hardhat-airsign 0.1.1 → 2.0.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 (201) hide show
  1. package/README.md +15 -10
  2. package/app-dist/assets/{add-CRSDwB2e.js → add-B1O0pD4h.js} +2 -2
  3. package/app-dist/assets/{add-CRSDwB2e.js.map → add-B1O0pD4h.js.map} +1 -1
  4. package/app-dist/assets/{all-wallets-DgqGjhs6.js → all-wallets-BcziYGZ_.js} +2 -2
  5. package/app-dist/assets/{all-wallets-DgqGjhs6.js.map → all-wallets-BcziYGZ_.js.map} +1 -1
  6. package/app-dist/assets/{app-store-BShzSz5b.js → app-store-DTZWqmmw.js} +2 -2
  7. package/app-dist/assets/{app-store-BShzSz5b.js.map → app-store-DTZWqmmw.js.map} +1 -1
  8. package/app-dist/assets/{apple-B_-sOHVN.js → apple-DnCGgNDe.js} +2 -2
  9. package/app-dist/assets/{apple-B_-sOHVN.js.map → apple-DnCGgNDe.js.map} +1 -1
  10. package/app-dist/assets/{arrow-bottom-DF5A1caW.js → arrow-bottom-DXZcPFiW.js} +2 -2
  11. package/app-dist/assets/{arrow-bottom-DF5A1caW.js.map → arrow-bottom-DXZcPFiW.js.map} +1 -1
  12. package/app-dist/assets/{arrow-bottom-circle-DIuZ8lC1.js → arrow-bottom-circle-1VxgUNV2.js} +2 -2
  13. package/app-dist/assets/{arrow-bottom-circle-DIuZ8lC1.js.map → arrow-bottom-circle-1VxgUNV2.js.map} +1 -1
  14. package/app-dist/assets/{arrow-left-CwTRYhiP.js → arrow-left-UpOOX78-.js} +2 -2
  15. package/app-dist/assets/{arrow-left-CwTRYhiP.js.map → arrow-left-UpOOX78-.js.map} +1 -1
  16. package/app-dist/assets/{arrow-right-CxBc1Z9Y.js → arrow-right-BgZSbrSb.js} +2 -2
  17. package/app-dist/assets/{arrow-right-CxBc1Z9Y.js.map → arrow-right-BgZSbrSb.js.map} +1 -1
  18. package/app-dist/assets/{arrow-top-DsqFntWs.js → arrow-top-CFitTuMQ.js} +2 -2
  19. package/app-dist/assets/{arrow-top-DsqFntWs.js.map → arrow-top-CFitTuMQ.js.map} +1 -1
  20. package/app-dist/assets/{bank-DaZBNytp.js → bank-Rx-cZHky.js} +2 -2
  21. package/app-dist/assets/{bank-DaZBNytp.js.map → bank-Rx-cZHky.js.map} +1 -1
  22. package/app-dist/assets/{basic-uYjQL5PS.js → basic-BqBpZO5u.js} +2 -2
  23. package/app-dist/assets/{basic-uYjQL5PS.js.map → basic-BqBpZO5u.js.map} +1 -1
  24. package/app-dist/assets/{browser-C1c_DZTT.js → browser-CxT64RYX.js} +2 -2
  25. package/app-dist/assets/{browser-C1c_DZTT.js.map → browser-CxT64RYX.js.map} +1 -1
  26. package/app-dist/assets/{card-Drom7Tv5.js → card-wzpea_VN.js} +2 -2
  27. package/app-dist/assets/{card-Drom7Tv5.js.map → card-wzpea_VN.js.map} +1 -1
  28. package/app-dist/assets/{ccip-DvVERuyo.js → ccip-8vMs6YOX.js} +2 -2
  29. package/app-dist/assets/{ccip-DvVERuyo.js.map → ccip-8vMs6YOX.js.map} +1 -1
  30. package/app-dist/assets/{checkmark-bWnoU59f.js → checkmark-5ZvdJ4cE.js} +2 -2
  31. package/app-dist/assets/{checkmark-bWnoU59f.js.map → checkmark-5ZvdJ4cE.js.map} +1 -1
  32. package/app-dist/assets/{checkmark-bold-xdhuFcVd.js → checkmark-bold-BYMoYpV3.js} +2 -2
  33. package/app-dist/assets/{checkmark-bold-xdhuFcVd.js.map → checkmark-bold-BYMoYpV3.js.map} +1 -1
  34. package/app-dist/assets/{chevron-bottom-g8RZtvvg.js → chevron-bottom-B6KoLsrA.js} +2 -2
  35. package/app-dist/assets/{chevron-bottom-g8RZtvvg.js.map → chevron-bottom-B6KoLsrA.js.map} +1 -1
  36. package/app-dist/assets/{chevron-left-CHq90J3p.js → chevron-left-UNWSh_Nj.js} +2 -2
  37. package/app-dist/assets/{chevron-left-CHq90J3p.js.map → chevron-left-UNWSh_Nj.js.map} +1 -1
  38. package/app-dist/assets/{chevron-right-DucMuosL.js → chevron-right-CLj5tStC.js} +2 -2
  39. package/app-dist/assets/{chevron-right-DucMuosL.js.map → chevron-right-CLj5tStC.js.map} +1 -1
  40. package/app-dist/assets/{chevron-top-jMvIimGH.js → chevron-top-DlIr11pX.js} +2 -2
  41. package/app-dist/assets/{chevron-top-jMvIimGH.js.map → chevron-top-DlIr11pX.js.map} +1 -1
  42. package/app-dist/assets/{chrome-store-DOAtVsxB.js → chrome-store-DSK4e2pT.js} +2 -2
  43. package/app-dist/assets/{chrome-store-DOAtVsxB.js.map → chrome-store-DSK4e2pT.js.map} +1 -1
  44. package/app-dist/assets/{clock-ByhfgiIa.js → clock-BFabU289.js} +2 -2
  45. package/app-dist/assets/{clock-ByhfgiIa.js.map → clock-BFabU289.js.map} +1 -1
  46. package/app-dist/assets/{close-kCTB-L29.js → close-BUfuggox.js} +2 -2
  47. package/app-dist/assets/{close-kCTB-L29.js.map → close-BUfuggox.js.map} +1 -1
  48. package/app-dist/assets/{coinPlaceholder-Nn0hvSA9.js → coinPlaceholder-DISCc80i.js} +2 -2
  49. package/app-dist/assets/{coinPlaceholder-Nn0hvSA9.js.map → coinPlaceholder-DISCc80i.js.map} +1 -1
  50. package/app-dist/assets/{compass-CbGNPMoI.js → compass-BoZDQj8C.js} +2 -2
  51. package/app-dist/assets/{compass-CbGNPMoI.js.map → compass-BoZDQj8C.js.map} +1 -1
  52. package/app-dist/assets/{copy-CAKeZlqs.js → copy-B7bketHz.js} +2 -2
  53. package/app-dist/assets/{copy-CAKeZlqs.js.map → copy-B7bketHz.js.map} +1 -1
  54. package/app-dist/assets/{core-BYSbgSRm.js → core-DPYRoLAn.js} +5 -5
  55. package/app-dist/assets/{core-BYSbgSRm.js.map → core-DPYRoLAn.js.map} +1 -1
  56. package/app-dist/assets/{cursor-Bt2rMzub.js → cursor-Dm0JxInY.js} +2 -2
  57. package/app-dist/assets/{cursor-Bt2rMzub.js.map → cursor-Dm0JxInY.js.map} +1 -1
  58. package/app-dist/assets/{cursor-transparent-B9I7l5HE.js → cursor-transparent-2ch9c1jg.js} +2 -2
  59. package/app-dist/assets/{cursor-transparent-B9I7l5HE.js.map → cursor-transparent-2ch9c1jg.js.map} +1 -1
  60. package/app-dist/assets/{desktop-Be_5H0x-.js → desktop-CIwtNj0u.js} +2 -2
  61. package/app-dist/assets/{desktop-Be_5H0x-.js.map → desktop-CIwtNj0u.js.map} +1 -1
  62. package/app-dist/assets/{disconnect-Dgoh7Tjm.js → disconnect-BOp-awMm.js} +2 -2
  63. package/app-dist/assets/{disconnect-Dgoh7Tjm.js.map → disconnect-BOp-awMm.js.map} +1 -1
  64. package/app-dist/assets/{discord-hBwKNnvZ.js → discord-BV0ggy08.js} +2 -2
  65. package/app-dist/assets/{discord-hBwKNnvZ.js.map → discord-BV0ggy08.js.map} +1 -1
  66. package/app-dist/assets/{etherscan-D0htYnpR.js → etherscan-t7Ki-QEK.js} +2 -2
  67. package/app-dist/assets/{etherscan-D0htYnpR.js.map → etherscan-t7Ki-QEK.js.map} +1 -1
  68. package/app-dist/assets/{events-pn7_SzwY.js → events-CavTDrjb.js} +2 -2
  69. package/app-dist/assets/{events-pn7_SzwY.js.map → events-CavTDrjb.js.map} +1 -1
  70. package/app-dist/assets/{exclamation-triangle-DOILyuF7.js → exclamation-triangle-Ccoe4UL9.js} +2 -2
  71. package/app-dist/assets/{exclamation-triangle-DOILyuF7.js.map → exclamation-triangle-Ccoe4UL9.js.map} +1 -1
  72. package/app-dist/assets/{extension-C9VDzCuK.js → extension-ChDmttRe.js} +2 -2
  73. package/app-dist/assets/{extension-C9VDzCuK.js.map → extension-ChDmttRe.js.map} +1 -1
  74. package/app-dist/assets/{external-link-CHYUmCEz.js → external-link-DubRbP6I.js} +2 -2
  75. package/app-dist/assets/{external-link-CHYUmCEz.js.map → external-link-DubRbP6I.js.map} +1 -1
  76. package/app-dist/assets/{facebook-Bsw-oFCw.js → facebook-CJcCYN5s.js} +2 -2
  77. package/app-dist/assets/{facebook-Bsw-oFCw.js.map → facebook-CJcCYN5s.js.map} +1 -1
  78. package/app-dist/assets/{farcaster-1gUIAUSw.js → farcaster-B4THrfxr.js} +2 -2
  79. package/app-dist/assets/{farcaster-1gUIAUSw.js.map → farcaster-B4THrfxr.js.map} +1 -1
  80. package/app-dist/assets/{filters-DDG3UMYY.js → filters-CuA9h5f-.js} +2 -2
  81. package/app-dist/assets/{filters-DDG3UMYY.js.map → filters-CuA9h5f-.js.map} +1 -1
  82. package/app-dist/assets/{github-CdtDuNaw.js → github-_wOQdqR_.js} +2 -2
  83. package/app-dist/assets/{github-CdtDuNaw.js.map → github-_wOQdqR_.js.map} +1 -1
  84. package/app-dist/assets/{google-BsG5fyrR.js → google-BETdiWIY.js} +2 -2
  85. package/app-dist/assets/{google-BsG5fyrR.js.map → google-BETdiWIY.js.map} +1 -1
  86. package/app-dist/assets/{help-circle-BCv1YqDB.js → help-circle-DGL5kFly.js} +2 -2
  87. package/app-dist/assets/{help-circle-BCv1YqDB.js.map → help-circle-DGL5kFly.js.map} +1 -1
  88. package/app-dist/assets/{id-CuxXJxny.js → id-BAmiPiG3.js} +2 -2
  89. package/app-dist/assets/{id-CuxXJxny.js.map → id-BAmiPiG3.js.map} +1 -1
  90. package/app-dist/assets/{image-B6FZSvkt.js → image-DBuiW2ya.js} +2 -2
  91. package/app-dist/assets/{image-B6FZSvkt.js.map → image-DBuiW2ya.js.map} +1 -1
  92. package/app-dist/assets/{index-BV0j_tJd.js → index-B7r6Bd0d.js} +2 -2
  93. package/app-dist/assets/{index-BV0j_tJd.js.map → index-B7r6Bd0d.js.map} +1 -1
  94. package/app-dist/assets/{index-CqsmC2RT.js → index-BgHayQna.js} +2 -2
  95. package/app-dist/assets/{index-CqsmC2RT.js.map → index-BgHayQna.js.map} +1 -1
  96. package/app-dist/assets/{index-COvL4P9m.js → index-BjRfNTdk.js} +2 -2
  97. package/app-dist/assets/{index-COvL4P9m.js.map → index-BjRfNTdk.js.map} +1 -1
  98. package/app-dist/assets/{index-Bu_XtD5E.css → index-C31w0EhJ.css} +1 -1
  99. package/app-dist/assets/index-D2ubWGvc.js +1753 -0
  100. package/app-dist/assets/index-D2ubWGvc.js.map +1 -0
  101. package/app-dist/assets/{index-DgGGl0Fe.js → index-DStAvMlI.js} +4 -4
  102. package/app-dist/assets/{index-DgGGl0Fe.js.map → index-DStAvMlI.js.map} +1 -1
  103. package/app-dist/assets/{index-DCjRGeb3.js → index-Dt_15Vcx.js} +2 -2
  104. package/app-dist/assets/{index-DCjRGeb3.js.map → index-Dt_15Vcx.js.map} +1 -1
  105. package/app-dist/assets/{index.es-DO7evs6Y.js → index.es-BaHcVq9H.js} +5 -5
  106. package/app-dist/assets/{index.es-DO7evs6Y.js.map → index.es-BaHcVq9H.js.map} +1 -1
  107. package/app-dist/assets/{info-Cywbxt_C.js → info-BGwX-8wC.js} +2 -2
  108. package/app-dist/assets/{info-Cywbxt_C.js.map → info-BGwX-8wC.js.map} +1 -1
  109. package/app-dist/assets/{info-circle-C86J6rkz.js → info-circle-BVE7L9LU.js} +2 -2
  110. package/app-dist/assets/{info-circle-C86J6rkz.js.map → info-circle-BVE7L9LU.js.map} +1 -1
  111. package/app-dist/assets/{lightbulb-CrZ_HglP.js → lightbulb-wyn0YT99.js} +2 -2
  112. package/app-dist/assets/{lightbulb-CrZ_HglP.js.map → lightbulb-wyn0YT99.js.map} +1 -1
  113. package/app-dist/assets/{mail-C3L0F8f-.js → mail-CqURWsZw.js} +2 -2
  114. package/app-dist/assets/{mail-C3L0F8f-.js.map → mail-CqURWsZw.js.map} +1 -1
  115. package/app-dist/assets/{metamask-sdk-CF6XpUqS.js → metamask-sdk-CCICWViI.js} +2 -2
  116. package/app-dist/assets/{metamask-sdk-CF6XpUqS.js.map → metamask-sdk-CCICWViI.js.map} +1 -1
  117. package/app-dist/assets/{mobile-D15vpxIp.js → mobile-DxekcR5S.js} +2 -2
  118. package/app-dist/assets/{mobile-D15vpxIp.js.map → mobile-DxekcR5S.js.map} +1 -1
  119. package/app-dist/assets/{more-B7ExUA9_.js → more-B2xjqArO.js} +2 -2
  120. package/app-dist/assets/{more-B7ExUA9_.js.map → more-B2xjqArO.js.map} +1 -1
  121. package/app-dist/assets/{network-placeholder-CcVy_R0p.js → network-placeholder-xy3H4Mg-.js} +2 -2
  122. package/app-dist/assets/{network-placeholder-CcVy_R0p.js.map → network-placeholder-xy3H4Mg-.js.map} +1 -1
  123. package/app-dist/assets/{nftPlaceholder-BACi0fly.js → nftPlaceholder-kGyQv4gE.js} +2 -2
  124. package/app-dist/assets/{nftPlaceholder-BACi0fly.js.map → nftPlaceholder-kGyQv4gE.js.map} +1 -1
  125. package/app-dist/assets/{off-Duwf9ts8.js → off-CSqaEbkD.js} +2 -2
  126. package/app-dist/assets/{off-Duwf9ts8.js.map → off-CSqaEbkD.js.map} +1 -1
  127. package/app-dist/assets/{play-store-4-EkI0KV.js → play-store-EIdU_7Z6.js} +2 -2
  128. package/app-dist/assets/{play-store-4-EkI0KV.js.map → play-store-EIdU_7Z6.js.map} +1 -1
  129. package/app-dist/assets/{plus-aeb5pwem.js → plus-CPg4pjRj.js} +2 -2
  130. package/app-dist/assets/{plus-aeb5pwem.js.map → plus-CPg4pjRj.js.map} +1 -1
  131. package/app-dist/assets/{qr-code-Cz7L38yy.js → qr-code-QAMIsYXK.js} +2 -2
  132. package/app-dist/assets/{qr-code-Cz7L38yy.js.map → qr-code-QAMIsYXK.js.map} +1 -1
  133. package/app-dist/assets/{recycle-horizontal-yjJpXq0U.js → recycle-horizontal-CV5Qhw2Q.js} +2 -2
  134. package/app-dist/assets/{recycle-horizontal-yjJpXq0U.js.map → recycle-horizontal-CV5Qhw2Q.js.map} +1 -1
  135. package/app-dist/assets/{refresh-fCA8pyDR.js → refresh-CJiM3xIB.js} +2 -2
  136. package/app-dist/assets/{refresh-fCA8pyDR.js.map → refresh-CJiM3xIB.js.map} +1 -1
  137. package/app-dist/assets/{reown-logo-YZnn6vkB.js → reown-logo-2D0oWXpD.js} +2 -2
  138. package/app-dist/assets/{reown-logo-YZnn6vkB.js.map → reown-logo-2D0oWXpD.js.map} +1 -1
  139. package/app-dist/assets/{search-BTh-Taun.js → search-DaHshq-U.js} +2 -2
  140. package/app-dist/assets/{search-BTh-Taun.js.map → search-DaHshq-U.js.map} +1 -1
  141. package/app-dist/assets/{secp256k1-DHeNy7w5.js → secp256k1-Od6Yo9wC.js} +2 -2
  142. package/app-dist/assets/{secp256k1-DHeNy7w5.js.map → secp256k1-Od6Yo9wC.js.map} +1 -1
  143. package/app-dist/assets/{secp256k1-BmolwVbs.js → secp256k1-RfsuBfnr.js} +2 -2
  144. package/app-dist/assets/{secp256k1-BmolwVbs.js.map → secp256k1-RfsuBfnr.js.map} +1 -1
  145. package/app-dist/assets/{send-n_iRWU2b.js → send-CYoNJcmR.js} +2 -2
  146. package/app-dist/assets/{send-n_iRWU2b.js.map → send-CYoNJcmR.js.map} +1 -1
  147. package/app-dist/assets/{swapHorizontal-BP6PC_Z_.js → swapHorizontal-CZlBSPys.js} +2 -2
  148. package/app-dist/assets/{swapHorizontal-BP6PC_Z_.js.map → swapHorizontal-CZlBSPys.js.map} +1 -1
  149. package/app-dist/assets/{swapHorizontalBold-CFegHLnf.js → swapHorizontalBold-CRZWDopS.js} +2 -2
  150. package/app-dist/assets/{swapHorizontalBold-CFegHLnf.js.map → swapHorizontalBold-CRZWDopS.js.map} +1 -1
  151. package/app-dist/assets/{swapHorizontalMedium-SMFfM3Zt.js → swapHorizontalMedium-CnvLAErw.js} +2 -2
  152. package/app-dist/assets/{swapHorizontalMedium-SMFfM3Zt.js.map → swapHorizontalMedium-CnvLAErw.js.map} +1 -1
  153. package/app-dist/assets/{swapHorizontalRoundedBold-BFRiRjq3.js → swapHorizontalRoundedBold-dSf21G7J.js} +2 -2
  154. package/app-dist/assets/{swapHorizontalRoundedBold-BFRiRjq3.js.map → swapHorizontalRoundedBold-dSf21G7J.js.map} +1 -1
  155. package/app-dist/assets/{swapVertical-DDYPFhjA.js → swapVertical-VhVxJU3T.js} +2 -2
  156. package/app-dist/assets/{swapVertical-DDYPFhjA.js.map → swapVertical-VhVxJU3T.js.map} +1 -1
  157. package/app-dist/assets/{telegram-CgxOCx9n.js → telegram-B-C9jpHB.js} +2 -2
  158. package/app-dist/assets/{telegram-CgxOCx9n.js.map → telegram-B-C9jpHB.js.map} +1 -1
  159. package/app-dist/assets/{three-dots-D1ACjz76.js → three-dots-FILuNYsd.js} +2 -2
  160. package/app-dist/assets/{three-dots-D1ACjz76.js.map → three-dots-FILuNYsd.js.map} +1 -1
  161. package/app-dist/assets/{twitch-B2cSw5Dv.js → twitch-DzwaF4Xb.js} +2 -2
  162. package/app-dist/assets/{twitch-B2cSw5Dv.js.map → twitch-DzwaF4Xb.js.map} +1 -1
  163. package/app-dist/assets/{twitterIcon-Y2aP57GN.js → twitterIcon-BlKnBtTW.js} +2 -2
  164. package/app-dist/assets/{twitterIcon-Y2aP57GN.js.map → twitterIcon-BlKnBtTW.js.map} +1 -1
  165. package/app-dist/assets/{verify-DLqSD1rk.js → verify-CmtNTJ_r.js} +2 -2
  166. package/app-dist/assets/{verify-DLqSD1rk.js.map → verify-CmtNTJ_r.js.map} +1 -1
  167. package/app-dist/assets/{verify-filled-M4ZQNUx-.js → verify-filled-DqUbrpnW.js} +2 -2
  168. package/app-dist/assets/{verify-filled-M4ZQNUx-.js.map → verify-filled-DqUbrpnW.js.map} +1 -1
  169. package/app-dist/assets/{w3m-modal-DO_pwuIZ.js → w3m-modal-CACYy1Ye.js} +2 -2
  170. package/app-dist/assets/{w3m-modal-DO_pwuIZ.js.map → w3m-modal-CACYy1Ye.js.map} +1 -1
  171. package/app-dist/assets/{wallet-BK-Vsgfk.js → wallet-DG-gDy5_.js} +2 -2
  172. package/app-dist/assets/{wallet-BK-Vsgfk.js.map → wallet-DG-gDy5_.js.map} +1 -1
  173. package/app-dist/assets/{wallet-placeholder-Dz0rtjLT.js → wallet-placeholder-C5F1lcuc.js} +2 -2
  174. package/app-dist/assets/{wallet-placeholder-Dz0rtjLT.js.map → wallet-placeholder-C5F1lcuc.js.map} +1 -1
  175. package/app-dist/assets/{walletconnect-EGqMGNfn.js → walletconnect-D9ToqDlh.js} +2 -2
  176. package/app-dist/assets/{walletconnect-EGqMGNfn.js.map → walletconnect-D9ToqDlh.js.map} +1 -1
  177. package/app-dist/assets/{warning-circle-BL_LsWzv.js → warning-circle-5kuvvJFh.js} +2 -2
  178. package/app-dist/assets/{warning-circle-BL_LsWzv.js.map → warning-circle-5kuvvJFh.js.map} +1 -1
  179. package/app-dist/assets/{x-Ck4eRtmA.js → x-B1dqvWvO.js} +2 -2
  180. package/app-dist/assets/{x-Ck4eRtmA.js.map → x-B1dqvWvO.js.map} +1 -1
  181. package/app-dist/index.html +2 -2
  182. package/dist/ContractService.d.ts +159 -0
  183. package/dist/ContractService.d.ts.map +1 -0
  184. package/dist/ContractService.js +530 -0
  185. package/dist/ContractService.js.map +1 -0
  186. package/dist/SigningServer.d.ts +6 -0
  187. package/dist/SigningServer.d.ts.map +1 -1
  188. package/dist/SigningServer.js +395 -0
  189. package/dist/SigningServer.js.map +1 -1
  190. package/dist/adapters/ethers-adapter.d.ts +34 -0
  191. package/dist/adapters/ethers-adapter.d.ts.map +1 -0
  192. package/dist/adapters/ethers-adapter.js +106 -0
  193. package/dist/adapters/ethers-adapter.js.map +1 -0
  194. package/dist/index.d.ts +2 -0
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +13 -3
  197. package/dist/index.js.map +1 -1
  198. package/dist/tasks/start.js +1 -1
  199. package/package.json +6 -3
  200. package/app-dist/assets/index-StZFkTrD.js +0 -1753
  201. package/app-dist/assets/index-StZFkTrD.js.map +0 -1
@@ -0,0 +1,1753 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B7r6Bd0d.js","assets/hooks.module-Dz_XB4AG.js","assets/index-nibyPLVP.js","assets/index-Dt_15Vcx.js","assets/events-CavTDrjb.js","assets/index-BjRfNTdk.js","assets/index-BgHayQna.js","assets/index.es-BaHcVq9H.js"])))=>i.map(i=>d[i]);
2
+ var cE=Object.defineProperty;var _1=e=>{throw TypeError(e)};var lE=(e,t,n)=>t in e?cE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Mr=(e,t,n)=>lE(e,typeof t!="symbol"?t+"":t,n),Ef=(e,t,n)=>t.has(e)||_1("Cannot "+n);var B=(e,t,n)=>(Ef(e,t,"read from private field"),n?n.call(e):t.get(e)),ne=(e,t,n)=>t.has(e)?_1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),G=(e,t,n,r)=>(Ef(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ae=(e,t,n)=>(Ef(e,t,"access private method"),n);var ml=(e,t,n,r)=>({set _(o){G(e,t,o,n)},get _(){return B(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var uE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function FU(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Iv={exports:{}},gd={},Bv={exports:{}},ue={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Wc=Symbol.for("react.element"),dE=Symbol.for("react.portal"),fE=Symbol.for("react.fragment"),hE=Symbol.for("react.strict_mode"),pE=Symbol.for("react.profiler"),mE=Symbol.for("react.provider"),gE=Symbol.for("react.context"),yE=Symbol.for("react.forward_ref"),wE=Symbol.for("react.suspense"),bE=Symbol.for("react.memo"),vE=Symbol.for("react.lazy"),I1=Symbol.iterator;function xE(e){return e===null||typeof e!="object"?null:(e=I1&&e[I1]||e["@@iterator"],typeof e=="function"?e:null)}var Nv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pv=Object.assign,Tv={};function Ui(e,t,n){this.props=e,this.context=t,this.refs=Tv,this.updater=n||Nv}Ui.prototype.isReactComponent={};Ui.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ui.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ov(){}Ov.prototype=Ui.prototype;function nm(e,t,n){this.props=e,this.context=t,this.refs=Tv,this.updater=n||Nv}var rm=nm.prototype=new Ov;rm.constructor=nm;Pv(rm,Ui.prototype);rm.isPureReactComponent=!0;var B1=Array.isArray,Rv=Object.prototype.hasOwnProperty,om={current:null},Mv={key:!0,ref:!0,__self:!0,__source:!0};function Lv(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Rv.call(t,r)&&!Mv.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var c=Array(a),l=0;l<a;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Wc,type:e,key:s,ref:i,props:o,_owner:om.current}}function CE(e,t){return{$$typeof:Wc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wc}function EE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var N1=/\/+/g;function Af(e,t){return typeof e=="object"&&e!==null&&e.key!=null?EE(""+e.key):t.toString(36)}function Jl(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Wc:case dE:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Af(i,0):r,B1(o)?(n="",e!=null&&(n=e.replace(N1,"$&/")+"/"),Jl(o,t,n,"",function(l){return l})):o!=null&&(sm(o)&&(o=CE(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(N1,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",B1(e))for(var a=0;a<e.length;a++){s=e[a];var c=r+Af(s,a);i+=Jl(s,t,n,c,o)}else if(c=xE(e),typeof c=="function")for(e=c.call(e),a=0;!(s=e.next()).done;)s=s.value,c=r+Af(s,a++),i+=Jl(s,t,n,c,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function gl(e,t,n){if(e==null)return e;var r=[],o=0;return Jl(e,r,"","",function(s){return t.call(n,s,o++)}),r}function AE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var It={current:null},Xl={transition:null},kE={ReactCurrentDispatcher:It,ReactCurrentBatchConfig:Xl,ReactCurrentOwner:om};function Fv(){throw Error("act(...) is not supported in production builds of React.")}ue.Children={map:gl,forEach:function(e,t,n){gl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gl(e,function(){t++}),t},toArray:function(e){return gl(e,function(t){return t})||[]},only:function(e){if(!sm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Component=Ui;ue.Fragment=fE;ue.Profiler=pE;ue.PureComponent=nm;ue.StrictMode=hE;ue.Suspense=wE;ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kE;ue.act=Fv;ue.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Pv({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=om.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)Rv.call(t,c)&&!Mv.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var l=0;l<c;l++)a[l]=arguments[l+2];r.children=a}return{$$typeof:Wc,type:e.type,key:o,ref:s,props:r,_owner:i}};ue.createContext=function(e){return e={$$typeof:gE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mE,_context:e},e.Consumer=e};ue.createElement=Lv;ue.createFactory=function(e){var t=Lv.bind(null,e);return t.type=e,t};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:yE,render:e}};ue.isValidElement=sm;ue.lazy=function(e){return{$$typeof:vE,_payload:{_status:-1,_result:e},_init:AE}};ue.memo=function(e,t){return{$$typeof:bE,type:e,compare:t===void 0?null:t}};ue.startTransition=function(e){var t=Xl.transition;Xl.transition={};try{e()}finally{Xl.transition=t}};ue.unstable_act=Fv;ue.useCallback=function(e,t){return It.current.useCallback(e,t)};ue.useContext=function(e){return It.current.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e){return It.current.useDeferredValue(e)};ue.useEffect=function(e,t){return It.current.useEffect(e,t)};ue.useId=function(){return It.current.useId()};ue.useImperativeHandle=function(e,t,n){return It.current.useImperativeHandle(e,t,n)};ue.useInsertionEffect=function(e,t){return It.current.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return It.current.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return It.current.useMemo(e,t)};ue.useReducer=function(e,t,n){return It.current.useReducer(e,t,n)};ue.useRef=function(e){return It.current.useRef(e)};ue.useState=function(e){return It.current.useState(e)};ue.useSyncExternalStore=function(e,t,n){return It.current.useSyncExternalStore(e,t,n)};ue.useTransition=function(){return It.current.useTransition()};ue.version="18.3.1";Bv.exports=ue;var j=Bv.exports;const C=_v(j);/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var SE=j,jE=Symbol.for("react.element"),_E=Symbol.for("react.fragment"),IE=Object.prototype.hasOwnProperty,BE=SE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NE={key:!0,ref:!0,__self:!0,__source:!0};function Dv(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)IE.call(t,r)&&!NE.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:jE,type:e,key:s,ref:i,props:o,_owner:BE.current}}gd.Fragment=_E;gd.jsx=Dv;gd.jsxs=Dv;Iv.exports=gd;var b=Iv.exports,Hh={},Uv={exports:{}},rn={},zv={exports:{}},$v={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */(function(e){function t(T,L){var D=T.length;T.push(L);e:for(;0<D;){var Q=D-1>>>1,te=T[Q];if(0<o(te,L))T[Q]=L,T[D]=te,D=Q;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],D=T.pop();if(D!==L){T[0]=D;e:for(var Q=0,te=T.length,se=te>>>1;Q<se;){var H=2*(Q+1)-1,X=T[H],re=H+1,ce=T[re];if(0>o(X,D))re<te&&0>o(ce,X)?(T[Q]=ce,T[re]=D,Q=re):(T[Q]=X,T[H]=D,Q=H);else if(re<te&&0>o(ce,D))T[Q]=ce,T[re]=D,Q=re;else break e}}return L}function o(T,L){var D=T.sortIndex-L.sortIndex;return D!==0?D:T.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(T){for(var L=n(l);L!==null;){if(L.callback===null)r(l);else if(L.startTime<=T)r(l),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(l)}}function x(T){if(m=!1,w(T),!p)if(n(c)!==null)p=!0,F(E);else{var L=n(l);L!==null&&$(x,L.startTime-T)}}function E(T,L){p=!1,m&&(m=!1,y(S),S=-1),h=!0;var D=d;try{for(w(L),f=n(c);f!==null&&(!(f.expirationTime>L)||T&&!O());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,d=f.priorityLevel;var te=Q(f.expirationTime<=L);L=e.unstable_now(),typeof te=="function"?f.callback=te:f===n(c)&&r(c),w(L)}else r(c);f=n(c)}if(f!==null)var se=!0;else{var H=n(l);H!==null&&$(x,H.startTime-L),se=!1}return se}finally{f=null,d=D,h=!1}}var A=!1,k=null,S=-1,_=5,N=-1;function O(){return!(e.unstable_now()-N<_)}function P(){if(k!==null){var T=e.unstable_now();N=T;var L=!0;try{L=k(!0,T)}finally{L?R():(A=!1,k=null)}}else A=!1}var R;if(typeof g=="function")R=function(){g(P)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,M=V.port2;V.port1.onmessage=P,R=function(){M.postMessage(null)}}else R=function(){v(P,0)};function F(T){k=T,A||(A=!0,R())}function $(T,L){S=v(function(){T(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,F(E))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var D=d;d=L;try{return T()}finally{d=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var D=d;d=T;try{return L()}finally{d=D}},e.unstable_scheduleCallback=function(T,L,D){var Q=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?Q+D:Q):D=Q,T){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=D+te,T={id:u++,callback:L,priorityLevel:T,startTime:D,expirationTime:te,sortIndex:-1},D>Q?(T.sortIndex=D,t(l,T),n(c)===null&&T===n(l)&&(m?(y(S),S=-1):m=!0,$(x,D-Q))):(T.sortIndex=te,t(c,T),p||h||(p=!0,F(E))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var L=d;return function(){var D=d;d=L;try{return T.apply(this,arguments)}finally{d=D}}}})($v);zv.exports=$v;var PE=zv.exports;/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var TE=j,en=PE;function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Wv=new Set,Wa={};function vs(e,t){xi(e,t),xi(e+"Capture",t)}function xi(e,t){for(Wa[e]=t,e=0;e<t.length;e++)Wv.add(t[e])}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qh=Object.prototype.hasOwnProperty,OE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,P1={},T1={};function RE(e){return Qh.call(T1,e)?!0:Qh.call(P1,e)?!1:OE.test(e)?T1[e]=!0:(P1[e]=!0,!1)}function ME(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LE(e,t,n,r){if(t===null||typeof t>"u"||ME(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bt(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var it={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){it[e]=new Bt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];it[t]=new Bt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){it[e]=new Bt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){it[e]=new Bt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){it[e]=new Bt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){it[e]=new Bt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){it[e]=new Bt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){it[e]=new Bt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){it[e]=new Bt(e,5,!1,e.toLowerCase(),null,!1,!1)});var im=/[\-:]([a-z])/g;function am(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(im,am);it[t]=new Bt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(im,am);it[t]=new Bt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(im,am);it[t]=new Bt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){it[e]=new Bt(e,1,!1,e.toLowerCase(),null,!1,!1)});it.xlinkHref=new Bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){it[e]=new Bt(e,1,!1,e.toLowerCase(),null,!0,!0)});function cm(e,t,n,r){var o=it.hasOwnProperty(t)?it[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LE(t,n,o,r)&&(n=null),r||o===null?RE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Nr=TE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yl=Symbol.for("react.element"),Ms=Symbol.for("react.portal"),Ls=Symbol.for("react.fragment"),lm=Symbol.for("react.strict_mode"),Gh=Symbol.for("react.profiler"),qv=Symbol.for("react.provider"),Vv=Symbol.for("react.context"),um=Symbol.for("react.forward_ref"),Kh=Symbol.for("react.suspense"),Yh=Symbol.for("react.suspense_list"),dm=Symbol.for("react.memo"),$r=Symbol.for("react.lazy"),Hv=Symbol.for("react.offscreen"),O1=Symbol.iterator;function ra(e){return e===null||typeof e!="object"?null:(e=O1&&e[O1]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,kf;function Aa(e){if(kf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);kf=t&&t[1]||""}return`
35
+ `+kf+e}var Sf=!1;function jf(e,t){if(!e||Sf)return"";Sf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
36
+ `),s=r.stack.split(`
37
+ `),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var c=`
38
+ `+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{Sf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Aa(e):""}function FE(e){switch(e.tag){case 5:return Aa(e.type);case 16:return Aa("Lazy");case 13:return Aa("Suspense");case 19:return Aa("SuspenseList");case 0:case 2:case 15:return e=jf(e.type,!1),e;case 11:return e=jf(e.type.render,!1),e;case 1:return e=jf(e.type,!0),e;default:return""}}function Jh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ls:return"Fragment";case Ms:return"Portal";case Gh:return"Profiler";case lm:return"StrictMode";case Kh:return"Suspense";case Yh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vv:return(e.displayName||"Context")+".Consumer";case qv:return(e._context.displayName||"Context")+".Provider";case um:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dm:return t=e.displayName||null,t!==null?t:Jh(e.type)||"Memo";case $r:t=e._payload,e=e._init;try{return Jh(e(t))}catch{}}return null}function DE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jh(t);case 8:return t===lm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function go(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UE(e){var t=Qv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wl(e){e._valueTracker||(e._valueTracker=UE(e))}function Gv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Eu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xh(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function R1(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=go(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Kv(e,t){t=t.checked,t!=null&&cm(e,"checked",t,!1)}function Zh(e,t){Kv(e,t);var n=go(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ep(e,t.type,n):t.hasOwnProperty("defaultValue")&&ep(e,t.type,go(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function M1(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ep(e,t,n){(t!=="number"||Eu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ka=Array.isArray;function Js(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+go(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function tp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function L1(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(ka(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:go(n)}}function Yv(e,t){var n=go(t.value),r=go(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function F1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Jv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function np(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bl,Xv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(bl=bl||document.createElement("div"),bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zE=["Webkit","ms","Moz","O"];Object.keys(Pa).forEach(function(e){zE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pa[t]=Pa[e]})});function Zv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pa.hasOwnProperty(e)&&Pa[e]?(""+t).trim():t+"px"}function e6(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $E=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rp(e,t){if(t){if($E[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function op(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sp=null;function fm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ip=null,Xs=null,Zs=null;function D1(e){if(e=Hc(e)){if(typeof ip!="function")throw Error(q(280));var t=e.stateNode;t&&(t=xd(t),ip(e.stateNode,e.type,t))}}function t6(e){Xs?Zs?Zs.push(e):Zs=[e]:Xs=e}function n6(){if(Xs){var e=Xs,t=Zs;if(Zs=Xs=null,D1(e),t)for(e=0;e<t.length;e++)D1(t[e])}}function r6(e,t){return e(t)}function o6(){}var _f=!1;function s6(e,t,n){if(_f)return e(t,n);_f=!0;try{return r6(e,t,n)}finally{_f=!1,(Xs!==null||Zs!==null)&&(o6(),n6())}}function Va(e,t){var n=e.stateNode;if(n===null)return null;var r=xd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var ap=!1;if(kr)try{var oa={};Object.defineProperty(oa,"passive",{get:function(){ap=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{ap=!1}function WE(e,t,n,r,o,s,i,a,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(u){this.onError(u)}}var Ta=!1,Au=null,ku=!1,cp=null,qE={onError:function(e){Ta=!0,Au=e}};function VE(e,t,n,r,o,s,i,a,c){Ta=!1,Au=null,WE.apply(qE,arguments)}function HE(e,t,n,r,o,s,i,a,c){if(VE.apply(this,arguments),Ta){if(Ta){var l=Au;Ta=!1,Au=null}else throw Error(q(198));ku||(ku=!0,cp=l)}}function xs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function i6(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function U1(e){if(xs(e)!==e)throw Error(q(188))}function QE(e){var t=e.alternate;if(!t){if(t=xs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return U1(o),e;if(s===r)return U1(o),t;s=s.sibling}throw Error(q(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function a6(e){return e=QE(e),e!==null?c6(e):null}function c6(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=c6(e);if(t!==null)return t;e=e.sibling}return null}var l6=en.unstable_scheduleCallback,z1=en.unstable_cancelCallback,GE=en.unstable_shouldYield,KE=en.unstable_requestPaint,Fe=en.unstable_now,YE=en.unstable_getCurrentPriorityLevel,hm=en.unstable_ImmediatePriority,u6=en.unstable_UserBlockingPriority,Su=en.unstable_NormalPriority,JE=en.unstable_LowPriority,d6=en.unstable_IdlePriority,yd=null,Kn=null;function XE(e){if(Kn&&typeof Kn.onCommitFiberRoot=="function")try{Kn.onCommitFiberRoot(yd,e,void 0,(e.current.flags&128)===128)}catch{}}var In=Math.clz32?Math.clz32:t4,ZE=Math.log,e4=Math.LN2;function t4(e){return e>>>=0,e===0?32:31-(ZE(e)/e4|0)|0}var vl=64,xl=4194304;function Sa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ju(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=Sa(a):(s&=i,s!==0&&(r=Sa(s)))}else i=n&~o,i!==0?r=Sa(i):s!==0&&(r=Sa(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-In(t),o=1<<n,r|=e[n],t&=~o;return r}function n4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function r4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-In(s),a=1<<i,c=o[i];c===-1?(!(a&n)||a&r)&&(o[i]=n4(a,t)):c<=t&&(e.expiredLanes|=a),s&=~a}}function lp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function f6(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function If(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-In(t),e[t]=n}function o4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-In(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function pm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-In(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ce=0;function h6(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var p6,mm,m6,g6,y6,up=!1,Cl=[],oo=null,so=null,io=null,Ha=new Map,Qa=new Map,qr=[],s4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function $1(e,t){switch(e){case"focusin":case"focusout":oo=null;break;case"dragenter":case"dragleave":so=null;break;case"mouseover":case"mouseout":io=null;break;case"pointerover":case"pointerout":Ha.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(t.pointerId)}}function sa(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Hc(t),t!==null&&mm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function i4(e,t,n,r,o){switch(t){case"focusin":return oo=sa(oo,e,t,n,r,o),!0;case"dragenter":return so=sa(so,e,t,n,r,o),!0;case"mouseover":return io=sa(io,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ha.set(s,sa(Ha.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Qa.set(s,sa(Qa.get(s)||null,e,t,n,r,o)),!0}return!1}function w6(e){var t=Lo(e.target);if(t!==null){var n=xs(t);if(n!==null){if(t=n.tag,t===13){if(t=i6(n),t!==null){e.blockedOn=t,y6(e.priority,function(){m6(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sp=r,n.target.dispatchEvent(r),sp=null}else return t=Hc(n),t!==null&&mm(t),e.blockedOn=n,!1;t.shift()}return!0}function W1(e,t,n){Zl(e)&&n.delete(t)}function a4(){up=!1,oo!==null&&Zl(oo)&&(oo=null),so!==null&&Zl(so)&&(so=null),io!==null&&Zl(io)&&(io=null),Ha.forEach(W1),Qa.forEach(W1)}function ia(e,t){e.blockedOn===t&&(e.blockedOn=null,up||(up=!0,en.unstable_scheduleCallback(en.unstable_NormalPriority,a4)))}function Ga(e){function t(o){return ia(o,e)}if(0<Cl.length){ia(Cl[0],e);for(var n=1;n<Cl.length;n++){var r=Cl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(oo!==null&&ia(oo,e),so!==null&&ia(so,e),io!==null&&ia(io,e),Ha.forEach(t),Qa.forEach(t),n=0;n<qr.length;n++)r=qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qr.length&&(n=qr[0],n.blockedOn===null);)w6(n),n.blockedOn===null&&qr.shift()}var ei=Nr.ReactCurrentBatchConfig,_u=!0;function c4(e,t,n,r){var o=Ce,s=ei.transition;ei.transition=null;try{Ce=1,gm(e,t,n,r)}finally{Ce=o,ei.transition=s}}function l4(e,t,n,r){var o=Ce,s=ei.transition;ei.transition=null;try{Ce=4,gm(e,t,n,r)}finally{Ce=o,ei.transition=s}}function gm(e,t,n,r){if(_u){var o=dp(e,t,n,r);if(o===null)Df(e,t,r,Iu,n),$1(e,r);else if(i4(o,e,t,n,r))r.stopPropagation();else if($1(e,r),t&4&&-1<s4.indexOf(e)){for(;o!==null;){var s=Hc(o);if(s!==null&&p6(s),s=dp(e,t,n,r),s===null&&Df(e,t,r,Iu,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Df(e,t,r,null,n)}}var Iu=null;function dp(e,t,n,r){if(Iu=null,e=fm(r),e=Lo(e),e!==null)if(t=xs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=i6(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Iu=e,null}function b6(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(YE()){case hm:return 1;case u6:return 4;case Su:case JE:return 16;case d6:return 536870912;default:return 16}default:return 16}}var no=null,ym=null,eu=null;function v6(){if(eu)return eu;var e,t=ym,n=t.length,r,o="value"in no?no.value:no.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return eu=o.slice(e,1<r?1-r:void 0)}function tu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function El(){return!0}function q1(){return!1}function on(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?El:q1,this.isPropagationStopped=q1,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=El)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),t}var zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wm=on(zi),Vc=Re({},zi,{view:0,detail:0}),u4=on(Vc),Bf,Nf,aa,wd=Re({},Vc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==aa&&(aa&&e.type==="mousemove"?(Bf=e.screenX-aa.screenX,Nf=e.screenY-aa.screenY):Nf=Bf=0,aa=e),Bf)},movementY:function(e){return"movementY"in e?e.movementY:Nf}}),V1=on(wd),d4=Re({},wd,{dataTransfer:0}),f4=on(d4),h4=Re({},Vc,{relatedTarget:0}),Pf=on(h4),p4=Re({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),m4=on(p4),g4=Re({},zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y4=on(g4),w4=Re({},zi,{data:0}),H1=on(w4),b4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},x4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=x4[e])?!!t[e]:!1}function bm(){return C4}var E4=Re({},Vc,{key:function(e){if(e.key){var t=b4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(e){return e.type==="keypress"?tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),A4=on(E4),k4=Re({},wd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Q1=on(k4),S4=Re({},Vc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),j4=on(S4),_4=Re({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),I4=on(_4),B4=Re({},wd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),N4=on(B4),P4=[9,13,27,32],vm=kr&&"CompositionEvent"in window,Oa=null;kr&&"documentMode"in document&&(Oa=document.documentMode);var T4=kr&&"TextEvent"in window&&!Oa,x6=kr&&(!vm||Oa&&8<Oa&&11>=Oa),G1=" ",K1=!1;function C6(e,t){switch(e){case"keyup":return P4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function E6(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fs=!1;function O4(e,t){switch(e){case"compositionend":return E6(t);case"keypress":return t.which!==32?null:(K1=!0,G1);case"textInput":return e=t.data,e===G1&&K1?null:e;default:return null}}function R4(e,t){if(Fs)return e==="compositionend"||!vm&&C6(e,t)?(e=v6(),eu=ym=no=null,Fs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return x6&&t.locale!=="ko"?null:t.data;default:return null}}var M4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Y1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!M4[e.type]:t==="textarea"}function A6(e,t,n,r){t6(r),t=Bu(t,"onChange"),0<t.length&&(n=new wm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ra=null,Ka=null;function L4(e){R6(e,0)}function bd(e){var t=zs(e);if(Gv(t))return e}function F4(e,t){if(e==="change")return t}var k6=!1;if(kr){var Tf;if(kr){var Of="oninput"in document;if(!Of){var J1=document.createElement("div");J1.setAttribute("oninput","return;"),Of=typeof J1.oninput=="function"}Tf=Of}else Tf=!1;k6=Tf&&(!document.documentMode||9<document.documentMode)}function X1(){Ra&&(Ra.detachEvent("onpropertychange",S6),Ka=Ra=null)}function S6(e){if(e.propertyName==="value"&&bd(Ka)){var t=[];A6(t,Ka,e,fm(e)),s6(L4,t)}}function D4(e,t,n){e==="focusin"?(X1(),Ra=t,Ka=n,Ra.attachEvent("onpropertychange",S6)):e==="focusout"&&X1()}function U4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bd(Ka)}function z4(e,t){if(e==="click")return bd(t)}function $4(e,t){if(e==="input"||e==="change")return bd(t)}function W4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nn=typeof Object.is=="function"?Object.is:W4;function Ya(e,t){if(Nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Qh.call(t,o)||!Nn(e[o],t[o]))return!1}return!0}function Z1(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ey(e,t){var n=Z1(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Z1(n)}}function j6(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?j6(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _6(){for(var e=window,t=Eu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Eu(e.document)}return t}function xm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function q4(e){var t=_6(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&j6(n.ownerDocument.documentElement,n)){if(r!==null&&xm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=ey(n,s);var i=ey(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var V4=kr&&"documentMode"in document&&11>=document.documentMode,Ds=null,fp=null,Ma=null,hp=!1;function ty(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hp||Ds==null||Ds!==Eu(r)||(r=Ds,"selectionStart"in r&&xm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ma&&Ya(Ma,r)||(Ma=r,r=Bu(fp,"onSelect"),0<r.length&&(t=new wm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ds)))}function Al(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Us={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionend:Al("Transition","TransitionEnd")},Rf={},I6={};kr&&(I6=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function vd(e){if(Rf[e])return Rf[e];if(!Us[e])return e;var t=Us[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in I6)return Rf[e]=t[n];return e}var B6=vd("animationend"),N6=vd("animationiteration"),P6=vd("animationstart"),T6=vd("transitionend"),O6=new Map,ny="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Eo(e,t){O6.set(e,t),vs(t,[e])}for(var Mf=0;Mf<ny.length;Mf++){var Lf=ny[Mf],H4=Lf.toLowerCase(),Q4=Lf[0].toUpperCase()+Lf.slice(1);Eo(H4,"on"+Q4)}Eo(B6,"onAnimationEnd");Eo(N6,"onAnimationIteration");Eo(P6,"onAnimationStart");Eo("dblclick","onDoubleClick");Eo("focusin","onFocus");Eo("focusout","onBlur");Eo(T6,"onTransitionEnd");xi("onMouseEnter",["mouseout","mouseover"]);xi("onMouseLeave",["mouseout","mouseover"]);xi("onPointerEnter",["pointerout","pointerover"]);xi("onPointerLeave",["pointerout","pointerover"]);vs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vs("onBeforeInput",["compositionend","keypress","textInput","paste"]);vs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ja="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),G4=new Set("cancel close invalid load scroll toggle".split(" ").concat(ja));function ry(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,HE(r,t,void 0,e),e.currentTarget=null}function R6(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==s&&o.isPropagationStopped())break e;ry(o,a,l),s=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,l=a.currentTarget,a=a.listener,c!==s&&o.isPropagationStopped())break e;ry(o,a,l),s=c}}}if(ku)throw e=cp,ku=!1,cp=null,e}function ke(e,t){var n=t[wp];n===void 0&&(n=t[wp]=new Set);var r=e+"__bubble";n.has(r)||(M6(t,e,2,!1),n.add(r))}function Ff(e,t,n){var r=0;t&&(r|=4),M6(n,e,r,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function Ja(e){if(!e[kl]){e[kl]=!0,Wv.forEach(function(n){n!=="selectionchange"&&(G4.has(n)||Ff(n,!1,e),Ff(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,Ff("selectionchange",!1,t))}}function M6(e,t,n,r){switch(b6(t)){case 1:var o=c4;break;case 4:o=l4;break;default:o=gm}n=o.bind(null,t,n,e),o=void 0,!ap||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Df(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Lo(a),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}a=a.parentNode}}r=r.return}s6(function(){var l=s,u=fm(n),f=[];e:{var d=O6.get(e);if(d!==void 0){var h=wm,p=e;switch(e){case"keypress":if(tu(n)===0)break e;case"keydown":case"keyup":h=A4;break;case"focusin":p="focus",h=Pf;break;case"focusout":p="blur",h=Pf;break;case"beforeblur":case"afterblur":h=Pf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=V1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=f4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=j4;break;case B6:case N6:case P6:h=m4;break;case T6:h=I4;break;case"scroll":h=u4;break;case"wheel":h=N4;break;case"copy":case"cut":case"paste":h=y4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Q1}var m=(t&4)!==0,v=!m&&e==="scroll",y=m?d!==null?d+"Capture":null:d;m=[];for(var g=l,w;g!==null;){w=g;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,y!==null&&(x=Va(g,y),x!=null&&m.push(Xa(g,x,w)))),v)break;g=g.return}0<m.length&&(d=new h(d,p,null,n,u),f.push({event:d,listeners:m}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==sp&&(p=n.relatedTarget||n.fromElement)&&(Lo(p)||p[Sr]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=l,p=p?Lo(p):null,p!==null&&(v=xs(p),p!==v||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=l),h!==p)){if(m=V1,x="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Q1,x="onPointerLeave",y="onPointerEnter",g="pointer"),v=h==null?d:zs(h),w=p==null?d:zs(p),d=new m(x,g+"leave",h,n,u),d.target=v,d.relatedTarget=w,x=null,Lo(u)===l&&(m=new m(y,g+"enter",p,n,u),m.target=w,m.relatedTarget=v,x=m),v=x,h&&p)t:{for(m=h,y=p,g=0,w=m;w;w=_s(w))g++;for(w=0,x=y;x;x=_s(x))w++;for(;0<g-w;)m=_s(m),g--;for(;0<w-g;)y=_s(y),w--;for(;g--;){if(m===y||y!==null&&m===y.alternate)break t;m=_s(m),y=_s(y)}m=null}else m=null;h!==null&&oy(f,d,h,m,!1),p!==null&&v!==null&&oy(f,v,p,m,!0)}}e:{if(d=l?zs(l):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var E=F4;else if(Y1(d))if(k6)E=$4;else{E=U4;var A=D4}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(E=z4);if(E&&(E=E(e,l))){A6(f,E,n,u);break e}A&&A(e,d,l),e==="focusout"&&(A=d._wrapperState)&&A.controlled&&d.type==="number"&&ep(d,"number",d.value)}switch(A=l?zs(l):window,e){case"focusin":(Y1(A)||A.contentEditable==="true")&&(Ds=A,fp=l,Ma=null);break;case"focusout":Ma=fp=Ds=null;break;case"mousedown":hp=!0;break;case"contextmenu":case"mouseup":case"dragend":hp=!1,ty(f,n,u);break;case"selectionchange":if(V4)break;case"keydown":case"keyup":ty(f,n,u)}var k;if(vm)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Fs?C6(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(x6&&n.locale!=="ko"&&(Fs||S!=="onCompositionStart"?S==="onCompositionEnd"&&Fs&&(k=v6()):(no=u,ym="value"in no?no.value:no.textContent,Fs=!0)),A=Bu(l,S),0<A.length&&(S=new H1(S,e,null,n,u),f.push({event:S,listeners:A}),k?S.data=k:(k=E6(n),k!==null&&(S.data=k)))),(k=T4?O4(e,n):R4(e,n))&&(l=Bu(l,"onBeforeInput"),0<l.length&&(u=new H1("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:l}),u.data=k))}R6(f,t)})}function Xa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Bu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Va(e,n),s!=null&&r.unshift(Xa(e,s,o)),s=Va(e,t),s!=null&&r.push(Xa(e,s,o))),e=e.return}return r}function _s(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oy(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,l=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&l!==null&&(a=l,o?(c=Va(n,s),c!=null&&i.unshift(Xa(n,c,a))):o||(c=Va(n,s),c!=null&&i.push(Xa(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var K4=/\r\n?/g,Y4=/\u0000|\uFFFD/g;function sy(e){return(typeof e=="string"?e:""+e).replace(K4,`
39
+ `).replace(Y4,"")}function Sl(e,t,n){if(t=sy(t),sy(e)!==t&&n)throw Error(q(425))}function Nu(){}var pp=null,mp=null;function gp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var yp=typeof setTimeout=="function"?setTimeout:void 0,J4=typeof clearTimeout=="function"?clearTimeout:void 0,iy=typeof Promise=="function"?Promise:void 0,X4=typeof queueMicrotask=="function"?queueMicrotask:typeof iy<"u"?function(e){return iy.resolve(null).then(e).catch(Z4)}:yp;function Z4(e){setTimeout(function(){throw e})}function Uf(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ga(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ga(t)}function ao(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ay(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var $i=Math.random().toString(36).slice(2),Qn="__reactFiber$"+$i,Za="__reactProps$"+$i,Sr="__reactContainer$"+$i,wp="__reactEvents$"+$i,eA="__reactListeners$"+$i,tA="__reactHandles$"+$i;function Lo(e){var t=e[Qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sr]||n[Qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ay(e);e!==null;){if(n=e[Qn])return n;e=ay(e)}return t}e=n,n=e.parentNode}return null}function Hc(e){return e=e[Qn]||e[Sr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function xd(e){return e[Za]||null}var bp=[],$s=-1;function Ao(e){return{current:e}}function Se(e){0>$s||(e.current=bp[$s],bp[$s]=null,$s--)}function Ae(e,t){$s++,bp[$s]=e.current,e.current=t}var yo={},pt=Ao(yo),Ft=Ao(!1),os=yo;function Ci(e,t){var n=e.type.contextTypes;if(!n)return yo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Dt(e){return e=e.childContextTypes,e!=null}function Pu(){Se(Ft),Se(pt)}function cy(e,t,n){if(pt.current!==yo)throw Error(q(168));Ae(pt,t),Ae(Ft,n)}function L6(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(q(108,DE(e)||"Unknown",o));return Re({},n,r)}function Tu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yo,os=pt.current,Ae(pt,e),Ae(Ft,Ft.current),!0}function ly(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=L6(e,t,os),r.__reactInternalMemoizedMergedChildContext=e,Se(Ft),Se(pt),Ae(pt,e)):Se(Ft),Ae(Ft,n)}var dr=null,Cd=!1,zf=!1;function F6(e){dr===null?dr=[e]:dr.push(e)}function nA(e){Cd=!0,F6(e)}function ko(){if(!zf&&dr!==null){zf=!0;var e=0,t=Ce;try{var n=dr;for(Ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}dr=null,Cd=!1}catch(o){throw dr!==null&&(dr=dr.slice(e+1)),l6(hm,ko),o}finally{Ce=t,zf=!1}}return null}var Ws=[],qs=0,Ou=null,Ru=0,un=[],dn=0,ss=null,wr=1,br="";function Oo(e,t){Ws[qs++]=Ru,Ws[qs++]=Ou,Ou=e,Ru=t}function D6(e,t,n){un[dn++]=wr,un[dn++]=br,un[dn++]=ss,ss=e;var r=wr;e=br;var o=32-In(r)-1;r&=~(1<<o),n+=1;var s=32-In(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,wr=1<<32-In(t)+o|n<<o|r,br=s+e}else wr=1<<s|n<<o|r,br=e}function Cm(e){e.return!==null&&(Oo(e,1),D6(e,1,0))}function Em(e){for(;e===Ou;)Ou=Ws[--qs],Ws[qs]=null,Ru=Ws[--qs],Ws[qs]=null;for(;e===ss;)ss=un[--dn],un[dn]=null,br=un[--dn],un[dn]=null,wr=un[--dn],un[dn]=null}var Zt=null,Xt=null,Be=!1,jn=null;function U6(e,t){var n=pn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function uy(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Zt=e,Xt=ao(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Zt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ss!==null?{id:wr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=pn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Zt=e,Xt=null,!0):!1;default:return!1}}function vp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xp(e){if(Be){var t=Xt;if(t){var n=t;if(!uy(e,t)){if(vp(e))throw Error(q(418));t=ao(n.nextSibling);var r=Zt;t&&uy(e,t)?U6(r,n):(e.flags=e.flags&-4097|2,Be=!1,Zt=e)}}else{if(vp(e))throw Error(q(418));e.flags=e.flags&-4097|2,Be=!1,Zt=e}}}function dy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Zt=e}function jl(e){if(e!==Zt)return!1;if(!Be)return dy(e),Be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!gp(e.type,e.memoizedProps)),t&&(t=Xt)){if(vp(e))throw z6(),Error(q(418));for(;t;)U6(e,t),t=ao(t.nextSibling)}if(dy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xt=ao(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xt=null}}else Xt=Zt?ao(e.stateNode.nextSibling):null;return!0}function z6(){for(var e=Xt;e;)e=ao(e.nextSibling)}function Ei(){Xt=Zt=null,Be=!1}function Am(e){jn===null?jn=[e]:jn.push(e)}var rA=Nr.ReactCurrentBatchConfig;function ca(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(q(309));var r=n.stateNode}if(!r)throw Error(q(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,e))}return e}function _l(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fy(e){var t=e._init;return t(e._payload)}function $6(e){function t(y,g){if(e){var w=y.deletions;w===null?(y.deletions=[g],y.flags|=16):w.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function o(y,g){return y=fo(y,g),y.index=0,y.sibling=null,y}function s(y,g,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<g?(y.flags|=2,g):w):(y.flags|=2,g)):(y.flags|=1048576,g)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,g,w,x){return g===null||g.tag!==6?(g=Gf(w,y.mode,x),g.return=y,g):(g=o(g,w),g.return=y,g)}function c(y,g,w,x){var E=w.type;return E===Ls?u(y,g,w.props.children,x,w.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$r&&fy(E)===g.type)?(x=o(g,w.props),x.ref=ca(y,g,w),x.return=y,x):(x=cu(w.type,w.key,w.props,null,y.mode,x),x.ref=ca(y,g,w),x.return=y,x)}function l(y,g,w,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=Kf(w,y.mode,x),g.return=y,g):(g=o(g,w.children||[]),g.return=y,g)}function u(y,g,w,x,E){return g===null||g.tag!==7?(g=es(w,y.mode,x,E),g.return=y,g):(g=o(g,w),g.return=y,g)}function f(y,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Gf(""+g,y.mode,w),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case yl:return w=cu(g.type,g.key,g.props,null,y.mode,w),w.ref=ca(y,null,g),w.return=y,w;case Ms:return g=Kf(g,y.mode,w),g.return=y,g;case $r:var x=g._init;return f(y,x(g._payload),w)}if(ka(g)||ra(g))return g=es(g,y.mode,w,null),g.return=y,g;_l(y,g)}return null}function d(y,g,w,x){var E=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(y,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case yl:return w.key===E?c(y,g,w,x):null;case Ms:return w.key===E?l(y,g,w,x):null;case $r:return E=w._init,d(y,g,E(w._payload),x)}if(ka(w)||ra(w))return E!==null?null:u(y,g,w,x,null);_l(y,w)}return null}function h(y,g,w,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return y=y.get(w)||null,a(g,y,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case yl:return y=y.get(x.key===null?w:x.key)||null,c(g,y,x,E);case Ms:return y=y.get(x.key===null?w:x.key)||null,l(g,y,x,E);case $r:var A=x._init;return h(y,g,w,A(x._payload),E)}if(ka(x)||ra(x))return y=y.get(w)||null,u(g,y,x,E,null);_l(g,x)}return null}function p(y,g,w,x){for(var E=null,A=null,k=g,S=g=0,_=null;k!==null&&S<w.length;S++){k.index>S?(_=k,k=null):_=k.sibling;var N=d(y,k,w[S],x);if(N===null){k===null&&(k=_);break}e&&k&&N.alternate===null&&t(y,k),g=s(N,g,S),A===null?E=N:A.sibling=N,A=N,k=_}if(S===w.length)return n(y,k),Be&&Oo(y,S),E;if(k===null){for(;S<w.length;S++)k=f(y,w[S],x),k!==null&&(g=s(k,g,S),A===null?E=k:A.sibling=k,A=k);return Be&&Oo(y,S),E}for(k=r(y,k);S<w.length;S++)_=h(k,y,S,w[S],x),_!==null&&(e&&_.alternate!==null&&k.delete(_.key===null?S:_.key),g=s(_,g,S),A===null?E=_:A.sibling=_,A=_);return e&&k.forEach(function(O){return t(y,O)}),Be&&Oo(y,S),E}function m(y,g,w,x){var E=ra(w);if(typeof E!="function")throw Error(q(150));if(w=E.call(w),w==null)throw Error(q(151));for(var A=E=null,k=g,S=g=0,_=null,N=w.next();k!==null&&!N.done;S++,N=w.next()){k.index>S?(_=k,k=null):_=k.sibling;var O=d(y,k,N.value,x);if(O===null){k===null&&(k=_);break}e&&k&&O.alternate===null&&t(y,k),g=s(O,g,S),A===null?E=O:A.sibling=O,A=O,k=_}if(N.done)return n(y,k),Be&&Oo(y,S),E;if(k===null){for(;!N.done;S++,N=w.next())N=f(y,N.value,x),N!==null&&(g=s(N,g,S),A===null?E=N:A.sibling=N,A=N);return Be&&Oo(y,S),E}for(k=r(y,k);!N.done;S++,N=w.next())N=h(k,y,S,N.value,x),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?S:N.key),g=s(N,g,S),A===null?E=N:A.sibling=N,A=N);return e&&k.forEach(function(P){return t(y,P)}),Be&&Oo(y,S),E}function v(y,g,w,x){if(typeof w=="object"&&w!==null&&w.type===Ls&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case yl:e:{for(var E=w.key,A=g;A!==null;){if(A.key===E){if(E=w.type,E===Ls){if(A.tag===7){n(y,A.sibling),g=o(A,w.props.children),g.return=y,y=g;break e}}else if(A.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$r&&fy(E)===A.type){n(y,A.sibling),g=o(A,w.props),g.ref=ca(y,A,w),g.return=y,y=g;break e}n(y,A);break}else t(y,A);A=A.sibling}w.type===Ls?(g=es(w.props.children,y.mode,x,w.key),g.return=y,y=g):(x=cu(w.type,w.key,w.props,null,y.mode,x),x.ref=ca(y,g,w),x.return=y,y=x)}return i(y);case Ms:e:{for(A=w.key;g!==null;){if(g.key===A)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(y,g.sibling),g=o(g,w.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=Kf(w,y.mode,x),g.return=y,y=g}return i(y);case $r:return A=w._init,v(y,g,A(w._payload),x)}if(ka(w))return p(y,g,w,x);if(ra(w))return m(y,g,w,x);_l(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(y,g.sibling),g=o(g,w),g.return=y,y=g):(n(y,g),g=Gf(w,y.mode,x),g.return=y,y=g),i(y)):n(y,g)}return v}var Ai=$6(!0),W6=$6(!1),Mu=Ao(null),Lu=null,Vs=null,km=null;function Sm(){km=Vs=Lu=null}function jm(e){var t=Mu.current;Se(Mu),e._currentValue=t}function Cp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ti(e,t){Lu=e,km=Vs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function gn(e){var t=e._currentValue;if(km!==e)if(e={context:e,memoizedValue:t,next:null},Vs===null){if(Lu===null)throw Error(q(308));Vs=e,Lu.dependencies={lanes:0,firstContext:e}}else Vs=Vs.next=e;return t}var Fo=null;function _m(e){Fo===null?Fo=[e]:Fo.push(e)}function q6(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,_m(t)):(n.next=o.next,o.next=n),t.interleaved=n,jr(e,r)}function jr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Wr=!1;function Im(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function V6(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,jr(e,n)}return o=r.interleaved,o===null?(t.next=t,_m(r)):(t.next=o.next,o.next=t),r.interleaved=t,jr(e,n)}function nu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pm(e,n)}}function hy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fu(e,t,n,r){var o=e.updateQueue;Wr=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var c=a,l=c.next;c.next=null,i===null?s=l:i.next=l,i=c;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(s!==null){var f=o.baseState;i=0,u=l=c=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=Re({},f,d);break e;case 2:Wr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,i|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(u===null&&(c=f),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);as|=i,e.lanes=i,e.memoizedState=f}}function py(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(q(191,o));o.call(r)}}}var Qc={},Yn=Ao(Qc),ec=Ao(Qc),tc=Ao(Qc);function Do(e){if(e===Qc)throw Error(q(174));return e}function Bm(e,t){switch(Ae(tc,t),Ae(ec,e),Ae(Yn,Qc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:np(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=np(t,e)}Se(Yn),Ae(Yn,t)}function ki(){Se(Yn),Se(ec),Se(tc)}function H6(e){Do(tc.current);var t=Do(Yn.current),n=np(t,e.type);t!==n&&(Ae(ec,e),Ae(Yn,n))}function Nm(e){ec.current===e&&(Se(Yn),Se(ec))}var Pe=Ao(0);function Du(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $f=[];function Pm(){for(var e=0;e<$f.length;e++)$f[e]._workInProgressVersionPrimary=null;$f.length=0}var ru=Nr.ReactCurrentDispatcher,Wf=Nr.ReactCurrentBatchConfig,is=0,Oe=null,Ve=null,Xe=null,Uu=!1,La=!1,nc=0,oA=0;function lt(){throw Error(q(321))}function Tm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nn(e[n],t[n]))return!1;return!0}function Om(e,t,n,r,o,s){if(is=s,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ru.current=e===null||e.memoizedState===null?cA:lA,e=n(r,o),La){s=0;do{if(La=!1,nc=0,25<=s)throw Error(q(301));s+=1,Xe=Ve=null,t.updateQueue=null,ru.current=uA,e=n(r,o)}while(La)}if(ru.current=zu,t=Ve!==null&&Ve.next!==null,is=0,Xe=Ve=Oe=null,Uu=!1,t)throw Error(q(300));return e}function Rm(){var e=nc!==0;return nc=0,e}function $n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Oe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function yn(){if(Ve===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=Xe===null?Oe.memoizedState:Xe.next;if(t!==null)Xe=t,Ve=e;else{if(e===null)throw Error(q(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Xe===null?Oe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function rc(e,t){return typeof t=="function"?t(e):t}function qf(e){var t=yn(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=Ve,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,c=null,l=s;do{var u=l.lane;if((is&u)===u)c!==null&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var f={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};c===null?(a=c=f,i=r):c=c.next=f,Oe.lanes|=u,as|=u}l=l.next}while(l!==null&&l!==s);c===null?i=r:c.next=a,Nn(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Oe.lanes|=s,as|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vf(e){var t=yn(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Nn(s,t.memoizedState)||(Mt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Q6(){}function G6(e,t){var n=Oe,r=yn(),o=t(),s=!Nn(r.memoizedState,o);if(s&&(r.memoizedState=o,Mt=!0),r=r.queue,Mm(J6.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,oc(9,Y6.bind(null,n,r,o,t),void 0,null),et===null)throw Error(q(349));is&30||K6(n,t,o)}return o}function K6(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Y6(e,t,n,r){t.value=n,t.getSnapshot=r,X6(t)&&Z6(e)}function J6(e,t,n){return n(function(){X6(t)&&Z6(e)})}function X6(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nn(e,n)}catch{return!0}}function Z6(e){var t=jr(e,1);t!==null&&Bn(t,e,1,-1)}function my(e){var t=$n();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rc,lastRenderedState:e},t.queue=e,e=e.dispatch=aA.bind(null,Oe,e),[t.memoizedState,e]}function oc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ex(){return yn().memoizedState}function ou(e,t,n,r){var o=$n();Oe.flags|=e,o.memoizedState=oc(1|t,n,void 0,r===void 0?null:r)}function Ed(e,t,n,r){var o=yn();r=r===void 0?null:r;var s=void 0;if(Ve!==null){var i=Ve.memoizedState;if(s=i.destroy,r!==null&&Tm(r,i.deps)){o.memoizedState=oc(t,n,s,r);return}}Oe.flags|=e,o.memoizedState=oc(1|t,n,s,r)}function gy(e,t){return ou(8390656,8,e,t)}function Mm(e,t){return Ed(2048,8,e,t)}function tx(e,t){return Ed(4,2,e,t)}function nx(e,t){return Ed(4,4,e,t)}function rx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ox(e,t,n){return n=n!=null?n.concat([e]):null,Ed(4,4,rx.bind(null,t,e),n)}function Lm(){}function sx(e,t){var n=yn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ix(e,t){var n=yn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ax(e,t,n){return is&21?(Nn(n,t)||(n=f6(),Oe.lanes|=n,as|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Mt=!0),e.memoizedState=n)}function sA(e,t){var n=Ce;Ce=n!==0&&4>n?n:4,e(!0);var r=Wf.transition;Wf.transition={};try{e(!1),t()}finally{Ce=n,Wf.transition=r}}function cx(){return yn().memoizedState}function iA(e,t,n){var r=uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lx(e))ux(t,n);else if(n=q6(e,t,n,r),n!==null){var o=At();Bn(n,e,r,o),dx(n,t,r)}}function aA(e,t,n){var r=uo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lx(e))ux(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Nn(a,i)){var c=t.interleaved;c===null?(o.next=o,_m(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=q6(e,t,o,r),n!==null&&(o=At(),Bn(n,e,r,o),dx(n,t,r))}}function lx(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function ux(e,t){La=Uu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pm(e,n)}}var zu={readContext:gn,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useInsertionEffect:lt,useLayoutEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useMutableSource:lt,useSyncExternalStore:lt,useId:lt,unstable_isNewReconciler:!1},cA={readContext:gn,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:gn,useEffect:gy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ou(4194308,4,rx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ou(4194308,4,e,t)},useInsertionEffect:function(e,t){return ou(4,2,e,t)},useMemo:function(e,t){var n=$n();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$n();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iA.bind(null,Oe,e),[r.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:my,useDebugValue:Lm,useDeferredValue:function(e){return $n().memoizedState=e},useTransition:function(){var e=my(!1),t=e[0];return e=sA.bind(null,e[1]),$n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Oe,o=$n();if(Be){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),et===null)throw Error(q(349));is&30||K6(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,gy(J6.bind(null,r,s,e),[e]),r.flags|=2048,oc(9,Y6.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=$n(),t=et.identifierPrefix;if(Be){var n=br,r=wr;n=(r&~(1<<32-In(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=nc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=oA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lA={readContext:gn,useCallback:sx,useContext:gn,useEffect:Mm,useImperativeHandle:ox,useInsertionEffect:tx,useLayoutEffect:nx,useMemo:ix,useReducer:qf,useRef:ex,useState:function(){return qf(rc)},useDebugValue:Lm,useDeferredValue:function(e){var t=yn();return ax(t,Ve.memoizedState,e)},useTransition:function(){var e=qf(rc)[0],t=yn().memoizedState;return[e,t]},useMutableSource:Q6,useSyncExternalStore:G6,useId:cx,unstable_isNewReconciler:!1},uA={readContext:gn,useCallback:sx,useContext:gn,useEffect:Mm,useImperativeHandle:ox,useInsertionEffect:tx,useLayoutEffect:nx,useMemo:ix,useReducer:Vf,useRef:ex,useState:function(){return Vf(rc)},useDebugValue:Lm,useDeferredValue:function(e){var t=yn();return Ve===null?t.memoizedState=e:ax(t,Ve.memoizedState,e)},useTransition:function(){var e=Vf(rc)[0],t=yn().memoizedState;return[e,t]},useMutableSource:Q6,useSyncExternalStore:G6,useId:cx,unstable_isNewReconciler:!1};function En(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ep(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ad={isMounted:function(e){return(e=e._reactInternals)?xs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=At(),o=uo(e),s=vr(r,o);s.payload=t,n!=null&&(s.callback=n),t=co(e,s,o),t!==null&&(Bn(t,e,o,r),nu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=At(),o=uo(e),s=vr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=co(e,s,o),t!==null&&(Bn(t,e,o,r),nu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=At(),r=uo(e),o=vr(n,r);o.tag=2,t!=null&&(o.callback=t),t=co(e,o,r),t!==null&&(Bn(t,e,r,n),nu(t,e,r))}};function yy(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Ya(n,r)||!Ya(o,s):!0}function fx(e,t,n){var r=!1,o=yo,s=t.contextType;return typeof s=="object"&&s!==null?s=gn(s):(o=Dt(t)?os:pt.current,r=t.contextTypes,s=(r=r!=null)?Ci(e,o):yo),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ad,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function wy(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ad.enqueueReplaceState(t,t.state,null)}function Ap(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Im(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=gn(s):(s=Dt(t)?os:pt.current,o.context=Ci(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ep(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ad.enqueueReplaceState(o,o.state,null),Fu(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Si(e,t){try{var n="",r=t;do n+=FE(r),r=r.return;while(r);var o=n}catch(s){o=`
40
+ Error generating stack: `+s.message+`
41
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function Hf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function kp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var dA=typeof WeakMap=="function"?WeakMap:Map;function hx(e,t,n){n=vr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wu||(Wu=!0,Rp=r),kp(e,t)},n}function px(e,t,n){n=vr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){kp(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){kp(e,t),typeof r!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function by(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dA;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=kA.bind(null,e,t,n),t.then(e,e))}function vy(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xy(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=vr(-1,1),t.tag=2,co(n,t,1))),n.lanes|=1),e)}var fA=Nr.ReactCurrentOwner,Mt=!1;function xt(e,t,n,r){t.child=e===null?W6(t,null,n,r):Ai(t,e.child,n,r)}function Cy(e,t,n,r,o){n=n.render;var s=t.ref;return ti(t,o),r=Om(e,t,n,r,s,o),n=Rm(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_r(e,t,o)):(Be&&n&&Cm(t),t.flags|=1,xt(e,t,r,o),t.child)}function Ey(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Vm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mx(e,t,s,r,o)):(e=cu(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ya,n(i,r)&&e.ref===t.ref)return _r(e,t,o)}return t.flags|=1,e=fo(s,r),e.ref=t.ref,e.return=t,t.child=e}function mx(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ya(s,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(Mt=!0);else return t.lanes=e.lanes,_r(e,t,o)}return Sp(e,t,n,r,o)}function gx(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(Qs,Gt),Gt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ae(Qs,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ae(Qs,Gt),Gt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ae(Qs,Gt),Gt|=r;return xt(e,t,o,n),t.child}function yx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Sp(e,t,n,r,o){var s=Dt(n)?os:pt.current;return s=Ci(t,s),ti(t,o),n=Om(e,t,n,r,s,o),r=Rm(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_r(e,t,o)):(Be&&r&&Cm(t),t.flags|=1,xt(e,t,n,o),t.child)}function Ay(e,t,n,r,o){if(Dt(n)){var s=!0;Tu(t)}else s=!1;if(ti(t,o),t.stateNode===null)su(e,t),fx(t,n,r),Ap(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,l=n.contextType;typeof l=="object"&&l!==null?l=gn(l):(l=Dt(n)?os:pt.current,l=Ci(t,l));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==l)&&wy(t,i,r,l),Wr=!1;var d=t.memoizedState;i.state=d,Fu(t,r,i,o),c=t.memoizedState,a!==r||d!==c||Ft.current||Wr?(typeof u=="function"&&(Ep(t,n,u,r),c=t.memoizedState),(a=Wr||yy(t,n,a,r,d,c,l))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=l,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,V6(e,t),a=t.memoizedProps,l=t.type===t.elementType?a:En(t.type,a),i.props=l,f=t.pendingProps,d=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=gn(c):(c=Dt(n)?os:pt.current,c=Ci(t,c));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||d!==c)&&wy(t,i,r,c),Wr=!1,d=t.memoizedState,i.state=d,Fu(t,r,i,o);var p=t.memoizedState;a!==f||d!==p||Ft.current||Wr?(typeof h=="function"&&(Ep(t,n,h,r),p=t.memoizedState),(l=Wr||yy(t,n,l,r,d,p,c)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=c,r=l):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return jp(e,t,n,r,s,o)}function jp(e,t,n,r,o,s){yx(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ly(t,n,!1),_r(e,t,s);r=t.stateNode,fA.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Ai(t,e.child,null,s),t.child=Ai(t,null,a,s)):xt(e,t,a,s),t.memoizedState=r.state,o&&ly(t,n,!0),t.child}function wx(e){var t=e.stateNode;t.pendingContext?cy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cy(e,t.context,!1),Bm(e,t.containerInfo)}function ky(e,t,n,r,o){return Ei(),Am(o),t.flags|=256,xt(e,t,n,r),t.child}var _p={dehydrated:null,treeContext:null,retryLane:0};function Ip(e){return{baseLanes:e,cachePool:null,transitions:null}}function bx(e,t,n){var r=t.pendingProps,o=Pe.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ae(Pe,o&1),e===null)return xp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=jd(i,r,0,null),e=es(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ip(n),t.memoizedState=_p,e):Fm(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return hA(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=fo(o,c),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=fo(a,s):(s=es(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Ip(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=_p,r}return s=e.child,e=s.sibling,r=fo(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fm(e,t){return t=jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Il(e,t,n,r){return r!==null&&Am(r),Ai(t,e.child,null,n),e=Fm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hA(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Hf(Error(q(422))),Il(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=jd({mode:"visible",children:r.children},o,0,null),s=es(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ai(t,e.child,null,i),t.child.memoizedState=Ip(i),t.memoizedState=_p,s);if(!(t.mode&1))return Il(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(q(419)),r=Hf(s,r,void 0),Il(e,t,i,r)}if(a=(i&e.childLanes)!==0,Mt||a){if(r=et,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,jr(e,o),Bn(r,e,o,-1))}return qm(),r=Hf(Error(q(421))),Il(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=SA.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,Xt=ao(o.nextSibling),Zt=t,Be=!0,jn=null,e!==null&&(un[dn++]=wr,un[dn++]=br,un[dn++]=ss,wr=e.id,br=e.overflow,ss=t),t=Fm(t,r.children),t.flags|=4096,t)}function Sy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Cp(e.return,t,n)}function Qf(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function vx(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(xt(e,t,r.children,n),r=Pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sy(e,n,t);else if(e.tag===19)Sy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ae(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Du(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Qf(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Du(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Qf(t,!0,n,null,s);break;case"together":Qf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function su(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _r(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),as|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=fo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pA(e,t,n){switch(t.tag){case 3:wx(t),Ei();break;case 5:H6(t);break;case 1:Dt(t.type)&&Tu(t);break;case 4:Bm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ae(Mu,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ae(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?bx(e,t,n):(Ae(Pe,Pe.current&1),e=_r(e,t,n),e!==null?e.sibling:null);Ae(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return vx(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ae(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,gx(e,t,n)}return _r(e,t,n)}var xx,Bp,Cx,Ex;xx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Bp=function(){};Cx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Do(Yn.current);var s=null;switch(n){case"input":o=Xh(e,o),r=Xh(e,r),s=[];break;case"select":o=Re({},o,{value:void 0}),r=Re({},r,{value:void 0}),s=[];break;case"textarea":o=tp(e,o),r=tp(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Nu)}rp(n,r);var i;n=null;for(l in o)if(!r.hasOwnProperty(l)&&o.hasOwnProperty(l)&&o[l]!=null)if(l==="style"){var a=o[l];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Wa.hasOwnProperty(l)?s||(s=[]):(s=s||[]).push(l,null));for(l in r){var c=r[l];if(a=o!=null?o[l]:void 0,r.hasOwnProperty(l)&&c!==a&&(c!=null||a!=null))if(l==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(l,n)),n=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Wa.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&ke("scroll",e),s||a===c||(s=[])):(s=s||[]).push(l,c))}n&&(s=s||[]).push("style",n);var l=s;(t.updateQueue=l)&&(t.flags|=4)}};Ex=function(e,t,n,r){n!==r&&(t.flags|=4)};function la(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mA(e,t,n){var r=t.pendingProps;switch(Em(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return Dt(t.type)&&Pu(),ut(t),null;case 3:return r=t.stateNode,ki(),Se(Ft),Se(pt),Pm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(jl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,jn!==null&&(Fp(jn),jn=null))),Bp(e,t),ut(t),null;case 5:Nm(t);var o=Do(tc.current);if(n=t.type,e!==null&&t.stateNode!=null)Cx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return ut(t),null}if(e=Do(Yn.current),jl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Qn]=t,r[Za]=s,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(o=0;o<ja.length;o++)ke(ja[o],r);break;case"source":ke("error",r);break;case"img":case"image":case"link":ke("error",r),ke("load",r);break;case"details":ke("toggle",r);break;case"input":R1(r,s),ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ke("invalid",r);break;case"textarea":L1(r,s),ke("invalid",r)}rp(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Sl(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Sl(r.textContent,a,e),o=["children",""+a]):Wa.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&ke("scroll",r)}switch(n){case"input":wl(r),M1(r,s,!0);break;case"textarea":wl(r),F1(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Nu)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Jv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Qn]=t,e[Za]=r,xx(e,t,!1,!1),t.stateNode=e;e:{switch(i=op(n,r),n){case"dialog":ke("cancel",e),ke("close",e),o=r;break;case"iframe":case"object":case"embed":ke("load",e),o=r;break;case"video":case"audio":for(o=0;o<ja.length;o++)ke(ja[o],e);o=r;break;case"source":ke("error",e),o=r;break;case"img":case"image":case"link":ke("error",e),ke("load",e),o=r;break;case"details":ke("toggle",e),o=r;break;case"input":R1(e,r),o=Xh(e,r),ke("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Re({},r,{value:void 0}),ke("invalid",e);break;case"textarea":L1(e,r),o=tp(e,r),ke("invalid",e);break;default:o=r}rp(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?e6(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Xv(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&qa(e,c):typeof c=="number"&&qa(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Wa.hasOwnProperty(s)?c!=null&&s==="onScroll"&&ke("scroll",e):c!=null&&cm(e,s,c,i))}switch(n){case"input":wl(e),M1(e,r,!1);break;case"textarea":wl(e),F1(e);break;case"option":r.value!=null&&e.setAttribute("value",""+go(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Js(e,!!r.multiple,s,!1):r.defaultValue!=null&&Js(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Nu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ut(t),null;case 6:if(e&&t.stateNode!=null)Ex(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=Do(tc.current),Do(Yn.current),jl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Qn]=t,(s=r.nodeValue!==n)&&(e=Zt,e!==null))switch(e.tag){case 3:Sl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Qn]=t,t.stateNode=r}return ut(t),null;case 13:if(Se(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Be&&Xt!==null&&t.mode&1&&!(t.flags&128))z6(),Ei(),t.flags|=98560,s=!1;else if(s=jl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[Qn]=t}else Ei(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ut(t),s=!1}else jn!==null&&(Fp(jn),jn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Pe.current&1?Qe===0&&(Qe=3):qm())),t.updateQueue!==null&&(t.flags|=4),ut(t),null);case 4:return ki(),Bp(e,t),e===null&&Ja(t.stateNode.containerInfo),ut(t),null;case 10:return jm(t.type._context),ut(t),null;case 17:return Dt(t.type)&&Pu(),ut(t),null;case 19:if(Se(Pe),s=t.memoizedState,s===null)return ut(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)la(s,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Du(e),i!==null){for(t.flags|=128,la(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ae(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&Fe()>ji&&(t.flags|=128,r=!0,la(s,!1),t.lanes=4194304)}else{if(!r)if(e=Du(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),la(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Be)return ut(t),null}else 2*Fe()-s.renderingStartTime>ji&&n!==1073741824&&(t.flags|=128,r=!0,la(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Fe(),t.sibling=null,n=Pe.current,Ae(Pe,r?n&1|2:n&1),t):(ut(t),null);case 22:case 23:return Wm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gt&1073741824&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function gA(e,t){switch(Em(t),t.tag){case 1:return Dt(t.type)&&Pu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ki(),Se(Ft),Se(pt),Pm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nm(t),null;case 13:if(Se(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Pe),null;case 4:return ki(),null;case 10:return jm(t.type._context),null;case 22:case 23:return Wm(),null;case 24:return null;default:return null}}var Bl=!1,ft=!1,yA=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Hs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function Np(e,t,n){try{n()}catch(r){Le(e,t,r)}}var jy=!1;function wA(e,t){if(pp=_u,e=_6(),xm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,l=0,u=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(a=i+o),f!==s||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++l===o&&(a=i),d===s&&++u===r&&(c=i),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(mp={focusedElem:e,selectionRange:n},_u=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,v=p.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:En(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(x){Le(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return p=jy,jy=!1,p}function Fa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Np(t,n,s)}o=o.next}while(o!==r)}}function kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ax(e){var t=e.alternate;t!==null&&(e.alternate=null,Ax(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qn],delete t[Za],delete t[wp],delete t[eA],delete t[tA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kx(e){return e.tag===5||e.tag===3||e.tag===4}function _y(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nu));else if(r!==4&&(e=e.child,e!==null))for(Tp(e,t,n),e=e.sibling;e!==null;)Tp(e,t,n),e=e.sibling}function Op(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Op(e,t,n),e=e.sibling;e!==null;)Op(e,t,n),e=e.sibling}var rt=null,kn=!1;function Lr(e,t,n){for(n=n.child;n!==null;)Sx(e,t,n),n=n.sibling}function Sx(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(yd,n)}catch{}switch(n.tag){case 5:ft||Hs(n,t);case 6:var r=rt,o=kn;rt=null,Lr(e,t,n),rt=r,kn=o,rt!==null&&(kn?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(kn?(e=rt,n=n.stateNode,e.nodeType===8?Uf(e.parentNode,n):e.nodeType===1&&Uf(e,n),Ga(e)):Uf(rt,n.stateNode));break;case 4:r=rt,o=kn,rt=n.stateNode.containerInfo,kn=!0,Lr(e,t,n),rt=r,kn=o;break;case 0:case 11:case 14:case 15:if(!ft&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Np(n,t,i),o=o.next}while(o!==r)}Lr(e,t,n);break;case 1:if(!ft&&(Hs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Le(n,t,a)}Lr(e,t,n);break;case 21:Lr(e,t,n);break;case 22:n.mode&1?(ft=(r=ft)||n.memoizedState!==null,Lr(e,t,n),ft=r):Lr(e,t,n);break;default:Lr(e,t,n)}}function Iy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yA),t.forEach(function(r){var o=jA.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:rt=a.stateNode,kn=!1;break e;case 3:rt=a.stateNode.containerInfo,kn=!0;break e;case 4:rt=a.stateNode.containerInfo,kn=!0;break e}a=a.return}if(rt===null)throw Error(q(160));Sx(s,i,o),rt=null,kn=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(l){Le(o,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jx(t,e),t=t.sibling}function jx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),Un(e),r&4){try{Fa(3,e,e.return),kd(3,e)}catch(m){Le(e,e.return,m)}try{Fa(5,e,e.return)}catch(m){Le(e,e.return,m)}}break;case 1:xn(t,e),Un(e),r&512&&n!==null&&Hs(n,n.return);break;case 5:if(xn(t,e),Un(e),r&512&&n!==null&&Hs(n,n.return),e.flags&32){var o=e.stateNode;try{qa(o,"")}catch(m){Le(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Kv(o,s),op(a,i);var l=op(a,s);for(i=0;i<c.length;i+=2){var u=c[i],f=c[i+1];u==="style"?e6(o,f):u==="dangerouslySetInnerHTML"?Xv(o,f):u==="children"?qa(o,f):cm(o,u,f,l)}switch(a){case"input":Zh(o,s);break;case"textarea":Yv(o,s);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Js(o,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?Js(o,!!s.multiple,s.defaultValue,!0):Js(o,!!s.multiple,s.multiple?[]:"",!1))}o[Za]=s}catch(m){Le(e,e.return,m)}}break;case 6:if(xn(t,e),Un(e),r&4){if(e.stateNode===null)throw Error(q(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){Le(e,e.return,m)}}break;case 3:if(xn(t,e),Un(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ga(t.containerInfo)}catch(m){Le(e,e.return,m)}break;case 4:xn(t,e),Un(e);break;case 13:xn(t,e),Un(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(zm=Fe())),r&4&&Iy(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(ft=(l=ft)||u,xn(t,e),ft=l):xn(t,e),Un(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!u&&e.mode&1)for(Z=e,u=e.child;u!==null;){for(f=Z=u;Z!==null;){switch(d=Z,h=d.child,d.tag){case 0:case 11:case 14:case 15:Fa(4,d,d.return);break;case 1:Hs(d,d.return);var p=d.stateNode;if(typeof p.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Le(r,n,m)}}break;case 5:Hs(d,d.return);break;case 22:if(d.memoizedState!==null){Ny(f);continue}}h!==null?(h.return=d,Z=h):Ny(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,l?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=Zv("display",i))}catch(m){Le(e,e.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=l?"":f.memoizedProps}catch(m){Le(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:xn(t,e),Un(e),r&4&&Iy(e);break;case 21:break;default:xn(t,e),Un(e)}}function Un(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(kx(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(qa(o,""),r.flags&=-33);var s=_y(e);Op(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=_y(e);Tp(e,a,i);break;default:throw Error(q(161))}}catch(c){Le(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bA(e,t,n){Z=e,_x(e)}function _x(e,t,n){for(var r=(e.mode&1)!==0;Z!==null;){var o=Z,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Bl;if(!i){var a=o.alternate,c=a!==null&&a.memoizedState!==null||ft;a=Bl;var l=ft;if(Bl=i,(ft=c)&&!l)for(Z=o;Z!==null;)i=Z,c=i.child,i.tag===22&&i.memoizedState!==null?Py(o):c!==null?(c.return=i,Z=c):Py(o);for(;s!==null;)Z=s,_x(s),s=s.sibling;Z=o,Bl=a,ft=l}By(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,Z=s):By(e)}}function By(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ft||kd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ft)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:En(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&py(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}py(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Ga(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}ft||t.flags&512&&Pp(t)}catch(d){Le(t,t.return,d)}}if(t===e){Z=null;break}if(n=t.sibling,n!==null){n.return=t.return,Z=n;break}Z=t.return}}function Ny(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Z=n;break}Z=t.return}}function Py(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kd(4,t)}catch(c){Le(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Le(t,o,c)}}var s=t.return;try{Pp(t)}catch(c){Le(t,s,c)}break;case 5:var i=t.return;try{Pp(t)}catch(c){Le(t,i,c)}}}catch(c){Le(t,t.return,c)}if(t===e){Z=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Z=a;break}Z=t.return}}var vA=Math.ceil,$u=Nr.ReactCurrentDispatcher,Dm=Nr.ReactCurrentOwner,mn=Nr.ReactCurrentBatchConfig,ye=0,et=null,De=null,st=0,Gt=0,Qs=Ao(0),Qe=0,sc=null,as=0,Sd=0,Um=0,Da=null,Rt=null,zm=0,ji=1/0,ur=null,Wu=!1,Rp=null,lo=null,Nl=!1,ro=null,qu=0,Ua=0,Mp=null,iu=-1,au=0;function At(){return ye&6?Fe():iu!==-1?iu:iu=Fe()}function uo(e){return e.mode&1?ye&2&&st!==0?st&-st:rA.transition!==null?(au===0&&(au=f6()),au):(e=Ce,e!==0||(e=window.event,e=e===void 0?16:b6(e.type)),e):1}function Bn(e,t,n,r){if(50<Ua)throw Ua=0,Mp=null,Error(q(185));qc(e,n,r),(!(ye&2)||e!==et)&&(e===et&&(!(ye&2)&&(Sd|=n),Qe===4&&Vr(e,st)),Ut(e,r),n===1&&ye===0&&!(t.mode&1)&&(ji=Fe()+500,Cd&&ko()))}function Ut(e,t){var n=e.callbackNode;r4(e,t);var r=ju(e,e===et?st:0);if(r===0)n!==null&&z1(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&z1(n),t===1)e.tag===0?nA(Ty.bind(null,e)):F6(Ty.bind(null,e)),X4(function(){!(ye&6)&&ko()}),n=null;else{switch(h6(r)){case 1:n=hm;break;case 4:n=u6;break;case 16:n=Su;break;case 536870912:n=d6;break;default:n=Su}n=Mx(n,Ix.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ix(e,t){if(iu=-1,au=0,ye&6)throw Error(q(327));var n=e.callbackNode;if(ni()&&e.callbackNode!==n)return null;var r=ju(e,e===et?st:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Vu(e,r);else{t=r;var o=ye;ye|=2;var s=Nx();(et!==e||st!==t)&&(ur=null,ji=Fe()+500,Zo(e,t));do try{EA();break}catch(a){Bx(e,a)}while(!0);Sm(),$u.current=s,ye=o,De!==null?t=0:(et=null,st=0,t=Qe)}if(t!==0){if(t===2&&(o=lp(e),o!==0&&(r=o,t=Lp(e,o))),t===1)throw n=sc,Zo(e,0),Vr(e,r),Ut(e,Fe()),n;if(t===6)Vr(e,r);else{if(o=e.current.alternate,!(r&30)&&!xA(o)&&(t=Vu(e,r),t===2&&(s=lp(e),s!==0&&(r=s,t=Lp(e,s))),t===1))throw n=sc,Zo(e,0),Vr(e,r),Ut(e,Fe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Ro(e,Rt,ur);break;case 3:if(Vr(e,r),(r&130023424)===r&&(t=zm+500-Fe(),10<t)){if(ju(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){At(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=yp(Ro.bind(null,e,Rt,ur),t);break}Ro(e,Rt,ur);break;case 4:if(Vr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-In(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vA(r/1960))-r,10<r){e.timeoutHandle=yp(Ro.bind(null,e,Rt,ur),r);break}Ro(e,Rt,ur);break;case 5:Ro(e,Rt,ur);break;default:throw Error(q(329))}}}return Ut(e,Fe()),e.callbackNode===n?Ix.bind(null,e):null}function Lp(e,t){var n=Da;return e.current.memoizedState.isDehydrated&&(Zo(e,t).flags|=256),e=Vu(e,t),e!==2&&(t=Rt,Rt=n,t!==null&&Fp(t)),e}function Fp(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function xA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Nn(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vr(e,t){for(t&=~Um,t&=~Sd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-In(t),r=1<<n;e[n]=-1,t&=~r}}function Ty(e){if(ye&6)throw Error(q(327));ni();var t=ju(e,0);if(!(t&1))return Ut(e,Fe()),null;var n=Vu(e,t);if(e.tag!==0&&n===2){var r=lp(e);r!==0&&(t=r,n=Lp(e,r))}if(n===1)throw n=sc,Zo(e,0),Vr(e,t),Ut(e,Fe()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ro(e,Rt,ur),Ut(e,Fe()),null}function $m(e,t){var n=ye;ye|=1;try{return e(t)}finally{ye=n,ye===0&&(ji=Fe()+500,Cd&&ko())}}function cs(e){ro!==null&&ro.tag===0&&!(ye&6)&&ni();var t=ye;ye|=1;var n=mn.transition,r=Ce;try{if(mn.transition=null,Ce=1,e)return e()}finally{Ce=r,mn.transition=n,ye=t,!(ye&6)&&ko()}}function Wm(){Gt=Qs.current,Se(Qs)}function Zo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,J4(n)),De!==null)for(n=De.return;n!==null;){var r=n;switch(Em(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pu();break;case 3:ki(),Se(Ft),Se(pt),Pm();break;case 5:Nm(r);break;case 4:ki();break;case 13:Se(Pe);break;case 19:Se(Pe);break;case 10:jm(r.type._context);break;case 22:case 23:Wm()}n=n.return}if(et=e,De=e=fo(e.current,null),st=Gt=t,Qe=0,sc=null,Um=Sd=as=0,Rt=Da=null,Fo!==null){for(t=0;t<Fo.length;t++)if(n=Fo[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Fo=null}return e}function Bx(e,t){do{var n=De;try{if(Sm(),ru.current=zu,Uu){for(var r=Oe.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Uu=!1}if(is=0,Xe=Ve=Oe=null,La=!1,nc=0,Dm.current=null,n===null||n.return===null){Qe=1,sc=t,De=null;break}e:{var s=e,i=n.return,a=n,c=t;if(t=st,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=vy(i);if(h!==null){h.flags&=-257,xy(h,i,a,s,t),h.mode&1&&by(s,l,t),t=h,c=l;var p=t.updateQueue;if(p===null){var m=new Set;m.add(c),t.updateQueue=m}else p.add(c);break e}else{if(!(t&1)){by(s,l,t),qm();break e}c=Error(q(426))}}else if(Be&&a.mode&1){var v=vy(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),xy(v,i,a,s,t),Am(Si(c,a));break e}}s=c=Si(c,a),Qe!==4&&(Qe=2),Da===null?Da=[s]:Da.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=hx(s,c,t);hy(s,y);break e;case 1:a=c;var g=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(lo===null||!lo.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=px(s,a,t);hy(s,x);break e}}s=s.return}while(s!==null)}Tx(n)}catch(E){t=E,De===n&&n!==null&&(De=n=n.return);continue}break}while(!0)}function Nx(){var e=$u.current;return $u.current=zu,e===null?zu:e}function qm(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),et===null||!(as&268435455)&&!(Sd&268435455)||Vr(et,st)}function Vu(e,t){var n=ye;ye|=2;var r=Nx();(et!==e||st!==t)&&(ur=null,Zo(e,t));do try{CA();break}catch(o){Bx(e,o)}while(!0);if(Sm(),ye=n,$u.current=r,De!==null)throw Error(q(261));return et=null,st=0,Qe}function CA(){for(;De!==null;)Px(De)}function EA(){for(;De!==null&&!GE();)Px(De)}function Px(e){var t=Rx(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Tx(e):De=t,Dm.current=null}function Tx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gA(n,t),n!==null){n.flags&=32767,De=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,De=null;return}}else if(n=mA(n,t,Gt),n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Qe===0&&(Qe=5)}function Ro(e,t,n){var r=Ce,o=mn.transition;try{mn.transition=null,Ce=1,AA(e,t,n,r)}finally{mn.transition=o,Ce=r}return null}function AA(e,t,n,r){do ni();while(ro!==null);if(ye&6)throw Error(q(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(o4(e,s),e===et&&(De=et=null,st=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Nl||(Nl=!0,Mx(Su,function(){return ni(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=mn.transition,mn.transition=null;var i=Ce;Ce=1;var a=ye;ye|=4,Dm.current=null,wA(e,n),jx(n,e),q4(mp),_u=!!pp,mp=pp=null,e.current=n,bA(n),KE(),ye=a,Ce=i,mn.transition=s}else e.current=n;if(Nl&&(Nl=!1,ro=e,qu=o),s=e.pendingLanes,s===0&&(lo=null),XE(n.stateNode),Ut(e,Fe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Wu)throw Wu=!1,e=Rp,Rp=null,e;return qu&1&&e.tag!==0&&ni(),s=e.pendingLanes,s&1?e===Mp?Ua++:(Ua=0,Mp=e):Ua=0,ko(),null}function ni(){if(ro!==null){var e=h6(qu),t=mn.transition,n=Ce;try{if(mn.transition=null,Ce=16>e?16:e,ro===null)var r=!1;else{if(e=ro,ro=null,qu=0,ye&6)throw Error(q(331));var o=ye;for(ye|=4,Z=e.current;Z!==null;){var s=Z,i=s.child;if(Z.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var l=a[c];for(Z=l;Z!==null;){var u=Z;switch(u.tag){case 0:case 11:case 15:Fa(8,u,s)}var f=u.child;if(f!==null)f.return=u,Z=f;else for(;Z!==null;){u=Z;var d=u.sibling,h=u.return;if(Ax(u),u===l){Z=null;break}if(d!==null){d.return=h,Z=d;break}Z=h}}}var p=s.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Z=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,Z=i;else e:for(;Z!==null;){if(s=Z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Fa(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,Z=y;break e}Z=s.return}}var g=e.current;for(Z=g;Z!==null;){i=Z;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,Z=w;else e:for(i=g;Z!==null;){if(a=Z,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:kd(9,a)}}catch(E){Le(a,a.return,E)}if(a===i){Z=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,Z=x;break e}Z=a.return}}if(ye=o,ko(),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(yd,e)}catch{}r=!0}return r}finally{Ce=n,mn.transition=t}}return!1}function Oy(e,t,n){t=Si(n,t),t=hx(e,t,1),e=co(e,t,1),t=At(),e!==null&&(qc(e,1,t),Ut(e,t))}function Le(e,t,n){if(e.tag===3)Oy(e,e,n);else for(;t!==null;){if(t.tag===3){Oy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(lo===null||!lo.has(r))){e=Si(n,e),e=px(t,e,1),t=co(t,e,1),e=At(),t!==null&&(qc(t,1,e),Ut(t,e));break}}t=t.return}}function kA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=At(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(st&n)===n&&(Qe===4||Qe===3&&(st&130023424)===st&&500>Fe()-zm?Zo(e,0):Um|=n),Ut(e,t)}function Ox(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=At();e=jr(e,t),e!==null&&(qc(e,t,n),Ut(e,n))}function SA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ox(e,n)}function jA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),Ox(e,n)}var Rx;Rx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Mt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Mt=!1,pA(e,t,n);Mt=!!(e.flags&131072)}else Mt=!1,Be&&t.flags&1048576&&D6(t,Ru,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;su(e,t),e=t.pendingProps;var o=Ci(t,pt.current);ti(t,n),o=Om(null,t,r,e,o,n);var s=Rm();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,Tu(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Im(t),o.updater=Ad,t.stateNode=o,o._reactInternals=t,Ap(t,r,e,n),t=jp(null,t,r,!0,s,n)):(t.tag=0,Be&&s&&Cm(t),xt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(su(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=IA(r),e=En(r,e),o){case 0:t=Sp(null,t,r,e,n);break e;case 1:t=Ay(null,t,r,e,n);break e;case 11:t=Cy(null,t,r,e,n);break e;case 14:t=Ey(null,t,r,En(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:En(r,o),Sp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:En(r,o),Ay(e,t,r,o,n);case 3:e:{if(wx(t),e===null)throw Error(q(387));r=t.pendingProps,s=t.memoizedState,o=s.element,V6(e,t),Fu(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Si(Error(q(423)),t),t=ky(e,t,r,n,o);break e}else if(r!==o){o=Si(Error(q(424)),t),t=ky(e,t,r,n,o);break e}else for(Xt=ao(t.stateNode.containerInfo.firstChild),Zt=t,Be=!0,jn=null,n=W6(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ei(),r===o){t=_r(e,t,n);break e}xt(e,t,r,n)}t=t.child}return t;case 5:return H6(t),e===null&&xp(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,gp(r,o)?i=null:s!==null&&gp(r,s)&&(t.flags|=32),yx(e,t),xt(e,t,i,n),t.child;case 6:return e===null&&xp(t),null;case 13:return bx(e,t,n);case 4:return Bm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ai(t,null,r,n):xt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:En(r,o),Cy(e,t,r,o,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,Ae(Mu,r._currentValue),r._currentValue=i,s!==null)if(Nn(s.value,i)){if(s.children===o.children&&!Ft.current){t=_r(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=vr(-1,n&-n),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Cp(s.return,n,t),a.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(q(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Cp(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}xt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ti(t,n),o=gn(o),r=r(o),t.flags|=1,xt(e,t,r,n),t.child;case 14:return r=t.type,o=En(r,t.pendingProps),o=En(r.type,o),Ey(e,t,r,o,n);case 15:return mx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:En(r,o),su(e,t),t.tag=1,Dt(r)?(e=!0,Tu(t)):e=!1,ti(t,n),fx(t,r,o),Ap(t,r,o,n),jp(null,t,r,!0,e,n);case 19:return vx(e,t,n);case 22:return gx(e,t,n)}throw Error(q(156,t.tag))};function Mx(e,t){return l6(e,t)}function _A(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(e,t,n,r){return new _A(e,t,n,r)}function Vm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IA(e){if(typeof e=="function")return Vm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===um)return 11;if(e===dm)return 14}return 2}function fo(e,t){var n=e.alternate;return n===null?(n=pn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cu(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Vm(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ls:return es(n.children,o,s,t);case lm:i=8,o|=8;break;case Gh:return e=pn(12,n,t,o|2),e.elementType=Gh,e.lanes=s,e;case Kh:return e=pn(13,n,t,o),e.elementType=Kh,e.lanes=s,e;case Yh:return e=pn(19,n,t,o),e.elementType=Yh,e.lanes=s,e;case Hv:return jd(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qv:i=10;break e;case Vv:i=9;break e;case um:i=11;break e;case dm:i=14;break e;case $r:i=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=pn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function es(e,t,n,r){return e=pn(7,e,r,t),e.lanes=n,e}function jd(e,t,n,r){return e=pn(22,e,r,t),e.elementType=Hv,e.lanes=n,e.stateNode={isHidden:!1},e}function Gf(e,t,n){return e=pn(6,e,null,t),e.lanes=n,e}function Kf(e,t,n){return t=pn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BA(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=If(0),this.expirationTimes=If(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=If(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hm(e,t,n,r,o,s,i,a,c){return e=new BA(e,t,n,a,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=pn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Im(s),e}function NA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ms,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Lx(e){if(!e)return yo;e=e._reactInternals;e:{if(xs(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(Dt(n))return L6(e,n,t)}return t}function Fx(e,t,n,r,o,s,i,a,c){return e=Hm(n,r,!0,e,o,s,i,a,c),e.context=Lx(null),n=e.current,r=At(),o=uo(n),s=vr(r,o),s.callback=t??null,co(n,s,o),e.current.lanes=o,qc(e,o,r),Ut(e,r),e}function _d(e,t,n,r){var o=t.current,s=At(),i=uo(o);return n=Lx(n),t.context===null?t.context=n:t.pendingContext=n,t=vr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=co(o,t,i),e!==null&&(Bn(e,o,i,s),nu(e,o,i)),i}function Hu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ry(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qm(e,t){Ry(e,t),(e=e.alternate)&&Ry(e,t)}function PA(){return null}var Dx=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gm(e){this._internalRoot=e}Id.prototype.render=Gm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));_d(e,t,null,null)};Id.prototype.unmount=Gm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cs(function(){_d(null,e,null,null)}),t[Sr]=null}};function Id(e){this._internalRoot=e}Id.prototype.unstable_scheduleHydration=function(e){if(e){var t=g6();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qr.length&&t!==0&&t<qr[n].priority;n++);qr.splice(n,0,e),n===0&&w6(e)}};function Km(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function My(){}function TA(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var l=Hu(i);s.call(l)}}var i=Fx(t,r,e,0,null,!1,!1,"",My);return e._reactRootContainer=i,e[Sr]=i.current,Ja(e.nodeType===8?e.parentNode:e),cs(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var l=Hu(c);a.call(l)}}var c=Hm(e,0,!1,null,null,!1,!1,"",My);return e._reactRootContainer=c,e[Sr]=c.current,Ja(e.nodeType===8?e.parentNode:e),cs(function(){_d(t,c,n,r)}),c}function Nd(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var c=Hu(i);a.call(c)}}_d(t,i,e,o)}else i=TA(n,t,e,o,r);return Hu(i)}p6=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Sa(t.pendingLanes);n!==0&&(pm(t,n|1),Ut(t,Fe()),!(ye&6)&&(ji=Fe()+500,ko()))}break;case 13:cs(function(){var r=jr(e,1);if(r!==null){var o=At();Bn(r,e,1,o)}}),Qm(e,1)}};mm=function(e){if(e.tag===13){var t=jr(e,134217728);if(t!==null){var n=At();Bn(t,e,134217728,n)}Qm(e,134217728)}};m6=function(e){if(e.tag===13){var t=uo(e),n=jr(e,t);if(n!==null){var r=At();Bn(n,e,t,r)}Qm(e,t)}};g6=function(){return Ce};y6=function(e,t){var n=Ce;try{return Ce=e,t()}finally{Ce=n}};ip=function(e,t,n){switch(t){case"input":if(Zh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xd(r);if(!o)throw Error(q(90));Gv(r),Zh(r,o)}}}break;case"textarea":Yv(e,n);break;case"select":t=n.value,t!=null&&Js(e,!!n.multiple,t,!1)}};r6=$m;o6=cs;var OA={usingClientEntryPoint:!1,Events:[Hc,zs,xd,t6,n6,$m]},ua={findFiberByHostInstance:Lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},RA={bundleType:ua.bundleType,version:ua.version,rendererPackageName:ua.rendererPackageName,rendererConfig:ua.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=a6(e),e===null?null:e.stateNode},findFiberByHostInstance:ua.findFiberByHostInstance||PA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pl.isDisabled&&Pl.supportsFiber)try{yd=Pl.inject(RA),Kn=Pl}catch{}}rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OA;rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(t))throw Error(q(200));return NA(e,t,null,n)};rn.createRoot=function(e,t){if(!Km(e))throw Error(q(299));var n=!1,r="",o=Dx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Hm(e,1,!1,null,null,n,!1,r,o),e[Sr]=t.current,Ja(e.nodeType===8?e.parentNode:e),new Gm(t)};rn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=a6(t),e=e===null?null:e.stateNode,e};rn.flushSync=function(e){return cs(e)};rn.hydrate=function(e,t,n){if(!Bd(t))throw Error(q(200));return Nd(null,e,t,!0,n)};rn.hydrateRoot=function(e,t,n){if(!Km(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Dx;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Fx(t,null,e,1,n??null,o,!1,s,i),e[Sr]=t.current,Ja(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Id(t)};rn.render=function(e,t,n){if(!Bd(t))throw Error(q(200));return Nd(null,e,t,!1,n)};rn.unmountComponentAtNode=function(e){if(!Bd(e))throw Error(q(40));return e._reactRootContainer?(cs(function(){Nd(null,null,e,!1,function(){e._reactRootContainer=null,e[Sr]=null})}),!0):!1};rn.unstable_batchedUpdates=$m;rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bd(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Nd(e,t,n,!1,r)};rn.version="18.3.1-next-f1338f8080-20240426";function Ux(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ux)}catch(e){console.error(e)}}Ux(),Uv.exports=rn;var zx=Uv.exports,Ly=zx;Hh.createRoot=Ly.createRoot,Hh.hydrateRoot=Ly.hydrateRoot;const MA="modulepreload",LA=function(e){return"/"+e},Fy={},W=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(c=>{if(c=LA(c),c in Fy)return;Fy[c]=!0;const l=c.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":MA,l||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),l)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};var Dy='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',FA={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${Dy}`,system:Dy},da={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},DA={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},$x=({borderRadius:e="large",fontStack:t="rounded",overlayBlur:n="none"})=>({blurs:{modalOverlay:DA[n].modalOverlay},fonts:{body:FA[t]},radii:{actionButton:da[e].actionButton,connectButton:da[e].connectButton,menuButton:da[e].connectButton,modal:da[e].modal,modalMobile:da[e].modalMobile}}),lu="#1A1B1F",Wx={blue:{accentColor:"#3898FF",accentColorForeground:"#FFF"},green:{accentColor:"#4BD166",accentColorForeground:lu},orange:{accentColor:"#FF983D",accentColorForeground:lu},pink:{accentColor:"#FF7AB8",accentColorForeground:lu},purple:{accentColor:"#7A70FF",accentColorForeground:"#FFF"},red:{accentColor:"#FF6257",accentColorForeground:"#FFF"}},Uy=Wx.blue,qx=({accentColor:e=Uy.accentColor,accentColorForeground:t=Uy.accentColorForeground,...n}={})=>({...$x(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(255, 255, 255, 0.04)",actionButtonBorderMobile:"rgba(255, 255, 255, 0.08)",actionButtonSecondaryBackground:"rgba(255, 255, 255, 0.08)",closeButton:"rgba(224, 232, 255, 0.6)",closeButtonBackground:"rgba(255, 255, 255, 0.08)",connectButtonBackground:lu,connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",connectButtonText:"#FFF",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",downloadTopCardBackground:"linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",error:"#FF494A",generalBorder:"rgba(255, 255, 255, 0.08)",generalBorderDim:"rgba(255, 255, 255, 0.04)",menuItemBackground:"rgba(224, 232, 255, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.5)",modalBackground:"#1A1B1F",modalBorder:"rgba(255, 255, 255, 0.08)",modalText:"#FFF",modalTextDim:"rgba(224, 232, 255, 0.3)",modalTextSecondary:"rgba(255, 255, 255, 0.6)",profileAction:"rgba(224, 232, 255, 0.1)",profileActionHover:"rgba(224, 232, 255, 0.2)",profileForeground:"rgba(224, 232, 255, 0.05)",selectedOptionBorder:"rgba(224, 232, 255, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.24)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});qx.accentColors=Wx;var Vx={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},zy=Vx.blue,Hx=({accentColor:e=zy.accentColor,accentColorForeground:t=zy.accentColorForeground,...n}={})=>({...$x(n),colors:{accentColor:e,accentColorForeground:t,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});Hx.accentColors=Vx;var Dp=`{
42
+ "connect_wallet": {
43
+ "label": "Connect Wallet",
44
+ "wrong_network": {
45
+ "label": "Wrong network"
46
+ }
47
+ },
48
+
49
+ "intro": {
50
+ "title": "What is a Wallet?",
51
+ "description": "A wallet is used to send, receive, store, and display digital assets. It's also a new way to log in, without needing to create new accounts and passwords on every website.",
52
+ "digital_asset": {
53
+ "title": "A Home for your Digital Assets",
54
+ "description": "Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."
55
+ },
56
+ "login": {
57
+ "title": "A New Way to Log In",
58
+ "description": "Instead of creating new accounts and passwords on every website, just connect your wallet."
59
+ },
60
+ "get": {
61
+ "label": "Get a Wallet"
62
+ },
63
+ "learn_more": {
64
+ "label": "Learn More"
65
+ }
66
+ },
67
+
68
+ "sign_in": {
69
+ "label": "Verify your account",
70
+ "description": "To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.",
71
+ "message": {
72
+ "send": "Sign message",
73
+ "preparing": "Preparing message...",
74
+ "cancel": "Cancel",
75
+ "preparing_error": "Error preparing message, please retry!"
76
+ },
77
+ "signature": {
78
+ "waiting": "Waiting for signature...",
79
+ "verifying": "Verifying signature...",
80
+ "signing_error": "Error signing message, please retry!",
81
+ "verifying_error": "Error verifying signature, please retry!",
82
+ "oops_error": "Oops, something went wrong!"
83
+ }
84
+ },
85
+
86
+ "connect": {
87
+ "label": "Connect",
88
+ "title": "Connect a Wallet",
89
+ "new_to_ethereum": {
90
+ "description": "New to Ethereum wallets?",
91
+ "learn_more": {
92
+ "label": "Learn More"
93
+ }
94
+ },
95
+ "learn_more": {
96
+ "label": "Learn more"
97
+ },
98
+ "recent": "Recent",
99
+ "status": {
100
+ "opening": "Opening %{wallet}...",
101
+ "connecting": "Connecting",
102
+ "connect_mobile": "Continue in %{wallet}",
103
+ "not_installed": "%{wallet} is not installed",
104
+ "not_available": "%{wallet} is not available",
105
+ "confirm": "Confirm connection in the extension",
106
+ "confirm_mobile": "Accept connection request in the wallet"
107
+ },
108
+ "secondary_action": {
109
+ "get": {
110
+ "description": "Don't have %{wallet}?",
111
+ "label": "GET"
112
+ },
113
+ "install": {
114
+ "label": "INSTALL"
115
+ },
116
+ "retry": {
117
+ "label": "RETRY"
118
+ }
119
+ },
120
+ "walletconnect": {
121
+ "description": {
122
+ "full": "Need the official WalletConnect modal?",
123
+ "compact": "Need the WalletConnect modal?"
124
+ },
125
+ "open": {
126
+ "label": "OPEN"
127
+ }
128
+ }
129
+ },
130
+
131
+ "connect_scan": {
132
+ "title": "Scan with %{wallet}",
133
+ "fallback_title": "Scan with your phone"
134
+ },
135
+
136
+ "connector_group": {
137
+ "installed": "Installed",
138
+ "recommended": "Recommended",
139
+ "other": "Other",
140
+ "popular": "Popular",
141
+ "more": "More",
142
+ "others": "Others"
143
+ },
144
+
145
+ "get": {
146
+ "title": "Get a Wallet",
147
+ "action": {
148
+ "label": "GET"
149
+ },
150
+ "mobile": {
151
+ "description": "Mobile Wallet"
152
+ },
153
+ "extension": {
154
+ "description": "Browser Extension"
155
+ },
156
+ "mobile_and_extension": {
157
+ "description": "Mobile Wallet and Extension"
158
+ },
159
+ "mobile_and_desktop": {
160
+ "description": "Mobile and Desktop Wallet"
161
+ },
162
+ "looking_for": {
163
+ "title": "Not what you're looking for?",
164
+ "mobile": {
165
+ "description": "Select a wallet on the main screen to get started with a different wallet provider."
166
+ },
167
+ "desktop": {
168
+ "compact_description": "Select a wallet on the main screen to get started with a different wallet provider.",
169
+ "wide_description": "Select a wallet on the left to get started with a different wallet provider."
170
+ }
171
+ }
172
+ },
173
+
174
+ "get_options": {
175
+ "title": "Get started with %{wallet}",
176
+ "short_title": "Get %{wallet}",
177
+ "mobile": {
178
+ "title": "%{wallet} for Mobile",
179
+ "description": "Use the mobile wallet to explore the world of Ethereum.",
180
+ "download": {
181
+ "label": "Get the app"
182
+ }
183
+ },
184
+ "extension": {
185
+ "title": "%{wallet} for %{browser}",
186
+ "description": "Access your wallet right from your favorite web browser.",
187
+ "download": {
188
+ "label": "Add to %{browser}"
189
+ }
190
+ },
191
+ "desktop": {
192
+ "title": "%{wallet} for %{platform}",
193
+ "description": "Access your wallet natively from your powerful desktop.",
194
+ "download": {
195
+ "label": "Add to %{platform}"
196
+ }
197
+ }
198
+ },
199
+
200
+ "get_mobile": {
201
+ "title": "Install %{wallet}",
202
+ "description": "Scan with your phone to download on iOS or Android",
203
+ "continue": {
204
+ "label": "Continue"
205
+ }
206
+ },
207
+
208
+ "get_instructions": {
209
+ "mobile": {
210
+ "connect": {
211
+ "label": "Connect"
212
+ },
213
+ "learn_more": {
214
+ "label": "Learn More"
215
+ }
216
+ },
217
+ "extension": {
218
+ "refresh": {
219
+ "label": "Refresh"
220
+ },
221
+ "learn_more": {
222
+ "label": "Learn More"
223
+ }
224
+ },
225
+ "desktop": {
226
+ "connect": {
227
+ "label": "Connect"
228
+ },
229
+ "learn_more": {
230
+ "label": "Learn More"
231
+ }
232
+ }
233
+ },
234
+
235
+ "chains": {
236
+ "title": "Switch Networks",
237
+ "wrong_network": "Wrong network detected, switch or disconnect to continue.",
238
+ "confirm": "Confirm in Wallet",
239
+ "switching_not_supported": "Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.",
240
+ "switching_not_supported_fallback": "Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.",
241
+ "disconnect": "Disconnect",
242
+ "connected": "Connected"
243
+ },
244
+
245
+ "profile": {
246
+ "disconnect": {
247
+ "label": "Disconnect"
248
+ },
249
+ "copy_address": {
250
+ "label": "Copy Address",
251
+ "copied": "Copied!"
252
+ },
253
+ "explorer": {
254
+ "label": "View more on explorer"
255
+ },
256
+ "transactions": {
257
+ "description": "%{appName} transactions will appear here...",
258
+ "description_fallback": "Your transactions will appear here...",
259
+ "recent": {
260
+ "title": "Recent Transactions"
261
+ },
262
+ "clear": {
263
+ "label": "Clear All"
264
+ }
265
+ }
266
+ },
267
+
268
+ "wallet_connectors": {
269
+ "ready": {
270
+ "qr_code": {
271
+ "step1": {
272
+ "description": "Add Ready to your home screen for faster access to your wallet.",
273
+ "title": "Open the Ready app"
274
+ },
275
+ "step2": {
276
+ "description": "Create a wallet and username, or import an existing wallet.",
277
+ "title": "Create or Import a Wallet"
278
+ },
279
+ "step3": {
280
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
281
+ "title": "Tap the Scan QR button"
282
+ }
283
+ }
284
+ },
285
+
286
+ "berasig": {
287
+ "extension": {
288
+ "step1": {
289
+ "title": "Install the BeraSig extension",
290
+ "description": "We recommend pinning BeraSig to your taskbar for easier access to your wallet."
291
+ },
292
+ "step2": {
293
+ "title": "Create a Wallet",
294
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
295
+ },
296
+ "step3": {
297
+ "title": "Refresh your browser",
298
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
299
+ }
300
+ }
301
+ },
302
+
303
+ "best": {
304
+ "qr_code": {
305
+ "step1": {
306
+ "title": "Open the Best Wallet app",
307
+ "description": "Add Best Wallet to your home screen for faster access to your wallet."
308
+ },
309
+ "step2": {
310
+ "title": "Create or Import a Wallet",
311
+ "description": "Create a new wallet or import an existing one."
312
+ },
313
+ "step3": {
314
+ "title": "Tap the QR icon and scan",
315
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
316
+ }
317
+ }
318
+ },
319
+
320
+ "bifrost": {
321
+ "qr_code": {
322
+ "step1": {
323
+ "description": "We recommend putting Bifrost Wallet on your home screen for quicker access.",
324
+ "title": "Open the Bifrost Wallet app"
325
+ },
326
+ "step2": {
327
+ "description": "Create or import a wallet using your recovery phrase.",
328
+ "title": "Create or Import a Wallet"
329
+ },
330
+ "step3": {
331
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
332
+ "title": "Tap the scan button"
333
+ }
334
+ }
335
+ },
336
+
337
+ "bitget": {
338
+ "qr_code": {
339
+ "step1": {
340
+ "description": "We recommend putting Bitget Wallet on your home screen for quicker access.",
341
+ "title": "Open the Bitget Wallet app"
342
+ },
343
+ "step2": {
344
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
345
+ "title": "Create or Import a Wallet"
346
+ },
347
+ "step3": {
348
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
349
+ "title": "Tap the scan button"
350
+ }
351
+ },
352
+
353
+ "extension": {
354
+ "step1": {
355
+ "description": "We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.",
356
+ "title": "Install the Bitget Wallet extension"
357
+ },
358
+ "step2": {
359
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
360
+ "title": "Create or Import a Wallet"
361
+ },
362
+ "step3": {
363
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
364
+ "title": "Refresh your browser"
365
+ }
366
+ }
367
+ },
368
+
369
+ "bitski": {
370
+ "extension": {
371
+ "step1": {
372
+ "description": "We recommend pinning Bitski to your taskbar for quicker access to your wallet.",
373
+ "title": "Install the Bitski extension"
374
+ },
375
+ "step2": {
376
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
377
+ "title": "Create or Import a Wallet"
378
+ },
379
+ "step3": {
380
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
381
+ "title": "Refresh your browser"
382
+ }
383
+ }
384
+ },
385
+
386
+ "bitverse": {
387
+ "qr_code": {
388
+ "step1": {
389
+ "title": "Open the Bitverse Wallet app",
390
+ "description": "Add Bitverse Wallet to your home screen for faster access to your wallet."
391
+ },
392
+ "step2": {
393
+ "title": "Create or Import a Wallet",
394
+ "description": "Create a new wallet or import an existing one."
395
+ },
396
+ "step3": {
397
+ "title": "Tap the QR icon and scan",
398
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
399
+ }
400
+ }
401
+ },
402
+
403
+ "bloom": {
404
+ "desktop": {
405
+ "step1": {
406
+ "title": "Open the Bloom Wallet app",
407
+ "description": "We recommend putting Bloom Wallet on your home screen for quicker access."
408
+ },
409
+ "step2": {
410
+ "description": "Create or import a wallet using your recovery phrase.",
411
+ "title": "Create or Import a Wallet"
412
+ },
413
+ "step3": {
414
+ "description": "After you have a wallet, click on Connect to connect via Bloom. A connection prompt in the app will appear for you to confirm the connection.",
415
+ "title": "Click on Connect"
416
+ }
417
+ }
418
+ },
419
+
420
+ "bybit": {
421
+ "qr_code": {
422
+ "step1": {
423
+ "description": "We recommend putting Bybit on your home screen for faster access to your wallet.",
424
+ "title": "Open the Bybit app"
425
+ },
426
+ "step2": {
427
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
428
+ "title": "Create or Import a Wallet"
429
+ },
430
+ "step3": {
431
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
432
+ "title": "Tap the scan button"
433
+ }
434
+ },
435
+
436
+ "extension": {
437
+ "step1": {
438
+ "description": "Click at the top right of your browser and pin Bybit Wallet for easy access.",
439
+ "title": "Install the Bybit Wallet extension"
440
+ },
441
+ "step2": {
442
+ "description": "Create a new wallet or import an existing one.",
443
+ "title": "Create or Import a wallet"
444
+ },
445
+ "step3": {
446
+ "description": "Once you set up Bybit Wallet, click below to refresh the browser and load up the extension.",
447
+ "title": "Refresh your browser"
448
+ }
449
+ }
450
+ },
451
+
452
+ "binance": {
453
+ "qr_code": {
454
+ "step1": {
455
+ "description": "We recommend putting Binance on your home screen for faster access to your wallet.",
456
+ "title": "Open the Binance app"
457
+ },
458
+ "step2": {
459
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
460
+ "title": "Create or Import a Wallet"
461
+ },
462
+ "step3": {
463
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
464
+ "title": "Tap the WalletConnect button"
465
+ }
466
+ },
467
+ "extension": {
468
+ "step1": {
469
+ "title": "Install the Binance Wallet extension",
470
+ "description": "We recommend pinning Binance Wallet to your taskbar for quicker access to your wallet."
471
+ },
472
+ "step2": {
473
+ "title": "Create or Import a Wallet",
474
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
475
+ },
476
+ "step3": {
477
+ "title": "Refresh your browser",
478
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
479
+ }
480
+ }
481
+ },
482
+
483
+ "coin98": {
484
+ "qr_code": {
485
+ "step1": {
486
+ "description": "We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",
487
+ "title": "Open the Coin98 Wallet app"
488
+ },
489
+ "step2": {
490
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
491
+ "title": "Create or Import a Wallet"
492
+ },
493
+ "step3": {
494
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
495
+ "title": "Tap the WalletConnect button"
496
+ }
497
+ },
498
+
499
+ "extension": {
500
+ "step1": {
501
+ "description": "Click at the top right of your browser and pin Coin98 Wallet for easy access.",
502
+ "title": "Install the Coin98 Wallet extension"
503
+ },
504
+ "step2": {
505
+ "description": "Create a new wallet or import an existing one.",
506
+ "title": "Create or Import a wallet"
507
+ },
508
+ "step3": {
509
+ "description": "Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.",
510
+ "title": "Refresh your browser"
511
+ }
512
+ }
513
+ },
514
+
515
+ "coinbase": {
516
+ "qr_code": {
517
+ "step1": {
518
+ "description": "We recommend putting Coinbase Wallet on your home screen for quicker access.",
519
+ "title": "Open the Coinbase Wallet app"
520
+ },
521
+ "step2": {
522
+ "description": "You can easily backup your wallet using the cloud backup feature.",
523
+ "title": "Create or Import a Wallet"
524
+ },
525
+ "step3": {
526
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
527
+ "title": "Tap the scan button"
528
+ }
529
+ },
530
+
531
+ "extension": {
532
+ "step1": {
533
+ "description": "We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",
534
+ "title": "Install the Coinbase Wallet extension"
535
+ },
536
+ "step2": {
537
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
538
+ "title": "Create or Import a Wallet"
539
+ },
540
+ "step3": {
541
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
542
+ "title": "Refresh your browser"
543
+ }
544
+ }
545
+ },
546
+
547
+ "compass": {
548
+ "extension": {
549
+ "step1": {
550
+ "description": "We recommend pinning Compass Wallet to your taskbar for quicker access to your wallet.",
551
+ "title": "Install the Compass Wallet extension"
552
+ },
553
+ "step2": {
554
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
555
+ "title": "Create or Import a Wallet"
556
+ },
557
+ "step3": {
558
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
559
+ "title": "Refresh your browser"
560
+ }
561
+ }
562
+ },
563
+
564
+ "core": {
565
+ "qr_code": {
566
+ "step1": {
567
+ "description": "We recommend putting Core on your home screen for faster access to your wallet.",
568
+ "title": "Open the Core app"
569
+ },
570
+ "step2": {
571
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
572
+ "title": "Create or Import a Wallet"
573
+ },
574
+ "step3": {
575
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
576
+ "title": "Tap the WalletConnect button"
577
+ }
578
+ },
579
+
580
+ "extension": {
581
+ "step1": {
582
+ "description": "We recommend pinning Core to your taskbar for quicker access to your wallet.",
583
+ "title": "Install the Core extension"
584
+ },
585
+ "step2": {
586
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
587
+ "title": "Create or Import a Wallet"
588
+ },
589
+ "step3": {
590
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
591
+ "title": "Refresh your browser"
592
+ }
593
+ }
594
+ },
595
+
596
+ "fox": {
597
+ "qr_code": {
598
+ "step1": {
599
+ "description": "We recommend putting FoxWallet on your home screen for quicker access.",
600
+ "title": "Open the FoxWallet app"
601
+ },
602
+ "step2": {
603
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
604
+ "title": "Create or Import a Wallet"
605
+ },
606
+ "step3": {
607
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
608
+ "title": "Tap the scan button"
609
+ }
610
+ }
611
+ },
612
+
613
+ "frontier": {
614
+ "qr_code": {
615
+ "step1": {
616
+ "description": "We recommend putting Frontier Wallet on your home screen for quicker access.",
617
+ "title": "Open the Frontier Wallet app"
618
+ },
619
+ "step2": {
620
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
621
+ "title": "Create or Import a Wallet"
622
+ },
623
+ "step3": {
624
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
625
+ "title": "Tap the scan button"
626
+ }
627
+ },
628
+
629
+ "extension": {
630
+ "step1": {
631
+ "description": "We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.",
632
+ "title": "Install the Frontier Wallet extension"
633
+ },
634
+ "step2": {
635
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
636
+ "title": "Create or Import a Wallet"
637
+ },
638
+ "step3": {
639
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
640
+ "title": "Refresh your browser"
641
+ }
642
+ }
643
+ },
644
+
645
+ "im_token": {
646
+ "qr_code": {
647
+ "step1": {
648
+ "title": "Open the imToken app",
649
+ "description": "Put imToken app on your home screen for faster access to your wallet."
650
+ },
651
+ "step2": {
652
+ "title": "Create or Import a Wallet",
653
+ "description": "Create a new wallet or import an existing one."
654
+ },
655
+ "step3": {
656
+ "title": "Tap Scanner Icon in top right corner",
657
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
658
+ }
659
+ }
660
+ },
661
+
662
+ "iopay": {
663
+ "qr_code": {
664
+ "step1": {
665
+ "description": "We recommend putting ioPay on your home screen for faster access to your wallet.",
666
+ "title": "Open the ioPay app"
667
+ },
668
+ "step2": {
669
+ "description": "You can easily backup your wallet using our backup feature on your phone.",
670
+ "title": "Create or Import a Wallet"
671
+ },
672
+ "step3": {
673
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
674
+ "title": "Tap the WalletConnect button"
675
+ }
676
+ }
677
+ },
678
+
679
+ "kaikas": {
680
+ "extension": {
681
+ "step1": {
682
+ "description": "We recommend pinning Kaikas to your taskbar for quicker access to your wallet.",
683
+ "title": "Install the Kaikas extension"
684
+ },
685
+ "step2": {
686
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
687
+ "title": "Create or Import a Wallet"
688
+ },
689
+ "step3": {
690
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
691
+ "title": "Refresh your browser"
692
+ }
693
+ },
694
+ "qr_code": {
695
+ "step1": {
696
+ "title": "Open the Kaikas app",
697
+ "description": "Put Kaikas app on your home screen for faster access to your wallet."
698
+ },
699
+ "step2": {
700
+ "title": "Create or Import a Wallet",
701
+ "description": "Create a new wallet or import an existing one."
702
+ },
703
+ "step3": {
704
+ "title": "Tap Scanner Icon in top right corner",
705
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
706
+ }
707
+ }
708
+ },
709
+
710
+ "kaia": {
711
+ "extension": {
712
+ "step1": {
713
+ "description": "We recommend pinning Kaia to your taskbar for quicker access to your wallet.",
714
+ "title": "Install the Kaia extension"
715
+ },
716
+ "step2": {
717
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
718
+ "title": "Create or Import a Wallet"
719
+ },
720
+ "step3": {
721
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
722
+ "title": "Refresh your browser"
723
+ }
724
+ },
725
+ "qr_code": {
726
+ "step1": {
727
+ "title": "Open the Kaia app",
728
+ "description": "Put Kaia app on your home screen for faster access to your wallet."
729
+ },
730
+ "step2": {
731
+ "title": "Create or Import a Wallet",
732
+ "description": "Create a new wallet or import an existing one."
733
+ },
734
+ "step3": {
735
+ "title": "Tap Scanner Icon in top right corner",
736
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
737
+ }
738
+ }
739
+ },
740
+
741
+ "kraken": {
742
+ "qr_code": {
743
+ "step1": {
744
+ "title": "Open the Kraken Wallet app",
745
+ "description": "Add Kraken Wallet to your home screen for faster access to your wallet."
746
+ },
747
+ "step2": {
748
+ "title": "Create or Import a Wallet",
749
+ "description": "Create a new wallet or import an existing one."
750
+ },
751
+ "step3": {
752
+ "title": "Tap the QR icon and scan",
753
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
754
+ }
755
+ }
756
+ },
757
+
758
+ "kresus": {
759
+ "qr_code": {
760
+ "step1": {
761
+ "title": "Open the Kresus Wallet app",
762
+ "description": "Add Kresus Wallet to your home screen for faster access to your wallet."
763
+ },
764
+ "step2": {
765
+ "title": "Create or Import a Wallet",
766
+ "description": "Create a new wallet or import an existing one."
767
+ },
768
+ "step3": {
769
+ "title": "Tap the QR icon and scan",
770
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
771
+ }
772
+ }
773
+ },
774
+
775
+ "magicEden": {
776
+ "extension": {
777
+ "step1": {
778
+ "title": "Install the Magic Eden extension",
779
+ "description": "We recommend pinning Magic Eden to your taskbar for easier access to your wallet."
780
+ },
781
+ "step2": {
782
+ "title": "Create or Import a Wallet",
783
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
784
+ },
785
+ "step3": {
786
+ "title": "Refresh your browser",
787
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
788
+ }
789
+ }
790
+ },
791
+
792
+ "metamask": {
793
+ "qr_code": {
794
+ "step1": {
795
+ "title": "Open the MetaMask app",
796
+ "description": "We recommend putting MetaMask on your home screen for quicker access."
797
+ },
798
+ "step2": {
799
+ "title": "Create or Import a Wallet",
800
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
801
+ },
802
+ "step3": {
803
+ "title": "Tap the scan button",
804
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
805
+ }
806
+ },
807
+
808
+ "extension": {
809
+ "step1": {
810
+ "title": "Install the MetaMask extension",
811
+ "description": "We recommend pinning MetaMask to your taskbar for quicker access to your wallet."
812
+ },
813
+ "step2": {
814
+ "title": "Create or Import a Wallet",
815
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
816
+ },
817
+ "step3": {
818
+ "title": "Refresh your browser",
819
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
820
+ }
821
+ }
822
+ },
823
+
824
+ "nestwallet": {
825
+ "extension": {
826
+ "step1": {
827
+ "title": "Install the NestWallet extension",
828
+ "description": "We recommend pinning NestWallet to your taskbar for quicker access to your wallet."
829
+ },
830
+ "step2": {
831
+ "title": "Create or Import a Wallet",
832
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
833
+ },
834
+ "step3": {
835
+ "title": "Refresh your browser",
836
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
837
+ }
838
+ }
839
+ },
840
+
841
+ "okx": {
842
+ "qr_code": {
843
+ "step1": {
844
+ "title": "Open the OKX Wallet app",
845
+ "description": "We recommend putting OKX Wallet on your home screen for quicker access."
846
+ },
847
+ "step2": {
848
+ "title": "Create or Import a Wallet",
849
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
850
+ },
851
+ "step3": {
852
+ "title": "Tap the scan button",
853
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
854
+ }
855
+ },
856
+
857
+ "extension": {
858
+ "step1": {
859
+ "title": "Install the OKX Wallet extension",
860
+ "description": "We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet."
861
+ },
862
+ "step2": {
863
+ "title": "Create or Import a Wallet",
864
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
865
+ },
866
+ "step3": {
867
+ "title": "Refresh your browser",
868
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
869
+ }
870
+ }
871
+ },
872
+
873
+ "omni": {
874
+ "qr_code": {
875
+ "step1": {
876
+ "title": "Open the Omni app",
877
+ "description": "Add Omni to your home screen for faster access to your wallet."
878
+ },
879
+ "step2": {
880
+ "title": "Create or Import a Wallet",
881
+ "description": "Create a new wallet or import an existing one."
882
+ },
883
+ "step3": {
884
+ "title": "Tap the QR icon and scan",
885
+ "description": "Tap the QR icon on your home screen, scan the code and confirm the prompt to connect."
886
+ }
887
+ }
888
+ },
889
+
890
+ "1inch": {
891
+ "qr_code": {
892
+ "step1": {
893
+ "description": "Put 1inch Wallet on your home screen for faster access to your wallet.",
894
+ "title": "Open the 1inch Wallet app"
895
+ },
896
+ "step2": {
897
+ "description": "Create a wallet and username, or import an existing wallet.",
898
+ "title": "Create or Import a Wallet"
899
+ },
900
+ "step3": {
901
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
902
+ "title": "Tap the Scan QR button"
903
+ }
904
+ }
905
+ },
906
+
907
+ "token_pocket": {
908
+ "qr_code": {
909
+ "step1": {
910
+ "title": "Open the TokenPocket app",
911
+ "description": "We recommend putting TokenPocket on your home screen for quicker access."
912
+ },
913
+ "step2": {
914
+ "title": "Create or Import a Wallet",
915
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
916
+ },
917
+ "step3": {
918
+ "title": "Tap the scan button",
919
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
920
+ }
921
+ },
922
+
923
+ "extension": {
924
+ "step1": {
925
+ "title": "Install the TokenPocket extension",
926
+ "description": "We recommend pinning TokenPocket to your taskbar for quicker access to your wallet."
927
+ },
928
+ "step2": {
929
+ "title": "Create or Import a Wallet",
930
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
931
+ },
932
+ "step3": {
933
+ "title": "Refresh your browser",
934
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
935
+ }
936
+ }
937
+ },
938
+
939
+ "trust": {
940
+ "qr_code": {
941
+ "step1": {
942
+ "title": "Open the Trust Wallet app",
943
+ "description": "Put Trust Wallet on your home screen for faster access to your wallet."
944
+ },
945
+ "step2": {
946
+ "title": "Create or Import a Wallet",
947
+ "description": "Create a new wallet or import an existing one."
948
+ },
949
+ "step3": {
950
+ "title": "Tap WalletConnect in Settings",
951
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
952
+ }
953
+ },
954
+
955
+ "extension": {
956
+ "step1": {
957
+ "title": "Install the Trust Wallet extension",
958
+ "description": "Click at the top right of your browser and pin Trust Wallet for easy access."
959
+ },
960
+ "step2": {
961
+ "title": "Create or Import a wallet",
962
+ "description": "Create a new wallet or import an existing one."
963
+ },
964
+ "step3": {
965
+ "title": "Refresh your browser",
966
+ "description": "Once you set up Trust Wallet, click below to refresh the browser and load up the extension."
967
+ }
968
+ }
969
+ },
970
+
971
+ "uniswap": {
972
+ "qr_code": {
973
+ "step1": {
974
+ "title": "Open the Uniswap app",
975
+ "description": "Add Uniswap Wallet to your home screen for faster access to your wallet."
976
+ },
977
+ "step2": {
978
+ "title": "Create or Import a Wallet",
979
+ "description": "Create a new wallet or import an existing one."
980
+ },
981
+ "step3": {
982
+ "title": "Tap the QR icon and scan",
983
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
984
+ }
985
+ }
986
+ },
987
+
988
+ "zerion": {
989
+ "qr_code": {
990
+ "step1": {
991
+ "title": "Open the Zerion app",
992
+ "description": "We recommend putting Zerion on your home screen for quicker access."
993
+ },
994
+ "step2": {
995
+ "title": "Create or Import a Wallet",
996
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
997
+ },
998
+ "step3": {
999
+ "title": "Tap the scan button",
1000
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1001
+ }
1002
+ },
1003
+
1004
+ "extension": {
1005
+ "step1": {
1006
+ "title": "Install the Zerion extension",
1007
+ "description": "We recommend pinning Zerion to your taskbar for quicker access to your wallet."
1008
+ },
1009
+ "step2": {
1010
+ "title": "Create or Import a Wallet",
1011
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1012
+ },
1013
+ "step3": {
1014
+ "title": "Refresh your browser",
1015
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1016
+ }
1017
+ }
1018
+ },
1019
+
1020
+ "rainbow": {
1021
+ "qr_code": {
1022
+ "step1": {
1023
+ "title": "Open the Rainbow app",
1024
+ "description": "We recommend putting Rainbow on your home screen for faster access to your wallet."
1025
+ },
1026
+ "step2": {
1027
+ "title": "Create or Import a Wallet",
1028
+ "description": "You can easily backup your wallet using our backup feature on your phone."
1029
+ },
1030
+ "step3": {
1031
+ "title": "Tap the scan button",
1032
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1033
+ }
1034
+ }
1035
+ },
1036
+
1037
+ "enkrypt": {
1038
+ "extension": {
1039
+ "step1": {
1040
+ "description": "We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.",
1041
+ "title": "Install the Enkrypt Wallet extension"
1042
+ },
1043
+ "step2": {
1044
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1045
+ "title": "Create or Import a Wallet"
1046
+ },
1047
+ "step3": {
1048
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1049
+ "title": "Refresh your browser"
1050
+ }
1051
+ }
1052
+ },
1053
+
1054
+ "frame": {
1055
+ "extension": {
1056
+ "step1": {
1057
+ "description": "We recommend pinning Frame to your taskbar for quicker access to your wallet.",
1058
+ "title": "Install Frame & the companion extension"
1059
+ },
1060
+ "step2": {
1061
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1062
+ "title": "Create or Import a Wallet"
1063
+ },
1064
+ "step3": {
1065
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1066
+ "title": "Refresh your browser"
1067
+ }
1068
+ }
1069
+ },
1070
+
1071
+ "one_key": {
1072
+ "extension": {
1073
+ "step1": {
1074
+ "title": "Install the OneKey Wallet extension",
1075
+ "description": "We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet."
1076
+ },
1077
+ "step2": {
1078
+ "title": "Create or Import a Wallet",
1079
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1080
+ },
1081
+ "step3": {
1082
+ "title": "Refresh your browser",
1083
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1084
+ }
1085
+ }
1086
+ },
1087
+
1088
+ "paraswap": {
1089
+ "qr_code": {
1090
+ "step1": {
1091
+ "title": "Open the ParaSwap app",
1092
+ "description": "Add ParaSwap Wallet to your home screen for faster access to your wallet."
1093
+ },
1094
+ "step2": {
1095
+ "title": "Create or Import a Wallet",
1096
+ "description": "Create a new wallet or import an existing one."
1097
+ },
1098
+ "step3": {
1099
+ "title": "Tap the QR icon and scan",
1100
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
1101
+ }
1102
+ }
1103
+ },
1104
+
1105
+ "phantom": {
1106
+ "extension": {
1107
+ "step1": {
1108
+ "title": "Install the Phantom extension",
1109
+ "description": "We recommend pinning Phantom to your taskbar for easier access to your wallet."
1110
+ },
1111
+ "step2": {
1112
+ "title": "Create or Import a Wallet",
1113
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
1114
+ },
1115
+ "step3": {
1116
+ "title": "Refresh your browser",
1117
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1118
+ }
1119
+ }
1120
+ },
1121
+
1122
+ "rabby": {
1123
+ "extension": {
1124
+ "step1": {
1125
+ "title": "Install the Rabby extension",
1126
+ "description": "We recommend pinning Rabby to your taskbar for quicker access to your wallet."
1127
+ },
1128
+ "step2": {
1129
+ "title": "Create or Import a Wallet",
1130
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1131
+ },
1132
+ "step3": {
1133
+ "title": "Refresh your browser",
1134
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1135
+ }
1136
+ }
1137
+ },
1138
+
1139
+ "ronin": {
1140
+ "qr_code": {
1141
+ "step1": {
1142
+ "description": "We recommend putting Ronin Wallet on your home screen for quicker access.",
1143
+ "title": "Open the Ronin Wallet app"
1144
+ },
1145
+ "step2": {
1146
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1147
+ "title": "Create or Import a Wallet"
1148
+ },
1149
+ "step3": {
1150
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1151
+ "title": "Tap the scan button"
1152
+ }
1153
+ },
1154
+
1155
+ "extension": {
1156
+ "step1": {
1157
+ "description": "We recommend pinning Ronin Wallet to your taskbar for quicker access to your wallet.",
1158
+ "title": "Install the Ronin Wallet extension"
1159
+ },
1160
+ "step2": {
1161
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",
1162
+ "title": "Create or Import a Wallet"
1163
+ },
1164
+ "step3": {
1165
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension.",
1166
+ "title": "Refresh your browser"
1167
+ }
1168
+ }
1169
+ },
1170
+
1171
+ "ramper": {
1172
+ "extension": {
1173
+ "step1": {
1174
+ "title": "Install the Ramper extension",
1175
+ "description": "We recommend pinning Ramper to your taskbar for easier access to your wallet."
1176
+ },
1177
+ "step2": {
1178
+ "title": "Create a Wallet",
1179
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1180
+ },
1181
+ "step3": {
1182
+ "title": "Refresh your browser",
1183
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1184
+ }
1185
+ }
1186
+ },
1187
+
1188
+ "safeheron": {
1189
+ "extension": {
1190
+ "step1": {
1191
+ "title": "Install the Core extension",
1192
+ "description": "We recommend pinning Safeheron to your taskbar for quicker access to your wallet."
1193
+ },
1194
+ "step2": {
1195
+ "title": "Create or Import a Wallet",
1196
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1197
+ },
1198
+ "step3": {
1199
+ "title": "Refresh your browser",
1200
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1201
+ }
1202
+ }
1203
+ },
1204
+
1205
+ "taho": {
1206
+ "extension": {
1207
+ "step1": {
1208
+ "title": "Install the Taho extension",
1209
+ "description": "We recommend pinning Taho to your taskbar for quicker access to your wallet."
1210
+ },
1211
+ "step2": {
1212
+ "title": "Create or Import a Wallet",
1213
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1214
+ },
1215
+ "step3": {
1216
+ "title": "Refresh your browser",
1217
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1218
+ }
1219
+ }
1220
+ },
1221
+
1222
+ "wigwam": {
1223
+ "extension": {
1224
+ "step1": {
1225
+ "title": "Install the Wigwam extension",
1226
+ "description": "We recommend pinning Wigwam to your taskbar for quicker access to your wallet."
1227
+ },
1228
+ "step2": {
1229
+ "title": "Create or Import a Wallet",
1230
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1231
+ },
1232
+ "step3": {
1233
+ "title": "Refresh your browser",
1234
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1235
+ }
1236
+ }
1237
+ },
1238
+
1239
+ "talisman": {
1240
+ "extension": {
1241
+ "step1": {
1242
+ "title": "Install the Talisman extension",
1243
+ "description": "We recommend pinning Talisman to your taskbar for quicker access to your wallet."
1244
+ },
1245
+ "step2": {
1246
+ "title": "Create or Import an Ethereum Wallet",
1247
+ "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
1248
+ },
1249
+ "step3": {
1250
+ "title": "Refresh your browser",
1251
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1252
+ }
1253
+ }
1254
+ },
1255
+
1256
+ "ctrl": {
1257
+ "extension": {
1258
+ "step1": {
1259
+ "title": "Install the CTRL Wallet extension",
1260
+ "description": "We recommend pinning CTRL Wallet to your taskbar for quicker access to your wallet."
1261
+ },
1262
+ "step2": {
1263
+ "title": "Create or Import a Wallet",
1264
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1265
+ },
1266
+ "step3": {
1267
+ "title": "Refresh your browser",
1268
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1269
+ }
1270
+ }
1271
+ },
1272
+
1273
+ "zeal": {
1274
+ "qr_code": {
1275
+ "step1": {
1276
+ "title": "Open the Zeal app",
1277
+ "description": "Add Zeal Wallet to your home screen for faster access to your wallet."
1278
+ },
1279
+ "step2": {
1280
+ "title": "Create or Import a Wallet",
1281
+ "description": "Create a new wallet or import an existing one."
1282
+ },
1283
+ "step3": {
1284
+ "title": "Tap the QR icon and scan",
1285
+ "description": "Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."
1286
+ }
1287
+ },
1288
+ "extension": {
1289
+ "step1": {
1290
+ "title": "Install the Zeal extension",
1291
+ "description": "We recommend pinning Zeal to your taskbar for quicker access to your wallet."
1292
+ },
1293
+ "step2": {
1294
+ "title": "Create or Import a Wallet",
1295
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1296
+ },
1297
+ "step3": {
1298
+ "title": "Refresh your browser",
1299
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1300
+ }
1301
+ }
1302
+ },
1303
+
1304
+ "safepal": {
1305
+ "extension": {
1306
+ "step1": {
1307
+ "title": "Install the SafePal Wallet extension",
1308
+ "description": "Click at the top right of your browser and pin SafePal Wallet for easy access."
1309
+ },
1310
+ "step2": {
1311
+ "title": "Create or Import a wallet",
1312
+ "description": "Create a new wallet or import an existing one."
1313
+ },
1314
+ "step3": {
1315
+ "title": "Refresh your browser",
1316
+ "description": "Once you set up SafePal Wallet, click below to refresh the browser and load up the extension."
1317
+ }
1318
+ },
1319
+ "qr_code": {
1320
+ "step1": {
1321
+ "title": "Open the SafePal Wallet app",
1322
+ "description": "Put SafePal Wallet on your home screen for faster access to your wallet."
1323
+ },
1324
+ "step2": {
1325
+ "title": "Create or Import a Wallet",
1326
+ "description": "Create a new wallet or import an existing one."
1327
+ },
1328
+ "step3": {
1329
+ "title": "Tap WalletConnect in Settings",
1330
+ "description": "Choose New Connection, then scan the QR code and confirm the prompt to connect."
1331
+ }
1332
+ }
1333
+ },
1334
+
1335
+ "desig": {
1336
+ "extension": {
1337
+ "step1": {
1338
+ "title": "Install the Desig extension",
1339
+ "description": "We recommend pinning Desig to your taskbar for easier access to your wallet."
1340
+ },
1341
+ "step2": {
1342
+ "title": "Create a Wallet",
1343
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1344
+ },
1345
+ "step3": {
1346
+ "title": "Refresh your browser",
1347
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1348
+ }
1349
+ }
1350
+ },
1351
+
1352
+ "subwallet": {
1353
+ "extension": {
1354
+ "step1": {
1355
+ "title": "Install the SubWallet extension",
1356
+ "description": "We recommend pinning SubWallet to your taskbar for quicker access to your wallet."
1357
+ },
1358
+ "step2": {
1359
+ "title": "Create or Import a Wallet",
1360
+ "description": "Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."
1361
+ },
1362
+ "step3": {
1363
+ "title": "Refresh your browser",
1364
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1365
+ }
1366
+ },
1367
+ "qr_code": {
1368
+ "step1": {
1369
+ "title": "Open the SubWallet app",
1370
+ "description": "We recommend putting SubWallet on your home screen for quicker access."
1371
+ },
1372
+ "step2": {
1373
+ "title": "Create or Import a Wallet",
1374
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1375
+ },
1376
+ "step3": {
1377
+ "title": "Tap the scan button",
1378
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1379
+ }
1380
+ }
1381
+ },
1382
+
1383
+ "clv": {
1384
+ "extension": {
1385
+ "step1": {
1386
+ "title": "Install the CLV Wallet extension",
1387
+ "description": "We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet."
1388
+ },
1389
+ "step2": {
1390
+ "title": "Create or Import a Wallet",
1391
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1392
+ },
1393
+ "step3": {
1394
+ "title": "Refresh your browser",
1395
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1396
+ }
1397
+ },
1398
+ "qr_code": {
1399
+ "step1": {
1400
+ "title": "Open the CLV Wallet app",
1401
+ "description": "We recommend putting CLV Wallet on your home screen for quicker access."
1402
+ },
1403
+ "step2": {
1404
+ "title": "Create or Import a Wallet",
1405
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."
1406
+ },
1407
+ "step3": {
1408
+ "title": "Tap the scan button",
1409
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1410
+ }
1411
+ }
1412
+ },
1413
+
1414
+ "okto": {
1415
+ "qr_code": {
1416
+ "step1": {
1417
+ "title": "Open the Okto app",
1418
+ "description": "Add Okto to your home screen for quick access"
1419
+ },
1420
+ "step2": {
1421
+ "title": "Create an MPC Wallet",
1422
+ "description": "Create an account and generate a wallet"
1423
+ },
1424
+ "step3": {
1425
+ "title": "Tap WalletConnect in Settings",
1426
+ "description": "Tap the Scan QR icon at the top right and confirm the prompt to connect."
1427
+ }
1428
+ }
1429
+ },
1430
+
1431
+ "ledger": {
1432
+ "desktop": {
1433
+ "step1": {
1434
+ "title": "Open the Ledger Live app",
1435
+ "description": "We recommend putting Ledger Live on your home screen for quicker access."
1436
+ },
1437
+ "step2": {
1438
+ "title": "Set up your Ledger",
1439
+ "description": "Set up a new Ledger or connect to an existing one."
1440
+ },
1441
+ "step3": {
1442
+ "title": "Connect",
1443
+ "description": "A connection prompt will appear for you to connect your wallet."
1444
+ }
1445
+ },
1446
+ "qr_code": {
1447
+ "step1": {
1448
+ "title": "Open the Ledger Live app",
1449
+ "description": "We recommend putting Ledger Live on your home screen for quicker access."
1450
+ },
1451
+ "step2": {
1452
+ "title": "Set up your Ledger",
1453
+ "description": "You can either sync with the desktop app or connect your Ledger."
1454
+ },
1455
+ "step3": {
1456
+ "title": "Scan the code",
1457
+ "description": "Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."
1458
+ }
1459
+ }
1460
+ },
1461
+
1462
+ "valora": {
1463
+ "qr_code": {
1464
+ "step1": {
1465
+ "title": "Open the Valora app",
1466
+ "description": "We recommend putting Valora on your home screen for quicker access."
1467
+ },
1468
+ "step2": {
1469
+ "title": "Create or import a wallet",
1470
+ "description": "Create a new wallet or import an existing one."
1471
+ },
1472
+ "step3": {
1473
+ "title": "Tap the scan button",
1474
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1475
+ }
1476
+ }
1477
+ },
1478
+
1479
+ "gate": {
1480
+ "qr_code": {
1481
+ "step1": {
1482
+ "title": "Open the Gate app",
1483
+ "description": "We recommend putting Gate on your home screen for quicker access."
1484
+ },
1485
+ "step2": {
1486
+ "title": "Create or Import a Wallet",
1487
+ "description": "Create a new wallet or import an existing one."
1488
+ },
1489
+ "step3": {
1490
+ "title": "Tap the scan button",
1491
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1492
+ }
1493
+ },
1494
+ "extension": {
1495
+ "step1": {
1496
+ "title": "Install the Gate extension",
1497
+ "description": "We recommend pinning Gate to your taskbar for easier access to your wallet."
1498
+ },
1499
+ "step2": {
1500
+ "title": "Create or Import a Wallet",
1501
+ "description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
1502
+ },
1503
+ "step3": {
1504
+ "title": "Refresh your browser",
1505
+ "description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
1506
+ }
1507
+ }
1508
+ },
1509
+
1510
+ "gemini": {
1511
+ "qr_code": {
1512
+ "step1": {
1513
+ "title": "Open keys.gemini.com",
1514
+ "description": "Visit keys.gemini.com on your mobile browser - no app download required."
1515
+ },
1516
+ "step2": {
1517
+ "title": "Create Your Wallet Instantly",
1518
+ "description": "Set up your smart wallet in seconds using your device's built-in authentication."
1519
+ },
1520
+ "step3": {
1521
+ "title": "Scan to Connect",
1522
+ "description": "Scan the QR code to instantly connect your wallet - it just works."
1523
+ }
1524
+ },
1525
+ "extension": {
1526
+ "step1": {
1527
+ "title": "Go to keys.gemini.com",
1528
+ "description": "No extensions or downloads needed - your wallet lives securely in the browser."
1529
+ },
1530
+ "step2": {
1531
+ "title": "One-Click Setup",
1532
+ "description": "Create your smart wallet instantly with passkey authentication - easier than any wallet out there."
1533
+ },
1534
+ "step3": {
1535
+ "title": "Connect and Go",
1536
+ "description": "Approve the connection and you're ready - the unopinionated wallet that just works."
1537
+ }
1538
+ }
1539
+ },
1540
+
1541
+ "xportal": {
1542
+ "qr_code": {
1543
+ "step1": {
1544
+ "description": "Put xPortal on your home screen for faster access to your wallet.",
1545
+ "title": "Open the xPortal app"
1546
+ },
1547
+ "step2": {
1548
+ "description": "Create a wallet or import an existing one.",
1549
+ "title": "Create or Import a Wallet"
1550
+ },
1551
+ "step3": {
1552
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1553
+ "title": "Tap the Scan QR button"
1554
+ }
1555
+ }
1556
+ },
1557
+
1558
+ "mew": {
1559
+ "qr_code": {
1560
+ "step1": {
1561
+ "description": "We recommend putting MEW Wallet on your home screen for quicker access.",
1562
+ "title": "Open the MEW Wallet app"
1563
+ },
1564
+ "step2": {
1565
+ "description": "You can easily backup your wallet using the cloud backup feature.",
1566
+ "title": "Create or Import a Wallet"
1567
+ },
1568
+ "step3": {
1569
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet.",
1570
+ "title": "Tap the scan button"
1571
+ }
1572
+ }
1573
+ },
1574
+
1575
+ "zilpay": {
1576
+ "qr_code": {
1577
+ "step1": {
1578
+ "title": "Open the ZilPay app",
1579
+ "description": "Add ZilPay to your home screen for faster access to your wallet."
1580
+ },
1581
+ "step2": {
1582
+ "title": "Create or Import a Wallet",
1583
+ "description": "Create a new wallet or import an existing one."
1584
+ },
1585
+ "step3": {
1586
+ "title": "Tap the scan button",
1587
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1588
+ }
1589
+ }
1590
+ },
1591
+
1592
+ "nova": {
1593
+ "qr_code": {
1594
+ "step1": {
1595
+ "title": "Open the Nova Wallet app",
1596
+ "description": "Add Nova Wallet to your home screen for faster access to your wallet."
1597
+ },
1598
+ "step2": {
1599
+ "title": "Create or Import a Wallet",
1600
+ "description": "Create a new wallet or import an existing one."
1601
+ },
1602
+ "step3": {
1603
+ "title": "Tap the scan button",
1604
+ "description": "After you scan, a connection prompt will appear for you to connect your wallet."
1605
+ }
1606
+ }
1607
+ }
1608
+ }
1609
+ }
1610
+ `;function UA(e,t){return Object.defineProperty(e,"__recipe__",{value:t,writable:!1}),e}var Qx=UA;function Gx(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");function n(r){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return{[t.defaultCondition]:r}}if(Array.isArray(r)){if(!("responsiveArray"in t))throw new Error("Responsive arrays are not supported");var o={};for(var s in t.responsiveArray)r[s]!=null&&(o[t.responsiveArray[s]]=r[s]);return o}return r}return Qx(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function zA(e){var{conditions:t}=e;if(!t)throw new Error("Styles have no conditions");var n=Gx(e);function r(o,s){if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){if(!t.defaultCondition)throw new Error("No default condition");return s(o,t.defaultCondition)}var i=Array.isArray(o)?n(o):o,a={};for(var c in i)i[c]!=null&&(a[c]=s(i[c],c));return a}return Qx(r,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function $A(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WA(e){var t=$A(e,"string");return typeof t=="symbol"?t:String(t)}function qA(e,t,n){return t=WA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$y(Object(n),!0).forEach(function(r){qA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var VA=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Object.assign({},...n.map(c=>c.styles)),s=Object.keys(o),i=s.filter(c=>"mappings"in o[c]),a=c=>{var l=[],u={},f=Yf({},c),d=!1;for(var h of i){var p=c[h];if(p!=null){var m=o[h];d=!0;for(var v of m.mappings)u[v]=p,f[v]==null&&delete f[v]}}var y=d?Yf(Yf({},u),f):c,g=function(){var E=y[w],A=o[w];try{if(A.mappings)return 1;if(typeof E=="string"||typeof E=="number")l.push(A.values[E].defaultClass);else if(Array.isArray(E))for(var k=0;k<E.length;k++){var S=E[k];if(S!=null){var _=A.responsiveArray[k];l.push(A.values[S].conditions[_])}}else for(var N in E){var O=E[N];O!=null&&l.push(A.values[O].conditions[N])}}catch(P){throw P}};for(var w in y)g();return e(l.join(" "))};return Object.assign(a,{properties:new Set(s)})},HA=e=>e,QA=function(){return VA(HA)(...arguments)};const _i=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Up=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],Kx=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Yx=[...Kx,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],GA=[...Kx,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],Wy=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],qy=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Jx=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],Vy=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],DU=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];function Pn(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new ck(e.type);return`${e.name}(${Pd(e.inputs,{includeName:t})})`}function Pd(e,{includeName:t=!1}={}){return e?e.map(n=>KA(n,{includeName:t})).join(t?", ":","):""}function KA(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Pd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Zn(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Ne(e){return Zn(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Xx="2.47.6";let fa={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Xx}`},U=class zp extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof zp?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),o=n.cause instanceof zp&&n.cause.docsPath||n.docsPath,s=(a=fa.getDocsUrl)==null?void 0:a.call(fa,{...n,docsPath:o}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...fa.version?[`Version: ${fa.version}`]:[]].join(`
1611
+ `);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Xx}walk(t){return Zx(this,t)}};function Zx(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Zx(e.cause,t):t?null:e}class YA extends U{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
1612
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Hy extends U{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
1613
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class e2 extends U{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
1614
+ `),{metaMessages:[`Params: (${Pd(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Gc extends U{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t})}}class JA extends U{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
1615
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class XA extends U{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Ne(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class ZA extends U{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
1616
+ `),{name:"AbiEncodingLengthMismatchError"})}}class ek extends U{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
1617
+ `),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class Qy extends U{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
1618
+ `),{docsPath:n,name:"AbiErrorNotFoundError"})}}class t2 extends U{constructor(t,{docsPath:n,cause:r}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
1619
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError",cause:r}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class tk extends U{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class nk extends U{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
1620
+ `),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class Gy extends U{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
1621
+ `),{docsPath:n,name:"AbiEventNotFoundError"})}}class Ii extends U{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
1622
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class n2 extends U{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
1623
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class rk extends U{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
1624
+ `),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class ok extends U{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Pn(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Pn(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let sk=class extends U{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class Qu extends U{constructor({abiItem:t,data:n,params:r,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join(`
1625
+ `),{metaMessages:[`Params: (${Pd(r,{includeName:!0})})`,`Data: ${n} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=o}}class Ym extends U{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${Pn(t,{includeName:!0})}".`].join(`
1626
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class ik extends U{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
1627
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class ak extends U{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
1628
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}let r2=class extends U{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
1629
+ `),{name:"InvalidArrayError"})}};class ck extends U{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
1630
+ `),{name:"InvalidDefinitionTypeError"})}}class $U extends U{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}let _t=class extends U{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}},o2=class extends U{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},s2=class extends U{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Ky extends U{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function Wi(e,{dir:t,size:n=32}={}){return typeof e=="string"?ho(e,{dir:t,size:n}):lk(e,{dir:t,size:n})}function ho(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new s2({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function lk(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new s2({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const s=t==="right";r[s?o:n-o-1]=e[s?o:e.length-o-1]}return r}let Jm=class extends U{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number "${s}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},uk=class extends U{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class dk extends U{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let fk=class extends U{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function zt(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function bn(e,{size:t}){if(Ne(e)>t)throw new fk({givenSize:Ne(e),maxSize:t})}function Ze(e,t={}){const{signed:n}=t;t.size&&bn(e,{size:t.size});const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function hk(e,t={}){let n=e;if(t.size&&(bn(n,{size:t.size}),n=zt(n)),zt(n)==="0x00")return!1;if(zt(n)==="0x01")return!0;throw new dk(n)}function tn(e,t={}){const n=Ze(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Jm({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function pk(e,t={}){let n=Tn(e);return t.size&&(bn(n,{size:t.size}),n=zt(n,{dir:"right"})),new TextDecoder().decode(n)}const mk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function $t(e,t={}){return typeof e=="number"||typeof e=="bigint"?z(e,t):typeof e=="string"?Bi(e,t):typeof e=="boolean"?i2(e,t):$e(e,t)}function i2(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(bn(n,{size:t.size}),Wi(n,{size:t.size})):n}function $e(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=mk[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(bn(r,{size:t.size}),Wi(r,{dir:"right",size:t.size})):r}function z(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const c=typeof e=="bigint"?"n":"";throw new Jm({max:s?`${s}${c}`:void 0,min:`${i}${c}`,signed:n,size:r,value:`${e}${c}`})}const a=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?Wi(a,{size:r}):a}const gk=new TextEncoder;function Bi(e,t={}){const n=gk.encode(e);return $e(n,t)}const yk=new TextEncoder;function qi(e,t={}){return typeof e=="number"||typeof e=="bigint"?bk(e,t):typeof e=="boolean"?wk(e,t):Zn(e)?Tn(e,t):ts(e,t)}function wk(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(bn(n,{size:t.size}),Wi(n,{size:t.size})):n}const sr={zero:48,nine:57,A:65,F:70,a:97,f:102};function Yy(e){if(e>=sr.zero&&e<=sr.nine)return e-sr.zero;if(e>=sr.A&&e<=sr.F)return e-(sr.A-10);if(e>=sr.a&&e<=sr.f)return e-(sr.a-10)}function Tn(e,t={}){let n=e;t.size&&(bn(n,{size:t.size}),n=Wi(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,s=new Uint8Array(o);for(let i=0,a=0;i<o;i++){const c=Yy(r.charCodeAt(a++)),l=Yy(r.charCodeAt(a++));if(c===void 0||l===void 0)throw new U(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[i]=c*16+l}return s}function bk(e,t){const n=z(e,t);return Tn(n)}function ts(e,t={}){const n=yk.encode(e);return typeof t.size=="number"?(bn(n,{size:t.size}),Wi(n,{dir:"right",size:t.size})):n}const Tl=BigInt(2**32-1),Jy=BigInt(32);function vk(e,t=!1){return t?{h:Number(e&Tl),l:Number(e>>Jy&Tl)}:{h:Number(e>>Jy&Tl)|0,l:Number(e&Tl)|0}}function xk(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=vk(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const Ck=(e,t,n)=>e<<n|t>>>32-n,Ek=(e,t,n)=>t<<n|e>>>32-n,Ak=(e,t,n)=>t<<n-32|e>>>64-n,kk=(e,t,n)=>e<<n-32|t>>>64-n,Is=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Sk(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ic(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ls(e,...t){if(!Sk(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function jk(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ic(e.outputLen),ic(e.blockLen)}function Ni(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a2(e,t){ls(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function _k(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Pi(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Jf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function zn(e,t){return e<<32-t|e>>>t}const Ik=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Bk(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Nk(e){for(let t=0;t<e.length;t++)e[t]=Bk(e[t]);return e}const Xy=Ik?e=>e:Nk;function Pk(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Td(e){return typeof e=="string"&&(e=Pk(e)),ls(e),e}function Tk(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];ls(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}let Xm=class{};function c2(e){const t=r=>e().update(Td(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ok(e=32){if(Is&&typeof Is.getRandomValues=="function")return Is.getRandomValues(new Uint8Array(e));if(Is&&typeof Is.randomBytes=="function")return Uint8Array.from(Is.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Rk=BigInt(0),ha=BigInt(1),Mk=BigInt(2),Lk=BigInt(7),Fk=BigInt(256),Dk=BigInt(113),l2=[],u2=[],d2=[];for(let e=0,t=ha,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],l2.push(2*(5*r+n)),u2.push((e+1)*(e+2)/2%64);let o=Rk;for(let s=0;s<7;s++)t=(t<<ha^(t>>Lk)*Dk)%Fk,t&Mk&&(o^=ha<<(ha<<BigInt(s))-ha);d2.push(o)}const f2=xk(d2,!0),Uk=f2[0],zk=f2[1],Zy=(e,t,n)=>n>32?Ak(e,t,n):Ck(e,t,n),ew=(e,t,n)=>n>32?kk(e,t,n):Ek(e,t,n);function $k(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=Zy(l,u,1)^n[a],d=ew(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=u2[i],c=Zy(o,s,a),l=ew(o,s,a),u=l2[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Uk[r],e[1]^=zk[r]}Pi(n)}let Wk=class h2 extends Xm{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,ic(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=_k(this.state)}clone(){return this._cloneInto()}keccak(){Xy(this.state32),$k(this.state32,this.rounds),Xy(this.state32),this.posOut=0,this.pos=0}update(t){Ni(this),t=Td(t),ls(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Ni(this,!1),ls(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ic(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(a2(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Pi(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new h2(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}};const qk=(e,t,n)=>c2(()=>new Wk(t,e,n)),Vk=qk(1,136,256/8);function ot(e,t){const n=t||"hex",r=Vk(Zn(e,{strict:!1})?qi(e):e);return n==="bytes"?r:$t(r)}let Vi=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,n)),n}set(t,n){if(super.has(t)&&super.delete(t),super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=super.keys().next().value;r!==void 0&&super.delete(r)}return this}};const Hk=/^0x[a-fA-F0-9]{40}$/,Xf=new Vi(8192);function We(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Xf.has(r))return Xf.get(r);const o=Hk.test(e)?e.toLowerCase()===e?!0:n?Kc(e)===e:!0:!1;return Xf.set(r,o),o}const Zf=new Vi(8192);function Kc(e,t){if(Zf.has(`${e}.${t}`))return Zf.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=ot(ts(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const s=`0x${o.join("")}`;return Zf.set(`${e}.${t}`,s),s}function Te(e,t){if(!We(e,{strict:!1}))throw new _t({address:e});return Kc(e,t)}let tw=class extends U{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},p2=class extends U{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Qk=class extends U{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Gk={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Qk({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new p2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new tw({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new tw({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Zm(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Gk);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function wo(e,t,n,{strict:r}={}){return Zn(e,{strict:!1})?$p(e,t,n,{strict:r}):y2(e,t,n,{strict:r})}function m2(e,t){if(typeof t=="number"&&t>0&&t>Ne(e)-1)throw new o2({offset:t,position:"start",size:Ne(e)})}function g2(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ne(e)!==n-t)throw new o2({offset:n,position:"end",size:Ne(e)})}function y2(e,t,n,{strict:r}={}){m2(e,t);const o=e.slice(t,n);return r&&g2(o,t,n),o}function $p(e,t,n,{strict:r}={}){m2(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&g2(o,t,n),o}function Kk(e,t={}){typeof t.size<"u"&&bn(e,{size:t.size});const n=$e(e,t);return Ze(n,t)}function Yk(e,t={}){let n=e;if(typeof t.size<"u"&&(bn(n,{size:t.size}),n=zt(n)),n.length>1||n[0]>1)throw new uk(n);return!!n[0]}function xr(e,t={}){typeof t.size<"u"&&bn(e,{size:t.size});const n=$e(e,t);return tn(n,t)}function Jk(e,t={}){let n=e;return typeof t.size<"u"&&(bn(n,{size:t.size}),n=zt(n,{dir:"right"})),new TextDecoder().decode(n)}function mt(e){return typeof e[0]=="string"?Ln(e):Xk(e)}function Xk(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Ln(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const ez=/^(.*)\[([0-9]*)\]$/,Zk=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,w2=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Cs(e,t){if(e.length!==t.length)throw new ZA({expectedLength:e.length,givenLength:t.length});const n=e7({params:e,values:t}),r=tg(n);return r.length===0?"0x":r}function e7({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(eg({param:e[r],value:t[r]}));return n}function eg({param:e,value:t}){const n=ng(e.type);if(n){const[r,o]=n;return n7(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return a7(t,{param:e});if(e.type==="address")return t7(t);if(e.type==="bool")return o7(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,o="256"]=w2.exec(e.type)??[];return s7(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return r7(t,{param:e});if(e.type==="string")return i7(t);throw new ik(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function tg(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=Ne(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(z(t+o,{size:32})),r.push(a),o+=Ne(a)):n.push(a)}return mt([...n,...r])}function t7(e){if(!We(e))throw new _t({address:e});return{dynamic:!1,encoded:ho(e.toLowerCase())}}function n7(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new r2(e);if(!r&&e.length!==t)throw new JA({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1;const s=[];for(let i=0;i<e.length;i++){const a=eg({param:n,value:e[i]});a.dynamic&&(o=!0),s.push(a)}if(r||o){const i=tg(s);if(r){const a=z(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?mt([a,i]):a}}if(o)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:mt(s.map(({encoded:i})=>i))}}function r7(e,{param:t}){const[,n]=t.type.split("bytes"),r=Ne(e);if(!n){let o=e;return r%32!==0&&(o=ho(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:mt([ho(z(r,{size:32})),o])}}if(r!==Number.parseInt(n,10))throw new XA({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:ho(e,{dir:"right"})}}function o7(e){if(typeof e!="boolean")throw new U(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ho(i2(e))}}function s7(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Jm({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:z(e,{size:32,signed:t})}}function i7(e){const t=Bi(e),n=Math.ceil(Ne(t)/32),r=[];for(let o=0;o<n;o++)r.push(ho(wo(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:mt([ho(z(Ne(t),{size:32})),...r])}}function a7(e,{param:t}){let n=!1;const r=[];for(let o=0;o<t.components.length;o++){const s=t.components[o],i=Array.isArray(e)?o:s.name,a=eg({param:s,value:e[i]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?tg(r):mt(r.map(({encoded:o})=>o))}}function ng(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Yc(e,t){const n=typeof t=="string"?Tn(t):t,r=Zm(n);if(Ne(n)===0&&e.length>0)throw new Gc;if(Ne(t)&&Ne(t)<32)throw new e2({data:typeof t=="string"?t:$e(t),params:e,size:Ne(t)});let o=0;const s=[];for(let i=0;i<e.length;++i){const a=e[i];r.setPosition(o);const[c,l]=ri(r,a,{staticPosition:0});o+=l,s.push(c)}return s}function ri(e,t,{staticPosition:n}){const r=ng(t.type);if(r){const[o,s]=r;return l7(e,{...t,type:s},{length:o,staticPosition:n})}if(t.type==="tuple")return h7(e,t,{staticPosition:n});if(t.type==="address")return c7(e);if(t.type==="bool")return u7(e);if(t.type.startsWith("bytes"))return d7(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return f7(e,t);if(t.type==="string")return p7(e,{staticPosition:n});throw new ak(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const nw=32,Wp=32;function c7(e){const t=e.readBytes(32);return[Kc($e(y2(t,-20))),32]}function l7(e,t,{length:n,staticPosition:r}){if(!n){const i=xr(e.readBytes(Wp)),a=r+i,c=a+nw;e.setPosition(a);const l=xr(e.readBytes(nw)),u=ac(t);let f=0;const d=[];for(let h=0;h<l;++h){e.setPosition(c+(u?h*32:f));const[p,m]=ri(e,t,{staticPosition:c});f+=m,d.push(p)}return e.setPosition(r+32),[d,32]}if(ac(t)){const i=xr(e.readBytes(Wp)),a=r+i,c=[];for(let l=0;l<n;++l){e.setPosition(a+l*32);const[u]=ri(e,t,{staticPosition:a});c.push(u)}return e.setPosition(r+32),[c,32]}let o=0;const s=[];for(let i=0;i<n;++i){const[a,c]=ri(e,t,{staticPosition:r+o});o+=c,s.push(a)}return[s,o]}function u7(e){return[Yk(e.readBytes(32),{size:32}),32]}function d7(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=xr(e.readBytes(32));e.setPosition(n+i);const a=xr(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[$e(c),32]}return[$e(e.readBytes(Number.parseInt(o,10),32)),32]}function f7(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?Kk(o,{signed:n}):xr(o,{signed:n}),32]}function h7(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),o=r?[]:{};let s=0;if(ac(t)){const i=xr(e.readBytes(Wp)),a=n+i;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(a+s);const[u,f]=ri(e,l,{staticPosition:a});s+=f,o[r?c:l==null?void 0:l.name]=u}return e.setPosition(n+32),[o,32]}for(let i=0;i<t.components.length;++i){const a=t.components[i],[c,l]=ri(e,a,{staticPosition:n});o[r?i:a==null?void 0:a.name]=c,s+=l}return[o,s]}function p7(e,{staticPosition:t}){const n=xr(e.readBytes(32)),r=t+n;e.setPosition(r);const o=xr(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=Jk(zt(s));return e.setPosition(t+32),[i,32]}function ac(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(ac);const n=ng(e.type);return!!(n&&ac({...e,type:n[1]}))}const m7=e=>ot(qi(e));function g7(e){return m7(e)}const y7="1.2.3";let qt=class qp extends Error{constructor(t,n={}){var i;const r=n.cause instanceof qp?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,o=n.cause instanceof qp&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${y7}`].join(`
1631
+ `);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Pr(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const b2=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,v2=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,x2=/^\(.+?\).*?$/,rw=/^tuple(?<array>(\[(\d*)\])*)$/;function Vp(e){let t=e.type;if(rw.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let o=0;o<n;o++){const s=e.components[o];t+=Vp(s),o<n-1&&(t+=", ")}const r=Pr(rw,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,Vp({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Os(e){let t="";const n=e.length;for(let r=0;r<n;r++){const o=e[r];t+=Vp(o),r!==n-1&&(t+=", ")}return t}function Gu(e){var t;return e.type==="function"?`function ${e.name}(${Os(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Os(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Os(e.inputs)})`:e.type==="error"?`error ${e.name}(${Os(e.inputs)})`:e.type==="constructor"?`constructor(${Os(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const C2=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function w7(e){return C2.test(e)}function b7(e){return Pr(C2,e)}const E2=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function v7(e){return E2.test(e)}function x7(e){return Pr(E2,e)}const A2=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function C7(e){return A2.test(e)}function E7(e){return Pr(A2,e)}const k2=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Od(e){return k2.test(e)}function A7(e){return Pr(k2,e)}const S2=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function k7(e){return S2.test(e)}function S7(e){return Pr(S2,e)}const j2=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function j7(e){return j2.test(e)}function _7(e){return Pr(j2,e)}const I7=/^receive\(\) external payable$/;function B7(e){return I7.test(e)}const ow=new Set(["memory","indexed","storage","calldata"]),N7=new Set(["indexed"]),Hp=new Set(["calldata","memory","storage"]);class P7 extends qt{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class T7 extends qt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class O7 extends qt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class R7 extends qt{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class M7 extends qt{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class L7 extends qt{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class F7 extends qt{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class D7 extends qt{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class U7 extends qt{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class Hi extends qt{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class z7 extends qt{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class $7 extends qt{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class W7 extends qt{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class q7 extends qt{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function V7(e,t,n){let r="";if(n)for(const o of Object.entries(n)){if(!o)continue;let s="";for(const i of o[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${o[0]}{${s}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const eh=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Qp(e,t={}){if(C7(e))return H7(e,t);if(v7(e))return Q7(e,t);if(w7(e))return G7(e,t);if(k7(e))return K7(e,t);if(j7(e))return Y7(e);if(B7(e))return{type:"receive",stateMutability:"payable"};throw new z7({signature:e})}function H7(e,t={}){const n=E7(e);if(!n)throw new Hi({signature:e,type:"function"});const r=Jt(n.parameters),o=[],s=r.length;for(let a=0;a<s;a++)o.push(Ir(r[a],{modifiers:Hp,structs:t,type:"function"}));const i=[];if(n.returns){const a=Jt(n.returns),c=a.length;for(let l=0;l<c;l++)i.push(Ir(a[l],{modifiers:Hp,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:i}}function Q7(e,t={}){const n=x7(e);if(!n)throw new Hi({signature:e,type:"event"});const r=Jt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Ir(r[i],{modifiers:N7,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function G7(e,t={}){const n=b7(e);if(!n)throw new Hi({signature:e,type:"error"});const r=Jt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Ir(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function K7(e,t={}){const n=S7(e);if(!n)throw new Hi({signature:e,type:"constructor"});const r=Jt(n.parameters),o=[],s=r.length;for(let i=0;i<s;i++)o.push(Ir(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function Y7(e){const t=_7(e);if(!t)throw new Hi({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const J7=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,X7=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Z7=/^u?int$/;function Ir(e,t){var f,d;const n=V7(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(eh.has(n))return eh.get(n);const r=x2.test(e),o=Pr(r?X7:J7,e);if(!o)throw new M7({param:e});if(o.name&&tS(o.name))throw new L7({param:e,name:o.name});const s=o.name?{name:o.name}:{},i=o.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let c,l={};if(r){c="tuple";const h=Jt(o.type),p=[],m=h.length;for(let v=0;v<m;v++)p.push(Ir(h[v],{structs:a}));l={components:p}}else if(o.type in a)c="tuple",l={components:a[o.type]};else if(Z7.test(o.type))c=`${o.type}256`;else if(o.type==="address payable")c="address";else if(c=o.type,(t==null?void 0:t.type)!=="struct"&&!_2(c))throw new O7({type:c});if(o.modifier){if(!((d=(f=t==null?void 0:t.modifiers)==null?void 0:f.has)!=null&&d.call(f,o.modifier)))throw new F7({param:e,type:t==null?void 0:t.type,modifier:o.modifier});if(Hp.has(o.modifier)&&!nS(c,!!o.array))throw new D7({param:e,type:t==null?void 0:t.type,modifier:o.modifier})}const u={type:`${c}${o.array??""}`,...s,...i,...l};return eh.set(n,u),u}function Jt(e,t=[],n="",r=0){const o=e.trim().length;for(let s=0;s<o;s++){const i=e[s],a=e.slice(s+1);switch(i){case",":return r===0?Jt(a,[...t,n.trim()]):Jt(a,t,`${n}${i}`,r);case"(":return Jt(a,t,`${n}${i}`,r+1);case")":return Jt(a,t,`${n}${i}`,r-1);default:return Jt(a,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new q7({current:n,depth:r});return t.push(n.trim()),t}function _2(e){return e==="address"||e==="bool"||e==="function"||e==="string"||b2.test(e)||v2.test(e)}const eS=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function tS(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||b2.test(e)||v2.test(e)||eS.test(e)}function nS(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function rg(e){const t={},n=e.length;for(let i=0;i<n;i++){const a=e[i];if(!Od(a))continue;const c=A7(a);if(!c)throw new Hi({signature:a,type:"struct"});const l=c.properties.split(";"),u=[],f=l.length;for(let d=0;d<f;d++){const p=l[d].trim();if(!p)continue;const m=Ir(p,{type:"struct"});u.push(m)}if(!u.length)throw new $7({signature:a});t[c.name]=u}const r={},o=Object.entries(t),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];r[a]=I2(c,t)}return r}const rS=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function I2(e=[],t={},n=new Set){const r=[],o=e.length;for(let s=0;s<o;s++){const i=e[s];if(x2.test(i.type))r.push(i);else{const c=Pr(rS,i.type);if(!(c!=null&&c.type))throw new U7({abiParameter:i});const{array:l,type:u}=c;if(u in t){if(n.has(u))throw new W7({type:u});r.push({...i,type:`tuple${l??""}`,components:I2(t[u],t,new Set([...n,u]))})}else if(_2(u))r.push(i);else throw new T7({type:u})}}return r}function B2(e){const t=rg(e),n=[],r=e.length;for(let o=0;o<r;o++){const s=e[o];Od(s)||n.push(Qp(s,t))}return n}function sw(e){let t;if(typeof e=="string")t=Qp(e);else{const n=rg(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(!Od(s)){t=Qp(s,n);break}}}if(!t)throw new P7({signature:e});return t}function iw(e){const t=[];if(typeof e=="string"){const n=Jt(e),r=n.length;for(let o=0;o<r;o++)t.push(Ir(n[o],{modifiers:ow}))}else{const n=rg(e),r=e.length;for(let o=0;o<r;o++){const s=e[o];if(Od(s))continue;const i=Jt(s),a=i.length;for(let c=0;c<a;c++)t.push(Ir(i[c],{modifiers:ow,structs:n}))}}if(t.length===0)throw new R7({params:e});return t}function oS(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new U("Unable to normalize signature.");return o}const sS=e=>{const t=typeof e=="string"?e:Gu(e);return oS(t)};function N2(e){return g7(sS(e))}const Rd=N2,Jc=e=>wo(N2(e),0,4);function Es(e){const{abi:t,args:n=[],name:r}=e,o=Zn(r,{strict:!1}),s=t.filter(a=>o?a.type==="function"?Jc(a)===r:a.type==="event"?Rd(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let i;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((l,u)=>{const f="inputs"in a&&a.inputs[u];return f?Gp(l,f):!1})){if(i&&"inputs"in i&&i.inputs){const l=P2(a.inputs,i.inputs,n);if(l)throw new ok({abiItem:a,type:l[0]},{abiItem:i,type:l[1]})}i=a}}return i||s[0]}function Gp(e,t){const n=typeof e,r=t.type;switch(r){case"address":return We(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>n==="object"&&Gp(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Gp(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function P2(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return P2(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?We(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?We(n[r],{strict:!1}):!1)return i}}const th="/docs/contract/decodeFunctionResult";function So(e){const{abi:t,args:n,functionName:r,data:o}=e;let s=t[0];if(r){const a=Es({abi:t,args:n,name:r});if(!a)throw new Ii(r,{docsPath:th});s=a}if(s.type!=="function")throw new Ii(void 0,{docsPath:th});if(!s.outputs)throw new n2(s.name,{docsPath:th});const i=Yc(s.outputs,o);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const aw="/docs/contract/encodeFunctionData";function iS(e){const{abi:t,args:n,functionName:r}=e;let o=t[0];if(r){const s=Es({abi:t,args:n,name:r});if(!s)throw new Ii(r,{docsPath:aw});o=s}if(o.type!=="function")throw new Ii(void 0,{docsPath:aw});return{abi:[o],functionName:Jc(Pn(o))}}function Vt(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:iS(e)})(),o=n[0],s=r,i="inputs"in o&&o.inputs?Cs(o.inputs,t??[]):void 0;return Ln([s,i??"0x"])}class Kp extends U{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class aS extends U{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class cS extends U{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
1632
+ `),{name:"ChainNotFoundError"})}}class T2 extends U{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class Md extends U{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function Qi({blockNumber:e,chain:t,contract:n}){var o;const r=(o=t==null?void 0:t.contracts)==null?void 0:o[n];if(!r)throw new Kp({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new Kp({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function je(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const lS={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},O2={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},uS={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function dS(e){const{abi:t,data:n,cause:r}=e,o=wo(n,0,4);if(o==="0x")throw new Gc({cause:r});const i=[...t||[],O2,uS].find(a=>a.type==="error"&&o===Jc(Pn(a)));if(!i)throw new t2(o,{docsPath:"/docs/contract/decodeErrorResult",cause:r});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?Yc(i.inputs,wo(n,4)):void 0,errorName:i.name}}const Ge=(e,t,n)=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o,n);function R2({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((o,s)=>`${r&&o.name?`${o.name}: `:""}${typeof t[s]=="object"?Ge(t[s]):t[s]}`).join(", ")})`}const fS={gwei:9,wei:18},hS={ether:-9,wei:9},pS={ether:-18,gwei:-9};function Ld(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,s]=[n.slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${s?`.${s}`:""}`}function og(e,t="wei"){return Ld(e,fS[t])}function Wt(e,t="wei"){return Ld(e,hS[t])}class mS extends U{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class gS extends U{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function cw(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
1633
+ `,"")}function yS(e){return e.reduce((t,{address:n,...r})=>{let o=`${t} ${n}:
1634
+ `;return r.nonce&&(o+=` nonce: ${r.nonce}
1635
+ `),r.balance&&(o+=` balance: ${r.balance}
1636
+ `),r.code&&(o+=` code: ${r.code}
1637
+ `),r.state&&(o+=` state:
1638
+ `,o+=cw(r.state)),r.stateDiff&&(o+=` stateDiff:
1639
+ `,o+=cw(r.stateDiff)),o},` State Override:
1640
+ `).slice(0,-1)}function Xc(e){const t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
1641
+ `)}class wS extends U{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class bS extends U{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Xc(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class vS extends U{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class xS extends U{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var p;const h=Xc({chain:o&&`${o==null?void 0:o.name} (id: ${o==null?void 0:o.id})`,from:n==null?void 0:n.address,to:f,value:typeof d<"u"&&`${og(d)} ${((p=o==null?void 0:o.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${Wt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Wt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Wt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class M2 extends U{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s}){let i="Transaction";r&&s!==void 0&&(i=`Transaction at block time "${r}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),n&&s!==void 0&&(i=`Transaction at block number "${n}" at index "${s}"`),o&&(i=`Transaction with hash "${o}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class L2 extends U{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class F2 extends U{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class CS extends U{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const ES=e=>e,sg=e=>e;class D2 extends U{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,stateOverride:h}){var v;const p=n?je(n):void 0;let m=Xc({from:p==null?void 0:p.address,to:f,value:typeof d<"u"&&`${og(d)} ${((v=o==null?void 0:o.nativeCurrency)==null?void 0:v.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${Wt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Wt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Wt(l)} gwei`,nonce:u});h&&(m+=`
1642
+ ${yS(h)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",m].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class ig extends U{constructor(t,{abi:n,args:r,contractAddress:o,docsPath:s,functionName:i,sender:a}){const c=Es({abi:n,args:r,name:i}),l=c?R2({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,u=c?Pn(c,{includeName:!0}):void 0,f=Xc({address:o&&ES(o),function:u,args:l&&l!=="()"&&`${[...Array((i==null?void 0:i.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=o,this.functionName=i,this.sender=a}}class Yp extends U{constructor({abi:t,data:n,functionName:r,message:o,cause:s}){let i,a,c,l;if(n&&n!=="0x")try{a=dS({abi:t,data:n,cause:s});const{abiItem:f,errorName:d,args:h}=a;if(d==="Error")l=h[0];else if(d==="Panic"){const[p]=h;l=lS[p]}else{const p=f?Pn(f,{includeName:!0}):void 0,m=f&&h?R2({abiItem:f,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[p?`Error: ${p}`:"",m&&m!=="()"?` ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${m}`:""]}}catch(f){i=f}else o&&(l=o);let u;i instanceof t2&&(u=i.signature,c=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${u}.`]),super(l&&l!=="execution reverted"||u?[`The contract function "${r}" reverted with the following ${u?"signature":"reason"}:`,l||u].join(`
1643
+ `):`The contract function "${r}" reverted.`,{cause:i??s,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.raw=n,this.reason=l,this.signature=u}}class AS extends U{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class kS extends U{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Fd extends U{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}function ag(e){var n,r,o,s,i,a;if(!(e instanceof U))return!1;const t=e.walk(c=>c instanceof Yp);return t instanceof Yp?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((o=t.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotFound"||((i=t.data)==null?void 0:i.errorName)==="ReverseAddressMismatch"||((a=t.data)==null?void 0:a.errorName)==="UnsupportedResolverProfile":!1}function SS(e){const{abi:t,data:n}=e,r=wo(n,0,4),o=t.find(s=>s.type==="function"&&r===Jc(Pn(s)));if(!o)throw new rk(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?Yc(o.inputs,wo(n,4)):void 0}}const nh="/docs/contract/encodeErrorResult";function lw(e){const{abi:t,errorName:n,args:r}=e;let o=t[0];if(n){const c=Es({abi:t,args:r,name:n});if(!c)throw new Qy(n,{docsPath:nh});o=c}if(o.type!=="error")throw new Qy(void 0,{docsPath:nh});const s=Pn(o),i=Jc(s);let a="0x";if(r&&r.length>0){if(!o.inputs)throw new ek(o.name,{docsPath:nh});a=Cs(o.inputs,r)}return Ln([i,a])}const rh="/docs/contract/encodeFunctionResult";function jS(e){const{abi:t,functionName:n,result:r}=e;let o=t[0];if(n){const i=Es({abi:t,name:n});if(!i)throw new Ii(n,{docsPath:rh});o=i}if(o.type!=="function")throw new Ii(void 0,{docsPath:rh});if(!o.outputs)throw new n2(o.name,{docsPath:rh});const s=(()=>{if(o.outputs.length===0)return[];if(o.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new r2(r)})();return Cs(o.outputs,s)}const Dd="x-batch-gateway:true";async function _S(e){const{data:t,ccipRequest:n}=e,{args:[r]}=SS({abi:Up,data:t}),o=[],s=[];return await Promise.all(r.map(async(i,a)=>{try{s[a]=i.urls.includes(Dd)?await _S({data:i.data,ccipRequest:n}):await n(i),o[a]=!1}catch(c){o[a]=!0,s[a]=IS(c)}})),jS({abi:Up,functionName:"query",result:[o,s]})}function IS(e){return e.name==="HttpRequestError"&&e.status?lw({abi:Up,errorName:"HttpError",args:[e.status,e.shortMessage]}):lw({abi:[O2],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function U2(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Zn(t)?t:null}function Jp(e){let t=new Uint8Array(32).fill(0);if(!e)return $e(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const o=U2(n[r]),s=o?qi(o):ot(ts(n[r]),"bytes");t=ot(mt([t,s]),"bytes")}return $e(t)}function BS(e){return`[${e.slice(2)}]`}function NS(e){const t=new Uint8Array(32).fill(0);return e?U2(e)||ot(ts(e)):$e(t)}function cg(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(ts(t).byteLength+2);let r=0;const o=t.split(".");for(let s=0;s<o.length;s++){let i=ts(o[s]);i.byteLength>255&&(i=ts(BS(NS(o[s])))),n[r]=i.length,n.set(i,r+1),r+=i.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function Y(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:s=>t(e,s)}class za extends U{constructor({body:t,cause:n,details:r,headers:o,status:s,url:i}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${sg(i)}`,t&&`Request body: ${Ge(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=s,this.url=i}}class lg extends U{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${sg(r)}`,`Request body: ${Ge(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class uw extends U{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${sg(n)}`,`Request body: ${Ge(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const PS=-1;class Ht extends U{constructor(t,{code:n,docsPath:r,metaMessages:o,name:s,shortMessage:i}){super(i,{cause:t,docsPath:r,metaMessages:o||(t==null?void 0:t.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof lg?t.code:n??PS}}class Qt extends Ht{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class cc extends Ht{constructor(t){super(t,{code:cc.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(cc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class lc extends Ht{constructor(t){super(t,{code:lc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(lc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class uc extends Ht{constructor(t,{method:n}={}){super(t,{code:uc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(uc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class dc extends Ht{constructor(t){super(t,{code:dc.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
1644
+ `)})}}Object.defineProperty(dc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class us extends Ht{constructor(t){super(t,{code:us.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(us,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class bo extends Ht{constructor(t){super(t,{code:bo.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
1645
+ `)})}}Object.defineProperty(bo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class fc extends Ht{constructor(t){super(t,{code:fc.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(fc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Jn extends Ht{constructor(t){super(t,{code:Jn.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Jn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class hc extends Ht{constructor(t){super(t,{code:hc.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(hc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Uo extends Ht{constructor(t,{method:n}={}){super(t,{code:Uo.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Uo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Ti extends Ht{constructor(t){super(t,{code:Ti.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Ti,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class pc extends Ht{constructor(t){super(t,{code:pc.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class ge extends Qt{constructor(t){super(t,{code:ge.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(ge,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class mc extends Qt{constructor(t){super(t,{code:mc.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class gc extends Qt{constructor(t,{method:n}={}){super(t,{code:gc.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(gc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class yc extends Qt{constructor(t){super(t,{code:yc.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(yc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class wc extends Qt{constructor(t){super(t,{code:wc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(wc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class kt extends Qt{constructor(t){super(t,{code:kt.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(kt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Oi extends Qt{constructor(t){super(t,{code:Oi.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Oi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class bc extends Qt{constructor(t){super(t,{code:bc.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class vc extends Qt{constructor(t){super(t,{code:vc.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(vc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class xc extends Qt{constructor(t){super(t,{code:xc.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(xc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Cc extends Qt{constructor(t){super(t,{code:Cc.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(Cc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Ec extends Qt{constructor(t){super(t,{code:Ec.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Ec,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Ri extends Qt{constructor(t){super(t,{code:Ri.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Ri,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Ac extends Qt{constructor(t){super(t,{code:Ac.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(Ac,"code",{enumerable:!0,configurable:!0,writable:!0,value:7e3});class TS extends Ht{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const OS=3;function ds(e,{abi:t,address:n,args:r,docsPath:o,functionName:s,sender:i}){const a=e instanceof Fd?e:e instanceof U?e.walk(p=>"data"in p)||e.walk():{},{code:c,data:l,details:u,message:f,shortMessage:d}=a,h=e instanceof Gc?new AS({functionName:s,cause:e}):[OS,us.code].includes(c)&&(l||u||f||d)||c===bo.code&&u==="execution reverted"&&l?new Yp({abi:t,data:typeof l=="object"?l.data:l,functionName:s,message:a instanceof lg?u:d??f,cause:e}):e;return new ig(h,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:s,sender:i})}const RS="0.1.1";function MS(){return RS}let le=class cr extends Error{static setStaticOptions(t){cr.prototype.docsOrigin=t.docsOrigin,cr.prototype.showVersion=t.showVersion,cr.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var u;if(n.cause instanceof cr){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(u=n.cause)!=null&&u.message?n.cause.message:n.details})(),o=n.cause instanceof cr&&n.cause.docsPath||n.docsPath,s=n.docsOrigin??cr.prototype.docsOrigin,i=`${s}${o??""}`,a=!!(n.version??cr.prototype.showVersion),c=n.version??cr.prototype.version,l=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o||a?["",r?`Details: ${r}`:void 0,o?`See: ${i}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
1646
+ `);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=i,this.docsOrigin=s,this.docsPath=o,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return z2(this,t)}};Object.defineProperty(le,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${MS()}`}});le.setStaticOptions(le.defaultStaticOptions);function z2(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?z2(e.cause,t):t?null:e}function Zc(e,t){if(Gs(e)>t)throw new ZS({givenSize:Gs(e),maxSize:t})}const ir={zero:48,nine:57,A:65,F:70,a:97,f:102};function dw(e){if(e>=ir.zero&&e<=ir.nine)return e-ir.zero;if(e>=ir.A&&e<=ir.F)return e-(ir.A-10);if(e>=ir.a&&e<=ir.f)return e-(ir.a-10)}function LS(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new ej({size:e.length,targetSize:r,type:"Bytes"});const o=new Uint8Array(r);for(let s=0;s<r;s++){const i=n==="right";o[i?s:r-s-1]=e[i?s:e.length-s-1]}return o}function $2(e,t={}){const{dir:n="left"}=t;let r=e,o=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),r}function Ud(e,t){if(nn(e)>t)throw new ij({givenSize:nn(e),maxSize:t})}function FS(e,t){if(typeof t=="number"&&t>0&&t>nn(e)-1)throw new J2({offset:t,position:"start",size:nn(e)})}function DS(e,t,n){if(typeof t=="number"&&typeof n=="number"&&nn(e)!==n-t)throw new J2({offset:n,position:"end",size:nn(e)})}function W2(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const o=e.replace("0x","");if(o.length>r*2)throw new aj({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return`0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}const US="#__bigint";function q2(e,t,n){return JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString()+US:o,n)}const zS=new TextDecoder,$S=new TextEncoder;function WS(e){return e instanceof Uint8Array?e:typeof e=="string"?V2(e):qS(e)}function qS(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function V2(e,t={}){const{size:n}=t;let r=e;n&&(Ud(e,n),r=hs(e,n));let o=r.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,i=new Uint8Array(s);for(let a=0,c=0;a<s;a++){const l=dw(o.charCodeAt(c++)),u=dw(o.charCodeAt(c++));if(l===void 0||u===void 0)throw new le(`Invalid byte sequence ("${o[c-2]}${o[c-1]}" in "${o}").`);i[a]=l<<4|u}return i}function VS(e,t={}){const{size:n}=t,r=$S.encode(e);return typeof n=="number"?(Zc(r,n),HS(r,n)):r}function HS(e,t){return LS(e,{dir:"right",size:t})}function Gs(e){return e.length}function QS(e,t,n,r={}){const{strict:o}=r;return e.slice(t,n)}function GS(e,t={}){const{size:n}=t;typeof n<"u"&&Zc(e,n);const r=Rn(e,t);return G2(r,t)}function KS(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Zc(r,n),r=H2(r)),r.length>1||r[0]>1)throw new XS(r);return!!r[0]}function Cr(e,t={}){const{size:n}=t;typeof n<"u"&&Zc(e,n);const r=Rn(e,t);return K2(r,t)}function YS(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Zc(r,n),r=JS(r)),zS.decode(r)}function H2(e){return $2(e,{dir:"left"})}function JS(e){return $2(e,{dir:"right"})}class XS extends le{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}let ZS=class extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},ej=class extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const tj=new TextEncoder,nj=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rj(e,t={}){const{strict:n=!1}=t;if(!e)throw new fw(e);if(typeof e!="string")throw new fw(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new hw(e);if(!e.startsWith("0x"))throw new hw(e)}function On(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function oj(e){return e instanceof Uint8Array?Rn(e):Array.isArray(e)?Rn(new Uint8Array(e)):e}function Q2(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ud(n,t.size),fs(n,t.size)):n}function Rn(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=nj[e[o]];const r=`0x${n}`;return typeof t.size=="number"?(Ud(r,t.size),hs(r,t.size)):r}function Et(e,t={}){const{signed:n,size:r}=t,o=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&o>s||o<i){const l=typeof e=="bigint"?"n":"";throw new Y2({max:s?`${s}${l}`:void 0,min:`${i}${l}`,signed:n,size:r,value:`${e}${l}`})}const c=`0x${(n&&o<0?BigInt.asUintN(r*8,BigInt(o)):o).toString(16)}`;return r?fs(c,r):c}function ug(e,t={}){return Rn(tj.encode(e),t)}function fs(e,t){return W2(e,{dir:"left",size:t})}function hs(e,t){return W2(e,{dir:"right",size:t})}function Xn(e,t,n,r={}){const{strict:o}=r;FS(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&DS(s,t,n),s}function nn(e){return Math.ceil((e.length-2)/2)}function G2(e,t={}){const{signed:n}=t;t.size&&Ud(e,t.size);const r=BigInt(e);if(!n)return r;const o=(e.length-2)/2,s=(1n<<BigInt(o)*8n)-1n,i=s>>1n;return r<=i?r:r-s-1n}function K2(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:G2(e,t))}function sj(e,t={}){const{strict:n=!1}=t;try{return rj(e,{strict:n}),!0}catch{return!1}}class Y2 extends le{constructor({max:t,min:n,signed:r,size:o,value:s}){super(`Number \`${s}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class fw extends le{constructor(t){super(`Value \`${typeof t=="object"?q2(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class hw extends le{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class ij extends le{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class J2 extends le{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class aj extends le{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function cj(e){return{address:e.address,amount:Et(e.amount),index:Et(e.index),validatorIndex:Et(e.validatorIndex)}}function X2(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Et(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Et(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Et(e.gasLimit)},...typeof e.number=="bigint"&&{number:Et(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Et(e.prevRandao)},...typeof e.time=="bigint"&&{time:Et(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(cj)}}}const lj="0x82ad56cb",Z2="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uj="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",dj="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",dg="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",oh="/docs/contract/encodeDeployData";function zd(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const o=t.find(i=>"type"in i&&i.type==="constructor");if(!o)throw new YA({docsPath:oh});if(!("inputs"in o))throw new Hy({docsPath:oh});if(!o.inputs||o.inputs.length===0)throw new Hy({docsPath:oh});const s=Cs(o.inputs,n);return Ln([r,s])}class Ks extends U{constructor({cause:t,message:n}={}){var o;const r=(o=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:o.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Ks,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Ks,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class ps extends U{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Wt(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(ps,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Xp extends U{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Wt(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Xp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Zp extends U{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Zp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class e0 extends U{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
1647
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(e0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class t0 extends U{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(t0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class n0 extends U{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
1648
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(n0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class r0 extends U{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(r0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class o0 extends U{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(o0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class s0 extends U{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(s0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class kc extends U{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Wt(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Wt(r)} gwei`:""}).`].join(`
1649
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(kc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class el extends U{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function $d(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof U?e.walk(o=>(o==null?void 0:o.code)===Ks.code):e;return r instanceof U?new Ks({cause:e,message:r.details}):Ks.nodeMessage.test(n)?new Ks({cause:e,message:e.details}):ps.nodeMessage.test(n)?new ps({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Xp.nodeMessage.test(n)?new Xp({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Zp.nodeMessage.test(n)?new Zp({cause:e,nonce:t==null?void 0:t.nonce}):e0.nodeMessage.test(n)?new e0({cause:e,nonce:t==null?void 0:t.nonce}):t0.nodeMessage.test(n)?new t0({cause:e,nonce:t==null?void 0:t.nonce}):n0.nodeMessage.test(n)?new n0({cause:e}):r0.nodeMessage.test(n)?new r0({cause:e,gas:t==null?void 0:t.gas}):o0.nodeMessage.test(n)?new o0({cause:e,gas:t==null?void 0:t.gas}):s0.nodeMessage.test(n)?new s0({cause:e}):kc.nodeMessage.test(n)?new kc({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new el({cause:e})}function e5(e,{docsPath:t,...n}){const r=(()=>{const o=$d(e,n);return o instanceof el?e:o})();return new D2(r,{docsPath:t,...n})}function Gi(e,{format:t}){if(!t)return{};const n={};function r(s){const i=Object.keys(s);for(const a of i)a in e&&(n[a]=e[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const o=t(e||{});return r(o),n}function fg(e,t){return({exclude:n,format:r})=>({exclude:n,format:(o,s)=>{const i=t(o,s);if(n)for(const a of n)delete i[a];return{...i,...r(o,s)}},type:e})}const fj={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function jo(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=hj(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>$e(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=z(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=z(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=z(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=z(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=z(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=z(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=fj[e.type]),typeof e.value<"u"&&(n.value=z(e.value)),n}function hj(e){return e.map(t=>({address:t.address,r:t.r?z(BigInt(t.r)):t.r,s:t.s?z(BigInt(t.s)):t.s,chainId:z(t.chainId),nonce:z(t.nonce),...typeof t.yParity<"u"?{yParity:z(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:z(t.v)}:{}}))}function hg(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}const sh=new Map;function t5({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){const s=async()=>{const u=c();i();const f=u.map(({args:d})=>d);f.length!==0&&e(f).then(d=>{o&&Array.isArray(d)&&d.sort(o);for(let h=0;h<u.length;h++){const{resolve:p}=u[h];p==null||p([d[h],d])}}).catch(d=>{for(let h=0;h<u.length;h++){const{reject:p}=u[h];p==null||p(d)}})},i=()=>sh.delete(t),a=()=>c().map(({args:u})=>u),c=()=>sh.get(t)||[],l=u=>sh.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:d,reject:h}=hg();return(n==null?void 0:n([...a(),u]))&&s(),c().length>0?(l({args:u,resolve:d,reject:h}),f):(l({args:u,resolve:d,reject:h}),setTimeout(s,r),f)}}}function pw(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Ky({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Ky({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function pj(e){const{balance:t,nonce:n,state:r,stateDiff:o,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=z(t)),n!==void 0&&(i.nonce=z(n)),r!==void 0&&(i.state=pw(r)),o!==void 0){if(i.state)throw new gS;i.stateDiff=pw(o)}return i}function pg(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!We(n,{strict:!1}))throw new _t({address:n});if(t[n])throw new mS({address:n});t[n]=pj(r)}return t}const Wd=2n**256n-1n;function Tr(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:o}=e,s=t?je(t):void 0;if(s&&!We(s.address))throw new _t({address:s.address});if(o&&!We(o))throw new _t({address:o});if(n&&n>Wd)throw new ps({maxFeePerGas:n});if(r&&n&&r>n)throw new kc({maxFeePerGas:n,maxPriorityFeePerGas:r})}async function tl(e,t){var R,V,M,F;const{account:n=e.account,authorizationList:r,batch:o=!!((R=e.batch)!=null&&R.multicall),blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:l,code:u,data:f,factory:d,factoryData:h,gas:p,gasPrice:m,maxFeePerBlobGas:v,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:w,to:x,value:E,stateOverride:A,...k}=t,S=n?je(n):void 0;if(u&&(d||h))throw new U("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&x)throw new U("Cannot provide both `code` & `to` as parameters.");const _=u&&f,N=d&&h&&x&&f,O=_||N,P=_?n5({code:u,data:f}):N?yj({data:f,factory:d,factoryData:h,to:x}):f;try{Tr(t);const T=(typeof s=="bigint"?z(s):void 0)||i,L=l?X2(l):void 0,D=pg(A),Q=(F=(M=(V=e.chain)==null?void 0:V.formatters)==null?void 0:M.transactionRequest)==null?void 0:F.format,se=(Q||jo)({...Gi(k,{format:Q}),accessList:a,account:S,authorizationList:r,blobs:c,data:P,gas:p,gasPrice:m,maxFeePerBlobGas:v,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:w,to:O?void 0:x,value:E},"call");if(o&&mj({request:se})&&!D&&!L)try{return await gj(e,{...se,blockNumber:s,blockTag:i})}catch(re){if(!(re instanceof T2)&&!(re instanceof Kp))throw re}const H=(()=>{const re=[se,T];return D&&L?[...re,D,L]:D?[...re,D]:L?[...re,{},L]:re})(),X=await e.request({method:"eth_call",params:H});return X==="0x"?{data:void 0}:{data:X}}catch($){const T=wj($),{offchainLookup:L,offchainLookupSignature:D}=await W(async()=>{const{offchainLookup:Q,offchainLookupSignature:te}=await import("./ccip-8vMs6YOX.js");return{offchainLookup:Q,offchainLookupSignature:te}},[]);if(e.ccipRead!==!1&&(T==null?void 0:T.slice(0,10))===D&&x)return{data:await L(e,{data:T,to:x})};throw O&&(T==null?void 0:T.slice(0,10))==="0x101bb98d"?new kS({factory:d}):e5($,{...t,account:S,chain:e.chain})}}function mj({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(lj)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function gj(e,t){var m;const{batchSize:n=1024,deployless:r=!1,wait:o=0}=typeof((m=e.batch)==null?void 0:m.multicall)=="object"?e.batch.multicall:{},{blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",data:a,to:c}=t,l=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Qi({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new T2})(),f=(typeof s=="bigint"?z(s):void 0)||i,{schedule:d}=t5({id:`${e.uid}.${f}`,wait:o,shouldSplitBatch(v){return v.reduce((g,{data:w})=>g+(w.length-2),0)>n*2},fn:async v=>{const y=v.map(x=>({allowFailure:!0,callData:x.data,target:x.to})),g=Vt({abi:_i,args:[y],functionName:"aggregate3"}),w=await e.request({method:"eth_call",params:[{...l===null?{data:n5({code:dg,data:g})}:{to:l,data:g}},f]});return So({abi:_i,args:[y],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:h,success:p}]=await d({data:a,to:c});if(!p)throw new Fd({data:h});return h==="0x"?{data:void 0}:{data:h}}function n5(e){const{code:t,data:n}=e;return zd({abi:B2(["constructor(bytes, bytes)"]),bytecode:Z2,args:[t,n]})}function yj(e){const{data:t,factory:n,factoryData:r,to:o}=e;return zd({abi:B2(["constructor(address, bytes, address, bytes)"]),bytecode:uj,args:[o,t,n,r]})}function wj(e){var n;if(!(e instanceof U))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function wn(e,t){const{abi:n,address:r,args:o,functionName:s,...i}=t,a=Vt({abi:n,args:o,functionName:s});try{const{data:c}=await Y(e,tl,"call")({...i,data:a,to:r});return So({abi:n,args:o,functionName:s,data:c||"0x"})}catch(c){throw ds(c,{abi:n,address:r,args:o,docsPath:"/docs/contract/readContract",functionName:s})}}async function bj(e,t){const{blockNumber:n,blockTag:r,coinType:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Qi({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>s.endsWith(d)))return null;const f=o!=null?[Jp(s),BigInt(o)]:[Jp(s)];try{const d=Vt({abi:qy,functionName:"addr",args:f}),h={address:l,abi:Yx,functionName:"resolveWithGateways",args:[$t(cg(s)),d,i??[Dd]],blockNumber:n,blockTag:r},m=await Y(e,wn,"readContract")(h);if(m[0]==="0x")return null;const v=So({abi:qy,args:f,functionName:"addr",data:m[0]});return v==="0x"||zt(v)==="0x00"?null:v}catch(d){if(a)throw d;if(ag(d))return null;throw d}}class vj extends U{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class pa extends U{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class mg extends U{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class xj extends U{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const Cj=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,Ej=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,Aj=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,kj=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Sj(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function mw(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function r5({uri:e,gatewayUrls:t}){const n=Aj.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=mw(t==null?void 0:t.ipfs,"https://ipfs.io"),o=mw(t==null?void 0:t.arweave,"https://arweave.net"),s=e.match(Cj),{protocol:i,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=i==="ipns:/"||a==="ipns/",f=i==="ipfs:/"||a==="ipfs/"||Ej.test(e);if(e.startsWith("http")&&!u&&!f){let h=e;return t!=null&&t.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${r}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&c)return{uri:`${o}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(kj,"");if(d.startsWith("<svg")&&(d=`data:image/svg+xml;base64,${btoa(d)}`),d.startsWith("data:")||d.startsWith("{"))return{uri:d,isOnChain:!0,isEncoded:!1};throw new mg({uri:e})}function o5(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new vj({data:e});return e.image||e.image_url||e.image_data}async function jj({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(o=>o.json());return await gg({gatewayUrls:e,uri:o5(n)})}catch{throw new mg({uri:t})}}async function gg({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=r5({uri:t,gatewayUrls:e});if(r||await Sj(n))return n;throw new mg({uri:t})}function _j(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,o]=t.split("/"),[s,i]=n.split(":"),[a,c]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new pa({reason:"Only EIP-155 supported"});if(!i)throw new pa({reason:"Chain ID not found"});if(!c)throw new pa({reason:"Contract address not found"});if(!o)throw new pa({reason:"Token ID not found"});if(!a)throw new pa({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:o}}async function Ij(e,{nft:t}){if(t.namespace==="erc721")return wn(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return wn(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new xj({namespace:t.namespace})}async function Bj(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?Nj(e,{gatewayUrls:t,record:n}):gg({uri:n,gatewayUrls:t})}async function Nj(e,{gatewayUrls:t,record:n}){const r=_j(n),o=await Ij(e,{nft:r}),{uri:s,isOnChain:i,isEncoded:a}=r5({uri:o,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return gg({uri:o5(u),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),jj({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,c)})}async function s5(e,t){const{blockNumber:n,blockTag:r,key:o,name:s,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Qi({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>s.endsWith(f)))return null;try{const f={address:l,abi:Yx,args:[$t(cg(s)),Vt({abi:Wy,functionName:"text",args:[Jp(s),o]}),i??[Dd]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},h=await Y(e,wn,"readContract")(f);if(h[0]==="0x")return null;const p=So({abi:Wy,functionName:"text",data:h[0]});return p===""?null:p}catch(f){if(a)throw f;if(ag(f))return null;throw f}}async function i5(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:o,gatewayUrls:s,strict:i,universalResolverAddress:a}){const c=await Y(e,s5,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:o,universalResolverAddress:a,gatewayUrls:s,strict:i});if(!c)return null;try{return await Bj(e,{record:c,gatewayUrls:r})}catch{return null}}async function a5(e,t){const{address:n,blockNumber:r,blockTag:o,coinType:s=60n,gatewayUrls:i,strict:a}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Qi({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:GA,args:[n,s,i??[Dd]],functionName:"reverseWithGateways",blockNumber:r,blockTag:o},f=Y(e,wn,"readContract"),[d]=await f(u);return d||null}catch(u){if(a)throw u;if(ag(u))return null;throw u}}async function Pj(e,t){const{blockNumber:n,blockTag:r,name:o}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return Qi({blockNumber:n,chain:s,contract:"ensUniversalResolver"})})(),a=s==null?void 0:s.ensTlds;if(a&&!a.some(l=>o.endsWith(l)))throw new Error(`${o} is not a valid ENS TLD (${a==null?void 0:a.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[c]=await Y(e,wn,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[$t(cg(o))],blockNumber:n,blockTag:r});return c}async function c5(e,t){var v,y,g;const{account:n=e.account,blockNumber:r,blockTag:o="latest",blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h,...p}=t,m=n?je(n):void 0;try{Tr(t);const x=(typeof r=="bigint"?z(r):void 0)||o,E=(g=(y=(v=e.chain)==null?void 0:v.formatters)==null?void 0:y.transactionRequest)==null?void 0:g.format,k=(E||jo)({...Gi(p,{format:E}),account:m,blobs:s,data:i,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,to:d,value:h},"createAccessList"),S=await e.request({method:"eth_createAccessList",params:[k,x]});return{accessList:S.accessList,gasUsed:BigInt(S.gasUsed)}}catch(w){throw e5(w,{...t,account:m,chain:e.chain})}}function qd(e,{method:t}){var r,o;const n={};return e.transport.type==="fallback"&&((o=(r=e.transport).onResponse)==null||o.call(r,({method:s,response:i,status:a,transport:c})=>{a==="success"&&t===s&&(n[i]=c.request)})),s=>n[s]||e.request}async function Tj(e){const t=qd(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}class Oj extends U{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const gw="/docs/contract/encodeEventTopics";function nl(e){var c;const{abi:t,eventName:n,args:r}=e;let o=t[0];if(n){const l=Es({abi:t,name:n});if(!l)throw new Gy(n,{docsPath:gw});o=l}if(o.type!=="event")throw new Gy(void 0,{docsPath:gw});const s=Pn(o),i=Rd(s);let a=[];if(r&&"inputs"in o){const l=(c=o.inputs)==null?void 0:c.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((f,d)=>Array.isArray(u[d])?u[d].map((h,p)=>yw({param:f,value:u[d][p]})):typeof u[d]<"u"&&u[d]!==null?yw({param:f,value:u[d]}):null))??[])}return[i,...a]}function yw({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return ot(qi(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new Oj(e.type);return Cs([e],[t])}async function l5(e,t){const{address:n,abi:r,args:o,eventName:s,fromBlock:i,strict:a,toBlock:c}=t,l=qd(e,{method:"eth_newFilter"}),u=s?nl({abi:r,args:o,eventName:s}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof i=="bigint"?z(i):i,toBlock:typeof c=="bigint"?z(c):c,topics:u}]});return{abi:r,args:o,eventName:s,id:f,request:l(f),strict:!!a,type:"event"}}async function u5(e,{address:t,args:n,event:r,events:o,fromBlock:s,strict:i,toBlock:a}={}){const c=o??(r?[r]:void 0),l=qd(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(h=>nl({abi:[h],eventName:h.name,args:n}))],r&&(u=u[0]));const f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?z(s):s,toBlock:typeof a=="bigint"?z(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:s,id:f,request:l(f),strict:!!i,toBlock:a,type:"event"}}async function d5(e){const t=qd(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}function Rj(e){const t=ot(`0x${e.substring(4)}`).substring(26);return Kc(`0x${t}`)}async function Mj({hash:e,signature:t}){const n=Zn(e)?e:$t(e),{secp256k1:r}=await W(async()=>{const{secp256k1:i}=await Promise.resolve().then(()=>dB);return{secp256k1:i}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:f,yParity:d}=t,h=Number(d??f),p=ww(h);return new r.Signature(Ze(l),Ze(u)).addRecoveryBit(p)}const i=Zn(t)?t:$t(t);if(Ne(i)!==65)throw new Error("invalid signature length");const a=tn(`0x${i.slice(130)}`),c=ww(a);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function ww(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function i0({hash:e,signature:t}){return Rj(await Mj({hash:e,signature:t}))}function vo(e,t="hex"){const n=f5(e),r=Zm(new Uint8Array(n.length));return n.encode(r),t==="hex"?$e(r.bytes):r.bytes}function f5(e){return Array.isArray(e)?Lj(e.map(t=>f5(t))):Fj(e)}function Lj(e){const t=e.reduce((o,s)=>o+s.length,0),n=h5(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:s}of e)s(o)}}}function Fj(e){const t=typeof e=="string"?Tn(e):e,n=h5(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function h5(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new U("Length is too large.")}function Dj(e){const{chainId:t,nonce:n,to:r}=e,o=e.contractAddress??e.address,s=ot(Ln(["0x05",vo([t?z(t):"0x",o,n?z(n):"0x"])]));return r==="bytes"?Tn(s):s}async function Vd(e){const{authorization:t,signature:n}=e;return i0({hash:Dj(t),signature:n??t})}class Uj extends U{constructor(t,{account:n,docsPath:r,chain:o,data:s,gas:i,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var p;const h=Xc({from:n==null?void 0:n.address,to:f,value:typeof d<"u"&&`${og(d)} ${((p=o==null?void 0:o.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof a<"u"&&`${Wt(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Wt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Wt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function zj(e,{docsPath:t,...n}){const r=(()=>{const o=$d(e,n);return o instanceof el?e:o})();return new Uj(r,{docsPath:t,...n})}class p5 extends U{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class yg extends U{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class $j extends U{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Wt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class m5 extends U{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const g5={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function rl(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?tn(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?tn(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?g5[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=qj(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Wj=fg("transaction",rl);function qj(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function wg(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:rl(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Vj=fg("block",wg);async function _n(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:o}={}){var l,u,f;const s=o??!1,i=n!==void 0?z(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[i||r,s]},{dedupe:!!i}),!a)throw new m5({blockHash:t,blockNumber:n});return(((f=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:f.format)||wg)(a,"getBlock")}async function bg(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Hj(e,t){return y5(e,t)}async function y5(e,t){var s,i;const{block:n,chain:r=e.chain,request:o}=t||{};try{const a=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((i=r==null?void 0:r.fees)==null?void 0:i.defaultPriorityFee);if(typeof a=="function"){const l=n||await Y(e,_n,"getBlock")({}),u=await a({block:l,client:e,request:o});if(u===null)throw new Error;return u}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return Ze(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):Y(e,_n,"getBlock")({}),Y(e,bg,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new yg;const l=c-a.baseFeePerGas;return l<0n?0n:l}}async function Qj(e,t){return a0(e,t)}async function a0(e,t){var d,h;const{block:n,chain:r=e.chain,request:o,type:s="eip1559"}=t||{},i=await(async()=>{var p,m;return typeof((p=r==null?void 0:r.fees)==null?void 0:p.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:o}):((m=r==null?void 0:r.fees)==null?void 0:m.baseFeeMultiplier)??1.2})();if(i<1)throw new p5;const c=10**(((d=i.toString().split(".")[1])==null?void 0:d.length)??0),l=p=>p*BigInt(Math.ceil(i*c))/BigInt(c),u=n||await Y(e,_n,"getBlock")({});if(typeof((h=r==null?void 0:r.fees)==null?void 0:h.estimateFeesPerGas)=="function"){const p=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:l,request:o,type:s});if(p!==null)return p}if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new yg;const p=typeof(o==null?void 0:o.maxPriorityFeePerGas)=="bigint"?o.maxPriorityFeePerGas:await y5(e,{block:u,chain:r,request:o}),m=l(u.baseFeePerGas);return{maxFeePerGas:(o==null?void 0:o.maxFeePerGas)??m+p,maxPriorityFeePerGas:p}}return{gasPrice:(o==null?void 0:o.gasPrice)??l(await Y(e,bg,"getGasPrice")({}))}}async function vg(e,{address:t,blockTag:n="latest",blockNumber:r}){const o=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?z(r):n]},{dedupe:!!r});return tn(o)}function xg(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Tn(s)):e.blobs,o=[];for(const s of r)o.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?o:o.map(s=>$e(s))}function Cg(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>Tn(i)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(i=>Tn(i)):e.commitments,s=[];for(let i=0;i<r.length;i++){const a=r[i],c=o[i];s.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(i=>$e(i))}function Gj(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,l=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+l,a,r)}function Kj(e,t,n){return e&t^~e&n}function Yj(e,t,n){return e&t^e&n^t&n}class Jj extends Xm{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Jf(this.buffer)}update(t){Ni(this),t=Td(t),ls(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=Jf(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ni(this),a2(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,Pi(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;Gj(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=Jf(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Fr=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Xj=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Dr=new Uint32Array(64);class Zj extends Jj{constructor(t=32){super(64,t,8,!1),this.A=Fr[0]|0,this.B=Fr[1]|0,this.C=Fr[2]|0,this.D=Fr[3]|0,this.E=Fr[4]|0,this.F=Fr[5]|0,this.G=Fr[6]|0,this.H=Fr[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)Dr[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const d=Dr[f-15],h=Dr[f-2],p=zn(d,7)^zn(d,18)^d>>>3,m=zn(h,17)^zn(h,19)^h>>>10;Dr[f]=m+Dr[f-7]+p+Dr[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=zn(a,6)^zn(a,11)^zn(a,25),h=u+d+Kj(a,c,l)+Xj[f]+Dr[f]|0,m=(zn(r,2)^zn(r,13)^zn(r,22))+Yj(r,o,s)|0;u=l,l=c,c=a,a=i+h|0,i=s,s=o,o=r,r=h+m|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,l,u)}roundClean(){Pi(Dr)}destroy(){this.set(0,0,0,0,0,0,0,0),Pi(this.buffer)}}const w5=c2(()=>new Zj),e_=w5;function t_(e,t){return e_(Zn(e,{strict:!1})?qi(e):e)}function n_(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),o=t_(t);return o.set([n],0),r==="bytes"?o:$e(o)}function b5(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const s of t)o.push(n_({commitment:s,to:r,version:n}));return o}const bw=6,v5=32,Eg=4096,x5=v5*Eg,vw=x5*bw-1-1*Eg*bw,C5=1;class r_ extends U{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class E5 extends U{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class o_ extends U{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class s_ extends U{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${C5}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function i_(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Tn(e.data):e.data,r=Ne(n);if(!r)throw new E5;if(r>vw)throw new r_({maxSize:vw,size:r});const o=[];let s=!0,i=0;for(;s;){const a=Zm(new Uint8Array(x5));let c=0;for(;c<Eg;){const l=n.slice(i,i+(v5-1));if(a.pushByte(0),a.pushBytes(l),l.length<31){a.pushByte(128),s=!1;break}c++,i+=31}o.push(a)}return t==="bytes"?o.map(a=>a.bytes):o.map(a=>$e(a.bytes))}function A5(e){const{data:t,kzg:n,to:r}=e,o=e.blobs??i_({data:t,to:r}),s=e.commitments??xg({blobs:o,kzg:n,to:r}),i=e.proofs??Cg({blobs:o,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<o.length;c++)a.push({blob:o[c],commitment:s[c],proof:i[c]});return a}function k5(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new bS({transaction:e})}function Hd(e,{docsPath:t,...n}){const r=(()=>{const o=$d(e,n);return o instanceof el?e:o})();return new xS(r,{docsPath:t,...n})}async function _o(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return tn(t)}async function Ag(e,t){var S,_,N,O,P;const{account:n=e.account,accessList:r,authorizationList:o,chain:s=e.chain,blobVersionedHashes:i,blobs:a,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:p,nonceManager:m,to:v,type:y,value:g,...w}=t,x=await(async()=>{if(!n||!m||typeof p<"u")return p;const R=je(n),V=s?s.id:await Y(e,_o,"getChainId")({});return await m.consume({address:R.address,chainId:V,client:e})})();Tr(t);const E=(_=(S=s==null?void 0:s.formatters)==null?void 0:S.transactionRequest)==null?void 0:_.format,k=(E||jo)({...Gi(w,{format:E}),account:n?je(n):void 0,accessList:r,authorizationList:o,blobs:a,blobVersionedHashes:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:x,to:v,type:y,value:g},"fillTransaction");try{const R=await e.request({method:"eth_fillTransaction",params:[k]}),M=(((O=(N=s==null?void 0:s.formatters)==null?void 0:N.transaction)==null?void 0:O.format)||rl)(R.tx);delete M.blockHash,delete M.blockNumber,delete M.r,delete M.s,delete M.transactionIndex,delete M.v,delete M.yParity,M.data=M.input,M.gas&&(M.gas=t.gas??M.gas),M.gasPrice&&(M.gasPrice=t.gasPrice??M.gasPrice),M.maxFeePerBlobGas&&(M.maxFeePerBlobGas=t.maxFeePerBlobGas??M.maxFeePerBlobGas),M.maxFeePerGas&&(M.maxFeePerGas=t.maxFeePerGas??M.maxFeePerGas),M.maxPriorityFeePerGas&&(M.maxPriorityFeePerGas=t.maxPriorityFeePerGas??M.maxPriorityFeePerGas),M.nonce&&(M.nonce=t.nonce??M.nonce);const F=await(async()=>{var D,Q;if(typeof((D=s==null?void 0:s.fees)==null?void 0:D.baseFeeMultiplier)=="function"){const te=await Y(e,_n,"getBlock")({});return s.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((Q=s==null?void 0:s.fees)==null?void 0:Q.baseFeeMultiplier)??1.2})();if(F<1)throw new p5;const T=10**(((P=F.toString().split(".")[1])==null?void 0:P.length)??0),L=D=>D*BigInt(Math.ceil(F*T))/BigInt(T);return M.maxFeePerGas&&!t.maxFeePerGas&&(M.maxFeePerGas=L(M.maxFeePerGas)),M.gasPrice&&!t.gasPrice&&(M.gasPrice=L(M.gasPrice)),{raw:R.raw,transaction:{from:k.from,...M}}}catch(R){throw Hd(R,{...t,chain:e.chain})}}const kg=["blobVersionedHashes","chainId","fees","gas","nonce","type"],xw=new Map,ih=new Vi(128);async function ol(e,t){var x,E,A;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=kg);const{account:r,chain:o=e.chain,nonceManager:s,parameters:i}=n,a=(()=>{if(typeof(o==null?void 0:o.prepareTransactionRequest)=="function")return{fn:o.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(o==null?void 0:o.prepareTransactionRequest))return{fn:o.prepareTransactionRequest[0],runAt:o.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof n.chainId<"u"?n.chainId:o?o.id:(c=await Y(e,_o,"getChainId")({}),c))}const u=r&&je(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&u&&s){const k=await l();f=await s.consume({address:u.address,chainId:k,client:e})}a!=null&&a.fn&&((x=a.runAt)!=null&&x.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillTransaction"}),f??(f=n.nonce));const h=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||ih.get(e.uid)===!1||!["fees","gas"].some(S=>i.includes(S))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await Y(e,Ag,"fillTransaction")({...n,nonce:f}).then(k=>{const{chainId:S,from:_,gas:N,gasPrice:O,nonce:P,maxFeePerBlobGas:R,maxFeePerGas:V,maxPriorityFeePerGas:M,type:F,...$}=k.transaction;return ih.set(e.uid,!0),{...n,..._?{from:_}:{},...F&&!n.type?{type:F}:{},...typeof S<"u"?{chainId:S}:{},...typeof N<"u"?{gas:N}:{},...typeof O<"u"?{gasPrice:O}:{},...typeof P<"u"?{nonce:P}:{},...typeof R<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:R}:{},...typeof V<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:V}:{},...typeof M<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:M}:{},..."nonceKey"in $&&typeof $.nonceKey<"u"?{nonceKey:$.nonceKey}:{}}}).catch(k=>{var N;const S=k;return S.name!=="TransactionExecutionError"||((N=S.walk)==null?void 0:N.call(S,O=>{var R;const P=O;return P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"||((R=P.message)==null?void 0:R.includes("eth_fillTransaction is not available"))}))&&ih.set(e.uid,!1),n}):n;f??(f=h.nonce),n={...h,...u?{from:u==null?void 0:u.address}:{},...f?{nonce:f}:{}};const{blobs:p,gas:m,kzg:v,type:y}=n;a!=null&&a.fn&&((E=a.runAt)!=null&&E.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"beforeFillParameters"}));let g;async function w(){return g||(g=await Y(e,_n,"getBlock")({blockTag:"latest"}),g)}if(i.includes("nonce")&&typeof f>"u"&&u&&!s&&(n.nonce=await Y(e,vg,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&p&&v){const k=xg({blobs:p,kzg:v});if(i.includes("blobVersionedHashes")){const S=b5({commitments:k,to:"hex"});n.blobVersionedHashes=S}if(i.includes("sidecars")){const S=Cg({blobs:p,commitments:k,kzg:v}),_=A5({blobs:p,commitments:k,proofs:S,to:"hex"});n.sidecars=_}}if(i.includes("chainId")&&(n.chainId=await l()),(i.includes("fees")||i.includes("type"))&&typeof y>"u")try{n.type=k5(n)}catch{let k=xw.get(e.uid);if(typeof k>"u"){const S=await w();k=typeof(S==null?void 0:S.baseFeePerGas)=="bigint",xw.set(e.uid,k)}n.type=k?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const k=await w(),{maxFeePerGas:S,maxPriorityFeePerGas:_}=await a0(e,{block:k,chain:o,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<_)throw new $j({maxPriorityFeePerGas:_});n.maxPriorityFeePerGas=_,n.maxFeePerGas=S}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new yg;if(typeof n.gasPrice>"u"){const k=await w(),{gasPrice:S}=await a0(e,{block:k,chain:o,request:n,type:"legacy"});n.gasPrice=S}}return i.includes("gas")&&typeof m>"u"&&(n.gas=await Y(e,Sg,"estimateGas")({...n,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((A=a.runAt)!=null&&A.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:o},{phase:"afterFillParameters"})),Tr(n),delete n.parameters,n}async function Sg(e,t){var i,a,c;const{account:n=e.account,prepare:r=!0}=t,o=n?je(n):void 0,s=(()=>{if(Array.isArray(r))return r;if((o==null?void 0:o.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Vd({authorization:t.authorizationList[0]}).catch(()=>{throw new U("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,blockNumber:p,blockTag:m,data:v,gas:y,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:x,maxPriorityFeePerGas:E,nonce:A,value:k,stateOverride:S,..._}=r?await ol(e,{...t,parameters:s,to:l}):t;if(y&&t.gas!==y)return y;const O=(typeof p=="bigint"?z(p):void 0)||m,P=pg(S);Tr(t);const R=(c=(a=(i=e.chain)==null?void 0:i.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,M=(R||jo)({...Gi(_,{format:R}),account:o,accessList:u,authorizationList:f,blobs:d,blobVersionedHashes:h,data:v,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:x,maxPriorityFeePerGas:E,nonce:A,to:l,value:k},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:P?[M,O??e.experimental_blockTag??"latest",P]:O?[M,O]:[M]}))}catch(l){throw zj(l,{...t,account:o,chain:e.chain})}}async function a_(e,t){var l;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(l=e.dataSuffix)==null?void 0:l.value,...a}=t,c=Vt({abi:n,args:o,functionName:s});try{return await Y(e,Sg,"estimateGas")({data:`${c}${i?i.replace("0x",""):""}`,to:r,...a})}catch(u){const f=a.account?je(a.account):void 0;throw ds(u,{abi:n,address:r,args:o,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:f==null?void 0:f.address})}}async function S5(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){var i,a,c;if((i=e.batch)!=null&&i.multicall&&((c=(a=e.chain)==null?void 0:a.contracts)!=null&&c.multicall3)){const l=e.chain.contracts.multicall3.address,u=Vt({abi:_i,functionName:"getEthBalance",args:[t]}),{data:f}=await Y(e,tl,"call")({to:l,data:u,blockNumber:n,blockTag:r});return So({abi:_i,functionName:"getEthBalance",args:[t],data:f||"0x"})}const o=typeof n=="bigint"?z(n):void 0,s=await e.request({method:"eth_getBalance",params:[t,o||r]});return BigInt(s)}async function c_(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}const l_=new Map,u_=new Map;function d_(e){const t=(o,s)=>({clear:()=>s.delete(o),get:()=>s.get(o),set:i=>s.set(o,i)}),n=t(e,l_),r=t(e,u_);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function f_(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=d_(t),o=r.response.get();if(o&&n>0&&Date.now()-o.created.getTime()<n)return o.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const i=await s;return r.response.set({created:new Date,data:i}),i}finally{r.promise.clear()}}const h_=e=>`blockNumber.${e}`;async function sl(e,{cacheTime:t=e.cacheTime}={}){const n=await f_(()=>e.request({method:"eth_blockNumber"}),{cacheKey:h_(e.uid),cacheTime:t});return BigInt(n)}async function p_(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const o=n!==void 0?z(n):void 0;let s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||r]},{dedupe:!!o}),tn(s)}async function Ku(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=n!==void 0?z(n):void 0,s=await e.request({method:"eth_getCode",params:[t,o||r]},{dedupe:!!o});if(s!=="0x")return s}function Mi(e,t){if(!We(e,{strict:!1}))throw new _t({address:e});if(!We(t,{strict:!1}))throw new _t({address:t});return e.toLowerCase()===t.toLowerCase()}function er(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const Cw="/docs/contract/decodeEventLog";function Yu(e){const{abi:t,data:n,strict:r,topics:o}=e,s=r??!0,[i,...a]=o;if(!i)throw new tk({docsPath:Cw});const c=t.find(y=>y.type==="event"&&i===Rd(Pn(y)));if(!(c&&"name"in c)||c.type!=="event")throw new nk(i,{docsPath:Cw});const{name:l,inputs:u}=c,f=u==null?void 0:u.some(y=>!("name"in y&&y.name)),d=f?[]:{},h=u.map((y,g)=>[y,g]).filter(([y])=>"indexed"in y&&y.indexed),p=[];for(let y=0;y<h.length;y++){const[g,w]=h[y],x=a[y];if(!x){if(s)throw new Ym({abiItem:c,param:g});p.push([g,w]);continue}d[f?w:g.name||w]=m_({param:g,value:x})}const m=u.filter(y=>!("indexed"in y&&y.indexed)),v=s?m:[...p.map(([y])=>y),...m];if(v.length>0){if(n&&n!=="0x")try{const y=Yc(v,n);if(y){let g=0;if(!s)for(const[w,x]of p)d[f?x:w.name||x]=y[g++];if(f)for(let w=0;w<u.length;w++)d[w]===void 0&&g<y.length&&(d[w]=y[g++]);else for(let w=0;w<m.length;w++)d[m[w].name]=y[g++]}}catch(y){if(s)throw y instanceof e2||y instanceof p2?new Qu({abiItem:c,data:n,params:v,size:Ne(n)}):y}else if(s)throw new Qu({abiItem:c,data:"0x",params:v,size:0})}return{eventName:l,args:Object.values(d).length>0?d:void 0}}function m_({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Yc([e],t)||[])[0]}function jg(e){const{abi:t,args:n,logs:r,strict:o=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),i=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:Rd(a)}));return r.map(a=>{var d;const c=typeof a.blockNumber=="string"?er(a):a,l=i.filter(h=>c.topics[0]===h.selector);if(l.length===0)return null;let u,f;for(const h of l)try{u=Yu({...c,abi:[h.abi],strict:!0}),f=h;break}catch{}if(!u&&!o){f=l[0];try{u=Yu({data:c.data,topics:c.topics,abi:[f.abi],strict:!1})}catch{const h=(d=f.abi.inputs)==null?void 0:d.some(p=>!("name"in p&&p.name));return{...c,args:h?[]:{},eventName:f.abi.name}}}return!u||!f||s&&!s.includes(u.eventName)||!g_({args:u.args,inputs:f.abi.inputs,matchArgs:n})?null:{...u,...c}}).filter(Boolean)}function g_(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function o(s,i,a){try{return s.type==="address"?Mi(i,a):s.type==="string"||s.type==="bytes"?ot(qi(i))===a:i===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((s,i)=>{if(s==null)return!0;const a=n[i];return a?(Array.isArray(s)?s:[s]).some(l=>o(a,l,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,i])=>{if(i==null)return!0;const a=n.find(l=>l.name===s);return a?(Array.isArray(i)?i:[i]).some(l=>o(a,l,t[s])):!1}):!1}async function _g(e,{address:t,blockHash:n,fromBlock:r,toBlock:o,event:s,events:i,args:a,strict:c}={}){const l=c??!1,u=i??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(m=>nl({abi:[m],eventName:m.name,args:i?void 0:a}))],s&&(f=f[0]));let d;n?d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:n}]}):d=await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:typeof r=="bigint"?z(r):r,toBlock:typeof o=="bigint"?z(o):o}]});const h=d.map(p=>er(p));return u?jg({abi:u,args:a,logs:h,strict:l}):h}async function j5(e,t){const{abi:n,address:r,args:o,blockHash:s,eventName:i,fromBlock:a,toBlock:c,strict:l}=t,u=i?Es({abi:n,name:i}):void 0,f=u?void 0:n.filter(d=>d.type==="event");return Y(e,_g,"getLogs")({address:r,args:o,blockHash:s,event:u,events:f,fromBlock:a,toBlock:c,strict:l})}async function y_(e,{address:t,blockNumber:n,blockTag:r="latest"}){const o=await Ku(e,{address:t,...n!==void 0?{blockNumber:n}:{blockTag:r}});if(o&&Ne(o)===23&&o.startsWith("0xef0100"))return Te(wo(o,3,23))}class w_ extends U{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function b_(e,t){const{address:n,factory:r,factoryData:o}=t;try{const[s,i,a,c,l,u,f]=await Y(e,wn,"readContract")({abi:v_,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:i,version:a,chainId:Number(c),verifyingContract:l,salt:u},extensions:f,fields:s}}catch(s){const i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new w_({address:n}):i}}const v_=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function x_(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function C_(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:o}){const s=typeof n=="bigint"?z(n):void 0,i=await e.request({method:"eth_feeHistory",params:[z(t),s||r,o]},{dedupe:!!s});return x_(i)}async function Qd(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const o=r.map(s=>er(s));return!("abi"in t)||!t.abi?o:jg({abi:t.abi,logs:o,strict:n})}async function E_(e,{filter:t}){const n=t.strict??!1,o=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>er(s));return t.abi?jg({abi:t.abi,logs:o,strict:n}):o}function A_(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:r}=n,o=n.address;if(!We(o))throw new _t({address:o});if(r<0)throw new Md({chainId:r})}Ig(e)}function k_(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new E5;for(const n of t){const r=Ne(n),o=tn(wo(n,0,1));if(r!==32)throw new o_({hash:n,size:r});if(o!==C5)throw new s_({hash:n,version:o})}}Ig(e)}function Ig(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:o}=e;if(t<=0)throw new Md({chainId:t});if(o&&!We(o))throw new _t({address:o});if(r&&r>Wd)throw new ps({maxFeePerGas:r});if(n&&r&&n>r)throw new kc({maxFeePerGas:r,maxPriorityFeePerGas:n})}function S_(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:s}=e;if(t<=0)throw new Md({chainId:t});if(s&&!We(s))throw new _t({address:s});if(n||o)throw new U("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>Wd)throw new ps({maxFeePerGas:r})}function j_(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:o,to:s}=e;if(s&&!We(s))throw new _t({address:s});if(typeof t<"u"&&t<=0)throw new Md({chainId:t});if(n||o)throw new U("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>Wd)throw new ps({maxFeePerGas:r})}function Gd(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:o}=e[n];for(let s=0;s<o.length;s++)if(o[s].length-2!==64)throw new vS({storageKey:o[s]});if(!We(r,{strict:!1}))throw new _t({address:r});t.push([r,o])}return t}function __(e,t){const n=k5(e);return n==="eip1559"?N_(e,t):n==="eip2930"?P_(e,t):n==="eip4844"?B_(e,t):n==="eip7702"?I_(e,t):T_(e,t)}function I_(e,t){const{authorizationList:n,chainId:r,gas:o,nonce:s,to:i,value:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:f}=e;A_(e);const d=Gd(u),h=O_(n);return Ln(["0x04",vo([z(r),s?z(s):"0x",l?z(l):"0x",c?z(c):"0x",o?z(o):"0x",i??"0x",a?z(a):"0x",f??"0x",d,h,...il(e,t)])])}function B_(e,t){const{chainId:n,gas:r,nonce:o,to:s,value:i,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:f}=e;k_(e);let d=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof d>"u"||typeof h>"u")){const w=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(A=>$e(A)),x=e.kzg,E=xg({blobs:w,kzg:x});if(typeof d>"u"&&(d=b5({commitments:E})),typeof h>"u"){const A=Cg({blobs:w,commitments:E,kzg:x});h=A5({blobs:w,commitments:E,proofs:A})}}const p=Gd(u),m=[z(n),o?z(o):"0x",l?z(l):"0x",c?z(c):"0x",r?z(r):"0x",s??"0x",i?z(i):"0x",f??"0x",p,a?z(a):"0x",d??[],...il(e,t)],v=[],y=[],g=[];if(h)for(let w=0;w<h.length;w++){const{blob:x,commitment:E,proof:A}=h[w];v.push(x),y.push(E),g.push(A)}return Ln(["0x03",vo(h?[m,v,y,g]:m)])}function N_(e,t){const{chainId:n,gas:r,nonce:o,to:s,value:i,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:u}=e;Ig(e);const f=Gd(l),d=[z(n),o?z(o):"0x",c?z(c):"0x",a?z(a):"0x",r?z(r):"0x",s??"0x",i?z(i):"0x",u??"0x",f,...il(e,t)];return Ln(["0x02",vo(d)])}function P_(e,t){const{chainId:n,gas:r,data:o,nonce:s,to:i,value:a,accessList:c,gasPrice:l}=e;S_(e);const u=Gd(c),f=[z(n),s?z(s):"0x",l?z(l):"0x",r?z(r):"0x",i??"0x",a?z(a):"0x",o??"0x",u,...il(e,t)];return Ln(["0x01",vo(f)])}function T_(e,t){const{chainId:n=0,gas:r,data:o,nonce:s,to:i,value:a,gasPrice:c}=e;j_(e);let l=[s?z(s):"0x",c?z(c):"0x",r?z(r):"0x",i??"0x",a?z(a):"0x",o??"0x"];if(t){const u=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new wS({v:t.v});return h})(),f=zt(t.r),d=zt(t.s);l=[...l,z(u),f==="0x00"?"0x":f,d==="0x00"?"0x":d]}else n>0&&(l=[...l,z(n),"0x","0x"]);return vo(l)}function il(e,t){const n=t??e,{v:r,yParity:o}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof o>"u")return[];const s=zt(n.r),i=zt(n.s);return[typeof o=="number"?o?z(1):"0x":r===0n?"0x":r===1n?z(1):r===27n?"0x":z(1),s==="0x00"?"0x":s,i==="0x00"?"0x":i]}function O_(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:r,nonce:o,...s}=n,i=n.address;t.push([r?$t(r):"0x",i,o?$t(o):"0x",...il({},s)])}return t}async function R_({address:e,authorization:t,signature:n}){return Mi(Te(e),await Vd({authorization:t,signature:n}))}const Ol=new Vi(8192);function M_(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Ol.get(n))return Ol.get(n);const r=e().finally(()=>Ol.delete(n));return Ol.set(n,r),r}async function c0(e){return new Promise(t=>setTimeout(t,e))}function ms(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((o,s)=>{const i=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:a,error:l}):t;u&&await c0(u),i({count:a+1})};try{const l=await e();o(l)}catch(l){if(a<n&&await r({count:a,error:l}))return c({error:l});s(l)}};i()})}function L_(e,t={}){return async(n,r={})=>{var f;const{dedupe:o=!1,methods:s,retryDelay:i=150,retryCount:a=3,uid:c}={...t,...r},{method:l}=n;if((f=s==null?void 0:s.exclude)!=null&&f.includes(l))throw new Uo(new Error("method not supported"),{method:l});if(s!=null&&s.include&&!s.include.includes(l))throw new Uo(new Error("method not supported"),{method:l});const u=o?Bi(`${c}.${Ge(n)}`):void 0;return M_(()=>ms(async()=>{try{return await e(n)}catch(d){const h=d;switch(h.code){case cc.code:throw new cc(h);case lc.code:throw new lc(h);case uc.code:throw new uc(h,{method:n.method});case dc.code:throw new dc(h);case us.code:throw new us(h);case bo.code:throw new bo(h);case fc.code:throw new fc(h);case Jn.code:throw new Jn(h);case hc.code:throw new hc(h);case Uo.code:throw new Uo(h,{method:n.method});case Ti.code:throw new Ti(h);case pc.code:throw new pc(h);case ge.code:throw new ge(h);case mc.code:throw new mc(h);case gc.code:throw new gc(h);case yc.code:throw new yc(h);case wc.code:throw new wc(h);case kt.code:throw new kt(h);case Oi.code:throw new Oi(h);case bc.code:throw new bc(h);case vc.code:throw new vc(h);case xc.code:throw new xc(h);case Cc.code:throw new Cc(h);case Ec.code:throw new Ec(h);case Ri.code:throw new Ri(h);case 5e3:throw new ge(h);case Ac.code:throw new Ac(h);default:throw d instanceof U?d:new TS(h)}}},{delay:({count:d,error:h})=>{var p;if(h&&h instanceof za){const m=(p=h==null?void 0:h.headers)==null?void 0:p.get("Retry-After");if(m!=null&&m.match(/\d/))return Number.parseInt(m,10)*1e3}return~~(1<<d)*i},retryCount:a,shouldRetry:({error:d})=>F_(d)}),{enabled:o,id:u})}}function F_(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Ti.code||e.code===us.code:e instanceof za&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function Bg({chain:e,currentChainId:t}){if(!e)throw new cS;if(t!==e.id)throw new aS({chain:e,currentChainId:t})}function at(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return o=>{const s=typeof o=="function"?o(r):o,i={...r,...s};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}const _5={"0x0":"reverted","0x1":"success"};function Ng(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>er(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?tn(e.transactionIndex):null,status:e.status?_5[e.status]:null,type:e.type?g5[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const D_=fg("transactionReceipt",Ng);function Kd(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((o,s)=>{(async()=>{let i;try{const a=new AbortController;n>0&&(i=setTimeout(()=>{r?a.abort():s(t)},n)),o(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(t),s(a)}finally{clearTimeout(i)}})()})}function U_(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Ew=U_();function z_(e,t={}){const{url:n,headers:r}=$_(e);return{async request(o){var p,m,v;const{body:s,fetchFn:i=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:c=t.onResponse,timeout:l=t.timeout??1e4}=o,u={...t.fetchOptions??{},...o.fetchOptions??{}},{headers:f,method:d,signal:h}=u;try{const y=await Kd(async({signal:w})=>{const x={...u,body:Array.isArray(s)?Ge(s.map(S=>({jsonrpc:"2.0",id:S.id??Ew.take(),...S}))):Ge({jsonrpc:"2.0",id:s.id??Ew.take(),...s}),headers:{...r,"Content-Type":"application/json",...f},method:d||"POST",signal:h||(l>0?w:null)},E=new Request(n,x),A=await(a==null?void 0:a(E,x))??{...x,url:n};return await i(A.url??n,A)},{errorInstance:new uw({body:s,url:n}),timeout:l,signal:!0});c&&await c(y);let g;if((p=y.headers.get("Content-Type"))!=null&&p.startsWith("application/json"))g=await y.json();else{g=await y.text();try{g=JSON.parse(g||"{}")}catch(w){if(y.ok)throw w;g={error:g}}}if(!y.ok){if(typeof((m=g.error)==null?void 0:m.code)=="number"&&typeof((v=g.error)==null?void 0:v.message)=="string")return g;throw new za({body:s,details:Ge(g.error)||y.statusText,headers:y.headers,status:y.status,url:n})}return g}catch(y){throw y instanceof za||y instanceof uw?y:new za({body:s,cause:y,url:n})}}}}function $_(e){try{const t=new URL(e),n=(()=>{if(t.username){const r=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(r)}`}}}})();return{url:t.toString(),...n}}catch{return{url:e}}}const W_=`Ethereum Signed Message:
1650
+ `;function q_(e){const t=typeof e=="string"?Bi(e):typeof e.raw=="string"?e.raw:$e(e.raw),n=Bi(`${W_}${Ne(t)}`);return mt([n,t])}function I5(e,t){return ot(q_(e),t)}class V_ extends U{constructor({domain:t}){super(`Invalid domain "${Ge(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class H_ extends U{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class Q_ extends U{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function G_(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(c,l)=>{const u={...l};for(const f of c){const{name:d,type:h}=f;h==="address"&&(u[d]=u[d].toLowerCase())}return u},i=o.EIP712Domain?t?s(o.EIP712Domain,t):{}:{},a=(()=>{if(r!=="EIP712Domain")return s(o[r],n)})();return Ge({domain:i,message:a,primaryType:r,types:o})}function B5(e){const{domain:t,message:n,primaryType:r,types:o}=e,s=(i,a)=>{for(const c of i){const{name:l,type:u}=c,f=a[l],d=u.match(w2);if(d&&(typeof f=="number"||typeof f=="bigint")){const[m,v,y]=d;z(f,{signed:v==="int",size:Number.parseInt(y,10)/8})}if(u==="address"&&typeof f=="string"&&!We(f))throw new _t({address:f});const h=u.match(Zk);if(h){const[m,v]=h;if(v&&Ne(f)!==Number.parseInt(v,10))throw new sk({expectedSize:Number.parseInt(v,10),givenSize:Ne(f)})}const p=o[u];p&&(K_(u),s(p,f))}};if(o.EIP712Domain&&t){if(typeof t!="object")throw new V_({domain:t});s(o.EIP712Domain,t)}if(r!=="EIP712Domain")if(o[r])s(o[r],n);else throw new H_({primaryType:r,types:o})}function N5({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function K_(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Q_({type:e})}function Y_(e){const{domain:t={},message:n,primaryType:r}=e,o={EIP712Domain:N5({domain:t}),...e.types};B5({domain:t,message:n,primaryType:r,types:o});const s=["0x1901"];return t&&s.push(J_({domain:t,types:o})),r!=="EIP712Domain"&&s.push(P5({data:n,primaryType:r,types:o})),ot(mt(s))}function J_({domain:e,types:t}){return P5({data:e,primaryType:"EIP712Domain",types:t})}function P5({data:e,primaryType:t,types:n}){const r=T5({data:e,primaryType:t,types:n});return ot(r)}function T5({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],o=[X_({primaryType:t,types:n})];for(const s of n[t]){const[i,a]=R5({types:n,name:s.name,type:s.type,value:e[s.name]});r.push(i),o.push(a)}return Cs(r,o)}function X_({primaryType:e,types:t}){const n=$t(Z_({primaryType:e,types:t}));return ot(n)}function Z_({primaryType:e,types:t}){let n="";const r=O5({primaryType:e,types:t});r.delete(e);const o=[e,...Array.from(r).sort()];for(const s of o)n+=`${s}(${t[s].map(({name:i,type:a})=>`${a} ${i}`).join(",")})`;return n}function O5({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),o=r==null?void 0:r[0];if(n.has(o)||t[o]===void 0)return n;n.add(o);for(const s of t[o])O5({primaryType:s.type,types:t},n);return n}function R5({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},ot(T5({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},ot(r)];if(n==="string")return[{type:"bytes32"},ot($t(r))];if(n.lastIndexOf("]")===n.length-1){const o=n.slice(0,n.lastIndexOf("[")),s=r.map(i=>R5({name:t,type:o,types:e,value:i}));return[{type:"bytes32"},ot(Cs(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:n},r]}class e9 extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const t9={checksum:new e9(8192)},ah=t9.checksum;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function n9(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Aw(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ju(e,...t){if(!n9(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function kw(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function r9(e,t){Ju(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function o9(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function M5(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const s9=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function i9(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function a9(e){for(let t=0;t<e.length;t++)e[t]=i9(e[t]);return e}const Sw=s9?e=>e:a9;function c9(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function L5(e){return typeof e=="string"&&(e=c9(e)),Ju(e),e}class l9{}function u9(e){const t=r=>e().update(L5(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const Rl=BigInt(2**32-1),jw=BigInt(32);function d9(e,t=!1){return t?{h:Number(e&Rl),l:Number(e>>jw&Rl)}:{h:Number(e>>jw&Rl)|0,l:Number(e&Rl)|0}}function f9(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=d9(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const h9=(e,t,n)=>e<<n|t>>>32-n,p9=(e,t,n)=>t<<n|e>>>32-n,m9=(e,t,n)=>t<<n-32|e>>>64-n,g9=(e,t,n)=>e<<n-32|t>>>64-n,y9=BigInt(0),ma=BigInt(1),w9=BigInt(2),b9=BigInt(7),v9=BigInt(256),x9=BigInt(113),F5=[],D5=[],U5=[];for(let e=0,t=ma,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],F5.push(2*(5*r+n)),D5.push((e+1)*(e+2)/2%64);let o=y9;for(let s=0;s<7;s++)t=(t<<ma^(t>>b9)*x9)%v9,t&w9&&(o^=ma<<(ma<<BigInt(s))-ma);U5.push(o)}const z5=f9(U5,!0),C9=z5[0],E9=z5[1],_w=(e,t,n)=>n>32?m9(e,t,n):h9(e,t,n),Iw=(e,t,n)=>n>32?g9(e,t,n):p9(e,t,n);function A9(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=_w(l,u,1)^n[a],d=Iw(l,u,1)^n[a+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let o=e[2],s=e[3];for(let i=0;i<24;i++){const a=D5[i],c=_w(o,s,a),l=Iw(o,s,a),u=F5[i];o=e[u],s=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=C9[r],e[1]^=E9[r]}M5(n)}class Pg extends l9{constructor(t,n,r,o=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=s,Aw(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=o9(this.state)}clone(){return this._cloneInto()}keccak(){Sw(this.state32),A9(this.state32,this.rounds),Sw(this.state32),this.posOut=0,this.pos=0}update(t){kw(this),t=L5(t),Ju(t);const{blockLen:n,state:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);for(let a=0;a<i;a++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){kw(this,!1),Ju(t),this.finish();const n=this.state,{blockLen:r}=this;for(let o=0,s=t.length;o<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Aw(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(r9(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,M5(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:o,rounds:s,enableXOF:i}=this;return t||(t=new Pg(n,r,o,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}}const k9=(e,t,n)=>u9(()=>new Pg(t,e,n)),S9=k9(1,136,256/8);function $5(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=S9(WS(e));return n==="Bytes"?r:Rn(r)}const j9=/^0x[a-fA-F0-9]{40}$/;function Yd(e,t={}){const{strict:n=!0}=t;if(!j9.test(e))throw new Bw({address:e,cause:new _9});if(n){if(e.toLowerCase()===e)return;if(W5(e)!==e)throw new Bw({address:e,cause:new I9})}}function W5(e){if(ah.has(e))return ah.get(e);Yd(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=$5(VS(t),{as:"Bytes"}),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const o=`0x${r.join("")}`;return ah.set(e,o),o}function l0(e,t={}){const{strict:n=!0}=t??{};try{return Yd(e,{strict:n}),!0}catch{return!1}}class Bw extends le{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class _9 extends le{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class I9 extends le{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const B9=/^(.*)\[([0-9]*)\]$/,N9=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,q5=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Nw=2n**256n-1n;function oi(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=Rg(t.type);if(s){const[i,a]=s;return T9(e,{...t,type:a},{checksumAddress:r,length:i,staticPosition:o})}if(t.type==="tuple")return L9(e,t,{checksumAddress:r,staticPosition:o});if(t.type==="address")return P9(e,{checksum:r});if(t.type==="bool")return O9(e);if(t.type.startsWith("bytes"))return R9(e,t,{staticPosition:o});if(t.type.startsWith("uint")||t.type.startsWith("int"))return M9(e,t);if(t.type==="string")return F9(e,{staticPosition:o});throw new Lg(t.type)}const Pw=32,u0=32;function P9(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(s=>n?W5(s):s)(Rn(QS(r,-20))),32]}function T9(e,t,n){const{checksumAddress:r,length:o,staticPosition:s}=n;if(!o){const c=Cr(e.readBytes(u0)),l=s+c,u=l+Pw;e.setPosition(l);const f=Cr(e.readBytes(Pw)),d=Sc(t);let h=0;const p=[];for(let m=0;m<f;++m){e.setPosition(u+(d?m*32:h));const[v,y]=oi(e,t,{checksumAddress:r,staticPosition:u});h+=y,p.push(v)}return e.setPosition(s+32),[p,32]}if(Sc(t)){const c=Cr(e.readBytes(u0)),l=s+c,u=[];for(let f=0;f<o;++f){e.setPosition(l+f*32);const[d]=oi(e,t,{checksumAddress:r,staticPosition:l});u.push(d)}return e.setPosition(s+32),[u,32]}let i=0;const a=[];for(let c=0;c<o;++c){const[l,u]=oi(e,t,{checksumAddress:r,staticPosition:s+i});i+=u,a.push(l)}return[a,i]}function O9(e){return[KS(e.readBytes(32),{size:32}),32]}function R9(e,t,{staticPosition:n}){const[r,o]=t.type.split("bytes");if(!o){const i=Cr(e.readBytes(32));e.setPosition(n+i);const a=Cr(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(a);return e.setPosition(n+32),[Rn(c),32]}return[Rn(e.readBytes(Number.parseInt(o,10),32)),32]}function M9(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[r>48?GS(o,{signed:n}):Cr(o,{signed:n}),32]}function L9(e,t,n){const{checksumAddress:r,staticPosition:o}=n,s=t.components.length===0||t.components.some(({name:c})=>!c),i=s?[]:{};let a=0;if(Sc(t)){const c=Cr(e.readBytes(u0)),l=o+c;for(let u=0;u<t.components.length;++u){const f=t.components[u];e.setPosition(l+a);const[d,h]=oi(e,f,{checksumAddress:r,staticPosition:l});a+=h,i[s?u:f==null?void 0:f.name]=d}return e.setPosition(o+32),[i,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,f]=oi(e,l,{checksumAddress:r,staticPosition:o});i[s?c:l==null?void 0:l.name]=u,a+=f}return[i,a]}function F9(e,{staticPosition:t}){const n=Cr(e.readBytes(32)),r=t+n;e.setPosition(r);const o=Cr(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];const s=e.readBytes(o,32),i=YS(H2(s));return e.setPosition(t+32),[i,32]}function D9({checksumAddress:e,parameters:t,values:n}){const r=[];for(let o=0;o<t.length;o++)r.push(Tg({checksumAddress:e,parameter:t[o],value:n[o]}));return r}function Tg({checksumAddress:e=!1,parameter:t,value:n}){const r=t,o=Rg(r.type);if(o){const[s,i]=o;return z9(n,{checksumAddress:e,length:s,parameter:{...r,type:i}})}if(r.type==="tuple")return H9(n,{checksumAddress:e,parameter:r});if(r.type==="address")return U9(n,{checksum:e});if(r.type==="bool")return W9(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,i="256"]=q5.exec(r.type)??[];return q9(n,{signed:s,size:Number(i)})}if(r.type.startsWith("bytes"))return $9(n,{type:r.type});if(r.type==="string")return V9(n);throw new Lg(r.type)}function Og(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?t+=32:t+=nn(a)}const n=[],r=[];let o=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:a}=e[s];i?(n.push(Et(t+o,{size:32})),r.push(a),o+=nn(a)):n.push(a)}return On(...n,...r)}function U9(e,t){const{checksum:n=!1}=t;return Yd(e,{strict:n}),{dynamic:!1,encoded:fs(e.toLowerCase())}}function z9(e,t){const{checksumAddress:n,length:r,parameter:o}=t,s=r===null;if(!Array.isArray(e))throw new tI(e);if(!s&&e.length!==r)throw new eI({expectedLength:r,givenLength:e.length,type:`${o.type}[${r}]`});let i=!1;const a=[];for(let c=0;c<e.length;c++){const l=Tg({checksumAddress:n,parameter:o,value:e[c]});l.dynamic&&(i=!0),a.push(l)}if(s||i){const c=Og(a);if(s){const l=Et(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?On(l,c):l}}if(i)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:On(...a.map(({encoded:c})=>c))}}function $9(e,{type:t}){const[,n]=t.split("bytes"),r=nn(e);if(!n){let o=e;return r%32!==0&&(o=hs(o,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:On(fs(Et(r,{size:32})),o)}}if(r!==Number.parseInt(n,10))throw new H5({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:hs(e)}}function W9(e){if(typeof e!="boolean")throw new le(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:fs(Q2(e))}}function q9(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new Y2({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:Et(e,{size:32,signed:t})}}function V9(e){const t=ug(e),n=Math.ceil(nn(t)/32),r=[];for(let o=0;o<n;o++)r.push(hs(Xn(t,o*32,(o+1)*32)));return{dynamic:!0,encoded:On(hs(Et(nn(t),{size:32})),...r)}}function H9(e,t){const{checksumAddress:n,parameter:r}=t;let o=!1;const s=[];for(let i=0;i<r.components.length;i++){const a=r.components[i],c=Array.isArray(e)?i:a.name,l=Tg({checksumAddress:n,parameter:a,value:e[c]});s.push(l),l.dynamic&&(o=!0)}return{dynamic:o,encoded:o?Og(s):On(...s.map(({encoded:i})=>i))}}function Rg(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Sc(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Sc);const n=Rg(e.type);return!!(n&&Sc({...e,type:n[1]}))}const Q9={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Y9({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new K9({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Tw({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Tw({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function G9(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Q9);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class Tw extends le{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class K9 extends le{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class Y9 extends le{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function J9(e,t,n={}){const{as:r="Array",checksumAddress:o=!1}=n,s=typeof t=="string"?V2(t):t,i=G9(s);if(Gs(s)===0&&e.length>0)throw new Z9;if(Gs(s)&&Gs(s)<32)throw new X9({data:typeof t=="string"?t:Rn(t),parameters:e,size:Gs(s)});let a=0;const c=r==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];i.setPosition(a);const[f,d]=oi(i,u,{checksumAddress:o,staticPosition:0});a+=d,r==="Array"?c.push(f):c[u.name??l]=f}return c}function Mg(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new Q5({expectedLength:e.length,givenLength:t.length});const o=D9({checksumAddress:r,parameters:e,values:t}),s=Og(o);return s.length===0?"0x":s}function d0(e,t){if(e.length!==t.length)throw new Q5({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r];n.push(d0.encode(o,s))}return On(...n)}(function(e){function t(n,r,o=!1){if(n==="address"){const c=r;return Yd(c),fs(c.toLowerCase(),o?32:0)}if(n==="string")return ug(r);if(n==="bytes")return r;if(n==="bool")return fs(Q2(r),o?32:1);const s=n.match(q5);if(s){const[c,l,u="256"]=s,f=Number.parseInt(u,10)/8;return Et(r,{size:o?32:f,signed:l==="int"})}const i=n.match(N9);if(i){const[c,l]=i;if(Number.parseInt(l,10)!==(r.length-2)/2)throw new H5({expectedSize:Number.parseInt(l,10),value:r});return hs(r,o?32:0)}const a=n.match(B9);if(a&&Array.isArray(r)){const[c,l]=a,u=[];for(let f=0;f<r.length;f++)u.push(t(l,r[f],!0));return u.length===0?"0x":On(...u)}throw new Lg(n)}e.encode=t})(d0||(d0={}));function V5(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?iw(e):e}class X9 extends le{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Os(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class Z9 extends le{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class eI extends le{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class H5 extends le{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${nn(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Q5 extends le{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
1651
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class tI extends le{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Lg extends le{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function G5(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new ch({signature:e});if(typeof e.s>"u")throw new ch({signature:e});if(n&&typeof e.yParity>"u")throw new ch({signature:e});if(e.r<0n||e.r>Nw)throw new cI({value:e.r});if(e.s<0n||e.s>Nw)throw new lI({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Dg({value:e.yParity})}function nI(e){return K5(Rn(e))}function K5(e){if(e.length!==130&&e.length!==132)throw new aI({signature:e});const t=BigInt(Xn(e,0,32)),n=BigInt(Xn(e,32,64)),r=(()=>{const o=+`0x${e.slice(130)}`;if(!Number.isNaN(o))try{return Fg(o)}catch{throw new Dg({value:o})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function rI(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return oI(e)}function oI(e){const t=typeof e=="string"?K5(e):e instanceof Uint8Array?nI(e):typeof e.r=="string"?iI(e):e.v?sI(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return G5(t),t}function sI(e){return{r:e.r,s:e.s,yParity:Fg(e.v)}}function iI(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Fg(n)),typeof r!="number")throw new Dg({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Fg(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new uI({value:e})}class aI extends le{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${nn(oj(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ch extends le{constructor({signature:t}){super(`Signature \`${q2(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class cI extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class lI extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Dg extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class uI extends le{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function dI(e,t={}){return typeof e.chainId=="string"?fI(e):{...e,...t.signature}}function fI(e){const{address:t,chainId:n,nonce:r}=e,o=rI(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...o}}const hI="0x8010801080108010801080108010801080108010801080108010801080108010",pI=V5("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Y5(e){if(typeof e=="string"){if(Xn(e,-32)!==hI)throw new yI(e)}else G5(e.authorization)}function mI(e){Y5(e);const t=K2(Xn(e,-64,-32)),n=Xn(e,-t-64,-64),r=Xn(e,0,-t-64),[o,s,i]=J9(pI,n);return{authorization:dI({address:o.delegation,chainId:Number(o.chainId),nonce:o.nonce,yParity:o.yParity,r:o.r,s:o.s}),signature:r,...i&&i!=="0x"?{data:i,to:s}:{}}}function gI(e){try{return Y5(e),!0}catch{return!1}}let yI=class extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function wI(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function bI(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?tn(e.nonce):void 0,storageProof:e.storageProof?wI(e.storageProof):void 0}}async function vI(e,{address:t,blockNumber:n,blockTag:r,storageKeys:o}){const s=r??"latest",i=n!==void 0?z(n):void 0,a=await e.request({method:"eth_getProof",params:[t,o,i||s]});return bI(a)}async function xI(e,{address:t,blockNumber:n,blockTag:r="latest",slot:o}){const s=n!==void 0?z(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,o,s||r]})}async function Ug(e,{blockHash:t,blockNumber:n,blockTag:r,hash:o,index:s,sender:i,nonce:a}){var d,h,p;const c=r||"latest",l=n!==void 0?z(n):void 0;let u=null;if(o?u=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,z(s)]},{dedupe:!0}):typeof s=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,z(s)]},{dedupe:!!l}):i&&typeof a=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[i,z(a)]},{dedupe:!0})),!u)throw new M2({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:s});return(((p=(h=(d=e.chain)==null?void 0:d.formatters)==null?void 0:h.transaction)==null?void 0:p.format)||rl)(u,"getTransaction")}async function CI(e,{hash:t,transactionReceipt:n}){const[r,o]=await Promise.all([Y(e,sl,"getBlockNumber")({}),t?Y(e,Ug,"getTransaction")({hash:t}):void 0]),s=(n==null?void 0:n.blockNumber)||(o==null?void 0:o.blockNumber);return s?r-s+1n:0n}async function uu(e,{hash:t}){var o,s,i;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new L2({hash:t});return(((i=(s=(o=e.chain)==null?void 0:o.formatters)==null?void 0:s.transactionReceipt)==null?void 0:i.format)||Ng)(n,"getTransactionReceipt")}async function J5(e,t){var g;const{account:n,authorizationList:r,allowFailure:o=!0,blockNumber:s,blockOverrides:i,blockTag:a,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:f=t.deployless??!1}=typeof((g=e.batch)==null?void 0:g.multicall)=="object"?e.batch.multicall:{},d=(()=>{if(t.multicallAddress)return t.multicallAddress;if(f)return null;if(e.chain)return Qi({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),h=[[]];let p=0,m=0;for(let w=0;w<l.length;w++){const{abi:x,address:E,args:A,functionName:k}=l[w];try{const S=Vt({abi:x,args:A,functionName:k});m+=(S.length-2)/2,u>0&&m>u&&h[p].length>0&&(p++,m=(S.length-2)/2,h[p]=[]),h[p]=[...h[p],{allowFailure:!0,callData:S,target:E}]}catch(S){const _=ds(S,{abi:x,address:E,args:A,docsPath:"/docs/contract/multicall",functionName:k,sender:n});if(!o)throw _;h[p]=[...h[p],{allowFailure:!0,callData:"0x",target:E}]}}const v=await Promise.allSettled(h.map(w=>Y(e,wn,"readContract")({...d===null?{code:dg}:{address:d},abi:_i,account:n,args:[w],authorizationList:r,blockNumber:s,blockOverrides:i,blockTag:a,functionName:"aggregate3",stateOverride:c}))),y=[];for(let w=0;w<v.length;w++){const x=v[w];if(x.status==="rejected"){if(!o)throw x.reason;for(let A=0;A<h[w].length;A++)y.push({status:"failure",error:x.reason,result:void 0});continue}const E=x.value;for(let A=0;A<E.length;A++){const{returnData:k,success:S}=E[A],{callData:_}=h[w][A],{abi:N,address:O,functionName:P,args:R}=l[y.length];try{if(_==="0x")throw new Gc;if(!S)throw new Fd({data:k});const V=So({abi:N,args:R,data:k,functionName:P});y.push(o?{result:V,status:"success"}:V)}catch(V){const M=ds(V,{abi:N,address:O,args:R,docsPath:"/docs/contract/multicall",functionName:P});if(!o)throw M;y.push({error:M,result:void 0,status:"failure"})}}}if(y.length!==l.length)throw new U("multicall results mismatch");return y}async function f0(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:o,returnFullTransactions:s,traceTransfers:i,validation:a}=t;try{const c=[];for(const d of o){const h=d.blockOverrides?X2(d.blockOverrides):void 0,p=d.calls.map(v=>{const y=v,g=y.account?je(y.account):void 0,w=y.abi?Vt(y):y.data,x={...y,account:g,data:y.dataSuffix?mt([w||"0x",y.dataSuffix]):w,from:y.from??(g==null?void 0:g.address)};return Tr(x),jo(x)}),m=d.stateOverrides?pg(d.stateOverrides):void 0;c.push({blockOverrides:h,calls:p,stateOverrides:m})}const u=(typeof n=="bigint"?z(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:i,validation:a},u]})).map((d,h)=>({...wg(d),calls:d.calls.map((p,m)=>{var N,O;const{abi:v,args:y,functionName:g,to:w}=o[h].calls[m],x=((N=p.error)==null?void 0:N.data)??p.returnData,E=BigInt(p.gasUsed),A=(O=p.logs)==null?void 0:O.map(P=>er(P)),k=p.status==="0x1"?"success":"failure",S=v&&k==="success"&&x!=="0x"?So({abi:v,data:x,functionName:g}):null,_=(()=>{if(k==="success")return;let P;if(x==="0x"?P=new Gc:x&&(P=new Fd({data:x})),!!P)return ds(P,{abi:v??[],address:w??"0x",args:y,functionName:g??"<unknown>"})})();return{data:x,gasUsed:E,logs:A,status:k,...k==="success"?{result:S}:{error:_}}})}))}catch(c){const l=c,u=$d(l,{});throw u instanceof el?l:u}}function h0(e){let t=!0,n="",r=0,o="",s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function","error",""].includes(o))o="";else if(o+=a,a===")"){s=!0;break}continue}if(a===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!s)throw new le("Unable to normalize signature.");return o}function p0(e,t){const n=typeof e,r=t.type;switch(r){case"address":return l0(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,s)=>p0(Object.values(e)[s],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>p0(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function X5(e,t,n){for(const r in e){const o=e[r],s=t[r];if(o.type==="tuple"&&s.type==="tuple"&&"components"in o&&"components"in s)return X5(o.components,s.components,n[r]);const i=[o.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?l0(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?l0(n[r],{strict:!1}):!1)return i}}function Z5(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?sw(e):e;return{...r,...n?{hash:Ys(r)}:{}}}function Jd(e,t,n){const{args:r=[],prepare:o=!0}=n??{},s=sj(t,{strict:!1}),i=e.filter(l=>s?l.type==="function"||l.type==="error"?e3(l)===Xn(t,0,4):l.type==="event"?Ys(l)===t:!1:"name"in l&&l.name===t);if(i.length===0)throw new Xu({name:t});if(i.length===1)return{...i[0],...o?{hash:Ys(i[0])}:{}};let a;for(const l of i){if(!("inputs"in l))continue;if(!r||r.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...o?{hash:Ys(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==r.length)continue;if(r.every((f,d)=>{const h="inputs"in l&&l.inputs[d];return h?p0(f,h):!1})){if(a&&"inputs"in a&&a.inputs){const f=X5(l.inputs,a.inputs,r);if(f)throw new AI({abiItem:l,type:f[0]},{abiItem:a,type:f[1]})}a=l}}const c=(()=>{if(a)return a;const[l,...u]=i;return{...l,overloads:u}})();if(!c)throw new Xu({name:t});return{...c,...o?{hash:Ys(c)}:{}}}function e3(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Jd(n,r)}return e[0]})();return Xn(Ys(t),0,4)}function EI(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,o]=e;return Jd(r,o)}return e[0]})(),n=typeof t=="string"?t:Gu(t);return h0(n)}function Ys(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Jd(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:$5(ug(EI(t)))}class AI extends le{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${h0(Gu(t.abiItem))}\`, and`,`\`${n.type}\` in \`${h0(Gu(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Xu extends le{constructor({name:t,data:n,type:r="item"}){const o=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${o} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function kI(...e){var s;const[t,n]=(()=>{if(Array.isArray(e[0])){const[i,a]=e;return[jI(i),a]}return e})(),{bytecode:r,args:o}=n;return On(r,(s=t.inputs)!=null&&s.length&&(o!=null&&o.length)?Mg(t.inputs,o):"0x")}function SI(e){return Z5(e)}function jI(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new Xu({name:"constructor"});return t}function _I(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,f]=e;return[Ow(l,u,{args:f}),f]}const[a,c]=e;return[a,c]})(),{overloads:r}=t,o=r?Ow([t,...r],t.name,{args:n}):t,s=II(o),i=n.length>0?Mg(o.inputs,n):void 0;return i?On(s,i):s}function Bs(e,t={}){return Z5(e,t)}function Ow(e,t,n){const r=Jd(e,t,n);if(r.type!=="function")throw new Xu({name:t,type:"function"});return r}function II(e){return e3(e)}const BI="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Cn="0x0000000000000000000000000000000000000000",NI="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function PI(e,t){const{blockNumber:n,blockTag:r,calls:o,stateOverrides:s,traceAssetChanges:i,traceTransfers:a,validation:c}=t,l=t.account?je(t.account):void 0;if(i&&!l)throw new U("`account` is required when `traceAssetChanges` is true");const u=l?kI(SI("constructor(bytes, bytes)"),{bytecode:Z2,args:[NI,_I(Bs("function getBalance(address)"),[l.address])]}):void 0,f=i?await Promise.all(t.calls.map(async T=>{if(!T.data&&!T.abi)return;const{accessList:L}=await c5(e,{account:l.address,...T,data:T.abi?Vt(T):T.data});return L.map(({address:D,storageKeys:Q})=>Q.length>0?D:null)})).then(T=>T.flat().filter(Boolean)):[],d=await f0(e,{blockNumber:n,blockTag:r,blocks:[...i?[{calls:[{data:u}],stateOverrides:s},{calls:f.map((T,L)=>({abi:[Bs("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:T,from:Cn,nonce:L})),stateOverrides:[{address:Cn,nonce:0}]}]:[],{calls:[...o,{to:Cn}].map(T=>({...T,from:l==null?void 0:l.address})),stateOverrides:s},...i?[{calls:[{data:u}]},{calls:f.map((T,L)=>({abi:[Bs("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:T,from:Cn,nonce:L})),stateOverrides:[{address:Cn,nonce:0}]},{calls:f.map((T,L)=>({to:T,abi:[Bs("function decimals() returns (uint256)")],functionName:"decimals",from:Cn,nonce:L})),stateOverrides:[{address:Cn,nonce:0}]},{calls:f.map((T,L)=>({to:T,abi:[Bs("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Cn,nonce:L})),stateOverrides:[{address:Cn,nonce:0}]},{calls:f.map((T,L)=>({to:T,abi:[Bs("function symbol() returns (string)")],functionName:"symbol",from:Cn,nonce:L})),stateOverrides:[{address:Cn,nonce:0}]}]:[]],traceTransfers:a,validation:c}),h=i?d[2]:d[0],[p,m,,v,y,g,w,x]=i?d:[],{calls:E,...A}=h,k=E.slice(0,-1)??[],S=(p==null?void 0:p.calls)??[],_=(m==null?void 0:m.calls)??[],N=[...S,..._].map(T=>T.status==="success"?Ze(T.data):null),O=(v==null?void 0:v.calls)??[],P=(y==null?void 0:y.calls)??[],R=[...O,...P].map(T=>T.status==="success"?Ze(T.data):null),V=((g==null?void 0:g.calls)??[]).map(T=>T.status==="success"?T.result:null),M=((x==null?void 0:x.calls)??[]).map(T=>T.status==="success"?T.result:null),F=((w==null?void 0:w.calls)??[]).map(T=>T.status==="success"?T.result:null),$=[];for(const[T,L]of R.entries()){const D=N[T];if(typeof L!="bigint"||typeof D!="bigint")continue;const Q=V[T-1],te=M[T-1],se=F[T-1],H=T===0?{address:BI,decimals:18,symbol:"ETH"}:{address:f[T-1],decimals:se||Q?Number(Q??1):void 0,symbol:te??void 0};$.some(X=>X.token.address===H.address)||$.push({token:H,value:{pre:D,post:L,diff:L-D}})}return{assetChanges:$,block:A,results:k}}async function TI(e,t){var u;const{abi:n,address:r,args:o,functionName:s,dataSuffix:i=typeof e.dataSuffix=="string"?e.dataSuffix:(u=e.dataSuffix)==null?void 0:u.value,...a}=t,c=a.account?je(a.account):e.account,l=Vt({abi:n,args:o,functionName:s});try{const{data:f}=await Y(e,tl,"call")({batch:!1,data:`${l}${i?i.replace("0x",""):""}`,to:r,...a,account:c}),d=So({abi:n,args:o,functionName:s,data:f||"0x"}),h=n.filter(p=>"name"in p&&p.name===t.functionName);return{result:d,request:{abi:h,address:r,args:o,dataSuffix:i,functionName:s,...a,account:c}}}catch(f){throw ds(f,{abi:n,address:r,args:o,docsPath:"/docs/contract/simulateContract",functionName:s,sender:c==null?void 0:c.address})}}async function Xd(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const t3="0x6492649264926492649264926492649264926492649264926492649264926492";function OI(e){if(Xn(e,-32)!==t3)throw new LI(e)}function RI(e){const{data:t,signature:n,to:r}=e;return On(Mg(V5("address, bytes, bytes"),[r,t,n]),t3)}function MI(e){try{return OI(e),!0}catch{return!1}}class LI extends le{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}class n3 extends Xm{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,jk(t);const r=Td(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),Pi(s)}update(t){return Ni(this),this.iHash.update(t),this}digestInto(t){Ni(this),ls(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const r3=(e,t,n)=>new n3(e,t).update(n).digest();r3.create=(e,t)=>new n3(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const zg=BigInt(0),m0=BigInt(1);function al(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function $g(e){if(!al(e))throw new Error("Uint8Array expected")}function jc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Ml(e){const t=e.toString(16);return t.length&1?"0"+t:t}function o3(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?zg:BigInt("0x"+e)}const s3=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",FI=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _c(e){if($g(e),s3)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=FI[e[n]];return t}const ar={_0:48,_9:57,A:65,F:70,a:97,f:102};function Rw(e){if(e>=ar._0&&e<=ar._9)return e-ar._0;if(e>=ar.A&&e<=ar.F)return e-(ar.A-10);if(e>=ar.a&&e<=ar.f)return e-(ar.a-10)}function Zu(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(s3)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=Rw(e.charCodeAt(s)),a=Rw(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function ns(e){return o3(_c(e))}function i3(e){return $g(e),o3(_c(Uint8Array.from(e).reverse()))}function cl(e,t){return Zu(e.toString(16).padStart(t*2,"0"))}function a3(e,t){return cl(e,t).reverse()}function an(e,t,n){let r;if(typeof t=="string")try{r=Zu(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(al(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function ed(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];$g(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}const lh=e=>typeof e=="bigint"&&zg<=e;function Wg(e,t,n){return lh(e)&&lh(t)&&lh(n)&&t<=e&&e<n}function si(e,t,n,r){if(!Wg(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function DI(e){let t;for(t=0;e>zg;e>>=m0,t+=1);return t}const Zd=e=>(m0<<BigInt(e))-m0,uh=e=>new Uint8Array(e),Mw=e=>Uint8Array.from(e);function UI(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=uh(e),o=uh(e),s=0;const i=()=>{r.fill(1),o.fill(0),s=0},a=(...f)=>n(o,r,...f),c=(f=uh(0))=>{o=a(Mw([0]),f),r=a(),f.length!==0&&(o=a(Mw([1]),f),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f<t;){r=a();const h=r.slice();d.push(h),f+=r.length}return ed(...d)};return(f,d)=>{i(),c(f);let h;for(;!(h=d(l()));)c();return i(),h}}const zI={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||al(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function ef(e,t,n={}){const r=(o,s,i)=>{const a=zI[s];if(typeof a!="function")throw new Error("invalid validator function");const c=e[o];if(!(i&&c===void 0)&&!a(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+c)};for(const[o,s]of Object.entries(t))r(o,s,!1);for(const[o,s]of Object.entries(n))r(o,s,!0);return e}function Lw(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Lt=BigInt(0),St=BigInt(1),zo=BigInt(2),$I=BigInt(3),c3=BigInt(4),l3=BigInt(5),u3=BigInt(8);function Ot(e,t){const n=e%t;return n>=Lt?n:t+n}function sn(e,t,n){let r=e;for(;t-- >Lt;)r*=r,r%=n;return r}function g0(e,t){if(e===Lt)throw new Error("invert: expected non-zero number");if(t<=Lt)throw new Error("invert: expected positive modulus, got "+t);let n=Ot(e,t),r=t,o=Lt,s=St;for(;n!==Lt;){const a=r/n,c=r%n,l=o-s*a;r=n,n=c,o=s,s=l}if(r!==St)throw new Error("invert: does not exist");return Ot(o,t)}function d3(e,t){const n=(e.ORDER+St)/c3,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function WI(e,t){const n=(e.ORDER-l3)/u3,r=e.mul(t,zo),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,zo),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function qI(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-St,n=0;for(;t%zo===Lt;)t/=zo,n++;let r=zo;const o=qg(e);for(;Fw(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return d3;let s=o.pow(r,t);const i=(t+St)/zo;return function(c,l){if(c.is0(l))return l;if(Fw(c,l)!==1)throw new Error("Cannot find square root");let u=n,f=c.mul(c.ONE,s),d=c.pow(l,t),h=c.pow(l,i);for(;!c.eql(d,c.ONE);){if(c.is0(d))return c.ZERO;let p=1,m=c.sqr(d);for(;!c.eql(m,c.ONE);)if(p++,m=c.sqr(m),p===u)throw new Error("Cannot find square root");const v=St<<BigInt(u-p-1),y=c.pow(f,v);u=p,f=c.sqr(y),d=c.mul(d,f),h=c.mul(h,y)}return h}}function VI(e){return e%c3===$I?d3:e%u3===l3?WI:qI(e)}const HI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function QI(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=HI.reduce((r,o)=>(r[o]="function",r),t);return ef(e,n)}function GI(e,t,n){if(n<Lt)throw new Error("invalid exponent, negatives unsupported");if(n===Lt)return e.ONE;if(n===St)return t;let r=e.ONE,o=t;for(;n>Lt;)n&St&&(r=e.mul(r,o)),o=e.sqr(o),n>>=St;return r}function f3(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function Fw(e,t){const n=(e.ORDER-St)/zo,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function h3(e,t){t!==void 0&&ic(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function qg(e,t,n=!1,r={}){if(e<=Lt)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:s}=h3(e,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let i;const a=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:s,MASK:Zd(o),ZERO:Lt,ONE:St,create:c=>Ot(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Lt<=c&&c<e},is0:c=>c===Lt,isOdd:c=>(c&St)===St,neg:c=>Ot(-c,e),eql:(c,l)=>c===l,sqr:c=>Ot(c*c,e),add:(c,l)=>Ot(c+l,e),sub:(c,l)=>Ot(c-l,e),mul:(c,l)=>Ot(c*l,e),pow:(c,l)=>GI(a,c,l),div:(c,l)=>Ot(c*g0(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>g0(c,e),sqrt:r.sqrt||(c=>(i||(i=VI(e)),i(a,c))),toBytes:c=>n?a3(c,s):cl(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return n?i3(c):ns(c)},invertBatch:c=>f3(a,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(a)}function p3(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function m3(e){const t=p3(e);return t+Math.ceil(t/2)}function KI(e,t,n=!1){const r=e.length,o=p3(t),s=m3(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?i3(e):ns(e),a=Ot(i,t-St)+St;return n?a3(a,o):cl(a,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dw=BigInt(0),y0=BigInt(1);function dh(e,t){const n=t.negate();return e?n:t}function g3(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function fh(e,t){g3(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=Zd(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function Uw(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=y0);const l=t*r,u=l+Math.abs(a)-1,f=a===0,d=a<0,h=t%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:l}}function YI(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function JI(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const hh=new WeakMap,y3=new WeakMap;function ph(e){return y3.get(e)||1}function XI(e,t){return{constTimeNegate:dh,hasPrecomputes(n){return ph(n)!==1},unsafeLadder(n,r,o=e.ZERO){let s=n;for(;r>Dw;)r&y0&&(o=o.add(s)),s=s.double(),r>>=y0;return o},precomputeWindow(n,r){const{windows:o,windowSize:s}=fh(r,t),i=[];let a=n,c=a;for(let l=0;l<o;l++){c=a,i.push(c);for(let u=1;u<s;u++)c=c.add(a),i.push(c);a=c.double()}return i},wNAF(n,r,o){let s=e.ZERO,i=e.BASE;const a=fh(n,t);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:f,isNeg:d,isNegF:h,offsetF:p}=Uw(o,c,a);o=l,f?i=i.add(dh(h,r[p])):s=s.add(dh(d,r[u]))}return{p:s,f:i}},wNAFUnsafe(n,r,o,s=e.ZERO){const i=fh(n,t);for(let a=0;a<i.windows&&o!==Dw;a++){const{nextN:c,offset:l,isZero:u,isNeg:f}=Uw(o,a,i);if(o=c,!u){const d=r[l];s=s.add(f?d.negate():d)}}return s},getPrecomputes(n,r,o){let s=hh.get(r);return s||(s=this.precomputeWindow(r,n),n!==1&&hh.set(r,o(s))),s},wNAFCached(n,r,o){const s=ph(n);return this.wNAF(s,this.getPrecomputes(s,n,o),r)},wNAFCachedUnsafe(n,r,o,s){const i=ph(n);return i===1?this.unsafeLadder(n,r,s):this.wNAFUnsafe(i,this.getPrecomputes(i,n,o),r,s)},setWindowSize(n,r){g3(r,t),y3.set(n,r),hh.delete(n)}}}function ZI(e,t,n,r){YI(n,e),JI(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=DI(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Zd(c),u=new Array(Number(l)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let d=i;for(let h=f;h>=0;h-=c){u.fill(i);for(let m=0;m<s;m++){const v=r[m],y=Number(v>>BigInt(h)&l);u[y]=u[y].add(n[m])}let p=i;for(let m=u.length-1,v=i;m>0;m--)v=v.add(u[m]),p=p.add(v);if(d=d.add(p),h!==0)for(let m=0;m<c;m++)d=d.double()}return d}function w3(e){return QI(e.Fp),ef(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...h3(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function zw(e){e.lowS!==void 0&&jc("lowS",e.lowS),e.prehash!==void 0&&jc("prehash",e.prehash)}function eB(e){const t=w3(e);ef(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:o}=t;if(n){if(!r.eql(o,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class tB extends Error{constructor(t=""){super(t)}}const fr={Err:tB,_tlv:{encode:(e,t)=>{const{Err:n}=fr;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Ml(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?Ml(o.length/2|128):"";return Ml(e)+s+o+t},decode(e,t){const{Err:n}=fr;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const l=t.subarray(r,r+c);if(l.length!==c)throw new n("tlv.decode: length bytes not complete");if(l[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of l)i=i<<8|u;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=fr;if(e<yr)throw new t("integer: negative integers are not allowed");let n=Ml(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=fr;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return ns(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=fr,o=an("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:l,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(l)}},hexFromSig(e){const{_tlv:t,_int:n}=fr,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}};function mh(e,t){return _c(cl(e,t))}const yr=BigInt(0),Je=BigInt(1);BigInt(2);const gh=BigInt(3),nB=BigInt(4);function rB(e){const t=eB(e),{Fp:n}=t,r=qg(t.n,t.nBitLength),o=t.toBytes||((w,x,E)=>{const A=x.toAffine();return ed(Uint8Array.from([4]),n.toBytes(A.x),n.toBytes(A.y))}),s=t.fromBytes||(w=>{const x=w.subarray(1),E=n.fromBytes(x.subarray(0,n.BYTES)),A=n.fromBytes(x.subarray(n.BYTES,2*n.BYTES));return{x:E,y:A}});function i(w){const{a:x,b:E}=t,A=n.sqr(w),k=n.mul(A,w);return n.add(n.add(k,n.mul(w,x)),E)}function a(w,x){const E=n.sqr(x),A=i(w);return n.eql(E,A)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,gh),nB),l=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,l)))throw new Error("bad curve params: a or b");function u(w){return Wg(w,Je,t.n)}function f(w){const{allowedPrivateKeyLengths:x,nByteLength:E,wrapPrivateKey:A,n:k}=t;if(x&&typeof w!="bigint"){if(al(w)&&(w=_c(w)),typeof w!="string"||!x.includes(w.length))throw new Error("invalid private key");w=w.padStart(E*2,"0")}let S;try{S=typeof w=="bigint"?w:ns(an("private key",w,E))}catch{throw new Error("invalid private key, expected hex or "+E+" bytes, got "+typeof w)}return A&&(S=Ot(S,k)),si("private key",S,Je,k),S}function d(w){if(!(w instanceof m))throw new Error("ProjectivePoint expected")}const h=Lw((w,x)=>{const{px:E,py:A,pz:k}=w;if(n.eql(k,n.ONE))return{x:E,y:A};const S=w.is0();x==null&&(x=S?n.ONE:n.inv(k));const _=n.mul(E,x),N=n.mul(A,x),O=n.mul(k,x);if(S)return{x:n.ZERO,y:n.ZERO};if(!n.eql(O,n.ONE))throw new Error("invZ was invalid");return{x:_,y:N}}),p=Lw(w=>{if(w.is0()){if(t.allowInfinityPoint&&!n.is0(w.py))return;throw new Error("bad point: ZERO")}const{x,y:E}=w.toAffine();if(!n.isValid(x)||!n.isValid(E))throw new Error("bad point: x or y not FE");if(!a(x,E))throw new Error("bad point: equation left != right");if(!w.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class m{constructor(x,E,A){if(x==null||!n.isValid(x))throw new Error("x required");if(E==null||!n.isValid(E)||n.is0(E))throw new Error("y required");if(A==null||!n.isValid(A))throw new Error("z required");this.px=x,this.py=E,this.pz=A,Object.freeze(this)}static fromAffine(x){const{x:E,y:A}=x||{};if(!x||!n.isValid(E)||!n.isValid(A))throw new Error("invalid affine point");if(x instanceof m)throw new Error("projective point not allowed");const k=S=>n.eql(S,n.ZERO);return k(E)&&k(A)?m.ZERO:new m(E,A,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(x){const E=f3(n,x.map(A=>A.pz));return x.map((A,k)=>A.toAffine(E[k])).map(m.fromAffine)}static fromHex(x){const E=m.fromAffine(s(an("pointHex",x)));return E.assertValidity(),E}static fromPrivateKey(x){return m.BASE.multiply(f(x))}static msm(x,E){return ZI(m,r,x,E)}_setWindowSize(x){g.setWindowSize(this,x)}assertValidity(){p(this)}hasEvenY(){const{y:x}=this.toAffine();if(n.isOdd)return!n.isOdd(x);throw new Error("Field doesn't support isOdd")}equals(x){d(x);const{px:E,py:A,pz:k}=this,{px:S,py:_,pz:N}=x,O=n.eql(n.mul(E,N),n.mul(S,k)),P=n.eql(n.mul(A,N),n.mul(_,k));return O&&P}negate(){return new m(this.px,n.neg(this.py),this.pz)}double(){const{a:x,b:E}=t,A=n.mul(E,gh),{px:k,py:S,pz:_}=this;let N=n.ZERO,O=n.ZERO,P=n.ZERO,R=n.mul(k,k),V=n.mul(S,S),M=n.mul(_,_),F=n.mul(k,S);return F=n.add(F,F),P=n.mul(k,_),P=n.add(P,P),N=n.mul(x,P),O=n.mul(A,M),O=n.add(N,O),N=n.sub(V,O),O=n.add(V,O),O=n.mul(N,O),N=n.mul(F,N),P=n.mul(A,P),M=n.mul(x,M),F=n.sub(R,M),F=n.mul(x,F),F=n.add(F,P),P=n.add(R,R),R=n.add(P,R),R=n.add(R,M),R=n.mul(R,F),O=n.add(O,R),M=n.mul(S,_),M=n.add(M,M),R=n.mul(M,F),N=n.sub(N,R),P=n.mul(M,V),P=n.add(P,P),P=n.add(P,P),new m(N,O,P)}add(x){d(x);const{px:E,py:A,pz:k}=this,{px:S,py:_,pz:N}=x;let O=n.ZERO,P=n.ZERO,R=n.ZERO;const V=t.a,M=n.mul(t.b,gh);let F=n.mul(E,S),$=n.mul(A,_),T=n.mul(k,N),L=n.add(E,A),D=n.add(S,_);L=n.mul(L,D),D=n.add(F,$),L=n.sub(L,D),D=n.add(E,k);let Q=n.add(S,N);return D=n.mul(D,Q),Q=n.add(F,T),D=n.sub(D,Q),Q=n.add(A,k),O=n.add(_,N),Q=n.mul(Q,O),O=n.add($,T),Q=n.sub(Q,O),R=n.mul(V,D),O=n.mul(M,T),R=n.add(O,R),O=n.sub($,R),R=n.add($,R),P=n.mul(O,R),$=n.add(F,F),$=n.add($,F),T=n.mul(V,T),D=n.mul(M,D),$=n.add($,T),T=n.sub(F,T),T=n.mul(V,T),D=n.add(D,T),F=n.mul($,D),P=n.add(P,F),F=n.mul(Q,D),O=n.mul(L,O),O=n.sub(O,F),F=n.mul(L,$),R=n.mul(Q,R),R=n.add(R,F),new m(O,P,R)}subtract(x){return this.add(x.negate())}is0(){return this.equals(m.ZERO)}wNAF(x){return g.wNAFCached(this,x,m.normalizeZ)}multiplyUnsafe(x){const{endo:E,n:A}=t;si("scalar",x,yr,A);const k=m.ZERO;if(x===yr)return k;if(this.is0()||x===Je)return this;if(!E||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,x,m.normalizeZ);let{k1neg:S,k1:_,k2neg:N,k2:O}=E.splitScalar(x),P=k,R=k,V=this;for(;_>yr||O>yr;)_&Je&&(P=P.add(V)),O&Je&&(R=R.add(V)),V=V.double(),_>>=Je,O>>=Je;return S&&(P=P.negate()),N&&(R=R.negate()),R=new m(n.mul(R.px,E.beta),R.py,R.pz),P.add(R)}multiply(x){const{endo:E,n:A}=t;si("scalar",x,Je,A);let k,S;if(E){const{k1neg:_,k1:N,k2neg:O,k2:P}=E.splitScalar(x);let{p:R,f:V}=this.wNAF(N),{p:M,f:F}=this.wNAF(P);R=g.constTimeNegate(_,R),M=g.constTimeNegate(O,M),M=new m(n.mul(M.px,E.beta),M.py,M.pz),k=R.add(M),S=V.add(F)}else{const{p:_,f:N}=this.wNAF(x);k=_,S=N}return m.normalizeZ([k,S])[0]}multiplyAndAddUnsafe(x,E,A){const k=m.BASE,S=(N,O)=>O===yr||O===Je||!N.equals(k)?N.multiplyUnsafe(O):N.multiply(O),_=S(this,E).add(S(x,A));return _.is0()?void 0:_}toAffine(x){return h(this,x)}isTorsionFree(){const{h:x,isTorsionFree:E}=t;if(x===Je)return!0;if(E)return E(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:x,clearCofactor:E}=t;return x===Je?this:E?E(m,this):this.multiplyUnsafe(t.h)}toRawBytes(x=!0){return jc("isCompressed",x),this.assertValidity(),o(m,this,x)}toHex(x=!0){return jc("isCompressed",x),_c(this.toRawBytes(x))}}m.BASE=new m(t.Gx,t.Gy,n.ONE),m.ZERO=new m(n.ZERO,n.ONE,n.ZERO);const{endo:v,nBitLength:y}=t,g=XI(m,v?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:f,weierstrassEquation:i,isWithinCurveOrder:u}}function oB(e){const t=w3(e);return ef(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function sB(e){const t=oB(e),{Fp:n,n:r,nByteLength:o,nBitLength:s}=t,i=n.BYTES+1,a=2*n.BYTES+1;function c(M){return Ot(M,r)}function l(M){return g0(M,r)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:h}=rB({...t,toBytes(M,F,$){const T=F.toAffine(),L=n.toBytes(T.x),D=ed;return jc("isCompressed",$),$?D(Uint8Array.from([F.hasEvenY()?2:3]),L):D(Uint8Array.from([4]),L,n.toBytes(T.y))},fromBytes(M){const F=M.length,$=M[0],T=M.subarray(1);if(F===i&&($===2||$===3)){const L=ns(T);if(!Wg(L,Je,n.ORDER))throw new Error("Point is not on curve");const D=d(L);let Q;try{Q=n.sqrt(D)}catch(H){const X=H instanceof Error?": "+H.message:"";throw new Error("Point is not on curve"+X)}const te=(Q&Je)===Je;return($&1)===1!==te&&(Q=n.neg(Q)),{x:L,y:Q}}else if(F===a&&$===4){const L=n.fromBytes(T.subarray(0,n.BYTES)),D=n.fromBytes(T.subarray(n.BYTES,2*n.BYTES));return{x:L,y:D}}else{const L=i,D=a;throw new Error("invalid Point, expected length of "+L+", or uncompressed "+D+", got "+F)}}});function p(M){const F=r>>Je;return M>F}function m(M){return p(M)?c(-M):M}const v=(M,F,$)=>ns(M.slice(F,$));class y{constructor(F,$,T){si("r",F,Je,r),si("s",$,Je,r),this.r=F,this.s=$,T!=null&&(this.recovery=T),Object.freeze(this)}static fromCompact(F){const $=o;return F=an("compactSignature",F,$*2),new y(v(F,0,$),v(F,$,2*$))}static fromDER(F){const{r:$,s:T}=fr.toSig(an("DER",F));return new y($,T)}assertValidity(){}addRecoveryBit(F){return new y(this.r,this.s,F)}recoverPublicKey(F){const{r:$,s:T,recovery:L}=this,D=k(an("msgHash",F));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const Q=L===2||L===3?$+t.n:$;if(Q>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=L&1?"03":"02",se=u.fromHex(te+mh(Q,n.BYTES)),H=l(Q),X=c(-D*H),re=c(T*H),ce=u.BASE.multiplyAndAddUnsafe(se,X,re);if(!ce)throw new Error("point at infinify");return ce.assertValidity(),ce}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Zu(this.toDERHex())}toDERHex(){return fr.hexFromSig(this)}toCompactRawBytes(){return Zu(this.toCompactHex())}toCompactHex(){const F=o;return mh(this.r,F)+mh(this.s,F)}}const g={isValidPrivateKey(M){try{return f(M),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const M=m3(t.n);return KI(t.randomBytes(M),t.n)},precompute(M=8,F=u.BASE){return F._setWindowSize(M),F.multiply(BigInt(3)),F}};function w(M,F=!0){return u.fromPrivateKey(M).toRawBytes(F)}function x(M){if(typeof M=="bigint")return!1;if(M instanceof u)return!0;const $=an("key",M).length,T=n.BYTES,L=T+1,D=2*T+1;if(!(t.allowedPrivateKeyLengths||o===L))return $===L||$===D}function E(M,F,$=!0){if(x(M)===!0)throw new Error("first arg must be private key");if(x(F)===!1)throw new Error("second arg must be public key");return u.fromHex(F).multiply(f(M)).toRawBytes($)}const A=t.bits2int||function(M){if(M.length>8192)throw new Error("input is too large");const F=ns(M),$=M.length*8-s;return $>0?F>>BigInt($):F},k=t.bits2int_modN||function(M){return c(A(M))},S=Zd(s);function _(M){return si("num < 2^"+s,M,yr,S),cl(M,o)}function N(M,F,$=O){if(["recovered","canonical"].some(wt=>wt in $))throw new Error("sign() legacy options not supported");const{hash:T,randomBytes:L}=t;let{lowS:D,prehash:Q,extraEntropy:te}=$;D==null&&(D=!0),M=an("msgHash",M),zw($),Q&&(M=an("prehashed msgHash",T(M)));const se=k(M),H=f(F),X=[_(H),_(se)];if(te!=null&&te!==!1){const wt=te===!0?L(n.BYTES):te;X.push(an("extraEntropy",wt))}const re=ed(...X),ce=se;function yt(wt){const ct=A(wt);if(!h(ct))return;const K=l(ct),me=u.BASE.multiply(ct).toAffine(),we=c(me.x);if(we===yr)return;const _e=c(K*c(ce+we*H));if(_e===yr)return;let Ie=(me.x===we?0:2)|Number(me.y&Je),Nt=_e;return D&&p(_e)&&(Nt=m(_e),Ie^=1),new y(we,Nt,Ie)}return{seed:re,k2sig:yt}}const O={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};function R(M,F,$=O){const{seed:T,k2sig:L}=N(M,F,$),D=t;return UI(D.hash.outputLen,D.nByteLength,D.hmac)(T,L)}u.BASE._setWindowSize(8);function V(M,F,$,T=P){var Ie;const L=M;F=an("msgHash",F),$=an("publicKey",$);const{lowS:D,prehash:Q,format:te}=T;if(zw(T),"strict"in T)throw new Error("options.strict was renamed to lowS");if(te!==void 0&&te!=="compact"&&te!=="der")throw new Error("format must be compact or der");const se=typeof L=="string"||al(L),H=!se&&!te&&typeof L=="object"&&L!==null&&typeof L.r=="bigint"&&typeof L.s=="bigint";if(!se&&!H)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let X,re;try{if(H&&(X=new y(L.r,L.s)),se){try{te!=="compact"&&(X=y.fromDER(L))}catch(Nt){if(!(Nt instanceof fr.Err))throw Nt}!X&&te!=="der"&&(X=y.fromCompact(L))}re=u.fromHex($)}catch{return!1}if(!X||D&&X.hasHighS())return!1;Q&&(F=t.hash(F));const{r:ce,s:yt}=X,wt=k(F),ct=l(yt),K=c(wt*ct),me=c(ce*ct),we=(Ie=u.BASE.multiplyAndAddUnsafe(re,K,me))==null?void 0:Ie.toAffine();return we?c(we.x)===ce:!1}return{CURVE:t,getPublicKey:w,getSharedSecret:E,sign:R,verify:V,ProjectivePoint:u,Signature:y,utils:g}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function iB(e){return{hash:e,hmac:(t,...n)=>r3(e,t,Tk(...n)),randomBytes:Ok}}function aB(e,t){const n=r=>sB({...e,...iB(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const b3=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),$w=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),cB=BigInt(0),lB=BigInt(1),w0=BigInt(2),Ww=(e,t)=>(e+t/w0)/t;function uB(e){const t=b3,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,f=sn(u,n,t)*u%t,d=sn(f,n,t)*u%t,h=sn(d,w0,t)*l%t,p=sn(h,o,t)*h%t,m=sn(p,s,t)*p%t,v=sn(m,a,t)*m%t,y=sn(v,c,t)*v%t,g=sn(y,a,t)*m%t,w=sn(g,n,t)*u%t,x=sn(w,i,t)*p%t,E=sn(x,r,t)*l%t,A=sn(E,w0,t);if(!b0.eql(b0.sqr(A),e))throw new Error("Cannot find square root");return A}const b0=qg(b3,void 0,void 0,{sqrt:uB}),v3=aB({a:cB,b:BigInt(7),Fp:b0,n:$w,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=$w,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-lB*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,i=BigInt("0x100000000000000000000000000000000"),a=Ww(s*e,t),c=Ww(-r*e,t);let l=Ot(e-a*n-c*o,t),u=Ot(-a*r-c*s,t);const f=l>i,d=u>i;if(f&&(l=t-l),d&&(u=t-u),l>i||u>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},w5),dB=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:v3},Symbol.toStringTag,{value:"Module"}));function fB({r:e,s:t,to:n="hex",v:r,yParity:o}){const s=(()=>{if(o===0||o===1)return o;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new v3.Signature(Ze(e),Ze(t)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?i:Tn(i)}async function tf(e,t){var l,u,f,d;const{address:n,chain:r=e.chain,hash:o,erc6492VerifierAddress:s=t.universalSignatureVerifierAddress??((u=(l=r==null?void 0:r.contracts)==null?void 0:l.erc6492Verifier)==null?void 0:u.address),multicallAddress:i=t.multicallAddress??((d=(f=r==null?void 0:r.contracts)==null?void 0:f.multicall3)==null?void 0:d.address),mode:a="auto"}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const c=(()=>{const h=t.signature;return Zn(h)?h:typeof h=="object"&&"r"in h&&"s"in h?fB(h):$e(h)})();try{if(a==="eoa")try{if(Mi(Te(n),await i0({hash:o,signature:c})))return!0}catch{}return gI(c)?await hB(e,{...t,multicallAddress:i,signature:c}):await pB(e,{...t,verifierAddress:s,signature:c})}catch(h){if(a!=="eoa")try{if(Mi(Te(n),await i0({hash:o,signature:c})))return!0}catch{}if(h instanceof gs)return!1;throw h}}async function hB(e,t){var v;const{address:n,blockNumber:r,blockTag:o,hash:s,multicallAddress:i}=t,{authorization:a,data:c,signature:l,to:u}=mI(t.signature);if(await Ku(e,{address:n,blockNumber:r,blockTag:o})===Ln(["0xef0100",a.address]))return await mB(e,{address:n,blockNumber:r,blockTag:o,hash:s,signature:l});const d={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:z(a.r,{size:32}),s:z(a.s,{size:32}),yParity:a.yParity};if(!await R_({address:n,authorization:d}))throw new gs;const p=await Y(e,wn,"readContract")({...i?{address:i}:{code:dg},authorizationList:[d],abi:_i,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??n,callData:c}]:[],{allowFailure:!0,target:n,callData:Vt({abi:Jx,functionName:"isValidSignature",args:[s,l]})}]]}),m=(v=p[p.length-1])==null?void 0:v.returnData;if(m!=null&&m.startsWith("0x1626ba7e"))return!0;throw new gs}async function pB(e,t){const{address:n,factory:r,factoryData:o,hash:s,signature:i,verifierAddress:a,...c}=t,l=await(async()=>!r&&!o||MI(i)?i:RI({data:o,signature:i,to:r}))(),u=a?{to:a,data:Vt({abi:Vy,functionName:"isValidSig",args:[n,s,l]}),...c}:{data:zd({abi:Vy,args:[n,s,l],bytecode:dj}),...c},{data:f}=await Y(e,tl,"call")(u).catch(d=>{throw d instanceof D2?new gs:d});if(hk(f??"0x0"))return!0;throw new gs}async function mB(e,t){const{address:n,blockNumber:r,blockTag:o,hash:s,signature:i}=t;if((await Y(e,wn,"readContract")({address:n,abi:Jx,args:[s,i],blockNumber:r,blockTag:o,functionName:"isValidSignature"}).catch(c=>{throw c instanceof ig?new gs:c})).startsWith("0x1626ba7e"))return!0;throw new gs}class gs extends Error{}async function gB(e,{address:t,message:n,factory:r,factoryData:o,signature:s,...i}){const a=I5(n);return Y(e,tf,"verifyHash")({address:t,factory:r,factoryData:o,hash:a,signature:s,...i})}async function yB(e,t){const{address:n,factory:r,factoryData:o,signature:s,message:i,primaryType:a,types:c,domain:l,...u}=t,f=Y_({message:i,primaryType:a,types:c,domain:l});return Y(e,tf,"verifyHash")({address:n,factory:r,factoryData:o,hash:f,signature:s,...u})}const yh=new Map,qw=new Map;let wB=0;function Br(e,t,n){const r=++wB,o=()=>yh.get(e)||[],s=()=>{const u=o();yh.set(e,u.filter(f=>f.id!==r))},i=()=>{const u=o();if(!u.some(d=>d.id===r))return;const f=qw.get(e);if(u.length===1&&f){const d=f();d instanceof Promise&&d.catch(()=>{})}s()},a=o();if(yh.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return i;const c={};for(const u in t)c[u]=(...f)=>{var h,p;const d=o();if(d.length!==0)for(const m of d)(p=(h=m.fns)[u])==null||p.call(h,...f)};const l=n(c);return typeof l=="function"&&qw.set(e,l),i}function Ki(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let o=!0;const s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));const c=await(n==null?void 0:n(a))??r;await c0(c);const l=async()=>{o&&(await e({unpoll:s}),await c0(r),l())};l()})(),s}function x3(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:o,poll:s,pollingInterval:i=e.pollingInterval}){const a=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return a?(()=>{const f=Ge(["watchBlockNumber",e.uid,t,n,i]);return Br(f,{onBlockNumber:r,onError:o},d=>Ki(async()=>{var h;try{const p=await Y(e,sl,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(p===c)return;if(p-c>1&&n)for(let m=c+1n;m<p;m++)d.onBlockNumber(m,c),c=m}(c===void 0||p>c)&&(d.onBlockNumber(p,c),c=p)}catch(p){(h=d.onError)==null||h.call(d,p)}},{emitOnBegin:t,interval:i}))})():(()=>{const f=Ge(["watchBlockNumber",e.uid,t,n]);return Br(f,{onBlockNumber:r,onError:o},d=>{let h=!0,p=()=>h=!1;return(async()=>{try{const m=(()=>{if(e.transport.type==="fallback"){const y=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return y?y.value:e.transport}return e.transport})(),{unsubscribe:v}=await m.subscribe({params:["newHeads"],onData(y){var w;if(!h)return;const g=Ze((w=y.result)==null?void 0:w.number);d.onBlockNumber(g,c),c=g},onError(y){var g;(g=d.onError)==null||g.call(d,y)}});p=v,h||p()}catch(m){o==null||o(m)}})(),()=>p()})})()}async function C3(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:o,onReplaced:s,retryCount:i=6,retryDelay:a=({count:E})=>~~(1<<E)*200,timeout:c=18e4}=t,l=Ge(["waitForTransactionReceipt",e.uid,o]),u=(()=>{var E;return t.pollingInterval?t.pollingInterval:(E=e.chain)!=null&&E.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let f,d,h,p=!1,m,v;const{promise:y,resolve:g,reject:w}=hg(),x=c?setTimeout(()=>{v==null||v(),m==null||m(),w(new CS({hash:o}))},c):void 0;return m=Br(l,{onReplaced:s,resolve:g,reject:w},async E=>{if(h=await Y(e,uu,"getTransactionReceipt")({hash:o}).catch(()=>{}),h&&r<=1){clearTimeout(x),E.resolve(h),m==null||m();return}v=Y(e,x3,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(A){const k=_=>{clearTimeout(x),v==null||v(),_(),m==null||m()};let S=A;if(!p)try{if(h){if(r>1&&(!h.blockNumber||S-h.blockNumber+1n<r))return;k(()=>E.resolve(h));return}if(n&&!f&&(p=!0,await ms(async()=>{f=await Y(e,Ug,"getTransaction")({hash:o}),f.blockNumber&&(S=f.blockNumber)},{delay:a,retryCount:i}),p=!1),h=await Y(e,uu,"getTransactionReceipt")({hash:o}),r>1&&(!h.blockNumber||S-h.blockNumber+1n<r))return;k(()=>E.resolve(h))}catch(_){if(_ instanceof M2||_ instanceof L2){if(!f){p=!1;return}try{d=f,p=!0;const N=await ms(()=>Y(e,_n,"getBlock")({blockNumber:S,includeTransactions:!0}),{delay:a,retryCount:i,shouldRetry:({error:R})=>R instanceof m5});p=!1;const O=N.transactions.find(({from:R,nonce:V})=>R===d.from&&V===d.nonce);if(!O||(h=await Y(e,uu,"getTransactionReceipt")({hash:O.hash}),r>1&&(!h.blockNumber||S-h.blockNumber+1n<r)))return;let P="replaced";O.to===d.to&&O.value===d.value&&O.input===d.input?P="repriced":O.from===O.to&&O.value===0n&&(P="cancelled"),k(()=>{var R;(R=E.onReplaced)==null||R.call(E,{reason:P,replacedTransaction:d,transaction:O,transactionReceipt:h}),E.resolve(h)})}catch(N){k(()=>E.reject(N))}}else k(()=>E.reject(_))}}})}),y}function bB(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:o,onError:s,includeTransactions:i,poll:a,pollingInterval:c=e.pollingInterval}){const l=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=i??!1;let f;return l?(()=>{const p=Ge(["watchBlocks",e.uid,t,n,r,u,c]);return Br(p,{onBlock:o,onError:s},m=>Ki(async()=>{var v;try{const y=await Y(e,_n,"getBlock")({blockTag:t,includeTransactions:u});if(y.number!==null&&(f==null?void 0:f.number)!=null){if(y.number===f.number)return;if(y.number-f.number>1&&n)for(let g=(f==null?void 0:f.number)+1n;g<y.number;g++){const w=await Y(e,_n,"getBlock")({blockNumber:g,includeTransactions:u});m.onBlock(w,f),f=w}}((f==null?void 0:f.number)==null||t==="pending"&&(y==null?void 0:y.number)==null||y.number!==null&&y.number>f.number)&&(m.onBlock(y,f),f=y)}catch(y){(v=m.onError)==null||v.call(m,y)}},{emitOnBegin:r,interval:c}))})():(()=>{let p=!0,m=!0,v=()=>p=!1;return(async()=>{try{r&&Y(e,_n,"getBlock")({blockTag:t,includeTransactions:u}).then(w=>{p&&m&&(o(w,void 0),m=!1)}).catch(s);const y=(()=>{if(e.transport.type==="fallback"){const w=e.transport.transports.find(x=>x.config.type==="webSocket"||x.config.type==="ipc");return w?w.value:e.transport}return e.transport})(),{unsubscribe:g}=await y.subscribe({params:["newHeads"],async onData(w){var E;if(!p)return;const x=await Y(e,_n,"getBlock")({blockNumber:(E=w.result)==null?void 0:E.number,includeTransactions:u}).catch(()=>{});p&&(o(x,f),m=!1,f=x)},onError(w){s==null||s(w)}});v=g,p||v()}catch(y){s==null||s(y)}})(),()=>v()})()}function vB(e,t){const{abi:n,address:r,args:o,batch:s=!0,eventName:i,fromBlock:a,onError:c,onLogs:l,poll:u,pollingInterval:f=e.pollingInterval,strict:d}=t;return(typeof u<"u"?u:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const v=d??!1,y=Ge(["watchContractEvent",r,o,s,e.uid,i,f,v,a]);return Br(y,{onLogs:l,onError:c},g=>{let w;a!==void 0&&(w=a-1n);let x,E=!1;const A=Ki(async()=>{var k;if(!E){try{x=await Y(e,l5,"createContractEventFilter")({abi:n,address:r,args:o,eventName:i,strict:v,fromBlock:a})}catch{}E=!0;return}try{let S;if(x)S=await Y(e,Qd,"getFilterChanges")({filter:x});else{const _=await Y(e,sl,"getBlockNumber")({});w&&w<_?S=await Y(e,j5,"getContractEvents")({abi:n,address:r,args:o,eventName:i,fromBlock:w+1n,toBlock:_,strict:v}):S=[],w=_}if(S.length===0)return;if(s)g.onLogs(S);else for(const _ of S)g.onLogs([_])}catch(S){x&&S instanceof bo&&(E=!1),(k=g.onError)==null||k.call(g,S)}},{emitOnBegin:!0,interval:f});return async()=>{x&&await Y(e,Xd,"uninstallFilter")({filter:x}),A()}})})():(()=>{const v=d??!1,y=Ge(["watchContractEvent",r,o,s,e.uid,i,f,v]);let g=!0,w=()=>g=!1;return Br(y,{onLogs:l,onError:c},x=>((async()=>{try{const E=(()=>{if(e.transport.type==="fallback"){const S=e.transport.transports.find(_=>_.config.type==="webSocket"||_.config.type==="ipc");return S?S.value:e.transport}return e.transport})(),A=i?nl({abi:n,eventName:i,args:o}):[],{unsubscribe:k}=await E.subscribe({params:["logs",{address:r,topics:A}],onData(S){var N;if(!g)return;const _=S.result;try{const{eventName:O,args:P}=Yu({abi:n,data:_.data,topics:_.topics,strict:d}),R=er(_,{args:P,eventName:O});x.onLogs([R])}catch(O){let P,R;if(O instanceof Qu||O instanceof Ym){if(d)return;P=O.abiItem.name,R=(N=O.abiItem.inputs)==null?void 0:N.some(M=>!("name"in M&&M.name))}const V=er(_,{args:R?[]:{},eventName:P});x.onLogs([V])}},onError(S){var _;(_=x.onError)==null||_.call(x,S)}});w=k,g||w()}catch(E){c==null||c(E)}})(),()=>w()))})()}function xB(e,{address:t,args:n,batch:r=!0,event:o,events:s,fromBlock:i,onError:a,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:f}){const d=typeof l<"u"?l:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=f??!1;return d?(()=>{const v=Ge(["watchEvent",t,n,r,e.uid,o,u,i]);return Br(v,{onLogs:c,onError:a},y=>{let g;i!==void 0&&(g=i-1n);let w,x=!1;const E=Ki(async()=>{var A;if(!x){try{w=await Y(e,u5,"createEventFilter")({address:t,args:n,event:o,events:s,strict:h,fromBlock:i})}catch{}x=!0;return}try{let k;if(w)k=await Y(e,Qd,"getFilterChanges")({filter:w});else{const S=await Y(e,sl,"getBlockNumber")({});g&&g!==S?k=await Y(e,_g,"getLogs")({address:t,args:n,event:o,events:s,fromBlock:g+1n,toBlock:S}):k=[],g=S}if(k.length===0)return;if(r)y.onLogs(k);else for(const S of k)y.onLogs([S])}catch(k){w&&k instanceof bo&&(x=!1),(A=y.onError)==null||A.call(y,k)}},{emitOnBegin:!0,interval:u});return async()=>{w&&await Y(e,Xd,"uninstallFilter")({filter:w}),E()}})})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const A=e.transport.transports.find(k=>k.config.type==="webSocket"||k.config.type==="ipc");return A?A.value:e.transport}return e.transport})(),w=s??(o?[o]:void 0);let x=[];w&&(x=[w.flatMap(k=>nl({abi:[k],eventName:k.name,args:n}))],o&&(x=x[0]));const{unsubscribe:E}=await g.subscribe({params:["logs",{address:t,topics:x}],onData(A){var S;if(!v)return;const k=A.result;try{const{eventName:_,args:N}=Yu({abi:w??[],data:k.data,topics:k.topics,strict:h}),O=er(k,{args:N,eventName:_});c([O])}catch(_){let N,O;if(_ instanceof Qu||_ instanceof Ym){if(f)return;N=_.abiItem.name,O=(S=_.abiItem.inputs)==null?void 0:S.some(R=>!("name"in R&&R.name))}const P=er(k,{args:O?[]:{},eventName:N});c([P])}},onError(A){a==null||a(A)}});y=E,v||y()}catch(g){a==null||a(g)}})(),()=>y()})()}function CB(e,{batch:t=!0,onError:n,onTransactions:r,poll:o,pollingInterval:s=e.pollingInterval}){return(typeof o<"u"?o:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=Ge(["watchPendingTransactions",e.uid,t,s]);return Br(l,{onTransactions:r,onError:n},u=>{let f;const d=Ki(async()=>{var h;try{if(!f)try{f=await Y(e,d5,"createPendingTransactionFilter")({});return}catch(m){throw d(),m}const p=await Y(e,Qd,"getFilterChanges")({filter:f});if(p.length===0)return;if(t)u.onTransactions(p);else for(const m of p)u.onTransactions([m])}catch(p){(h=u.onError)==null||h.call(u,p)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await Y(e,Xd,"uninstallFilter")({filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await e.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;r([h])},onError(d){n==null||n(d)}});u=f,l||u()}catch(f){n==null||n(f)}})(),()=>u()})()}async function EB(e,{chain:t}){const{id:n,name:r,nativeCurrency:o,rpcUrls:s,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:z(n),chainName:r,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}class Io extends U{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
1652
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class rs extends U{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function Vg(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const wh=new Vi(128);async function nf(e,t){var x,E,A,k,S;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:s,authorizationList:i,blobs:a,data:c,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(x=e.dataSuffix)==null?void 0:x.value,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,type:v,value:y,...g}=t;if(typeof n>"u")throw new Io({docsPath:"/docs/actions/wallet/sendTransaction"});const w=n?je(n):null;try{Tr(t);const _=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await Vd({authorization:i[0]}).catch(()=>{throw new U("`to` is required. Could not infer from `authorizationList`.")})})();if((w==null?void 0:w.type)==="json-rpc"||w===null){let N;o!==null&&(N=await Y(e,_o,"getChainId")({}),r&&Bg({currentChainId:N,chain:o}));const O=(k=(A=(E=e.chain)==null?void 0:E.formatters)==null?void 0:A.transactionRequest)==null?void 0:k.format,R=(O||jo)({...Gi(g,{format:O}),accessList:s,account:w,authorizationList:i,blobs:a,chainId:N,data:l?mt([c??"0x",l]):c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,to:_,type:v,value:y},"sendTransaction"),V=wh.get(e.uid),M=V?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:M,params:[R]},{retryCount:0})}catch(F){if(V===!1)throw F;const $=F;if($.name==="InvalidInputRpcError"||$.name==="InvalidParamsRpcError"||$.name==="MethodNotFoundRpcError"||$.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[R]},{retryCount:0}).then(T=>(wh.set(e.uid,!0),T)).catch(T=>{const L=T;throw L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError"?(wh.set(e.uid,!1),$):L});throw $}}if((w==null?void 0:w.type)==="local"){const N=await Y(e,ol,"prepareTransactionRequest")({account:w,accessList:s,authorizationList:i,blobs:a,chain:o,data:l?mt([c??"0x",l]):c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,nonceManager:w.nonceManager,parameters:[...kg,"sidecars"],type:v,value:y,...g,to:_}),O=(S=o==null?void 0:o.serializers)==null?void 0:S.transaction,P=await w.signTransaction(N,{serializer:O});return await Y(e,Vg,"sendRawTransaction")({serializedTransaction:P})}throw(w==null?void 0:w.type)==="smart"?new rs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new rs({docsPath:"/docs/actions/wallet/sendTransaction",type:w==null?void 0:w.type})}catch(_){throw _ instanceof rs?_:Hd(_,{...t,account:w,chain:t.chain||void 0})}}function AB(e,t){const{abi:n,args:r,bytecode:o,...s}=t,i=zd({abi:n,args:r,bytecode:o});return nf(e,{...s,...s.authorizationList?{to:null}:{},data:i})}async function kB(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>Kc(r))}const E3="0x5792579257925792579257925792579257925792579257925792579257925792",A3=z(0,{size:32});async function k3(e,t){var d;const{account:n=e.account,chain:r=e.chain,experimental_fallback:o,experimental_fallbackDelay:s=32,forceAtomic:i=!1,id:a,version:c="2.0.0"}=t,l=n?je(n):null;let u=t.capabilities;e.dataSuffix&&!((d=t.capabilities)!=null&&d.dataSuffix)&&(typeof e.dataSuffix=="string"?u={...t.capabilities,dataSuffix:{value:e.dataSuffix,optional:!0}}:u={...t.capabilities,dataSuffix:{value:e.dataSuffix.value,...e.dataSuffix.required?{}:{optional:!0}}});const f=t.calls.map(h=>{const p=h,m=p.abi?Vt({abi:p.abi,functionName:p.functionName,args:p.args}):p.data;return{data:p.dataSuffix&&m?mt([m,p.dataSuffix]):m,to:p.to,value:p.value?z(p.value):void 0}});try{const h=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:f,capabilities:u,chainId:z(r.id),from:l==null?void 0:l.address,id:a,version:c}]},{retryCount:0});return typeof h=="string"?{id:h}:h}catch(h){const p=h;if(o&&(p.name==="MethodNotFoundRpcError"||p.name==="MethodNotSupportedRpcError"||p.name==="UnknownRpcError"||p.details.toLowerCase().includes("does not exist / is not available")||p.details.toLowerCase().includes("missing or invalid. request()")||p.details.toLowerCase().includes("did not match any variant of untagged enum")||p.details.toLowerCase().includes("account upgraded to unsupported contract")||p.details.toLowerCase().includes("eip-7702 not supported")||p.details.toLowerCase().includes("unsupported wc_ method")||p.details.toLowerCase().includes("feature toggled misconfigured")||p.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(u&&Object.values(u).some(w=>!w.optional)){const w="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Oi(new U(w,{details:w}))}if(i&&f.length>1){const g="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Ri(new U(g,{details:g}))}const m=[];for(const g of f){const w=nf(e,{account:l,chain:r,data:g.data,to:g.to,value:g.value?Ze(g.value):void 0});m.push(w),s>0&&await new Promise(x=>setTimeout(x,s))}const v=await Promise.allSettled(m);if(v.every(g=>g.status==="rejected"))throw v[0].reason;const y=v.map(g=>g.status==="fulfilled"?g.value:A3);return{id:mt([...y,z(r.id,{size:32}),E3])}}throw Hd(h,{...t,account:l,chain:t.chain})}}async function S3(e,t){async function n(u){if(u.endsWith(E3.slice(2))){const d=zt($p(u,-64,-32)),h=$p(u,0,-64).slice(2).match(/.{1,64}/g),p=await Promise.all(h.map(v=>A3.slice(2)!==v?e.request({method:"eth_getTransactionReceipt",params:[`0x${v}`]},{dedupe:!0}):void 0)),m=p.some(v=>v===null)?100:p.every(v=>(v==null?void 0:v.status)==="0x1")?200:p.every(v=>(v==null?void 0:v.status)==="0x0")?500:600;return{atomic:!1,chainId:tn(d),receipts:p.filter(Boolean),status:m,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:r=!1,chainId:o,receipts:s,version:i="2.0.0",...a}=await n(t.id),[c,l]=(()=>{const u=a.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...a,atomic:r,chainId:o?tn(o):void 0,receipts:(s==null?void 0:s.map(u=>({...u,blockNumber:Ze(u.blockNumber),gasUsed:Ze(u.gasUsed),status:_5[u.status]})))??[],statusCode:l,status:c,version:i}}async function SB(e,t={}){const{account:n=e.account,chainId:r}=t,o=n?je(n):void 0,s=r?[o==null?void 0:o.address,[z(r)]]:[o==null?void 0:o.address],i=await e.request({method:"wallet_getCapabilities",params:s}),a={};for(const[c,l]of Object.entries(i)){a[Number(c)]={};for(let[u,f]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),a[Number(c)][u]=f}return typeof r=="number"?a[r]:a}async function jB(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function j3(e,t){var c;const{account:n=e.account,chainId:r,nonce:o}=t;if(!n)throw new Io({docsPath:"/docs/eip7702/prepareAuthorization"});const s=je(n),i=(()=>{if(t.executor)return t.executor==="self"?t.executor:je(t.executor)})(),a={address:t.contractAddress??t.address,chainId:r,nonce:o};return typeof a.chainId>"u"&&(a.chainId=((c=e.chain)==null?void 0:c.id)??await Y(e,_o,"getChainId")({})),typeof a.nonce>"u"&&(a.nonce=await Y(e,vg,"getTransactionCount")({address:s.address,blockTag:"pending"}),(i==="self"||i!=null&&i.address&&Mi(i.address,s.address))&&(a.nonce+=1)),a}async function _B(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>Te(n))}async function IB(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}class BB extends U{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function _3(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:o=({statusCode:m})=>m===200||m>=300,retryCount:s=4,retryDelay:i=({count:m})=>~~(1<<m)*200,timeout:a=6e4,throwOnFailure:c=!1}=t,l=Ge(["waitForCallsStatus",e.uid,n]),{promise:u,resolve:f,reject:d}=hg();let h;const p=Br(l,{resolve:f,reject:d},m=>{const v=Ki(async()=>{const y=g=>{clearTimeout(h),v(),g(),p()};try{const g=await ms(async()=>{const w=await Y(e,S3,"getCallsStatus")({id:n});if(c&&w.status==="failure")throw new BB(w);return w},{retryCount:s,delay:i});if(!o(g))return;y(()=>m.resolve(g))}catch(g){y(()=>m.reject(g))}},{interval:r,emitOnBegin:!0});return v});return h=a?setTimeout(()=>{p(),clearTimeout(h),d(new NB({id:n}))},a):void 0,await u}class NB extends U{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}async function PB(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),o=await Y(e,k3,"sendCalls")(t);return await Y(e,_3,"waitForCallsStatus")({...t,id:o.id,timeout:r})}async function Hg(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var a,c,l;const o=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,r]:[t]},{retryCount:0}),i=(((l=(c=(a=e.chain)==null?void 0:a.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||Ng)(o);if(i.status==="reverted"&&n)throw new F2({receipt:i});return i}const bh=new Vi(128);async function I3(e,t){var k,S,_,N,O;const{account:n=e.account,assertChainId:r=!0,chain:o=e.chain,accessList:s,authorizationList:i,blobs:a,data:c,dataSuffix:l=typeof e.dataSuffix=="string"?e.dataSuffix:(k=e.dataSuffix)==null?void 0:k.value,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,pollingInterval:v,throwOnReceiptRevert:y,type:g,value:w,...x}=t,E=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Io({docsPath:"/docs/actions/wallet/sendTransactionSync"});const A=n?je(n):null;try{Tr(t);const P=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await Vd({authorization:i[0]}).catch(()=>{throw new U("`to` is required. Could not infer from `authorizationList`.")})})();if((A==null?void 0:A.type)==="json-rpc"||A===null){let R;o!==null&&(R=await Y(e,_o,"getChainId")({}),r&&Bg({currentChainId:R,chain:o}));const V=(N=(_=(S=e.chain)==null?void 0:S.formatters)==null?void 0:_.transactionRequest)==null?void 0:N.format,F=(V||jo)({...Gi(x,{format:V}),accessList:s,account:A,authorizationList:i,blobs:a,chainId:R,data:c&&mt([c,l??"0x"]),gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,to:P,type:g,value:w},"sendTransaction"),$=bh.get(e.uid),T=$?"wallet_sendTransaction":"eth_sendTransaction",L=await(async()=>{try{return await e.request({method:T,params:[F]},{retryCount:0})}catch(Q){if($===!1)throw Q;const te=Q;if(te.name==="InvalidInputRpcError"||te.name==="InvalidParamsRpcError"||te.name==="MethodNotFoundRpcError"||te.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(se=>(bh.set(e.uid,!0),se)).catch(se=>{const H=se;throw H.name==="MethodNotFoundRpcError"||H.name==="MethodNotSupportedRpcError"?(bh.set(e.uid,!1),te):H});throw te}})(),D=await Y(e,C3,"waitForTransactionReceipt")({checkReplacement:!1,hash:L,pollingInterval:v,timeout:E});if(y&&D.status==="reverted")throw new F2({receipt:D});return D}if((A==null?void 0:A.type)==="local"){const R=await Y(e,ol,"prepareTransactionRequest")({account:A,accessList:s,authorizationList:i,blobs:a,chain:o,data:c&&mt([c,l??"0x"]),gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,nonceManager:A.nonceManager,parameters:[...kg,"sidecars"],type:g,value:w,...x,to:P}),V=(O=o==null?void 0:o.serializers)==null?void 0:O.transaction,M=await A.signTransaction(R,{serializer:V});return await Y(e,Hg,"sendRawTransactionSync")({serializedTransaction:M,throwOnReceiptRevert:y,timeout:t.timeout})}throw(A==null?void 0:A.type)==="smart"?new rs({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new rs({docsPath:"/docs/actions/wallet/sendTransactionSync",type:A==null?void 0:A.type})}catch(P){throw P instanceof rs?P:Hd(P,{...t,account:A,chain:t.chain||void 0})}}async function TB(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function OB(e,t){const{account:n=e.account}=t;if(!n)throw new Io({docsPath:"/docs/eip7702/signAuthorization"});const r=je(n);if(!r.signAuthorization)throw new rs({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const o=await j3(e,t);return r.signAuthorization(o)}async function B3(e,{account:t=e.account,message:n}){if(!t)throw new Io({docsPath:"/docs/actions/wallet/signMessage"});const r=je(t);if(r.signMessage)return r.signMessage({message:n});const o=typeof n=="string"?Bi(n):n.raw instanceof Uint8Array?$t(n.raw):n.raw;return e.request({method:"personal_sign",params:[o,r.address]},{retryCount:0})}async function RB(e,t){var l,u,f,d;const{account:n=e.account,chain:r=e.chain,...o}=t;if(!n)throw new Io({docsPath:"/docs/actions/wallet/signTransaction"});const s=je(n);Tr({account:s,...t});const i=await Y(e,_o,"getChainId")({});r!==null&&Bg({currentChainId:i,chain:r});const a=(r==null?void 0:r.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||jo;return s.signTransaction?s.signTransaction({...o,chainId:i},{serializer:(d=(f=e.chain)==null?void 0:f.serializers)==null?void 0:d.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...o,account:s},"signTransaction"),chainId:z(i),from:s.address}]},{retryCount:0})}async function MB(e,t){const{account:n=e.account,domain:r,message:o,primaryType:s}=t;if(!n)throw new Io({docsPath:"/docs/actions/wallet/signTypedData"});const i=je(n),a={EIP712Domain:N5({domain:r}),...t.types};if(B5({domain:r,message:o,primaryType:s,types:a}),i.signTypedData)return i.signTypedData({domain:r,message:o,primaryType:s,types:a});const c=G_({domain:r,message:o,primaryType:s,types:a});return e.request({method:"eth_signTypedData_v4",params:[i.address,c]},{retryCount:0})}async function LB(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:z(t)}]},{retryCount:0})}async function FB(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function Ic(e,t){return Ic.internal(e,nf,"sendTransaction",t)}(function(e){async function t(n,r,o,s){const{abi:i,account:a=n.account,address:c,args:l,functionName:u,...f}=s;if(typeof a>"u")throw new Io({docsPath:"/docs/contract/writeContract"});const d=a?je(a):null,h=Vt({abi:i,args:l,functionName:u});try{return await Y(n,r,o)({data:h,to:c,account:d,...f})}catch(p){throw ds(p,{abi:i,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:u,sender:d==null?void 0:d.address})}}e.internal=t})(Ic||(Ic={}));async function DB(e,t){return Ic.internal(e,I3,"sendTransactionSync",t)}function Yi(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const o=e[n];return typeof o=="function"?o:s=>t(e,s)}const du="2.22.1",UB=()=>`@wagmi/core@${du}`;var N3=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},td,P3;let Or=class v0 extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return UB()}constructor(t,n={}){var s;super(),td.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof v0?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,o=n.cause instanceof v0&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
1653
+ `),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return N3(this,td,"m",P3).call(this,this,t)}};td=new WeakSet,P3=function e(t,n){return n!=null&&n(t)?t:t.cause?N3(this,td,"m",e).call(this,t.cause,n):t};class xo extends Or{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class zB extends Or{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class $B extends Or{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class WB extends Or{constructor({address:t,connector:n}){super(`Account "${t}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class qB extends Or{constructor({connectionChainId:t,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class VB extends Or{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function HB(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new zB;try{e.setState(a=>({...a,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=t,i=await n.connect(s);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(a=>({...a,connections:new Map(a.connections).set(n.uid,{accounts:s.withCapabilities?i.accounts.map(c=>typeof c=="object"?c.address:c):i.accounts,chainId:i.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:s.withCapabilities?i.accounts.map(a=>typeof a=="object"?a:{address:a,capabilities:{}}):i.accounts,chainId:i.chainId}}catch(o){throw e.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}const x0=256;let Ll=x0,Fl;function T3(e=11){if(!Fl||Ll+e>x0*2){Fl="",Ll=0;for(let t=0;t<x0;t++)Fl+=(256+Math.random()*256|0).toString(16).substring(1)}return Fl.substring(Ll,Ll+++e)}function O3(e){const{batch:t,chain:n,ccipRead:r,dataSuffix:o,key:s="base",name:i="Base Client",type:a="base"}=e,c=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),l=(n==null?void 0:n.blockTime)??12e3,u=Math.min(Math.max(Math.floor(l/2),500),4e3),f=e.pollingInterval??u,d=e.cacheTime??f,h=e.account?je(e.account):void 0,{config:p,request:m,value:v}=e.transport({account:h,chain:n,pollingInterval:f}),y={...p,...v},g={account:h,batch:t,cacheTime:d,ccipRead:r,chain:n,dataSuffix:o,key:s,name:i,pollingInterval:f,request:m,transport:y,type:a,uid:T3(),...c?{experimental_blockTag:c}:{}};function w(x){return E=>{const A=E(x);for(const S in g)delete A[S];const k={...x,...A};return Object.assign(k,{extend:w(k)})}}return Object.assign(g,{extend:w(g)})}function QB(e){var f,d,h;const{scheme:t,statement:n,...r}=((f=e.match(GB))==null?void 0:f.groups)??{},{chainId:o,expirationTime:s,issuedAt:i,notBefore:a,requestId:c,...l}=((d=e.match(KB))==null?void 0:d.groups)??{},u=(h=e.split("Resources:")[1])==null?void 0:h.split(`
1654
+ - `).slice(1);return{...r,...l,...o?{chainId:Number(o)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const GB=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,KB=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function YB(e){const{address:t,domain:n,message:r,nonce:o,scheme:s,time:i=new Date}=e;if(n&&r.domain!==n||o&&r.nonce!==o||s&&r.scheme!==s||r.expirationTime&&i>=r.expirationTime||r.notBefore&&i<r.notBefore)return!1;try{if(!r.address||!We(r.address,{strict:!1})||t&&!Mi(r.address,t))return!1}catch{return!1}return!0}async function JB(e,t){const{address:n,domain:r,message:o,nonce:s,scheme:i,signature:a,time:c=new Date,...l}=t,u=QB(o);if(!u.address||!YB({address:n,domain:r,message:u,nonce:s,scheme:i,time:c}))return!1;const d=I5(o);return tf(e,{address:u.address,hash:d,signature:a,...l})}function XB(e){return{call:t=>tl(e,t),createAccessList:t=>c5(e,t),createBlockFilter:()=>Tj(e),createContractEventFilter:t=>l5(e,t),createEventFilter:t=>u5(e,t),createPendingTransactionFilter:()=>d5(e),estimateContractGas:t=>a_(e,t),estimateGas:t=>Sg(e,t),getBalance:t=>S5(e,t),getBlobBaseFee:()=>c_(e),getBlock:t=>_n(e,t),getBlockNumber:t=>sl(e,t),getBlockTransactionCount:t=>p_(e,t),getBytecode:t=>Ku(e,t),getChainId:()=>_o(e),getCode:t=>Ku(e,t),getContractEvents:t=>j5(e,t),getDelegation:t=>y_(e,t),getEip712Domain:t=>b_(e,t),getEnsAddress:t=>bj(e,t),getEnsAvatar:t=>i5(e,t),getEnsName:t=>a5(e,t),getEnsResolver:t=>Pj(e,t),getEnsText:t=>s5(e,t),getFeeHistory:t=>C_(e,t),estimateFeesPerGas:t=>Qj(e,t),getFilterChanges:t=>Qd(e,t),getFilterLogs:t=>E_(e,t),getGasPrice:()=>bg(e),getLogs:t=>_g(e,t),getProof:t=>vI(e,t),estimateMaxPriorityFeePerGas:t=>Hj(e,t),fillTransaction:t=>Ag(e,t),getStorageAt:t=>xI(e,t),getTransaction:t=>Ug(e,t),getTransactionConfirmations:t=>CI(e,t),getTransactionCount:t=>vg(e,t),getTransactionReceipt:t=>uu(e,t),multicall:t=>J5(e,t),prepareTransactionRequest:t=>ol(e,t),readContract:t=>wn(e,t),sendRawTransaction:t=>Vg(e,t),sendRawTransactionSync:t=>Hg(e,t),simulate:t=>f0(e,t),simulateBlocks:t=>f0(e,t),simulateCalls:t=>PI(e,t),simulateContract:t=>TI(e,t),verifyHash:t=>tf(e,t),verifyMessage:t=>gB(e,t),verifySiweMessage:t=>JB(e,t),verifyTypedData:t=>yB(e,t),uninstallFilter:t=>Xd(e,t),waitForTransactionReceipt:t=>C3(e,t),watchBlocks:t=>bB(e,t),watchBlockNumber:t=>x3(e,t),watchContractEvent:t=>vB(e,t),watchEvent:t=>xB(e,t),watchPendingTransactions:t=>CB(e,t)}}function ZB(e){return{addChain:t=>EB(e,t),deployContract:t=>AB(e,t),fillTransaction:t=>Ag(e,t),getAddresses:()=>kB(e),getCallsStatus:t=>S3(e,t),getCapabilities:t=>SB(e,t),getChainId:()=>_o(e),getPermissions:()=>jB(e),prepareAuthorization:t=>j3(e,t),prepareTransactionRequest:t=>ol(e,t),requestAddresses:()=>_B(e),requestPermissions:t=>IB(e,t),sendCalls:t=>k3(e,t),sendCallsSync:t=>PB(e,t),sendRawTransaction:t=>Vg(e,t),sendRawTransactionSync:t=>Hg(e,t),sendTransaction:t=>nf(e,t),sendTransactionSync:t=>I3(e,t),showCallsStatus:t=>TB(e,t),signAuthorization:t=>OB(e,t),signMessage:t=>B3(e,t),signTransaction:t=>RB(e,t),signTypedData:t=>MB(e,t),switchChain:t=>LB(e,t),waitForCallsStatus:t=>_3(e,t),watchAsset:t=>FB(e,t),writeContract:t=>Ic(e,t),writeContractSync:t=>DB(e,t)}}function R3({key:e,methods:t,name:n,request:r,retryCount:o=3,retryDelay:s=150,timeout:i,type:a},c){const l=T3();return{config:{key:e,methods:t,name:n,request:r,retryCount:o,retryDelay:s,timeout:i,type:a},request:L_(r,{methods:t,retryCount:o,retryDelay:s,uid:l}),value:c}}function eN(e,t={}){const{key:n="custom",methods:r,name:o="Custom Provider",retryDelay:s}=t;return({retryCount:i})=>R3({key:n,methods:r,name:o,request:e.request.bind(e),retryCount:t.retryCount??i,retryDelay:s,type:"custom"})}class tN extends U{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function nN(e,t={}){const{batch:n,fetchFn:r,fetchOptions:o,key:s="http",methods:i,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:f}=t;return({chain:d,retryCount:h,timeout:p})=>{const{batchSize:m=1e3,wait:v=0}=typeof n=="object"?n:{},y=t.retryCount??h,g=p??t.timeout??1e4,w=e||(d==null?void 0:d.rpcUrls.default.http[0]);if(!w)throw new tN;const x=z_(w,{fetchFn:r,fetchOptions:o,onRequest:c,onResponse:l,timeout:g});return R3({key:s,methods:i,name:a,async request({method:E,params:A}){const k={method:E,params:A},{schedule:S}=t5({id:w,wait:v,shouldSplitBatch(P){return P.length>m},fn:P=>x.request({body:P}),sort:(P,R)=>P.id-R.id}),_=async P=>n?S(P):[await x.request({body:P})],[{error:N,result:O}]=await _(k);if(f)return{error:N,result:O};if(N)throw new lg({body:k,error:N,url:w});return O},retryCount:y,retryDelay:u,timeout:g,type:"http"},{fetchOptions:o,url:w})}}async function M3(e,t={}){const{assertChainId:n=!0}=t;let r;if(t.connector){const{connector:u}=t;if(e.state.status==="reconnecting"&&!u.getAccounts&&!u.getChainId)throw new VB({connector:u});const[f,d]=await Promise.all([u.getAccounts().catch(h=>{if(t.account===null)return[];throw h}),u.getChainId()]);r={accounts:f,chainId:d,connector:u}}else r=e.state.connections.get(e.state.current);if(!r)throw new $B;const o=t.chainId??r.chainId,s=await r.connector.getChainId();if(n&&s!==o)throw new qB({connectionChainId:o,connectorChainId:s});const i=r.connector;if(i.getClient)return i.getClient({chainId:o});const a=je(t.account??r.accounts[0]);if(a&&(a.address=Te(a.address)),t.account&&!r.accounts.some(u=>u.toLowerCase()===a.address.toLowerCase()))throw new WB({address:a.address,connector:i});const c=e.chains.find(u=>u.id===o),l=await r.connector.getProvider({chainId:o});return O3({account:a,chain:c,name:"Connector Client",transport:u=>eN(l)({...u,retryCount:0})})}async function rN(e,t={}){var o,s;let n;if(t.connector)n=t.connector;else{const{connections:i,current:a}=e.state,c=i.get(a);n=c==null?void 0:c.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(i=>{if(r.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const a=r.values().next().value;return{...i,connections:new Map(r),current:a.connector.uid}});{const i=e.state.current;if(!i)return;const a=(o=e.state.connections.get(i))==null?void 0:o.connector;if(!a)return;await((s=e.storage)==null?void 0:s.setItem("recentConnectorId",a.id))}}function L3(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(pS[e])}function F3(e){const t=e.state.current,n=e.state.connections.get(t),r=n==null?void 0:n.accounts,o=r==null?void 0:r[0],s=e.chains.find(a=>a.id===(n==null?void 0:n.chainId)),i=e.state.status;switch(i){case"connected":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:i};case"reconnecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:i};case"connecting":return{address:o,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:i};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:i}}}async function oN(e,t){const{allowFailure:n=!0,chainId:r,contracts:o,...s}=t,i=e.getClient({chainId:r});return Yi(i,J5,"multicall")({allowFailure:n,contracts:o,...s})}function sN(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Yi(o,wn,"readContract")(r)}async function iN(e,t){var a;const{allowFailure:n=!0,blockNumber:r,blockTag:o,...s}=t,i=t.contracts;try{const c={};for(const[d,h]of i.entries()){const p=h.chainId??e.state.chainId;c[p]||(c[p]=[]),(a=c[p])==null||a.push({contract:h,index:d})}const l=()=>Object.entries(c).map(([d,h])=>oN(e,{...s,allowFailure:n,blockNumber:r,blockTag:o,chainId:Number.parseInt(d,10),contracts:h.map(({contract:p})=>p)})),u=(await Promise.all(l())).flat(),f=Object.values(c).flatMap(d=>d.map(({index:h})=>h));return u.reduce((d,h,p)=>(d&&(d[f[p]]=h),d),[])}catch(c){if(c instanceof ig)throw c;const l=()=>i.map(u=>sN(e,{...u,blockNumber:r,blockTag:o}));return n?(await Promise.allSettled(l())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(l())}}async function aN(e,t){const{address:n,blockNumber:r,blockTag:o,chainId:s,token:i,unit:a="ether"}=t;if(i)try{return await Vw(e,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:i})}catch(d){if(d.name==="ContractFunctionExecutionError"){const h=await Vw(e,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:i}),p=pk(zt(h.symbol,{dir:"right"}));return{...h,symbol:p}}throw d}const c=e.getClient({chainId:s}),u=await Yi(c,S5,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:o}),f=e.chains.find(d=>d.id===s)??c.chain;return{decimals:f.nativeCurrency.decimals,formatted:Ld(u,L3(a)),symbol:f.nativeCurrency.symbol,value:u}}async function Vw(e,t){const{balanceAddress:n,chainId:r,symbolType:o,tokenAddress:s,unit:i}=t,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:o}]}],address:s},[c,l,u]=await iN(e,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),f=Ld(c??"0",L3(i??l));return{decimals:l,formatted:f,symbol:u,value:c}}function Hw(e){return e.state.chainId}function ys(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ys(e[r],t[r]))return!1;return!0}if(typeof e.valueOf=="function"&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(typeof e.toString=="function"&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e);if(n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.hasOwn(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(s&&!ys(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}let vh=[];function Qw(e){const t=e.chains;return ys(vh,t)?vh:(vh=t,t)}function cN(e,t={}){try{return e.getClient(t)}catch{return}}let Dl=[];function C0(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||ys(Dl,t)?Dl:(Dl=t,t)}let Ul=[];function Gw(e){const t=e.connectors;return Ul.length===t.length&&Ul.every((n,r)=>n===t[r])?Ul:(Ul=t,t)}function lN(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Yi(o,i5,"getEnsAvatar")(r)}function uN(e,t){const{chainId:n,...r}=t,o=e.getClient({chainId:n});return Yi(o,a5,"getEnsName")(r)}function E0(e,t={}){const n=cN(e,t);return n==null?void 0:n.extend(XB)}async function dN(e,t={}){return(await M3(e,t)).extend(ZB)}let xh=!1;async function fN(e,t={}){var l,u;if(xh)return[];xh=!0,e.setState(f=>({...f,status:f.current?"reconnecting":"connecting"}));const n=[];if((l=t.connectors)!=null&&l.length)for(const f of t.connectors){let d;typeof f=="function"?d=e._internal.connectors.setup(f):d=f,n.push(d)}else n.push(...e.connectors);let r;try{r=await((u=e.storage)==null?void 0:u.getItem("recentConnectorId"))}catch{}const o={};for(const[,f]of e.state.connections)o[f.connector.id]=1;r&&(o[r]=0);const s=Object.keys(o).length>0?[...n].sort((f,d)=>(o[f.id]??10)-(o[d.id]??10)):n;let i=!1;const a=[],c=[];for(const f of s){const d=await f.getProvider().catch(()=>{});if(!d||c.some(m=>m===d)||!await f.isAuthorized())continue;const p=await f.connect({isReconnecting:!0}).catch(()=>null);p&&(f.emitter.off("connect",e._internal.events.connect),f.emitter.on("change",e._internal.events.change),f.emitter.on("disconnect",e._internal.events.disconnect),e.setState(m=>{const v=new Map(i?m.connections:new Map).set(f.uid,{accounts:p.accounts,chainId:p.chainId,connector:f});return{...m,current:i?m.current:f.uid,connections:v}}),a.push({accounts:p.accounts,chainId:p.chainId,connector:f}),c.push(d),i=!0)}return(e.state.status==="reconnecting"||e.state.status==="connecting")&&(i?e.setState(f=>({...f,status:"connected"})):e.setState(f=>({...f,connections:new Map,current:null,status:"disconnected"}))),xh=!1,a}async function hN(e,t){const{account:n,connector:r,...o}=t;let s;return typeof n=="object"&&n.type==="local"?s=e.getClient():s=await M3(e,{account:n,connector:r}),Yi(s,B3,"signMessage")({...o,...n?{account:n}:{}})}class Yt extends Or{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class pN extends Or{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function mN(e,t){var i;const{addEthereumChainParameter:n,chainId:r}=t,o=e.state.connections.get(((i=t.connector)==null?void 0:i.uid)??e.state.current);if(o){const a=o.connector;if(!a.switchChain)throw new pN({connector:a});return await a.switchChain({addEthereumChainParameter:n,chainId:r})}const s=e.chains.find(a=>a.id===r);if(!s)throw new xo;return e.setState(a=>({...a,chainId:r})),s}function D3(e,t){const{onChange:n}=t;return e.subscribe(()=>F3(e),n,{equalityFn(r,o){const{connector:s,...i}=r,{connector:a,...c}=o;return ys(i,c)&&(s==null?void 0:s.id)===(a==null?void 0:a.id)&&(s==null?void 0:s.uid)===(a==null?void 0:a.uid)}})}function gN(e,t){const{onChange:n}=t;return e.subscribe(r=>r.chainId,n)}function yN(e,t){const{onChange:n}=t;return e.subscribe(()=>C0(e),n,{equalityFn:ys})}function wN(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,o)=>{n(Object.values(r),o)})}function bN(e,t){const{onChange:n}=t;return e.subscribe(()=>E0(e),n,{equalityFn(r,o){return(r==null?void 0:r.uid)===(o==null?void 0:o.uid)}})}rf.type="injected";function rf(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){const c=e.target;if(typeof c=="function"){const l=c();if(l)return l}return typeof c=="object"?c:typeof c=="string"?{...vN[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(l){return l==null?void 0:l.ethereum}}}let o,s,i,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return!0},type:rf.type,async setup(){const l=await this.getProvider();l!=null&&l.on&&e.target&&(i||(i=this.onConnect.bind(this),l.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),l.on("accountsChanged",o)))},async connect({chainId:l,isReconnecting:u,withCapabilities:f}={}){var p,m,v,y,g,w;const d=await this.getProvider();if(!d)throw new Yt;let h=[];if(u)h=await this.getAccounts().catch(()=>[]);else if(t)try{h=(y=(v=(m=(p=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:p.caveats)==null?void 0:m[0])==null?void 0:v.value)==null?void 0:y.map(E=>Te(E)),h.length>0&&(h=await this.getAccounts())}catch(x){const E=x;if(E.code===ge.code)throw new ge(E);if(E.code===Jn.code)throw E}try{!(h!=null&&h.length)&&!u&&(h=(await d.request({method:"eth_requestAccounts"})).map(A=>Te(A))),i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let x=await this.getChainId();if(l&&x!==l){const E=await this.switchChain({chainId:l}).catch(A=>{if(A.code===ge.code)throw A;return{id:x}});x=(E==null?void 0:E.id)??x}return t&&await((g=c.storage)==null?void 0:g.removeItem(`${this.id}.disconnected`)),e.target||await((w=c.storage)==null?void 0:w.setItem("injected.connected",!0)),{accounts:f?h.map(E=>({address:E,capabilities:{}})):h,chainId:x}}catch(x){const E=x;throw E.code===ge.code?new ge(E):E.code===Jn.code?new Jn(E):E}},async disconnect(){var u,f;const l=await this.getProvider();if(!l)throw new Yt;s&&(l.removeListener("chainChanged",s),s=void 0),a&&(l.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),l.on("connect",i));try{await Kd(()=>l.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await((u=c.storage)==null?void 0:u.setItem(`${this.id}.disconnected`,!0)),e.target||await((f=c.storage)==null?void 0:f.removeItem("injected.connected"))},async getAccounts(){const l=await this.getProvider();if(!l)throw new Yt;return(await l.request({method:"eth_accounts"})).map(f=>Te(f))},async getChainId(){const l=await this.getProvider();if(!l)throw new Yt;const u=await l.request({method:"eth_chainId"});return Number(u)},async getProvider(){if(typeof window>"u")return;let l;const u=r();return typeof u.provider=="function"?l=u.provider(window):typeof u.provider=="string"?l=fu(window,u.provider):l=u.provider,l&&!l.removeListener&&("off"in l&&typeof l.off=="function"?l.removeListener=l.off:l.removeListener=()=>{}),l},async isAuthorized(){var l,u;try{if(t&&await((l=c.storage)==null?void 0:l.getItem(`${this.id}.disconnected`))||!e.target&&!await((u=c.storage)==null?void 0:u.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const p=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",p),!!await this.getProvider()),m=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(y=>window.addEventListener("ethereum#initialized",()=>y(p()),{once:!0}))]:[],new Promise(y=>setTimeout(()=>y(p()),m))]))return!0}throw new Yt}return!!(await ms(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:u}){var p,m,v,y;const f=await this.getProvider();if(!f)throw new Yt;const d=c.chains.find(g=>g.id===u);if(!d)throw new kt(new xo);const h=new Promise(g=>{const w=x=>{"chainId"in x&&x.chainId===u&&(c.emitter.off("change",w),g())};c.emitter.on("change",w)});try{return await Promise.all([f.request({method:"wallet_switchEthereumChain",params:[{chainId:z(u)}]}).then(async()=>{await this.getChainId()===u&&c.emitter.emit("change",{chainId:u})}),h]),d}catch(g){const w=g;if(w.code===4902||((m=(p=w==null?void 0:w.data)==null?void 0:p.originalError)==null?void 0:m.code)===4902)try{const{default:x,...E}=d.blockExplorers??{};let A;l!=null&&l.blockExplorerUrls?A=l.blockExplorerUrls:x&&(A=[x.url,...Object.values(E).map(_=>_.url)]);let k;(v=l==null?void 0:l.rpcUrls)!=null&&v.length?k=l.rpcUrls:k=[((y=d.rpcUrls.default)==null?void 0:y.http[0])??""];const S={blockExplorerUrls:A,chainId:z(u),chainName:(l==null?void 0:l.chainName)??d.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??d.nativeCurrency,rpcUrls:k};return await Promise.all([f.request({method:"wallet_addEthereumChain",params:[S]}).then(async()=>{if(await this.getChainId()===u)c.emitter.emit("change",{chainId:u});else throw new ge(new Error("User rejected switch after adding network."))}),h]),d}catch(x){throw new ge(x)}throw w.code===ge.code?new ge(w):new kt(w)}},async onAccountsChanged(l){var u;if(l.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f}),t&&await((u=c.storage)==null?void 0:u.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:l.map(f=>Te(f))})},onChainChanged(l){const u=Number(l);c.emitter.emit("change",{chainId:u})},async onConnect(l){const u=await this.getAccounts();if(u.length===0)return;const f=Number(l.chainId);c.emitter.emit("connect",{accounts:u,chainId:f});const d=await this.getProvider();d&&(i&&(d.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),d.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a)))},async onDisconnect(l){const u=await this.getProvider();l&&l.code===1013&&u&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),u&&(s&&(u.removeListener("chainChanged",s),s=void 0),a&&(u.removeListener("disconnect",a),a=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i))))}})}const vN={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e!=null&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:fu(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return fu(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const r of n)if(t[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return(t=e==null?void 0:e.phantom)!=null&&t.ethereum?(n=e.phantom)==null?void 0:n.ethereum:fu(e,"isPhantom")}}};function fu(e,t){function n(o){return typeof t=="function"?t(o):typeof t=="string"?o[t]:!0}const r=e.ethereum;if(r!=null&&r.providers)return r.providers.find(o=>n(o));if(r&&n(r))return r}function xN(e){if(typeof window>"u")return;const t=n=>e(n.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}function CN(){const e=new Set;let t=[];const n=()=>xN(o=>{t.some(({info:s})=>s.uuid===o.info.uuid)||(t=[...t,o],e.forEach(s=>s(t,{added:[o]})))});let r=n();return{_listeners(){return e},clear(){e.forEach(o=>o([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),r==null||r()},findProvider({rdns:o}){return t.find(s=>s.info.rdns===o)},getProviders(){return t},reset(){this.clear(),r==null||r(),r=n()},subscribe(o,{emitImmediately:s}={}){return e.add(o),s&&o(t,{added:t}),()=>e.delete(o)}}}const EN=e=>(t,n,r)=>{const o=r.subscribe;return r.subscribe=(i,a,c)=>{let l=i;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=i(r.getState());l=d=>{const h=i(d);if(!u(f,h)){const p=f;a(f=h,p)}},c!=null&&c.fireImmediately&&a(f,f)}return o(l)},e(t,n,r)},AN=EN;function kN(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var s;const i=c=>c===null?null:JSON.parse(c,void 0),a=(s=n.getItem(o))!=null?s:null;return a instanceof Promise?a.then(i):i(a)},setItem:(o,s)=>n.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>n.removeItem(o)}}const A0=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return A0(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return A0(r)(n)}}}},SN=(e,t)=>(n,r,o)=>{let s={storage:kN(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...t},i=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,o);const u=()=>{const m=s.partialize({...r()});return l.setItem(s.name,{state:m,version:s.version})},f=o.setState;o.setState=(m,v)=>{f(m,v),u()};const d=e((...m)=>{n(...m),u()},r,o);o.getInitialState=()=>d;let h;const p=()=>{var m,v;if(!l)return;i=!1,a.forEach(g=>{var w;return g((w=r())!=null?w:d)});const y=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(m=r())!=null?m:d))||void 0;return A0(l.getItem.bind(l))(s.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==s.version){if(s.migrate)return[!0,s.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var w;const[x,E]=g;if(h=s.merge(E,(w=r())!=null?w:d),n(h,!0),x)return u()}).then(()=>{y==null||y(h,void 0),h=r(),i=!0,c.forEach(g=>g(h))}).catch(g=>{y==null||y(void 0,g)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>i,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},s.skipHydration||p(),h||d},jN=SN,Kw=e=>{let t;const n=new Set,r=(l,u)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const d=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,d))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},Ch=e=>e?Kw(e):Kw;var U3={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,f||c,d),p=n?n+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function i(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)t.call(u,f)&&l.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=n?n+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},a.prototype.listenerCount=function(l){var u=n?n+l:l,f=this._events[u];return f?f.fn?1:f.length:0},a.prototype.emit=function(l,u,f,d,h,p){var m=n?n+l:l;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,g,w;if(v.fn){switch(v.once&&this.removeListener(l,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,d),!0;case 5:return v.fn.call(v.context,u,f,d,h),!0;case 6:return v.fn.call(v.context,u,f,d,h,p),!0}for(w=1,g=new Array(y-1);w<y;w++)g[w-1]=arguments[w];v.fn.apply(v.context,g)}else{var x=v.length,E;for(w=0;w<x;w++)switch(v[w].once&&this.removeListener(l,v[w].fn,void 0,!0),y){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,f);break;case 4:v[w].fn.call(v[w].context,u,f,d);break;default:if(!g)for(E=1,g=new Array(y-1);E<y;E++)g[E-1]=arguments[E];v[w].fn.apply(v[w].context,g)}}return!0},a.prototype.on=function(l,u,f){return s(this,l,u,f,!1)},a.prototype.once=function(l,u,f){return s(this,l,u,f,!0)},a.prototype.removeListener=function(l,u,f,d){var h=n?n+l:l;if(!this._events[h])return this;if(!u)return i(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&i(this,h);else{for(var m=0,v=[],y=p.length;m<y;m++)(p[m].fn!==u||d&&!p[m].once||f&&p[m].context!==f)&&v.push(p[m]);v.length?this._events[h]=v.length===1?v[0]:v:i(this,h)}return this},a.prototype.removeAllListeners=function(l){var u;return l?(u=n?n+l:l,this._events[u]&&i(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(U3);var _N=U3.exports;const IN=_v(_N);let BN=class{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new IN})}on(t,n){this._emitter.on(t,n)}once(t,n){this._emitter.once(t,n)}off(t,n){this._emitter.off(t,n)}emit(t,...n){const r=n[0];this._emitter.emit(t,{uid:this.uid,...r})}listenerCount(t){return this._emitter.listenerCount(t)}};function NN(e){return new BN(e)}function PN(e,t){return JSON.parse(e,(n,r)=>{let o=r;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(t==null?void 0:t(n,o))??o})}function Yw(e,t){return e.slice(0,t).join(".")||"."}function Jw(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function TN(e,t){const n=typeof e=="function",r=typeof t=="function",o=[],s=[];return function(a,c){if(typeof c=="object")if(o.length){const l=Jw(o,this);l===0?o[o.length]=this:(o.splice(l),s.splice(l)),s[s.length]=a;const u=Jw(o,c);if(u!==0)return r?t.call(this,a,c,Yw(s,u)):`[ref=${Yw(s,u)}]`}else o[0]=c,s[0]=a;return n?e.call(this,a,c):c}}function ON(e,t,n,r){return JSON.stringify(e,TN((o,s)=>{let i=s;return typeof i=="bigint"&&(i={__type:"bigint",value:s.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(s.entries())}),(t==null?void 0:t(o,i))??i},r),n??void 0)}function RN(e){const{deserialize:t=PN,key:n="wagmi",serialize:r=ON,storage:o=z3}=e;function s(i){return i instanceof Promise?i.then(a=>a).catch(()=>null):i}return{...o,key:n,async getItem(i,a){const c=o.getItem(`${n}.${i}`),l=await s(c);return l?t(l)??null:a??null},async setItem(i,a){const c=`${n}.${i}`;a===null?await s(o.removeItem(c)):await s(o.setItem(c,r(a)))},async removeItem(i){await s(o.removeItem(`${n}.${i}`))}}}const z3={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function MN(){const e=typeof window<"u"&&window.localStorage?window.localStorage:z3;return{getItem(t){return e.getItem(t)},removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch{}}}}const k0=256;let zl=k0,$l;function LN(e=11){if(!$l||zl+e>k0*2){$l="",zl=0;for(let t=0;t<k0;t++)$l+=(256+Math.random()*256|0).toString(16).substring(1)}return $l.substring(zl,zl+++e)}function FN(e){const{multiInjectedProviderDiscovery:t=!0,storage:n=RN({storage:MN()}),syncConnectedChain:r=!0,ssr:o=!1,...s}=e,i=typeof window<"u"&&t?CN():void 0,a=Ch(()=>s.chains),c=Ch(()=>{const E=[],A=new Set;for(const k of s.connectors??[]){const S=l(k);if(E.push(S),!o&&S.rdns){const _=typeof S.rdns=="string"?[S.rdns]:S.rdns;for(const N of _)A.add(N)}}if(!o&&i){const k=i.getProviders();for(const S of k)A.has(S.info.rdns)||E.push(l(u(S)))}return E});function l(E){var S;const A=NN(LN()),k={...E({emitter:A,chains:a.getState(),storage:n,transports:s.transports}),emitter:A,uid:A.uid};return A.on("connect",w),(S=k.setup)==null||S.call(k),k}function u(E){const{info:A}=E,k=E.provider;return rf({target:{...A,id:A.rdns,provider:k}})}const f=new Map;function d(E={}){const A=E.chainId??v.getState().chainId,k=a.getState().find(_=>_.id===A);if(E.chainId&&!k)throw new xo;{const _=f.get(v.getState().chainId);if(_&&!k)return _;if(!k)throw new xo}{const _=f.get(A);if(_)return _}let S;if(s.client)S=s.client({chain:k});else{const _=k.id,N=a.getState().map(R=>R.id),O={},P=Object.entries(s);for(const[R,V]of P)if(!(R==="chains"||R==="client"||R==="connectors"||R==="transports"))if(typeof V=="object")if(_ in V)O[R]=V[_];else{if(N.some(F=>F in V))continue;O[R]=V}else O[R]=V;S=O3({...O,chain:k,batch:O.batch??{multicall:!0},transport:R=>s.transports[_]({...R,connectors:c})})}return f.set(A,S),S}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const m="0.0.0-canary-";du.startsWith(m)?p=Number.parseInt(du.replace(m,""),10):p=Number.parseInt(du.split(".")[0]??"0",10);const v=Ch(AN(n?jN(h,{migrate(E,A){if(A===p)return E;const k=h(),S=y(E,k.chainId);return{...k,chainId:S}},name:"store",partialize(E){return{connections:{__type:"Map",value:Array.from(E.connections.entries()).map(([A,k])=>{const{id:S,name:_,type:N,uid:O}=k.connector;return[A,{...k,connector:{id:S,name:_,type:N,uid:O}}]})},chainId:E.chainId,current:E.current}},merge(E,A){typeof E=="object"&&E&&"status"in E&&delete E.status;const k=y(E,A.chainId);return{...A,...E,chainId:k}},skipHydration:o,storage:n,version:p}):h));v.setState(h());function y(E,A){return E&&typeof E=="object"&&"chainId"in E&&typeof E.chainId=="number"&&a.getState().some(k=>k.id===E.chainId)?E.chainId:A}r&&v.subscribe(({connections:E,current:A})=>{var k;return A?(k=E.get(A))==null?void 0:k.chainId:void 0},E=>{if(a.getState().some(k=>k.id===E))return v.setState(k=>({...k,chainId:E??k.chainId}))}),i==null||i.subscribe(E=>{const A=new Set,k=new Set;for(const _ of c.getState())if(A.add(_.id),_.rdns){const N=typeof _.rdns=="string"?[_.rdns]:_.rdns;for(const O of N)k.add(O)}const S=[];for(const _ of E){if(k.has(_.info.rdns))continue;const N=l(u(_));A.has(N.id)||S.push(N)}n&&!v.persist.hasHydrated()||c.setState(_=>[..._,...S],!0)});function g(E){v.setState(A=>{const k=A.connections.get(E.uid);return k?{...A,connections:new Map(A.connections).set(E.uid,{accounts:E.accounts??k.accounts,chainId:E.chainId??k.chainId,connector:k.connector})}:A})}function w(E){v.getState().status==="connecting"||v.getState().status==="reconnecting"||v.setState(A=>{const k=c.getState().find(S=>S.uid===E.uid);return k?(k.emitter.listenerCount("connect")&&k.emitter.off("connect",g),k.emitter.listenerCount("change")||k.emitter.on("change",g),k.emitter.listenerCount("disconnect")||k.emitter.on("disconnect",x),{...A,connections:new Map(A.connections).set(E.uid,{accounts:E.accounts,chainId:E.chainId,connector:k}),current:E.uid,status:"connected"}):A})}function x(E){v.setState(A=>{const k=A.connections.get(E.uid);if(k){const _=k.connector;_.emitter.listenerCount("change")&&k.connector.emitter.off("change",g),_.emitter.listenerCount("disconnect")&&k.connector.emitter.off("disconnect",x),_.emitter.listenerCount("connect")||k.connector.emitter.on("connect",w)}if(A.connections.delete(E.uid),A.connections.size===0)return{...A,connections:new Map,current:null,status:"disconnected"};const S=A.connections.values().next().value;return{...A,connections:new Map(A.connections),current:S.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:d,get state(){return v.getState()},setState(E){let A;typeof E=="function"?A=E(v.getState()):A=E;const k=h();typeof A!="object"&&(A=k),Object.keys(k).some(_=>!(_ in A))&&(A=k),v.setState(A,!0)},subscribe(E,A,k){return v.subscribe(E,A,k?{...k,fireImmediately:k.emitImmediately}:void 0)},_internal:{mipd:i,async revalidate(){const E=v.getState(),A=E.connections;let k=E.current;for(const[,S]of A){const _=S.connector;_.isAuthorized&&await _.isAuthorized()||(A.delete(_.uid),k===_.uid&&(k=null))}v.setState(S=>({...S,connections:A,current:k}))},store:v,ssr:!!o,syncConnectedChain:r,transports:s.transports,chains:{setState(E){const A=typeof E=="function"?E(a.getState()):E;if(A.length!==0)return a.setState(A,!0)},subscribe(E){return a.subscribe(E)}},connectors:{providerDetailToConnector:u,setup:l,setState(E){return c.setState(typeof E=="function"?E(c.getState()):E,!0)},subscribe(E){return c.subscribe(E)}},events:{change:g,connect:w,disconnect:x}}}}function DN(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(o=>o.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(o=>{var c;const s=new Set;for(const l of o??[])if(l.rdns){const u=Array.isArray(l.rdns)?l.rdns:[l.rdns];for(const f of u)s.add(f)}const i=[],a=((c=e._internal.mipd)==null?void 0:c.getProviders())??[];for(const l of a){if(s.has(l.info.rdns))continue;const u=e._internal.connectors.providerDetailToConnector(l),f=e._internal.connectors.setup(u);i.push(f)}return[...o,...i]})),r?fN(e):e.storage&&e.setState(o=>({...o,connections:new Map}))}}}function $3(e){var s,i,a;const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=(i=(s=e.transports)==null?void 0:s[t.id])==null?void 0:i.call(s,{chain:t});return(((a=r==null?void 0:r.value)==null?void 0:a.transports)||[r]).map(({value:c})=>(c==null?void 0:c.url)||n)}function UN(e){const{children:t,config:n,initialState:r,reconnectOnMount:o=!0}=e,{onMount:s}=DN(n,{initialState:r,reconnectOnMount:o});n._internal.ssr||s();const i=j.useRef(!0);return j.useEffect(()=>{if(i.current&&n._internal.ssr)return s(),()=>{i.current=!1}},[]),t}const W3=j.createContext(void 0);function zN(e){const{children:t,config:n}=e,r={value:n};return j.createElement(UN,e,j.createElement(W3.Provider,r,t))}const $N="2.19.5",WN=()=>`wagmi@${$N}`;class qN extends Or{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return WN()}}class VN extends qN{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Ke(e={}){const t=e.config??j.useContext(W3);if(!t)throw new VN;return t}function HN(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((r,o)=>{n(r,o)})}var q3={exports:{}},V3={},H3={exports:{}},Q3={};/**
1655
+ * @license React
1656
+ * use-sync-external-store-shim.production.js
1657
+ *
1658
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1659
+ *
1660
+ * This source code is licensed under the MIT license found in the
1661
+ * LICENSE file in the root directory of this source tree.
1662
+ */var Li=j;function QN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GN=typeof Object.is=="function"?Object.is:QN,KN=Li.useState,YN=Li.useEffect,JN=Li.useLayoutEffect,XN=Li.useDebugValue;function ZN(e,t){var n=t(),r=KN({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return JN(function(){o.value=n,o.getSnapshot=t,Eh(o)&&s({inst:o})},[e,n,t]),YN(function(){return Eh(o)&&s({inst:o}),e(function(){Eh(o)&&s({inst:o})})},[e]),XN(n),n}function Eh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!GN(e,n)}catch{return!0}}function eP(e,t){return t()}var tP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eP:ZN;Q3.useSyncExternalStore=Li.useSyncExternalStore!==void 0?Li.useSyncExternalStore:tP;H3.exports=Q3;var nP=H3.exports;/**
1663
+ * @license React
1664
+ * use-sync-external-store-shim/with-selector.production.js
1665
+ *
1666
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1667
+ *
1668
+ * This source code is licensed under the MIT license found in the
1669
+ * LICENSE file in the root directory of this source tree.
1670
+ */var of=j,rP=nP;function oP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sP=typeof Object.is=="function"?Object.is:oP,iP=rP.useSyncExternalStore,aP=of.useRef,cP=of.useEffect,lP=of.useMemo,uP=of.useDebugValue;V3.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=aP(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=lP(function(){function c(h){if(!l){if(l=!0,u=h,h=r(h),o!==void 0&&i.hasValue){var p=i.value;if(o(p,h))return f=p}return f=h}if(p=f,sP(u,h))return p;var m=r(h);return o!==void 0&&o(p,m)?(u=h,p):(u=h,f=m)}var l=!1,u,f,d=n===void 0?null:n;return[function(){return c(t())},d===null?void 0:function(){return c(d())}]},[t,n,r,o]);var a=iP(e,s[0],s[1]);return cP(function(){i.hasValue=!0,i.value=a},[a]),uP(a),a};q3.exports=V3;var G3=q3.exports;const Ah=e=>typeof e=="object"&&!Array.isArray(e);function dP(e,t,n=t,r=ys){const o=j.useRef([]),s=G3.useSyncExternalStoreWithSelector(e,t,n,i=>i,(i,a)=>{if(Ah(i)&&Ah(a)&&o.current.length){for(const c of o.current)if(!r(i[c],a[c]))return!1;return!0}return r(i,a)});return j.useMemo(()=>{if(Ah(s)){const i={...s};let a={};for(const[c,l]of Object.entries(i))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(c)||o.current.push(c),l)}};return Object.defineProperties(i,a),i}return s},[s])}function gt(e={}){const t=Ke(e);return dP(n=>D3(t,{onChange:n}),()=>F3(t))}function K3(e={}){const{onConnect:t,onDisconnect:n}=e,r=Ke(e);j.useEffect(()=>D3(r,{onChange(o,s){if((s.status==="reconnecting"||s.status==="connecting"&&s.address===void 0)&&o.status==="connected"){const{address:i,addresses:a,chain:c,chainId:l,connector:u}=o,f=s.status==="reconnecting"||s.status===void 0;t==null||t({address:i,addresses:a,chain:c,chainId:l,connector:u,isReconnected:f})}else s.status==="connected"&&o.status==="disconnected"&&(n==null||n())}}),[r,t,n])}var Ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qo,Qr,li,yv,fP=(yv=class extends Ji{constructor(){super();ne(this,qo);ne(this,Qr);ne(this,li);G(this,li,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){B(this,Qr)||this.setEventListener(B(this,li))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Qr))==null||t.call(this),G(this,Qr,void 0))}setEventListener(t){var n;G(this,li,t),(n=B(this,Qr))==null||n.call(this),G(this,Qr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,qo)!==t&&(G(this,qo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof B(this,qo)=="boolean"?B(this,qo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qo=new WeakMap,Qr=new WeakMap,li=new WeakMap,yv),Qg=new fP,hP={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gr,tm,wv,pP=(wv=class{constructor(){ne(this,Gr,hP);ne(this,tm,!1)}setTimeoutProvider(e){G(this,Gr,e)}setTimeout(e,t){return B(this,Gr).setTimeout(e,t)}clearTimeout(e){B(this,Gr).clearTimeout(e)}setInterval(e,t){return B(this,Gr).setInterval(e,t)}clearInterval(e){B(this,Gr).clearInterval(e)}},Gr=new WeakMap,tm=new WeakMap,wv),$o=new pP;function mP(e){setTimeout(e,0)}var gP=typeof window>"u"||"Deno"in globalThis;function Ct(){}function yP(e,t){return typeof e=="function"?e(t):e}function S0(e){return typeof e=="number"&&e>=0&&e!==1/0}function Y3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function po(e,t){return typeof e=="function"?e(t):e}function ln(e,t){return typeof e=="function"?e(t):e}function Xw(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Gg(i,t.options))return!1}else if(!Bc(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Zw(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ws(t.options.mutationKey)!==ws(s))return!1}else if(!Bc(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Gg(e,t){return((t==null?void 0:t.queryKeyHashFn)||ws)(e)}function ws(e){return JSON.stringify(e,(t,n)=>j0(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Bc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Bc(e[n],t[n])):!1}var wP=Object.prototype.hasOwnProperty;function J3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=eb(e)&&eb(t);if(!r&&!(j0(e)&&j0(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let l=0;for(let u=0;u<a;u++){const f=r?u:i[u],d=e[f],h=t[f];if(d===h){c[f]=d,(r?u<s:wP.call(e,f))&&l++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){c[f]=h;continue}const p=J3(d,h,n+1);c[f]=p,p===d&&l++}return s===a&&l===s?e:c}function nd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function eb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function j0(e){if(!tb(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tb(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tb(e){return Object.prototype.toString.call(e)==="[object Object]"}function bP(e){return new Promise(t=>{$o.setTimeout(t,e)})}function _0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?J3(e,t):t}function vP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function xP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Kg=Symbol();function X3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Kg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Yg(e,t){return typeof e=="function"?e(...t):!!e}function CP(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Nc=(()=>{let e=()=>gP;return{isServer(){return e()},setIsServer(t){e=t}}})();function I0(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var EP=mP;function AP(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=EP;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var He=AP(),ui,Kr,di,bv,kP=(bv=class extends Ji{constructor(){super();ne(this,ui,!0);ne(this,Kr);ne(this,di);G(this,di,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,Kr)||this.setEventListener(B(this,di))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,Kr))==null||t.call(this),G(this,Kr,void 0))}setEventListener(t){var n;G(this,di,t),(n=B(this,Kr))==null||n.call(this),G(this,Kr,t(this.setOnline.bind(this)))}setOnline(t){B(this,ui)!==t&&(G(this,ui,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return B(this,ui)}},ui=new WeakMap,Kr=new WeakMap,di=new WeakMap,bv),rd=new kP;function SP(e){return Math.min(1e3*2**e,3e4)}function Z3(e){return(e??"online")==="online"?rd.isOnline():!0}var B0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eC(e){let t=!1,n=0,r;const o=I0(),s=()=>o.status!=="pending",i=m=>{var v;if(!s()){const y=new B0(m);d(y),(v=e.onCancel)==null||v.call(e,y)}},a=()=>{t=!0},c=()=>{t=!1},l=()=>Qg.isFocused()&&(e.networkMode==="always"||rd.isOnline())&&e.canRun(),u=()=>Z3(e.networkMode)&&e.canRun(),f=m=>{s()||(r==null||r(),o.resolve(m))},d=m=>{s()||(r==null||r(),o.reject(m))},h=()=>new Promise(m=>{var v;r=y=>{(s()||l())&&m(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;r=void 0,s()||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(s())return;let m;const v=n===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var A;if(s())return;const g=e.retry??(Nc.isServer()?0:3),w=e.retryDelay??SP,x=typeof w=="function"?w(n,y):w,E=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!E){d(y);return}n++,(A=e.onFail)==null||A.call(e,n,y),bP(x).then(()=>l()?void 0:h()).then(()=>{t?d(y):p()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:c,canStart:u,start:()=>(u()?p():h().then(p),o)}}var Vo,vv,tC=(vv=class{constructor(){ne(this,Vo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),S0(this.gcTime)&&G(this,Vo,$o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Nc.isServer()?1/0:5*60*1e3))}clearGcTimeout(){B(this,Vo)&&($o.clearTimeout(B(this,Vo)),G(this,Vo,void 0))}},Vo=new WeakMap,vv),Ho,fi,cn,Qo,Ye,Fc,Go,Kt,nC,lr,xv,jP=(xv=class extends tC{constructor(t){super();ne(this,Kt);ne(this,Ho);ne(this,fi);ne(this,cn);ne(this,Qo);ne(this,Ye);ne(this,Fc);ne(this,Go);G(this,Go,!1),G(this,Fc,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,Qo,t.client),G(this,cn,B(this,Qo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,Ho,rb(this.options)),this.state=t.state??B(this,Ho),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,Ye))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,Fc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=rb(this.options);n.data!==void 0&&(this.setState(nb(n.data,n.dataUpdatedAt)),G(this,Ho,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,cn).remove(this)}setData(t,n){const r=_0(this.state.data,t,this.options);return ae(this,Kt,lr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ae(this,Kt,lr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=B(this,Ye))==null?void 0:r.promise;return(o=B(this,Ye))==null||o.cancel(t),n?n.then(Ct).catch(Ct):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(this,Ho)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ln(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>po(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Y3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,Ye))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,Ye))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,cn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(B(this,Ye)&&(B(this,Go)||ae(this,Kt,nC).call(this)?B(this,Ye).cancel({revert:!0}):B(this,Ye).cancelRetry()),this.scheduleGc()),B(this,cn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ae(this,Kt,lr).call(this,{type:"invalidate"})}async fetch(t,n){var c,l,u,f,d,h,p,m,v,y,g,w;if(this.state.fetchStatus!=="idle"&&((c=B(this,Ye))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(B(this,Ye))return B(this,Ye).continueRetry(),B(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(E=>E.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,o=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(G(this,Go,!0),r.signal)})},s=()=>{const x=X3(this.options,n),A=(()=>{const k={client:B(this,Qo),queryKey:this.queryKey,meta:this.meta};return o(k),k})();return G(this,Go,!1),this.options.persister?this.options.persister(x,A,this):x(A)},a=(()=>{const x={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:B(this,Qo),state:this.state,fetchFn:s};return o(x),x})();(l=this.options.behavior)==null||l.onFetch(a,this),G(this,fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ae(this,Kt,lr).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),G(this,Ye,eC({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:x=>{x instanceof B0&&x.revert&&this.setState({...B(this,fi),fetchStatus:"idle"}),r.abort()},onFail:(x,E)=>{ae(this,Kt,lr).call(this,{type:"failed",failureCount:x,error:E})},onPause:()=>{ae(this,Kt,lr).call(this,{type:"pause"})},onContinue:()=>{ae(this,Kt,lr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const x=await B(this,Ye).start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),(h=(d=B(this,cn).config).onSuccess)==null||h.call(d,x,this),(m=(p=B(this,cn).config).onSettled)==null||m.call(p,x,this.state.error,this),x}catch(x){if(x instanceof B0){if(x.silent)return B(this,Ye).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw ae(this,Kt,lr).call(this,{type:"error",error:x}),(y=(v=B(this,cn).config).onError)==null||y.call(v,x,this),(w=(g=B(this,cn).config).onSettled)==null||w.call(g,this.state.data,x,this),x}finally{this.scheduleGc()}}},Ho=new WeakMap,fi=new WeakMap,cn=new WeakMap,Qo=new WeakMap,Ye=new WeakMap,Fc=new WeakMap,Go=new WeakMap,Kt=new WeakSet,nC=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rC(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...nb(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return G(this,fi,t.manual?o:void 0),o;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),He.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,cn).notify({query:this,type:"updated",action:t})})},xv);function rC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Z3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nb(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Pt,he,Dc,bt,Ko,hi,hr,Yr,Uc,pi,mi,Yo,Jo,Jr,gi,xe,_a,N0,P0,T0,O0,R0,M0,L0,oC,Cv,_P=(Cv=class extends Ji{constructor(t,n){super();ne(this,xe);ne(this,Pt);ne(this,he);ne(this,Dc);ne(this,bt);ne(this,Ko);ne(this,hi);ne(this,hr);ne(this,Yr);ne(this,Uc);ne(this,pi);ne(this,mi);ne(this,Yo);ne(this,Jo);ne(this,Jr);ne(this,gi,new Set);this.options=n,G(this,Pt,t),G(this,Yr,null),G(this,hr,I0()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,he).addObserver(this),ob(B(this,he),this.options)?ae(this,xe,_a).call(this):this.updateResult(),ae(this,xe,O0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return F0(B(this,he),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return F0(B(this,he),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ae(this,xe,R0).call(this),ae(this,xe,M0).call(this),B(this,he).removeObserver(this)}setOptions(t){const n=this.options,r=B(this,he);if(this.options=B(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ln(this.options.enabled,B(this,he))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ae(this,xe,L0).call(this),B(this,he).setOptions(this.options),n._defaulted&&!nd(this.options,n)&&B(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,he),observer:this});const o=this.hasListeners();o&&sb(B(this,he),r,this.options,n)&&ae(this,xe,_a).call(this),this.updateResult(),o&&(B(this,he)!==r||ln(this.options.enabled,B(this,he))!==ln(n.enabled,B(this,he))||po(this.options.staleTime,B(this,he))!==po(n.staleTime,B(this,he)))&&ae(this,xe,N0).call(this);const s=ae(this,xe,P0).call(this);o&&(B(this,he)!==r||ln(this.options.enabled,B(this,he))!==ln(n.enabled,B(this,he))||s!==B(this,Jr))&&ae(this,xe,T0).call(this,s)}getOptimisticResult(t){const n=B(this,Pt).getQueryCache().build(B(this,Pt),t),r=this.createResult(n,t);return BP(this,r)&&(G(this,bt,r),G(this,hi,this.options),G(this,Ko,B(this,he).state)),r}getCurrentResult(){return B(this,bt)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,hr).status==="pending"&&B(this,hr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){B(this,gi).add(t)}getCurrentQuery(){return B(this,he)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=B(this,Pt).defaultQueryOptions(t),r=B(this,Pt).getQueryCache().build(B(this,Pt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ae(this,xe,_a).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,bt)))}createResult(t,n){var _;const r=B(this,he),o=this.options,s=B(this,bt),i=B(this,Ko),a=B(this,hi),l=t!==r?t.state:B(this,Dc),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const N=this.hasListeners(),O=!N&&ob(t,n),P=N&&sb(t,r,n,o);(O||P)&&(f={...f,...rC(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=f;h=f.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&v==="pending"){let N;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(N=s.data,y=!0):N=typeof n.placeholderData=="function"?n.placeholderData((_=B(this,mi))==null?void 0:_.state.data,B(this,mi)):n.placeholderData,N!==void 0&&(v="success",h=_0(s==null?void 0:s.data,N,n),d=!0)}if(n.select&&h!==void 0&&!y)if(s&&h===(i==null?void 0:i.data)&&n.select===B(this,Uc))h=B(this,pi);else try{G(this,Uc,n.select),h=n.select(h),h=_0(s==null?void 0:s.data,h,n),G(this,pi,h),G(this,Yr,null)}catch(N){G(this,Yr,N)}B(this,Yr)&&(p=B(this,Yr),h=B(this,pi),m=Date.now(),v="error");const g=f.fetchStatus==="fetching",w=v==="pending",x=v==="error",E=w&&g,A=h!==void 0,S={status:v,fetchStatus:f.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:f.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:x&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:x&&A,isStale:Jg(t,n),refetch:this.refetch,promise:B(this,hr),isEnabled:ln(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=S.data!==void 0,O=S.status==="error"&&!N,P=M=>{O?M.reject(S.error):N&&M.resolve(S.data)},R=()=>{const M=G(this,hr,S.promise=I0());P(M)},V=B(this,hr);switch(V.status){case"pending":t.queryHash===r.queryHash&&P(V);break;case"fulfilled":(O||S.data!==V.value)&&R();break;case"rejected":(!O||S.error!==V.reason)&&R();break}}return S}updateResult(){const t=B(this,bt),n=this.createResult(B(this,he),this.options);if(G(this,Ko,B(this,he).state),G(this,hi,this.options),B(this,Ko).data!==void 0&&G(this,mi,B(this,he)),nd(n,t))return;G(this,bt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!B(this,gi).size)return!0;const i=new Set(s??B(this,gi));return this.options.throwOnError&&i.add("error"),Object.keys(B(this,bt)).some(a=>{const c=a;return B(this,bt)[c]!==t[c]&&i.has(c)})};ae(this,xe,oC).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ae(this,xe,O0).call(this)}},Pt=new WeakMap,he=new WeakMap,Dc=new WeakMap,bt=new WeakMap,Ko=new WeakMap,hi=new WeakMap,hr=new WeakMap,Yr=new WeakMap,Uc=new WeakMap,pi=new WeakMap,mi=new WeakMap,Yo=new WeakMap,Jo=new WeakMap,Jr=new WeakMap,gi=new WeakMap,xe=new WeakSet,_a=function(t){ae(this,xe,L0).call(this);let n=B(this,he).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ct)),n},N0=function(){ae(this,xe,R0).call(this);const t=po(this.options.staleTime,B(this,he));if(Nc.isServer()||B(this,bt).isStale||!S0(t))return;const r=Y3(B(this,bt).dataUpdatedAt,t)+1;G(this,Yo,$o.setTimeout(()=>{B(this,bt).isStale||this.updateResult()},r))},P0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,he)):this.options.refetchInterval)??!1},T0=function(t){ae(this,xe,M0).call(this),G(this,Jr,t),!(Nc.isServer()||ln(this.options.enabled,B(this,he))===!1||!S0(B(this,Jr))||B(this,Jr)===0)&&G(this,Jo,$o.setInterval(()=>{(this.options.refetchIntervalInBackground||Qg.isFocused())&&ae(this,xe,_a).call(this)},B(this,Jr)))},O0=function(){ae(this,xe,N0).call(this),ae(this,xe,T0).call(this,ae(this,xe,P0).call(this))},R0=function(){B(this,Yo)&&($o.clearTimeout(B(this,Yo)),G(this,Yo,void 0))},M0=function(){B(this,Jo)&&($o.clearInterval(B(this,Jo)),G(this,Jo,void 0))},L0=function(){const t=B(this,Pt).getQueryCache().build(B(this,Pt),this.options);if(t===B(this,he))return;const n=B(this,he);G(this,he,t),G(this,Dc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},oC=function(t){He.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(B(this,bt))}),B(this,Pt).getQueryCache().notify({query:B(this,he),type:"observerResultsUpdated"})})},Cv);function IP(e,t){return ln(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ob(e,t){return IP(e,t)||e.state.data!==void 0&&F0(e,t,t.refetchOnMount)}function F0(e,t,n){if(ln(t.enabled,e)!==!1&&po(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Jg(e,t)}return!1}function sb(e,t,n,r){return(e!==t||ln(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Jg(e,n)}function Jg(e,t){return ln(t.enabled,e)!==!1&&e.isStaleByTime(po(t.staleTime,e))}function BP(e,t){return!nd(e.getCurrentResult(),t)}function ib(e){return{onFetch:(t,n)=>{var u,f,d,h,p;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],i=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let m=!1;const v=w=>{CP(w,()=>t.signal,()=>m=!0)},y=X3(t.options,t.fetchOptions),g=async(w,x,E)=>{if(m)return Promise.reject();if(x==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:x,direction:E?"backward":"forward",meta:t.options.meta};return v(O),O})(),S=await y(k),{maxPages:_}=t.options,N=E?xP:vP;return{pages:N(w.pages,S,_),pageParams:N(w.pageParams,x,_)}};if(o&&s.length){const w=o==="backward",x=w?NP:ab,E={pages:s,pageParams:i},A=x(r,E);a=await g(E,A,w)}else{const w=e??s.length;do{const x=c===0?i[0]??r.initialPageParam:ab(r,a);if(c>0&&x==null)break;a=await g(a,x),c++}while(c<w)}return a};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ab(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function NP(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var zc,qn,dt,Xo,Vn,zr,Ev,PP=(Ev=class extends tC{constructor(t){super();ne(this,Vn);ne(this,zc);ne(this,qn);ne(this,dt);ne(this,Xo);G(this,zc,t.client),this.mutationId=t.mutationId,G(this,dt,t.mutationCache),G(this,qn,[]),this.state=t.state||sC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,qn).includes(t)||(B(this,qn).push(t),this.clearGcTimeout(),B(this,dt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,qn,B(this,qn).filter(n=>n!==t)),this.scheduleGc(),B(this,dt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,qn).length||(this.state.status==="pending"?this.scheduleGc():B(this,dt).remove(this))}continue(){var t;return((t=B(this,Xo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,c,l,u,f,d,h,p,m,v,y,g,w,x,E,A,k;const n=()=>{ae(this,Vn,zr).call(this,{type:"continue"})},r={client:B(this,zc),meta:this.options.meta,mutationKey:this.options.mutationKey};G(this,Xo,eC({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(S,_)=>{ae(this,Vn,zr).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{ae(this,Vn,zr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,dt).canRun(this)}));const o=this.state.status==="pending",s=!B(this,Xo).canStart();try{if(o)n();else{ae(this,Vn,zr).call(this,{type:"pending",variables:t,isPaused:s}),B(this,dt).config.onMutate&&await B(this,dt).config.onMutate(t,this,r);const _=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t,r));_!==this.state.context&&ae(this,Vn,zr).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const S=await B(this,Xo).start();return await((l=(c=B(this,dt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this,r)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,S,t,this.state.context,r)),await((h=(d=B(this,dt).config).onSettled)==null?void 0:h.call(d,S,null,this.state.variables,this.state.context,this,r)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,S,null,t,this.state.context,r)),ae(this,Vn,zr).call(this,{type:"success",data:S}),S}catch(S){try{await((y=(v=B(this,dt).config).onError)==null?void 0:y.call(v,S,t,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((w=(g=this.options).onError)==null?void 0:w.call(g,S,t,this.state.context,r))}catch(_){Promise.reject(_)}try{await((E=(x=B(this,dt).config).onSettled)==null?void 0:E.call(x,void 0,S,this.state.variables,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,S,t,this.state.context,r))}catch(_){Promise.reject(_)}throw ae(this,Vn,zr).call(this,{type:"error",error:S}),S}finally{B(this,dt).runNext(this)}}},zc=new WeakMap,qn=new WeakMap,dt=new WeakMap,Xo=new WeakMap,Vn=new WeakSet,zr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),He.batch(()=>{B(this,qn).forEach(r=>{r.onMutationUpdate(t)}),B(this,dt).notify({mutation:this,type:"updated",action:t})})},Ev);function sC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pr,An,$c,Av,TP=(Av=class extends Ji{constructor(t={}){super();ne(this,pr);ne(this,An);ne(this,$c);this.config=t,G(this,pr,new Set),G(this,An,new Map),G(this,$c,0)}build(t,n,r){const o=new PP({client:t,mutationCache:this,mutationId:++ml(this,$c)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){B(this,pr).add(t);const n=Wl(t);if(typeof n=="string"){const r=B(this,An).get(n);r?r.push(t):B(this,An).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,pr).delete(t)){const n=Wl(t);if(typeof n=="string"){const r=B(this,An).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&B(this,An).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Wl(t);if(typeof n=="string"){const r=B(this,An).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Wl(t);if(typeof n=="string"){const o=(r=B(this,An).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){He.batch(()=>{B(this,pr).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,pr).clear(),B(this,An).clear()})}getAll(){return Array.from(B(this,pr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Zw(n,r))}findAll(t={}){return this.getAll().filter(n=>Zw(t,n))}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return He.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ct))))}},pr=new WeakMap,An=new WeakMap,$c=new WeakMap,Av);function Wl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mr,Xr,Tt,gr,Ar,hu,D0,kv,OP=(kv=class extends Ji{constructor(n,r){super();ne(this,Ar);ne(this,mr);ne(this,Xr);ne(this,Tt);ne(this,gr);G(this,mr,n),this.setOptions(r),this.bindMethods(),ae(this,Ar,hu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=B(this,mr).defaultMutationOptions(n),nd(this.options,r)||B(this,mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,Tt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ws(r.mutationKey)!==ws(this.options.mutationKey)?this.reset():((o=B(this,Tt))==null?void 0:o.state.status)==="pending"&&B(this,Tt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=B(this,Tt))==null||n.removeObserver(this)}onMutationUpdate(n){ae(this,Ar,hu).call(this),ae(this,Ar,D0).call(this,n)}getCurrentResult(){return B(this,Xr)}reset(){var n;(n=B(this,Tt))==null||n.removeObserver(this),G(this,Tt,void 0),ae(this,Ar,hu).call(this),ae(this,Ar,D0).call(this)}mutate(n,r){var o;return G(this,gr,r),(o=B(this,Tt))==null||o.removeObserver(this),G(this,Tt,B(this,mr).getMutationCache().build(B(this,mr),this.options)),B(this,Tt).addObserver(this),B(this,Tt).execute(n)}},mr=new WeakMap,Xr=new WeakMap,Tt=new WeakMap,gr=new WeakMap,Ar=new WeakSet,hu=function(){var r;const n=((r=B(this,Tt))==null?void 0:r.state)??sC();G(this,Xr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},D0=function(n){He.batch(()=>{var r,o,s,i,a,c,l,u;if(B(this,gr)&&this.hasListeners()){const f=B(this,Xr).variables,d=B(this,Xr).context,h={client:B(this,mr),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=B(this,gr)).onSuccess)==null||o.call(r,n.data,f,d,h)}catch(p){Promise.reject(p)}try{(i=(s=B(this,gr)).onSettled)==null||i.call(s,n.data,null,f,d,h)}catch(p){Promise.reject(p)}}else if((n==null?void 0:n.type)==="error"){try{(c=(a=B(this,gr)).onError)==null||c.call(a,n.error,f,d,h)}catch(p){Promise.reject(p)}try{(u=(l=B(this,gr)).onSettled)==null||u.call(l,void 0,n.error,f,d,h)}catch(p){Promise.reject(p)}}}this.listeners.forEach(f=>{f(B(this,Xr))})})},kv),Hn,Sv,RP=(Sv=class extends Ji{constructor(t={}){super();ne(this,Hn);this.config=t,G(this,Hn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Gg(o,n);let i=this.get(s);return i||(i=new jP({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){B(this,Hn).has(t.queryHash)||(B(this,Hn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=B(this,Hn).get(t.queryHash);n&&(t.destroy(),n===t&&B(this,Hn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){He.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Hn).get(t)}getAll(){return[...B(this,Hn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Xw(t,r)):n}notify(t){He.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){He.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){He.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Hn=new WeakMap,Sv),Me,Zr,eo,yi,wi,to,bi,vi,jv,MP=(jv=class{constructor(e={}){ne(this,Me);ne(this,Zr);ne(this,eo);ne(this,yi);ne(this,wi);ne(this,to);ne(this,bi);ne(this,vi);G(this,Me,e.queryCache||new RP),G(this,Zr,e.mutationCache||new TP),G(this,eo,e.defaultOptions||{}),G(this,yi,new Map),G(this,wi,new Map),G(this,to,0)}mount(){ml(this,to)._++,B(this,to)===1&&(G(this,bi,Qg.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Me).onFocus())})),G(this,vi,rd.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Me).onOnline())})))}unmount(){var e,t;ml(this,to)._--,B(this,to)===0&&((e=B(this,bi))==null||e.call(this),G(this,bi,void 0),(t=B(this,vi))==null||t.call(this),G(this,vi,void 0))}isFetching(e){return B(this,Me).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,Zr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Me).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=B(this,Me).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(po(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return B(this,Me).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=B(this,Me).get(r.queryHash),s=o==null?void 0:o.state.data,i=yP(t,s);if(i!==void 0)return B(this,Me).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return He.batch(()=>B(this,Me).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Me).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=B(this,Me);He.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=B(this,Me);return He.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=He.batch(()=>B(this,Me).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ct).catch(Ct)}invalidateQueries(e,t={}){return He.batch(()=>(B(this,Me).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=He.batch(()=>B(this,Me).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ct)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ct)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=B(this,Me).build(this,t);return n.isStaleByTime(po(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ct).catch(Ct)}fetchInfiniteQuery(e){return e.behavior=ib(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ct).catch(Ct)}ensureInfiniteQueryData(e){return e.behavior=ib(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rd.isOnline()?B(this,Zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,Me)}getMutationCache(){return B(this,Zr)}getDefaultOptions(){return B(this,eo)}setDefaultOptions(e){G(this,eo,e)}setQueryDefaults(e,t){B(this,yi).set(ws(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,yi).values()],n={};return t.forEach(r=>{Bc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){B(this,wi).set(ws(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,wi).values()],n={};return t.forEach(r=>{Bc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,eo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Kg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,eo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,Me).clear(),B(this,Zr).clear()}},Me=new WeakMap,Zr=new WeakMap,eo=new WeakMap,yi=new WeakMap,wi=new WeakMap,to=new WeakMap,bi=new WeakMap,vi=new WeakMap,jv);function LP(e){return JSON.stringify(e,(t,n)=>FP(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):typeof n=="bigint"?n.toString():n)}function FP(e){if(!cb(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!cb(n)||!n.hasOwnProperty("isPrototypeOf"))}function cb(e){return Object.prototype.toString.call(e)==="[object Object]"}function sf(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:o,initialDataUpdatedAt:s,maxPages:i,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:f,queryKeyHashFn:d,retry:h,retryDelay:p,structuralSharing:m,getPreviousPageParam:v,getNextPageParam:y,initialPageParam:g,_optimisticResults:w,enabled:x,notifyOnChangeProps:E,placeholderData:A,refetchInterval:k,refetchIntervalInBackground:S,refetchOnMount:_,refetchOnReconnect:N,refetchOnWindowFocus:O,retryOnMount:P,select:R,staleTime:V,suspense:M,throwOnError:F,config:$,connector:T,query:L,...D}=e;return D}function DP(e){return{mutationFn(t){return HB(e,t)},mutationKey:["connect"]}}function UP(e){return{mutationFn(t){return rN(e,t)},mutationKey:["disconnect"]}}function zP(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return await aN(e,{...s,address:r})??null},queryKey:$P(t)}}function $P(e={}){return["balance",sf(e)]}function WP(e,t={}){return{async queryFn({queryKey:n}){const{name:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("name is required");return lN(e,{...s,name:r})},queryKey:qP(t)}}function qP(e={}){return["ensAvatar",sf(e)]}function VP(e,t={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:o,...s}=n[1];if(!r)throw new Error("address is required");return uN(e,{...s,address:r})},queryKey:HP(t)}}function HP(e={}){return["ensName",sf(e)]}function QP(e,t={}){return{gcTime:0,async queryFn({queryKey:n}){const{connector:r}=t,{connectorUid:o,scopeKey:s,...i}=n[1];return dN(e,{...i,connector:r})},queryKey:GP(t)}}function GP(e={}){const{connector:t,...n}=e;return["walletClient",{...sf(n),connectorUid:t==null?void 0:t.uid}]}function KP(e){return{mutationFn(t){return hN(e,t)},mutationKey:["signMessage"]}}function YP(e){return{mutationFn(t){return mN(e,t)},mutationKey:["switchChain"]}}var iC=j.createContext(void 0),Xg=e=>{const t=j.useContext(iC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},JP=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(iC.Provider,{value:e,children:t})),aC=j.createContext(!1),XP=()=>j.useContext(aC);aC.Provider;function ZP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eT=j.createContext(ZP()),tT=()=>j.useContext(eT),nT=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Yg(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},rT=e=>{j.useEffect(()=>{e.clearReset()},[e])},oT=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Yg(n,[e.error,r])),sT=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iT=(e,t)=>e.isLoading&&e.isFetching&&!t,aT=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,lb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cT(e,t,n){var d,h,p,m;const r=XP(),o=tT(),s=Xg(),i=s.defaultQueryOptions(e);(h=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,i);const a=s.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",sT(i),nT(i,o,a),rT(o);const c=!s.getQueryCache().get(i.queryHash),[l]=j.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),f=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(v=>{const y=f?l.subscribe(He.batchCalls(v)):Ct;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),j.useEffect(()=>{l.setOptions(i)},[i,l]),aT(i,u))throw lb(i,l,o);if(oT({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw u.error;if((m=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||m.call(p,i,u),i.experimental_prefetchInRender&&!Nc.isServer()&&iT(u,r)){const v=c?lb(i,l,o):a==null?void 0:a.promise;v==null||v.catch(Ct).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function cC(e,t){return cT(e,_P)}function af(e,t){const n=Xg(),[r]=j.useState(()=>new OP(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const o=j.useSyncExternalStore(j.useCallback(i=>r.subscribe(He.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=j.useCallback((i,a)=>{r.mutate(i,a).catch(Ct)},[r]);if(o.error&&Yg(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function cf(e){const t=cC({...e,queryKeyHashFn:LP});return t.queryKey=e.queryKey,t}function As(e={}){const t=Ke(e);return j.useSyncExternalStore(n=>gN(t,{onChange:n}),()=>Hw(t),()=>Hw(t))}function lC(e={}){const{address:t,query:n={}}=e,r=Ke(e),o=As({config:r}),s=zP(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return cf({...n,...s,enabled:i})}function lT(e={}){const t=Ke(e);return j.useSyncExternalStore(n=>HN(t,{onChange:n}),()=>Qw(t),()=>Qw(t))}function uT(e={}){const t=Ke(e);return j.useSyncExternalStore(n=>wN(t,{onChange:n}),()=>Gw(t),()=>Gw(t))}function dT(e={}){const{mutation:t}=e,n=Ke(e),r=DP(n),{mutate:o,mutateAsync:s,...i}=af({...t,...r});return j.useEffect(()=>n.subscribe(({status:a})=>a,(a,c)=>{c==="connected"&&a==="disconnected"&&i.reset()}),[n,i.reset]),{...i,connect:o,connectAsync:s,connectors:uT({config:n})}}function fT(e={}){const t=Ke(e);return j.useSyncExternalStore(n=>yN(t,{onChange:n}),()=>C0(t),()=>C0(t))}function Zg(e={}){const{mutation:t}=e,n=Ke(e),r=UP(n),{mutate:o,mutateAsync:s,...i}=af({...t,...r});return{...i,connectors:fT({config:n}).map(a=>a.connector),disconnect:o,disconnectAsync:s}}function hT(e={}){const{name:t,query:n={}}=e,r=Ke(e),o=As({config:r}),s=WP(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return cf({...n,...s,enabled:i})}function pT(e={}){const{address:t,query:n={}}=e,r=Ke(e),o=As({config:r}),s=VP(r,{...e,chainId:e.chainId??o}),i=!!(t&&(n.enabled??!0));return cf({...n,...s,enabled:i})}function mT(e={}){const t=Ke(e);return G3.useSyncExternalStoreWithSelector(n=>bN(t,{onChange:n}),()=>E0(t,e),()=>E0(t,e),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function gT(e={}){const{mutation:t}=e,n=Ke(e),r=KP(n),{mutate:o,mutateAsync:s,...i}=af({...t,...r});return{...i,signMessage:o,signMessageAsync:s}}function yT(e={}){const{mutation:t}=e,n=Ke(e),r=YP(n),{mutate:o,mutateAsync:s,...i}=af({...t,...r});return{...i,chains:lT({config:n}),switchChain:o,switchChainAsync:s}}function uC(e={}){const{query:t={},...n}=e,r=Ke(n),o=Xg(),{address:s,connector:i,status:a}=gt({config:r}),c=As({config:r}),l=e.connector??i,{queryKey:u,...f}=QP(r,{...e,chainId:e.chainId??c,connector:e.connector??i}),d=!!((a==="connected"||a==="reconnecting"&&(l!=null&&l.getProvider))&&(t.enabled??!0)),h=j.useRef(s);return j.useEffect(()=>{const p=h.current;!s&&p?(o.removeQueries({queryKey:u}),h.current=void 0):s!==p&&(o.invalidateQueries({queryKey:u}),h.current=s)},[s,o]),cf({...t,...f,queryKey:u,enabled:d,staleTime:Number.POSITIVE_INFINITY})}function dC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fC(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dC(e))&&(r&&(r+=" "),r+=t);return r}var wT="AEkVMQnvDV0B0wKWAQYBQgDpATQAoQDcAIUApwBsAOMAcACTAEUAigBRAHkAPgA/ACwANwAoAGIAHgAvACsAJQAXAC8AHAAhACIALwAVACsAEQAiAAsAGwARABgAFwA7ACoAKwAsADQAFgAtABIAHAAhAA4AHQAdABUAFgAZAA0ADgAXABAAGQAUABIEtAYQASIUOjfDBdMAsQCuPwFnAKUBA10jAK5/Ly8vLwE/pwUJ6/0HPwbkMQVXBVgAPSs5APa2EQbIwQuUCkEDyJ4zAsUKLwKOoQKG2D+Ob4kCxcsCg/IBH98JAPKtAUECLY0KP48A4wDiChUAF9S5yAwLPZ0EG3cA/QI5GL0P6wkGKekFBIFnDRsHLQCrAGmR76WcfwBbBpMjBukAGwA7DJMAWxVbqft7uycM2yDPCLspA7EUOwD3LWujAKF9GAAXBCXXFgEdALkZzQT6CSBMNwmXCYgeG1ZZTOODQgATAAwAFQAOa1QAIQAOAEfuFdg98zlYypXmLgoQHV9NWD3sABMADAAVAA5rIFxAlwDD6wAbADkMxQAbFVup+3EB224cHQVbBeIC0J8CxLAKTBykZRRzGm1M9QC7DWcC4QALLTSJF8mRAoF7ARMbAL0NZwLhAAstAUhQJZFMCgMt+wUyCddpF60B10MASSsSdwIxFiEC6ye5N2sAOeEB9SUAxw7LtQEbY4EAsQUABQCK00kFG8MfBxcAqCfRAaErLQObAGcBChk+7Td0BBgXAKoBxwIhANMrEnM681CwBZA6dyc1SAX6JwVZBVivuAVpO11CEjpYQZd7k2ZfofgLEwPFByXxdyMEo0sCU1MCdRurJwGPo6U1WwNFFwSDYQkA0QarPy8jBykCOV0AawFhH3EAgx0ZAJUBSbcAJ2kXAa/FAzctIUNTAW9ZBmUCZQDxSRcDKQEFAElBAKsAXQBzACu1Bgfz7xmNfwAJIQApALMbRwHRAdsHCzGXeIHoAAoAEQA0AD0AODN3edPAEF8QXAFNCUxsOhULAqwPpgvlERUM0SrL09gANKkH6wNTB+sDUwNTB+sH6wNTB+sDUwNTA1MDUxwK8BrTwBBfD0gEbQWOBYsE1giDJkkRgQcoCNJUDXQeHEcDRQD8IyVJHDuTMwslQkwMTQMH/DZCbKd9OANHMatU9ZCiA8syTzlsAR5xEqAAKg9zHDW1Tn56R3GgCktPrrV/SWJOZwK+Oqg/+AohCZNvu3dOBj0QFyehEPMMLwGxATcN6UvUBO0GNwTFH3kZFQ/JlZgIoS3ZDOkm3y6dgFYj8Sp/BelL8DzZC0lRZA9VC2EJ3zpfgUoDHQEJIocK2Q01CGkQ7wrFZw3hEUEHNQPRSZYAoQb9Cw0dMRWxJgxiqAsFOXMG9xryC4smqxMlevgFzxodBkkBJRr7AMsu44WsWi1cGE9bBf8LISPDFKRQHA0hQLN4RBoXBxElpQKNQ2xKg1EyHo8h8jw5DWIuD1F4B/E8ARlLC308mkanRQoRzj6JPUQiRUwoBDF7LCsnhwnLD4EMtXxuAVUJHQmtDG0TLRETN8EINQcVKZcgJxEIHUaRYJYE85sD7xPNAwcFOwk9Bw8DsRwpEyoVJQUJgSDTAu820S6vAotWfAETBccPIR/bEExH3A7lCJcCYQN/JecAKRUdABMilwg/XwBbj9RTAS7HCMNqaCNwA2MU410RbweNDlMHoxwvFbsc3XDEXgeGBCifqwlXAXEJlQFbBN8IBTVXjJwgPWdPi1QYlyBdQTtd+AItDGEVm0S5h3QChw9nEhcBMQFvBzUM/QJzEekRZxCRCOeGADWxM/Q6IQRLIX8gDQojA0tsygsjJvUM9GUBnxJeAwg0OXfqZ6dgsiAX+QcVMsFBXCHtC45PyQyYGr0YPlQqGeAHuwPvGu8n5kFTBfsDnw86STPqBLkLZQiHCTsARQ6fEwfTGGYKbYzMAS2HAbOVA1ONfwJriwYzBwcAYweDBXXhABkCowifAAEAywNTADUCqQeZABUAgT0BOQMjKwEd4QKLA48ILccBkSsB7yUEF78MEQDzM25GAsOtAoBmZp4F2VQCigJFMQFJIQQBSkNNA6tt3QDXAEcGD9tDARGnRscW3z8B22snAMMA9wABMQcBPQHJAe9pALMBWwstCZ6vsQFJ5SUAfwARZwHTAoUA2QAxAHvtAU8ASQVV9QXPAktFAQ0tFCdTXQG3AxsBLwEJAHUGx4mhxQMbBGkHzwIQFxXdAu8qB7EDItsTyULBAr3aUQAyEgo0CrUKtB9f81wvAi1uPUwACh+kPsM/SgVNO087VDtPO1Q7TztUO087VDtPO1QDk7veu94KaF9BYecMog3QRMQ6RRPXYE1gLhPELbMUvRXKJVIZORq4JwEl4FUFDwAtz2YsCCg0cRe4ADspZIM9Y4IeLApHHONTjVT0LRcArUueM6sNqBsRRDwFQ3XpYiYWCgoeAmR9AmI+V0mrVzccAqHzAmiUAmYFAp+AOBcHAmY3AmYiBGoEewN/DwN+jjkCOXMTOX46Hx8CbBkCMjI4BgJtwwJtquuGL2NBJwFjANoA3QBGAQeUDIkA+ge+AAmxAncrAnaeOwJ5Rz8CeLYZWNdFqkbTAnw7AnrEAn0FAnzsBVUFHEf8SHlfIAAnEUlUSlcRE0rIAtD9AtDISyMDiEsDh+JEwZEuAvKdXP8DA6pLykwpIctNSE2rAos7AorUvRcDGT9jAbMCjjMCjlg8k30CjtUCjlh0UbBTMQZS0FSBApP3ApMIAOUAGFUaVatVzAIsFymRgjLdeGJFNzUCl5sC765YHaQAVSEClosClniYAKVZqFoFfUkANwKWsQKWSlxAXM0CmccCmWBcxl0DFQKclzm+OpkCnBICn5cCnrSGABkLLSYLAp3tAp6OALE5YTBh6wKezwKgagGlAp6bGwKeSqFjxGQjIScCJ6sCJnoCoPcCoEgCotkCocACpisCpcoCp/sAeQKn7mh4aK3/RWoYas0CrN8CrKoCrWMCrP4CVxkCVdgCsd3TAx9KbJMCsrkJArLkE2zcbV9tRFsDJckCtlg3O26MAylBArhaArlDEQK5JnNwMnDdAr0VArvWcJIDMg0CvoRx/gMzbQK+FnMec0sCw8cCwwBzfnRHMUF03AM8owM8lgM9uwLFeALGQwLGDIUCyGVNAshAAslLAskqAmSZAt3OeHVdeKp5IUvMAxifZv4CYfAZ75Ugewdejl63DQLPZwLPaCtHT87vD5sAwqkCz28BJeYDTg5+RwEC3CMC24YC0ksDUlgDU1sA/QNViICFO8cS6VxBghiCz4LKg4kC2sMC2dqEDIRFpzgDhqEAKwNkCoZtVfUAUQLfYQLetG9zAuIr7RAB8ywjAfSXAfLOgwLr7wLpbHUC6vUC6uAA9UMBtQLuhQLrmJamlv8C7jsDhdyYdXDccZ0C8v8AZQOOEpmPAvcPA5FqA5KDAveUAvnVAvhimhiap7czmxoDnX8C/vYBFwA1nxifrwMFiQOmZgOm1QDNwQMGZqGEogEFAwxFAQsBGwdpBl21YwEAtwRnuw2HHq8JABNxNQAfAy8SSQOFewFfIx0AjOsAHQDmnwObjQizBhufwQCnBRG76R09PhZ4BWg3PkArQiFCtF9xEV+8AJbFBTIAkEwZm7k7JmAyEbrPDi8YxhiJyfYFVwVYBVcFWAVjBVgFVwVYBVcFWAVXBVgFVwVYRhUI14VnAgICCmRe6SsEyQOxBi+7uwC7BKe7AOdAKRayBUY+aT5wQj9Ctl91N1/oAFgRM6sAjP7Ma8v8pudGej0mIwQrFic2NX5t32rB8RnCLGkBa9duMBcFXwVqycHJuAjPSVsAAAAKfF59i74AMz+BAAMW0QblrSMFAIzDCwMBDQDlZR09JB9KQrFCvEE4I18nYDYnOCMJwT0KRD9DPng+gT5wPnECiUK8SUI7X8tOT2pNCixrVC9qC24fX+AzOhsJZ5sKYiMrPB0mQqtCvCvMAcv8X8kOHy4JCAkifp3fajotShfJq8msCWXBy8wKYEFfD+UQoxEAk40dRUIlG6ltOc44CjM/Qz5wQj8cBwodTEdsWywtWuG8Egp97R0rQj8cXQhKCQ4zVENCNwQ7Q5wsCoEbLUI/G/UIUyIjGDAxAAWPYfBeCnFkyWALYC0jbkNgGTkCGx5gswYCaxBlTmBNEQFk52AVYJVgfWCzYEtgkWgWFwa1DtxVqbxaC0MWqwG7K83BAh8VABwDHgF5AmwvMJVSgAGKCrhHGgDkI3SOCsoNpk3qAZsCh5xPBUBfAPf3BwA0FlcMC6UMJB+6r0eAgQw0ABUTnyuCCHoC0gtLZREbANhOBnUECh5aADEAtritAJQnCxZvqyQ4nxkBWwGGCfwD2e0PBqoGSga5AB3LValaCbthE4kLLT8OuwG7ASICR1ooKCggHh8hLBImBiEMjQBUAm5XkEmVAW4fD3FHAdN1D85RIBmpsE3qBxEFTF8A9/cHAHoGJGwKKwulODAtx69WDQsAX7wLAGNAlQh6AOpN7yIbvwAxALa4rQCUJy07Ds4CkBh7ULtYyHRyjsOlmw/ZFUkb7AEpEFwSBh/lAccJOhCTBQ8rDDYLABEAs+AiAQIApADhAJiCCrJrOS8AFABbG8YubHYqDcEQAjskHNPhHB4LG30CewTBCqrxbAAnLQ6mLs6hHAe7CQAQOg+7GkcczaF3HgE9Kl8cLs4RGQB9q9ocAuugCAHCAULz5B9lAb4Jtwz6CDwKPgAFwAs9AksNuwi8DTwKvAk8DrsFmAEbawouzqEqD4sa4QHDAREWOwCgCzsLuxC7BBiqe9wAO2sMPAACpgm8BRvQ9QUBvgH6bsoGewG7D00RErwBAQDqAQAAdBVbBhbLFPxvF7sYOxjbL7ZtvgNIqLsAB7sALrsC6w5WAAq7BAAeuwJVICp/FTwVuwG+J+QAsloBvSjgo7vIAAFbAAG7AAJbAALjAAg7AA67AgAbu6VbDr/EAPQAaPuoOwMBu5UnSwDn3Rm7CBp7CKEFCv9wAN+7p7sau6OLeXIG+6mbgwASuwYbCwG8AACGAG27BgALu6c7ARo7ugihnMoBuwvtB8CpOwDhewG/AADlABW7AAb7AAm7AGmLABq7GLuOaRX7AA5rAC5LHgAGuwAXuwghAA1KAcIAt68mAcAAALQADpsAHBsBv/7hCqEABcYLFRXbAAebAEK7AQIAabsAC3sAHbsACLsJoQAFygBunxnVAJEIIQAFygABOwAH2wAdmwghAAaaAAl7ABsrAG0bAOa7gAAIWwAUuwkhAAbKAOOLAAk7C6EOxPtfAAc7AG6cQEgARwADOwAJrQM3AAcbABl7Abv/Aab7AAobAAo7AAn7p+sGuwAJGwADCwAQOwAIPAAUOwARawAPiwAN6wANuwAZCwYWGwAVOwBumxm7ALobLgATOwMAaSsKAOFLAAI7AARSABd7BRsABtAAGLsAC/sAX7sAa/sA5IsBuwAXdgG8AAFyC6EABUoAbXYAB/sA5XsAHGseAXsoUgA5RQD+Bw0McgAoKnABpAUIXgG8XiMMCQdvS2xfKokfPBRiLTYDoQq0AdgAFgLRA24BdnJHUhQhA08CFT4BLAYDc0a8e1J6QAApADEB+wBTCtsAe5AsASsAduUNETJGAUoAVwUAAVABB4rMAHg7BCClAFoA1hUAlWg3H4sAzWuxAM/UFgjCdXMbGFYdCdEBiJCrIlNTTUgSPMKJ+QB/HDdAKSvgEZdPAHIBKSwwKUIZDwMwVQT3xe4AS2XcAGoCcQI/EXo6x3guNdUGBQAQGx0KCAwqBB8dKU5TTgi5ugAKEs0AJgABGgCGAIkAjjUA7gC0AOAAnTwAuwCrAKYAoQDyAJ8A0wCcAOsBDAEHAMAAeQBaAMsAzQEHANcA6wCIAKIBNQDjANgA1QMBByoz1NTU1LbA3M3QzkMyFwFNAVcvRwFVAWQBYwFWAUdLQ0VoDQFOFQcIAzI2DAcAIg0kJiksODo6PT09Pj8OQB5RUVFRU1NSUylUVVdWVhxdYWFgYmEjZmhwb3JycnJycnR0dHR0dHR0dHR0dnZ3dnVbAEDsAEUAlgB0AC4AYvIAigBTAFMAMwJz6QCH//LyAGAAj+wAmwBLAF4AYPn5qgCBAIEAZQBSAK0AHgCyAH8CPAI/APgA4wD6APoA5AD7AOUA5QDkAOIAKQJ3AU0BPAE6AVABOgE6AToBNQE0ATQBNAEYAVQPACsIAABNFwoWAxUWDgCKAJIAogBLAGQYAi0AcABpAJEDEgMkKgMeQT5HKQCLAksAwwJTAqAAugKSApICkgKSApICkgKHApICkgKSApICkgKSApECkQKUApwCkwKSApICkAKQApACkAKOApECcQHQApMCmwKSApICkRZ5CwD6BQOnAl0CNhcBUBA1At4RCisTAUo3E02RAXekPAFlWQD/Az1HAQAAkykeGI9qAClgAGkALgCJA5TMi/CuhFoFuisOwhEBndV0KgsEIzFsATNabAGyAN5+gH9+gH6BgoJ+g4aEfoWIhoCHgoiCiX6Kfot+jIqNfo5+j4KQfpF+kn6TfpSDlYiWgpd+2gLabOEC2GwAgmwkbKAAg2xsBEkERgRIBEsESQRPBEwERwRNBE8ETgRKBEwETwCWZmwAowOIbAC0ZgEFbADJUWxsAM9sAgxsAPZabAD2ARkA9gD0APQA9QD0A31ebNSEI2XAAPYA9AD0APUA9BxsbACJWmwA9gCJARkA9gCJAL4A6AAIAPYAiQN9XmzUhCNlwBxsAPdabAEZAPYA9gD0APQA9QD0APcA9AD0APUA9AN9XmzUhCNlwBxsbACJWmwBGQD2AIkA9gCJAu0A9gCJAL4CNwD3AIkDfV5s1IQjZcAcbAJDATZsAkoBOWwCS8FsbAJXbGwDnwLtA58DnwOgA6ADoAOg1IQjZcAGA31ebBxsbACJWmwBGQOfAIkDnwCJAu0DnwCJAL4CNwOfAInUhCNlwAYDfV5sHGwEPmwAiQQ/AIkGjTFtIDFs1m4DKGwDrAJsbABVWv4VMgJsbACJAmwAVAEAul5sAmxebGwAiV5sAmxebD3YAEls1gJsbEbCxxP/x5BApA0KYFA89AsjTx97EHmJQPyocItC2JnNFRCEnFU6SFTDoI0PxeRNRoNRWkpzVnWW8pTagkNmgf+jGupqZ3eu50LAFnc+OzfJwdub1AdpOy76VnijWNR/CMEevikQkFyQuLuPajxWi9chqOoMJ7qpCN4sx3LJG4Myu8kD68wC6+iAwt+pU1JEeY13rpCVkXSZfinVKn4xZpxsI3Lp8bJLrJ9ujkrIalMRBAcv/GSKEtowzcEn5XmJw2BagB8V2UWJoJHZ14SXhM7p0XeGFOuw6mlvyq99WYp5XxrO6ru9nn4RHcOkJ7hx5UqWtman7yVMLzYXQefQRUdIY70RYQE8+aAzCNSGQkXiHfnHYRMi+xczKDdZLk3AV1gzxkkSHLjBwuq8shIJ+/RAbqjqQbugFhe0rqklu432EERkM5k9y1DXzds46oLqKAx6OhPT2WiqEfhaITn7OF9Y694AmKmUvbpWp0xJqDaf3jeNJXnK6NpnGcFOmbclbARC+5+5U52ufw5b0Hh+2LrrNimvZe4eYmApRsZnJE310SqB+1xB6rSJfnV1f2D0awB18Oc0sXAFqIlgHgWiaZGdvP5CJUSsCTCQUC335+iSkwPlLJJ5lwjTSn9Lw22NbK1Tu8w+bUpHtDRDPho7Gun8aw2Jzu9i+N0Ot/kPMbLAb/rUQ82kfpk85qLDkfxLl39QPDngo72GYh/Xigbpcm1pA23D2ywt3D8GgMOao040wDqkHxOEx0OhC+ZmHiIdjK7yRbfJD2ouZbAedhD3p7s8WDmCJfNforgDYPGAXSI08fTjPZ5B37lc5VXGzc1vJmibDwBNVzXuaUzg7N5H4BxqjhJ+kz9HLUJys7bpBDYAPvbut13AwJCWd059tS8YTYgC8HwrkewBfa1LSSpmMr9uR2EekTiAMH+Mx4AGzgbquccwBDlLmRhgXL/YiLPCEb6d2k5qJ6o800qddABkpqt7NG+sc2uvHZwZs57W1AHTFM1KkMShasADAh2FvzbzJOzVDMS3ZlT2BSFKdnkZFB6JyqJbhm6XANis9TrtzJdlPVp+rl8v3nIke6Jou7m2TKu53Vounupgkz2LzrQPhhatLIG7rfF/gUKWp15X3LKt+ZvuCDSqPUigF9yJntimC1HJR7Yj/dUrLAXWrT+1tnwPJJLGKAlQ5VeNDWRKCTt2vz3rJuo4+gIt75/Mkfl/gSZblZ9r/SEeeosZXneli/xNh1WVCvkRt2RnyyjtMkMqhzXh1PVOCbILqv0r7rGYm0CHIyKdhHL90cl9E1I6eEtQTCt6RXj8M0HHrHCHLVRpNM6WIbT5BCMGVnL0o5895qSRbCJz+5I8PGMhAN/Xrj4BgIdlKqlHtBHqTJwmK169toZ2IWxNzrAbIG7zh85Q/LG2A4yBcaBel52zdunokB0lv3A7kXnTI7M6ZnfZ7nwuj5lkGhqSpW+w5CI/FmRlplBEbnZy1ZxS3DL8rf1YWhO5XivWZBSRh1gFsjjyj3qRG1cm/6ors7WsEif6WRxns1MKDZa6KrbfMQ/swIb+2nb0tqxHeii6FcgVeAjE/Xwac1owx04dJKG8R5YQgHNnEfHf0qb8WOnU0eQSjazq+IK7cSuCqYzPEUB/x+QgGZqM3dBoYvNvZVOHDkbgdilWdagqO5bkybXfLpyMPuGq8mvAAEZGbR6RwXGlW9ErOWTfnjfx6dXFJqBj0OBSGFz4lWQasNOmVJeN4SFWSLfOGB/7ehV5YuoNNROHZEG9ElVuMnqbDMMuDleOt/cN/gsWxGw128mwU8/HxkOKqdTZnI7dHka67WCTf/FmBrxpNCaKJ1GxBTCSS7MNfhNj8S4Gtotg6Z3AM9cAeVROnppUMaiV5jjudLnNqoVrKO1/FijLlAc74kxydxKX1RQuMqHR63eecYr5o6MJ+B78VsLlCrpelWh6GOrCOBIoQmIcdpJL1pwE2zzZqBkecGTdK8KMOB6r1eNRURyrz6M899TZaoS/vNOxHf+5gORU+OyYIcIW6diP25GHF6u8TNjuL/GJzCnLLXd01KrsjRa51v4+O/VIAWXESJxfxWjv628J+cWUQpoD+Yytzs3jSMRJ23/XT+vUdtUMLDQq1vnIoeg/GjWh88MT6k9dRqDaQ+vodilFgvjuNw5pJpId9mfwyYeLCGb3BmHXdfQfhfPRQaupe/f8TG4Bk3eDKlYBaEK3kZYNN2Sdxz47m/vYBxvIOKtnqplB1pebzuXmAr/MuzQCknKe653dzaWQQ7MUhWYWvzIZwLe1v0rXxImLaz+AkAu+sYikhouNF3EW6w4crZ6MuUiDbIAx8XhAfegcvW6x9BPb3/sCxGWu9YyatqExB+TSm69qIkI9IwhjrcnzME+jWBx4mNQm5WwLzUjSyY4FZ0aMF5YFlXUD4hL4XfOeYv5rDe2s2D/Cn+28fZ9UCnOQvXFMnQqfc0G+ZqOWWD9l/liqUPaNQzZjxCHpUAD8Rcc90MniQ02ugHWsUupFUvhC9usY7zNPt5F2jO7qgzhafsQSd50jgLrC6Qx6bpHbXR3WNAu1BzGmwbz+ebGmwTjdy006Y6zipP7n/OJlvSmbq+SY+nefAVKK6EBMPbce5n3IdRI8+vbxCpN53rw3TvgNds1SuMiuLGxt89L71mxPDeanGhyHvOjmO56tnVpoHalQnL6TqNuqKsHjHCIKB4pCgj4WyYPvRvYvqi5EMr7lN3MotPR/KH7JUD1lZbU0QzfbrEBJnuQiVAyAC9vwXWp2TRU1/0aapyAH2cbglEHVAdl+1rb1u147uV0td1eNoQZsqHrIMIYVPXtLk2TIU3cJE08PjoYNDpfF/IcJnYQHl6nsplczX3Rgah4NbJJHl//5scUufqsSd//kbIS406ZWoMP//+jhGUswX/5nVNz/jAj9KmXPtAmMiK+khhbn1w/mELzZMT/WxcW//y/jsHaOM/61oAW/CjYhJtY622/TtMYuP7bilBvbiT3vB9n8IcFPnwM78H0KfhYDRdY5PhWJ4jWRQzB+HT5NVZV56LG82hcQms+jOTT/c9Y9sx5rPi1/wB7f/+c5UfUCKk3iwwCuywUc2MGnAwsXf1E5hoI55x1Q/Qby+sWH8NRjavZ8VaDsdi1NUVhH86BJHX1yaFt1w1OYeL5LVmdN+5Q+KuTvXEPDzUCg6xp0HhsUhTWSe7MZMM/6rsTUb0/nbUE3YQlGGt48kT1/6cnf6yHnvHtQx9EosOXN077yyEq/jE3YTiG/5SEJmXFeocJJ1EAd6vKeK6VEdJLOZ1km/EwOnZWCQpzCLKPHxrfh4yJhGq//2dos2E/3+MOcdW5EsgIdmTQUQetzRy5fQHhDBl37XbWzsqO/cASEDjyst1/8NEROqVAxWnddQV+umJ8IrKVgKvGaTc0GsQ4s8h0Osql5QKwlddPDjJhKInyWqYUKmmlIts+FIcXZ6yM6cljbsjUG2ksSOkuIw4sYHffRNgBOLApvD6XrR6Rt0rV2Uf8IpnIUVnb9Twt91QjAaD/dStSWDxg7aYY+VXIgnuowYdOkjywa2hlgrnI6PjaU3e3UjQ5Yk5mdIJGyHnv3/P+1EkMav1yFyF+FeJE/RXnWBw+Nh0aOo6TGlKX7d+dkP9+brvr79SdtXJtcD/aXBGiMNfG6/NQniQHYQlK78FEHDqOh+bDI0o+2Ub0h53EL/vlzjrBczVEZz2bOtvIL+DIzDkk9nCWt7tlqsq3l9JMtJk3r5HG2iJ9b/X11TG6wwMAjHLQ2oasaMEsydh88QPvI+hmqIHhvalpKoKOueJR0eZ9J8G2alNOIOy98jwvbc87Ewk9d+5G/tUijTmlbjFlDKXV05HalKxaRTrucc73On7yzAPS6f2v4ogiaWyWeV73dv/MsQT5HjRrsYV9dLAcI3T+zC2qEVINyNpEhoKV+xVSuWtT4AhBfpnZ7unIM+HX3msI0HiI+P+z2PFgkjGi5PqEbG/wNIWeRUjPtDEgbbubN+I4JaDLrW9borRBDob7ZFx+JdKeFVUKVeWqb/c88Ol7DhM0suLtuEd8tkDSMTD3DFx8UphPINHMHi51hAPttXL4Ektt/lKEUG/R4qZKohHjVpAcPIMiHyWr6xR8/EWnNJvBFET76yCdk5er7ADB/1bgoImhpSiZ/omZjPKPCEeZsOwvPmXL+1vlJNeGO3TzySmGA1X6e58gLrazDM71jywM1XL8zKHN6G3kB31Y8vLtP982N975SZXk2JwDvmv7AY/aDsFFk1v+nE7/hbvuOWhBH4kuemeYozPk2K22Vx/YGiDTLU7YilpOt29u3RZMBh4UJjlTP5ItxTzWv6ebL9b+GSU1Vsm2S8LMfVfJczaBSqE8J1A4YUjpsALL7++bwCPXFhaufdpDFtBlHb9makeYbqdg9ltvK/HwF/rNE6KrtWUkEcxmTB7Iyu5TiVaIgW/YxzQhpArliIMkOoK5L7ShVtF+DYqV01mk7fwop04hQRwg4KFmr5z9nYf05VVqkSe7gfnx5bxxlQ0qEV0jiwzf064qG11iEqjHcUgDWWsDs/LEGlzX31T5KVL+7D4EoKim7HBagiqRo5JI3WfDBgpKIruWz9j/J6Hp5Q/EJbMWB8NeSMuFarNw3AEYPBJtYQO/4oD/ZgPTSQ06di0EeumX5EbrdThO+fvYEVSxLtZ3AJkee0Xn0sDwNtiiZhJjJRDuG1YRKB1vOulfd9JjHeyu+UHTmrtra/pm+8Rixh4WKiLaLOCxIbZNoWRZSyyUGLPjAaAo+SQBpfO2uruWrzFxLlpvrXJNMCWtlJDKGAnlWK5xpU2tcxXbeD+sbdfwYXt/qTwDk6UqXR/aUt099DhSNl4Nk8mXwpw+b0nvjKOG6Mg1PRXjrMUMANvNgEArv8nMJs3vj1aHi8MHz/UfJWWzkcrSpZTNBhduXlGR7i+ip/THDp5R9KRNcDKECgtwgXg4EFN5HHfikP/XvsoCkHTg+NbsD8Gl6eknk4Arwn/BWGJ0hgW0/gUKrzuGZhub7igRP3abetpIm+24xEOlWl3YKpm2qTBFvX8ddDRvm1LcwnCJuEfZx12qPY9TrntMIQsv316zvpyWnyStX8VU4j6tQk+CWlLBUCJR6MdH9Cp7g2qdn2WM9qFbREmejH09dlWEPm8hPF0L7RxwRRdiCs0DP8ewk6ApoELkKU9hckSdbnXm8UHJmaNXjxv/q0fTTpu8rnl9lN0vQCpDRbCtcz12rGRFEA7Cfg7FhZn5QFkNmv1ZURKEsiZce1nS9K7HrwpC7yJV4Xt3eAVbLJfoXHrtwG60Z8gwaSnmxoL3s2ZlRqggZN/MHo1oUS4L+GwObFI596Ld4Mvi8l+cQmF1gJpkpnDio7TuO35npaMHiWzFqPSX3qNgkIPGuX0qGYnPIVsM901Yu8oZnOZOY1TbtIdFUNKNq2dP8SJ4F/VCEzIjF0/Rh+7UrZj80tC6rognVH3mqa8eCs/lcQU1Pjj98kBmAKDbZUTwosv02UunRR3n0X6c+f73mtwB7/WbQ16gO431EtwZbNG1SM4TZPBnsQSESlsfG2JLQXx5xWf4bmQ/xcVCPISAX5897JxHKLD/Xkgu57+ABR2+MMtEbX64+MNlBHpKC7sjlWVEShf5qA+dGc59LFVlZrX/Enq9z/v+wnZ1HErmxmjJjxOA+hAjVUWgtq6ygAi/8ewJDjUMFw3zhQFtbyTLDPFd21Ji5S5QPZo9nMSxdg1+DGFSN0wlWt7XeYPbHqLfliV0J1kOhQNp0VbUPy0MS2Ms66OxtSWvaULaWHnfAA+sieVVgtjDwN3nKonWapkSKRN8BKKJQpCfqo8RQI5udhfu5s5+7vwsppmAJDgz2GNA7d43VdbV2l/SrvEu4RYslmNJmfSOVbssxAhSYy6WxpIQdDB0FVBpZ6IM8yr81QN+XLZ3n/wed/R+s6LslkxKbzzst/GkRbe6rFmtvJCwr1T44ETM+IMgOnjUO0eG6a1n2w7lwM1oFBvzMUWRkNFOvKcx3oSb5XdenZ5dXsute6nkRypBiSdAtA2fxAd8UdLOZW/MB7fZoEuFheQXijdaF8kuaRZoSeWdKOkKsGYEGaXfaDKTu0WMTcLniQs7KRCz9iK3SP+Y2xIjkfVGqFLSQ6vh+A1u6FdfwXsv1VPMfi2cxmdM+/xTgMXEyo2ZGcQ2YmPsghnYdv2+z48JpGZA4tUK1p1q2VdVxyfypXEXcrxKKtmt8UdW7sHWmKMqDuBBM3J/JUQx8eUYN4pJ5oRqvdiPHU1o/WPjiKvnlCqOdyxlxF54L9PrtLD1NejZ9aZDivVr6ZfMFK1/psVygoPIAnphcJWWb9+5IKMKmgRQULsTPZi6Bw4wP32zVEoKcHpP73CkFAqS98nSaGoWDjDJiaACJn4p5o1jq9R4Q4VcibhXF//LHP0bdf63kRVZdRbbhGe7sDQcyWS5tpkfeYHnff25WK+4FpzLlAcbaKmHdIBqOw3fImx1uqQIADH0TyHzFlqTG6nMoY81svP0T6BIyELMS8tMe+E1p6TFP6sVpZa6VNaTumufD5aj9goRa9SAmdJT4HhI2r0egj8UrgFb8L59wGLnYlzkLAiUd3m/WWIIEU61kPoEjd3gIVy/fiBcgqQqHnoXpL0SqLGdGGgn7DQeVMSYWHfjno1FngIKP9cjYaTlcRP6bZunjHP13/lbVm4awti894pTf/ZNNqr4OR+tDVie/m+rC8QpVnRbsCMPukOH87B2jM4AG6pHuXl1x9SiKdhYJVOhfo/+SCaGjUW2CoogL1FFhFGN9o+acoVLl0SXs/3vrSccmZeAF3NewFuOg/P12QYKQF+SH+KYcNnsAhIAELPBUgre/KRUJEA+KPD0MHRjv+3J/j2Z23MuJmkfy7leWcMsti8wXLSHgXFJTaksx1Woi6oljwxFVIJG12SBSZLNJDbXMYPekmiXT4FclKI35BFgqnYpKfcsr+f8HUXQoHJ9UYZ4J5YMiHHyAxg6eidhodgqJ2Htf/xYEx+G0zXchuzlt8hcAl+AT8NCQ4orFc4DerabF1enA7NTLnvtZh3FUwqIOvY7Q4DYmoDHwXTSw5UNNh6r7j0B/ezMYJMDcw4+6gCTZX4YQ+7Xs8de72vsR3cmfpxIX64/6KR1p3VX4F6vfHEzxzarh8aDH4G1DFoBBM6npXFpK+Rh+WrcFclAeAxi0PoaR9CpOxxGLSdvxKVSw8oOOanG/soKImRopN38AdcUhhM2GT/PgQeSQrG12njuJJD5Z7vWfAZmFybYLdSA91kB4aoBhoj1Z//KNIVVujqaLLRwCkbyn4vh0739C9V9iSjybeOIeSOvNs7LW1a7EUtNoKAnOGML4U8KBXpfrw73WjAszJG4Qscq+Xr3kZWR4Omm0xT6qE9y6FNSpstV4onMZSqCEJ+3VX9qjvdx5QVrM0WXxmPZxejdfnihcFAjzv5PjlTl6ickDbHe6+Lch52pjOPqk+m3RZ+bh2JSMGtFBuODbMchrpRVlt16NTQ05Ps0IDtWlUmWfP2vX8M4YDynIuOZ4Ck91+591B98Gw9fw+yQogTR8CSg0zaJu+rlBo/mr3A+1NziF+kdubz+whc857AZt6DwIBIF5+5yiaaf3ByQp1Fm3sOkZDAzwsYSQTM/Kv6idkugF63FDobDdUY3huruU+sCaBuRR+HmOowvmZoBjZHNh77SXFtmY/oOUE7ifN7nBHAo83S/xvcS6H4Ci2u/9Id62Wv6Ui+zMNLAzhfkTkVcW2BwrnYvpur0ZDlzs+ZLsmGTWvd1892t78gx1YjEJusGcxphjLkV0UfAKlekfSBVWHE2ahk4AbbRmHyL7GYdtKfdlINwrcdJuf3Cee1nfUojDQn/YmItESOFhtLzrkEv4k2XpMU9oaJQ3VUC+1INh6BE68pkHameGJm4Gvdb24Q0fXWxd9Tp3A9mzFSe4qXDGGDIV4AAGV1jIDfveknH1TwWpUT6HiQxKP3AAHJNkJeRlj/mXBmS4S1j8FK6YmpK7jyyAiRbsMCCLoJcx01fvgpMvKQRxu9IOwymconQjD56g7ksOrcOeoTbius4JnGesAS1DtgdaophYsw1wGIsMS3P7K6doE3K5czznqPQLSRRF/Ylzb5NtSKsL33SgskFNCF4khn5LWaDxI23ZRi2hzqN8uW8UzZEBYy68+VtGLSymQrXGUlr2nO2BbBIT5Vh1RmGAyDXaW0FPrpx3wv2UYdFk9tSl+906bMxCuXQaKDQP/U19UEcVGK4gmksL8lAorxQSAOwpeYX9xrZsh6yoGaL/X5O3tgQC8OM+/GvxnW9XvAtu/JxAigydfSmZfqZfg1XOcHNOpLlN8j64OZ36l5qawDBJ62YaTvxeNmm5gowCdBosgcpHOgNgwA+sknN8XmsR2IYChcafl9bGNMZ/nB5guWuvEziv6QI2bP2DtyKWG/qUjZMaxy+wASkkVGtuwGtywkTYG6MYrZBo18vYcww48G/+f+eITA/qMwbLlJC0S3+/ai2pPvkOhRRVmGTuSupaxhIk0xoXLtixCxSAn4Z3OnUS3wBqVscLI4P3GP7i/6gxYsswsVmkvDXFLhO/OKcur8flegCSKiqmVpIRvCzgbjEA0mXPn+RExXY/2OE1f/BYuWpRQY8gCDpMOYBx9Gn4tL3hihSIR1ixh2PIIT7cr2gUJbfs76EKYG52Jk0UZF/PQkBxGuFCEWXnG6ue/hTIqjTRq1sotVrKrwIGHDrITyuanUzbIYdgdEeV88K1VD82TYB2B61Ft+tB1KqHPmT9+hWoaV+iF3SuvtJqvnoLaA8wxrD56AUMULEgzO9SvBcBAfqz/dzMYzwMt/YLszDbmGe1bcHHfFMcvGql9bf/tp+Hrj4q18aNnftGjmXTfws39emn7/5IBxog9MrmftAA5Oq4awenm8HimWO72dwVlHcHmutVMdrMHw+p2vzpzT+B0iIZ+IEpplwWhClcXlxhxAsF3CHRnnaUEqq3ByQ+cqhe5SvR4SFxh/LZoQwtj8QZQGT1BzY2EMpYnUcZWQEPlwFZw+7UryK9qV8KgruYsvyMoK16KI2sN4SOblrVwhyiL8+IBZ8cpUhsJQSU7TFHAi+L2F0sn0y+FtDODlnuif2Mba8QddPZYYxjTsIgkMe3M6+7kXxUfZvbCUlyq71J1eNczGk6Vqw6rSx2K3vM+DjLxDRGzWepTO2qTT/W8S7u0QXcyFUahcB4vq8xCYTpy8iswtnyz7Kx6lgTEQJ9RqkgEIN6DOUqB0uRdeYuDa7AP7Zy9z+ZlTsmVR5vtV71m3dmdtNeWghbr5PnPJtjXAzcvZjxyV96VEx/B1TA0IEQSI50ywGuIbmAYdQg/l/rxhQLX+6uOLyFsaUt6mtjpAJkLfehnB6MlOHnNOrWLvCBqVBS07jcM+4RzLEed3f3/0Xwp92U+nataNHyEgnnuYR6PXEjRLETz0xrt3UglfK7Bn4aNlXG7cZco4lMziLv5+Mh2JCww3mz69Z9ZMRR/xv5EKJ38IFxKd9dw5CgPIXja/gzAshMbF14/qBIgNkdUQeP8YE7SrICGtiTnAKTyA9cXa3OauDHxZOdTP7yuYBzD1UcHstIO16FxF1bRUAlSkszI83YufTchU8OPnnozDl9bS0y6CnnjGwgj9M61cXcZsljjhLeT/Vq+30ScN2PcT/dOoxUDqDS38+OpCCzLDdnwHQc3ECQVIkaxmdPaZTSdfp2jjGzSdNLM5yPQsgJDl+ZnhclDQi8ltUnkqWJ323IvTZPN8rn0+EshL1cx9PiaLTzUsryn9Zp2Nt/detUAh4N/2I3dlMQqjHFxSihv0uykzflq5clMy2ZBaxoEb0/QMp03IQQus3vnZd/NOmSsmgqXqKFP3ozyDgY7RQS+npabe/hNG+5sa5FtvL8v0uYuag2NewYkcol3TOTadpuncCnDgOGpmLnTQ1PEPUN2cNsrW8LYfIv+hzfb7vod+ipXHzmbgj5Fzc6RcT/5PD7VQ8nTJBNj1urkVUx9uJvTWmqY08OC80rGDLaWXv243VB16gjt4Xtwp5H2UDR0LiKW24Ed/sOO8jl1yEU/XAb3h7ScKnCFy/V3sICrkY1D0K9fSokHIL0s5/7DLShLAPXRbV7fbv4qj6OwHC9d5PlEOX3LRpQ3P7hcSAKlIKPDM83ypz56U5+rJeo0cyUtC7wltL8wqEiNSgZsDWzACc7RFoZqhlD0+sihIBQlkQTXmvUyIOZhkQX2zqME5VRC7ms1sa3CY+odMn3mMBiTvCMKnnCxg5ZPLq4GUDB4jF8Br2K4x4sxfWjGXQatJ25I1JyrIv2Z4bP1jKw5C+B2/s0v4dGUOsaS6IPIQV3ETQ+F2fSl2BPBXHzyYN8VmwWIrKeMX9pyGWuAOVXwkxJsRBaBVzLhZDP8ONGncknL5DpTxHN32GgFWMwsc0GmL0oRDmRT8u2lvjAKUIi0MmXhIHSlFeh3Qh5pP6ap4YUd6b569ZIaHgya2AyD12cPxY0In/PBjzDctTaKJCU+xc6m9RkNLDEE8guvxtJP8sl8N9bLqw0F/qejaBlcHYqw31zYpsutQp07hsP1vhGdl4hJ1wA7OCsAHnKj9879uSHILEmuZ6vI1lT4tvnWCVKZhhYrWHW9oPKPKpbOC6FTjf/OtUvwmiXr2ykvyLzHGQeyS7BenZpL3N/CaF5T7Gkml7JXN5cj0PKaDpZVImD61FuMgFHPqSHvt4Ej4KBdAfdcoO3AjQPLwwtKsgGM+ty4lNZMBEItJSRLunG5ckrM/BeoXWoPZVvEoIzLgFQYPupMwZCXis4W2SCJ2zsefZqCj+aTfSq1FYdUj2UeJALvVTf7vuuikOE1Hit3UIAGUi/sqgMum9vw218y1FlY/9XnOji9nqhGAcMYICc7BiqLZj5N+cKEuSAuiyWbMg81ZD1lHovy/we2eaCcCv4MzEW3O0mVA/t2xdA0cxTVbXmFhn+tARDpvDz5ftLr15OAAmvo2QiAky+feVO4bGibv2nlBmBzqx0lEDfEm4UnEs11pbnwZlJ/0Y73/wBPYfTNZiJKR73TzdCW1BffiJq9bLjQmaKnU0+gN8sfe25IKSUCooQwxePDrFn3a/zUgWxvPoTYVXfobY/GV2qqTkeVDV9D8657fhY0/wiaJ5NfLxhXbE/naxs34N0hd6vxNfdm1TCnozm/NKSCThchoYgMF7Z2tzXFovRfsNVkf86JjrM60r7UIuV3bsmfrMOqzjXjN6HPBG25zCJ3QLueySbj9oFvX/HxWBqh31PBPxduCVAxMqC9HK+YL3oBZqBruoh6LKvdMqoz0PYXUBrwbiioyE8Tj5ImjJmiOOWLbAZvIZ/l9rIPljx3T5glJ2ewlfuIT5GlodQsAf/IEtmYkML5SRQGxxwW+rlZkD8belJNu09Itwx9xDULTnemVDeojdbgcd2gKGM9aO00Jivtbs7ZyOSE8IPh98GfvatD8Ud5uHcZfAfMiPSlIxd4UqeSDzuNfbKDuFepkyC/s3j9fawmhY1b9NqDi0ZS5eP35l7rL2eK5QlWLlyCmxx8AFaFiTuD2pMUxZV5mBSJuJduOaq2ZrWpu28DE8jl/hisBz7bGWH6qLF0ayWNq1Sejtcs8KQrQqJk5P9QHDYHOIolgNsMDmEaWcTelghbfFCDqWrq6YLwDWy+m68ec5nShgq2fduUBpQUuKKKgnttaUX9PRfMmxqJyU7e0RLr1bev+ge1KK0bZyhHKKDE8gQX9Vf7rNHWOxBtZcxwwGusyMpH77qWZxXsQmbgIGhtiO+gSSRCyu/ek+OFsz1HMiQH0IHV7PjJi3dszYfFp8ue9h4+AfKte4MTiehPvxNcm/T1t9vsFZx8rHN5ie77r2jzZOq/Em4Q+H9sNcZakf9HnzCc1fJixppxP8FQABmVnqa6GbJhwaka7WH7Wdoz1WxOjSNV8N9sgW5S3Ppgkut+TTCkjA+AodUOk1KIR+8G8S3WrSZG4nyqfJ6FEjXl6a/LEoRMHZUqfPRWvwqrtXYy9IUsmUGzkqi76ib4NANCe5DnyOxnFRZ9d8FdBVBjra3iNuZhJuWW5Omi/hBigqDsg0mu2AhfJDXdwyMIJ33HHHPfS2JtjegRejX11m41TbNL+Qp7mR0g9CPKTj9PIjuSycGN/YPozXI4zarXuAeLv5CHKtKcJKRbd6R2oLNiEt0T8+QIVJH7zt9ncKMgd49vV2P1AyScZ9Qzbu3m3LBnuu6dw7aE0b6r4kzVkI/GUS88mA53L/rLtntkFlZXGtIoqNP2mD3eVv08AVVPT3wJn81zpbJV9SuqZ6Pd1ge0Zz2RFHeCdV5CLPftH9V5o9+VzFu4R0QeumqDwUhXn3IyYotdJnxr1l3BqWnQVAeDBEOtPyJQx1q5+mODiClXtYeBLTWtsJ42AMBcf/IFIhpfhYO08hsg0Ik+DpQFNOKReK3o3cudkxWX0soPtI5eSFOA6yNylS+IQjrQtYQ/5s4UcixJfokumBUjpH9ofSjUTwPCapGFndfqqG5IHeMMvfg+88SXm7bNyjk6pGKzL+WxDAdqKtQ72WWVbOk3I+ueGuammmB2pvFZvqIcU/lvW3n9+r2lycnQLE4OX9R1jIgW4cDjJ3v8dAa66mVcfC7ptCr5io6mCaA9qI9T9FFWqo1ZAaMxgxAu8aXqmaOYryMND2sTUfoHvxcYK7hEiJhCLYFDx3PBhE97c2a0ub1/ePJcyJOqr7UaTAPTJ+xvZtjb/40sloY1ltRnTkWILmIP2b7S3AdXCR+YiArMUHwdncpjpyDGfzqGOUoAuaamWzAMacQtb34/M32FEgR5lUEf8fRzFrZUhzQj0fR7/6gdzdnVVvcSneLmtqJ930VCCDORY8CVdQWdo/S3PNkX3pQsPVKWIYGAMrFZoq8bQ/OJBDSXP7KSBdL3QN0Zqd393p6VFc7DnlnFiN00SY5Nux7yadeIM0Upl2rVsu8/VAI";const ub=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),db=4;function bT(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),o=1,s=[0,1];for(let E=1;E<r;E++)s.push(o+=n());let i=n(),a=t;t+=i;let c=0,l=0;function u(){return c==0&&(l=l<<8|e[t++],c=8),l>>--c&1}const f=31,d=2**f,h=d>>>1,p=h>>1,m=d-1;let v=0;for(let E=0;E<f;E++)v=v<<1|u();let y=[],g=0,w=d;for(;;){let E=Math.floor(((v-g+1)*o-1)/w),A=0,k=r;for(;k-A>1;){let N=A+k>>>1;E<s[N]?k=N:A=N}if(A==0)break;y.push(A);let S=g+Math.floor(w*s[A]/o),_=g+Math.floor(w*s[A+1]/o)-1;for(;!((S^_)&h);)v=v<<1&m|u(),S=S<<1&m,_=_<<1&m|1;for(;S&~_&p;)v=v&h|v<<1&m>>>1|u(),S=S<<1^h,_=(_^h)<<1|h|1;g=S,w=1+_-S}let x=r-4;return y.map(E=>{switch(E-x){case 3:return x+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return x+256+(e[a++]<<8|e[a++]);case 1:return x+e[a++];default:return E-1}})}function vT(e){let t=0;return()=>e[t++]}function hC(e){return vT(bT(xT(e)))}function xT(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((o,s)=>t[o.charCodeAt(0)]=s);let n=e.length,r=new Uint8Array(6*n>>3);for(let o=0,s=0,i=0,a=0;o<n;o++)a=a<<6|t[e.charCodeAt(o)],i+=6,i>=8&&(r[s++]=a>>(i-=8));return r}function CT(e){return e&1?~e>>1:e>>1}function ET(e,t){let n=Array(e);for(let r=0,o=0;r<e;r++)n[r]=o+=CT(t());return n}function Pc(e,t=0){let n=[];for(;;){let r=e(),o=e();if(!o)break;t+=r;for(let s=0;s<o;s++)n.push(t+s);t+=o+1}return n}function pC(e){return Tc(()=>{let t=Pc(e);if(t.length)return t})}function mC(e){let t=[];for(;;){let n=e();if(n==0)break;t.push(AT(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(kT(n,e))}return t.flat()}function Tc(e){let t=[];for(;;){let n=e(t.length);if(!n)break;t.push(n)}return t}function gC(e,t,n){let r=Array(e).fill().map(()=>[]);for(let o=0;o<t;o++)ET(e,n).forEach((s,i)=>r[i].push(s));return r}function AT(e,t){let n=1+t(),r=t(),o=Tc(t);return gC(o.length,1+e,t).flatMap((i,a)=>{let[c,...l]=i;return Array(o[a]).fill().map((u,f)=>{let d=f*r;return[c+f*n,l.map(h=>h+d)]})})}function kT(e,t){let n=1+t();return gC(n,1+e,t).map(o=>[o[0],o.slice(1)])}function ST(e){let t=[],n=Pc(e);return o(r([]),[]),t;function r(s){let i=e(),a=Tc(()=>{let c=Pc(e).map(l=>n[l]);if(c.length)return r(c)});return{S:i,B:a,Q:s}}function o({S:s,B:i},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&t.push(a);for(let l of i)for(let u of l.Q)o(l,[...a,u],c)}}}function jT(e){return e.toString(16).toUpperCase().padStart(2,"0")}function yC(e){return`{${jT(e)}}`}function _T(e){let t=[];for(let n=0,r=e.length;n<r;){let o=e.codePointAt(n);n+=o<65536?1:2,t.push(o)}return t}function Fi(e){let n=e.length;if(n<4096)return String.fromCodePoint(...e);let r=[];for(let o=0;o<n;)r.push(String.fromCodePoint(...e.slice(o,o+=4096)));return r.join("")}function IT(e,t){let n=e.length,r=n-t.length;for(let o=0;r==0&&o<n;o++)r=e[o]-t[o];return r}var BT="AEUDWAHSCGYATwDVADIAdgAiADQAFAAtABQAIQAPACcADQASAAsAGQAJABIACQARAAUACwAFAAwABQAQAAMABwAEAAoABQAJAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACwANAA0AAwAKAAkABAAdAAYAZwDTAecDNACxCmIB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgPi89uj00MsvBXxEPAGPCDwBnQKoEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJEMAJpIBpob5AERSMAKNoAXqaQLRBMCzEiC+AZ4EWRJJFbEu7QDQLARtEbgECxDwAb/RyAk1AV4nD2cEQQKTAzsAGpobPgAahAGPCrysdy0OAKwAfFIcBAQFUmoA/PtZADkBIadVj2UMUgx5Il4ANQC9vLIBDAHUGVsQ8wCzfQIbGVcCHBZHAZ8CBAgXOhG7AqMZ4M7+1M0UAPDNAWsC+mcJDe8AAQA99zkEXLICyQozAo6lAobcP5JvjQLFzwKD9gU/OD8FEQCtEQL6bW+nAKUEvzjDHsuRyUvOFHcacUz5AqIFRSE2kzsBEQCuaQL5DQTlcgO6twSpTiUgCwIFCAUXBHQEqQV6swAVxUlmTmsCwjqsP/wKJQmXb793UgZBEBsnpRD3DDMBtQE7De1L2ATxBjsEyR99GRkPzZWcCKUt3QztJuMuoYBaI/UqgwXtS/Q83QtNUWgPWQtlCeM6Y4FOAyEBDSKLCt0NOQhtEPMKyWsN5RFFBzkD1UmaAKUHAQsRHTUVtSYQYqwLCTl3Bvsa9guPJq8TKXr8BdMaIQZNASka/wDPLueFsFoxXBxPXwYDCyUjxxSoUCANJUC3eEgaGwcVJakCkUNwSodRNh6TIfY8PQ1mLhNRfAf1PAUZTwuBPJ5Gq0UOEdI+jT1IIklMLAQ1fywvJ4sJzw+FDLl8cgFZCSEJsQxxEzERFzfFCDkHGS2XJCcVCCFGlWCaBPefA/MT0QMLBT8JQQcTA7UcLRMuFSkFDYEk1wLzNtUuswKPVoABFwXLDyUf3xBQR+AO6QibAmUDgyXrAC0VIQAXIpsIQ2MAX4/YUwUuywjHamwjdANnFOdhEXMHkQ5XB6ccMxW/HOFwyF4Lhggoo68JWwF1CZkBXwTjCAk1W4ygIEFnU4tYGJsgYUE/XfwCMQxlFZ9EvYd4AosPaxIbATUBcwc5DQECdxHtEWsQlQjrhgQ1tTP4OiUETyGDIBEKJwNPbM4LJyb5DPhpAaMSYgMMND137merYLYkF/0HGTLFQWAh8QuST80MnBrBGEJULhnkB78D8xrzJ+pBVwX/A6MDEzpNM+4EvQtpCIsJPwBJDqMXB9cYagpxjNABMYsBt5kDV5GDAm+PBjcHCwBnC4cFeeUAHQKnCKMABQDPA1cAOQKtB50AGQCFQQE9AycvASHlAo8DkwgxywGVLwHzKQQbwwwVAPc3bkoCw7ECgGpmogXdWAKOAkk1AU0lBAVOR1EDr3HhANsASwYT30cBFatKyxrjQwHfbysAxwD7AAU1BwVBAc0B820AtwFfCzEJorO1AU3pKQCDABVrAdcCiQDdADUAf/EBUwBNBVn5BdMCT0kBETEYK1dhAbsDHwEzAQ0AeQbLjaXJBx8EbQfTAhAbFeEC7y4HtQEDIt8TzULFAr3eVaFgAmSBAmJCW02vWzcgAqH3AmiYAmYJAp+EOBsLAmY7AmYmBG4EfwN/EwN+kjkGOXcXOYI6IyMCbB0CMjY4CgJtxwJtru+KM2dFKwFnAN4A4QBKBQeYDI0A/gvCAA21AncvAnaiPwJ5S0MCeLodXNtFrkbXAnw/AnrIAn0JAnzwBVkFIEgASH1jJAKBbQKAAAKABQJ/rklYSlsVF0rMAtEBAtDMSycDiE8Dh+ZExZEyAvKhXQMDA65LzkwtJQPPTUxNrwKLPwKK2MEbBx1DZwW3Ao43Ao5cQJeBAo7ZAo5ceFG0UzUKUtRUhQKT+wKTDADpABxVHlWvVdAGLBsplYYy4XhmRTs5ApefAu+yWCGoAFklApaPApZ8nACpWaxaCYFNADsClrUClk5cRFzRApnLAplkXMpdBxkCnJs5wjqdApwWAp+bAp64igAdDzEqDwKd8QKekgC1PWE0Ye8CntMCoG4BqQKenx8Cnk6lY8hkJyUrAievAiZ+AqD7AqBMAqLdAqHEAqYvAqXOAqf/AH0Cp/JofGixAANJahxq0QKs4wKsrgKtZwKtAgJXHQJV3AKx4dcDH05slwKyvQ0CsugXbOBtY21IXwMlzQK2XDs/bpADKUUCuF4CuUcVArkqd3A2cOECvRkCu9pwlgMyEQK+iHICAzNxAr4acyJzTwLDywLDBHOCdEs1RXTgAzynAzyaAz2/AsV8AsZHAsYQiQLIaVECyEQCyU8CyS4CZJ0C3dJ4eWF4rnklS9ADGKNnAgJh9BnzlSR7C16SXrsRAs9rAs9sL0tT0vMTnwDGrQLPcwEp6gNOEn5LBQLcJwLbigLSTwNSXANTXwEBA1WMgIk/AMsW7WBFghyC04LOg40C2scC2d6EEIRJpzwDhqUALwNkDoZxWfkAVQLfZQLeuHN3AuIv7RQB8zAnAfSbAfLShwLr8wLpcHkC6vkC6uQA+UcBuQLuiQLrnJaqlwMC7j8DheCYeXDgcaEC8wMAaQOOFpmTAvcTA5FuA5KHAveYAvnZAvhmmhyaq7s3mx4DnYMC/voBGwA5nxyfswMFjQOmagOm2QDRxQMGaqGIogUJAwxJAtQAPwMA4UEXUwER8wNrB5dnBQCTLSu3r73bAYmZFH8RBDkB+ykFIQ6dCZ8Akv0TtRQrxQL3LScApQC3BbmOkRc/xqdtQS4UJo0uAUMBgPwBtSYAdQMOBG0ALAIWDKEAAAoCPQJqA90DfgSRASBFBSF8CgAFAEQAEwA2EgJ3AQAF1QNr7wrFAgD3Cp8nv7G35QGRIUFCAekUfxE0wIkABAAbAFoCRQKEiwAGOlM6lI1tALg6jzrQAI04wTrcAKUA6ADLATqBOjs5/Dn5O3aJOls7nok6bzkYAVYBMwFsBS81XTWeNa01ZjV1NbY1xTWCNZE10jXhNZ41rTXuNf01sjXBNgI2ETXGNdU2FjYnNd417TYuNj02LjUtITY6Nj02PDbJNwgEkDxXNjg23TcgNw82yiA3iTcwCgSwPGc2JDcZN2w6jTchQtRDB0LgQwscDw8JmyhtKFFVBgDpfwDpsAD+mxQ91wLpNSMArQC9BbeOkRdLxptzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgELgEaJZkC7aMAoQCjBcGOmxdNxrsBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUHqSvAj5Gqwr7YrMUACT9AN3rpF27H7fsd/twPt4l+UW1yQYKBt2Cgy7qJpGiLcdE2P1cQSImUbqJ6ICH27H4knQMIRMrFkHu3sx6tC35Y+eLIh4e4CMKJ4DfyV+8mfta499RCAJ0xfeZR8PsoYOApva9pjGn4PhvyZS7/h5JLuhaucfjuU+Z584wwqNO4hWYmaBCcjgQPale1bjoHzMUbut/zTgxHxBnAyrdKpF4IRMASLBtD/jviyLeCgj8twWjAd3HchN/uqaeRYeHJgl7JEY9/cTrvtfybx/r3Y/NtxJ9dp+MTVmiS9bwBH73s8Di56/Ma+mTPMHq4T1yEG1fWcqr0u+hrGnJEvU1JJAm/maQSrKrazIyvSkDFkj8UUlfBq8baniTGPng6YZRL661rDNw4w/1g2figG0IhXnL7wosd/sVNo5dYSmMBTP5c7rYLjRdCwg8quwljOMPf63D8ICAL0r71XRiyFHdgwHbwfgnPOf4Lzjf2v+j+IiDHG2isp5yUnzSDyDRb4i/Vs0qHSHq8PiEQ/JnBP7PxnjN0j6gT4AVAeRx/1o9VnEUlUwvFrzJqHk9jxAw4sYxCnrxaeBdCFFKbnE7z+x54F5W7ZZsU6kx8Qocul6FoAHHy01FGL/nne61mn4+uYXfQ1Uccn+HMLKE+cZzT8BB1E3FRskOgJrRsq25rauLm8+uamXpkS/bTy6y1wDbCrW4eD532kTWrtNUmVVZOIn/C+/JR9KVR5iG9TY8iaT67ubm/whL1xbKZoqtY+a6fNxMJrg211bGYJDUkYMNWA0BMB++9zOm6Eik4roqs9CCEFW0lyAK0PbvlzvoxrZuY/OEhNW/l/63U15Od/RSvmDvXpGLiVmeGi5PDSH2bYz5o2g6wFDQ2FbZgYgTF8rPlvA1ifjZD3NLtFdXdpSIJvgKR7GpjJWG7GZGawPomIH8B5tUmtHH9LpM+/KQKunEPa1GiQkCXv4Cnm9DLORo2joicHdPDZ64obQrPZ5bgqckkj0G6/NEiPYBY4bCkL7W8G5YzsUb6GakFjykSPkT7JGeLeB6uJOGMm+x7N381BCDfbJFx0dtLgV9Q477BfL1fvitX5anV/oYfxeYl+eF5x5bB8+Ep/L2nsmd56aKF4aAD4GbJWsdKyBW22xEmAD3XdbtsMyAFoR5mOla0gEd9U/YVB7zvHGpHbQonay9Sv0bQ8iZ8piaXVrKc5AG1AmqqgaEvzHSP2Wux7aZTWh6quVDVU01JtMIVRdCFwlSbbqqhoFlyzsotQzRexFvZ/MqUSFu3OhRIuNBbufvBpdVgb8XdGJ48/lJPCZ7dsOujTTbKPSEvGXkOnG2Xdi8/nM3EMRqITd5QeU7iOjKqC7URJY6TnLsHij22xAHKnVRD5MDtBYnoGFqZGMDmXCW6Oj+BAWw14hESY/xLF6bLku06AHkiXTHPCFZ0f9YSqqo27eAhhS67OrA2Het4M9JM3jm/yRX6bYxnfmzYl5qQdHxN08FsNuWDrWd4vMUY2QD3hr8vS73SCTkFoXZR3xNzOQt8d/6HfjBmXqvrE6EGkLzK6YK2U2/ksU/iUH+LvVIsJI+ri2AL/klo+ShdDyfs5A83i2prkMs51IKR7ZcqjZJi5X3+bd8GlyWvtddxKEoEqSgEO7A8jIgf2nH0h8FjM7oB6yte3X5mpL0i/E4Rx0CotKnILJj/vJqo4VkPQ93jRtRVfaitQPqldl5xRYPq8387Z0DcnZvOeION0Ht1+P27kFLGQIcLBX4FG3sffccNHh5cPfzp9INoRtqVtdViJfg8RjnXiIz/MNqEN6zvzX3hMzyWC7oSoXIT14ubc0abPX8Rp9GVa5NI/8iv+6ela1oTncbdimRKnrbRffDR/X4nH+bgqAuHWl7hOaeXPWVzIeRl7ga+JzD4Sx3mlj/q6Ra/E2HhDf21eEzTLNGfCZsY+/yxZzQzIAuijG65ii4O/waAJCrEJaWd/DRAKMQ5678Dw5AT7RCKzdadIwd8LsD+DgPBASmWsUlf8R0k1w/2k4lO2Wpb4zMI6EJVJs0xk/wn8/fRUPqrDKhbjHR41SqgFMx5RGMPuduFwlu5lK89tW11sTqiX/5EfGs5nO+y9FKvgXKPOEmgE05EKNL6Sjb3xS40H3BVPhm0ESOZgAjZoymc8be0inDVo4JdJVf+NKd3tN/CaB7GShhH27qf95NoFZVX/6ZkR2lX+CgWrQ2INgkh+bbMz68+uJ3Clsh8HSMPEQtAt+BBE6fXDab7KIlsKxU1lIXW/KWVstpdPanJ0pdXpQinDyUQjtY7ZVcfiecRxRDMAUhHFU2cEaciQ+htiPMPx1kdvtWG9T44w3r037ljHBFJdYR0r55qvMRixtAEFJAqA4T1ES87FAx7UozXasytg8MftZYt0rjYgLe6EJ5aWvy2qscBSBQ7yehoJIA3wIIZ9ukfkyBb6qnue5ko8W50rpV4kXqWjI5nbGRXrNW0tBZHXlY48nSgcUXBHWT4GcgLZJoLlKJnV96kCYpq9eWHh7xJzkCAyrQuQ5AJ0qq/uZ3toJglNterev+Qm0KXxPg/+YbFRJdfhbp1wOnVOEYdVHTya6CtO0afhEaBhx3oHwCb5Kq6RwHDzFMl2vfjL8GwzcCoTj7wZe+UFnYDV2yKpPU9dba29gYBdNqJg/KXozO+CJTlKmlKhnqTf5doeS35DZFV+cYJQVjd+oVY/Gtc/6XPzUxb1gMqf6cEjNNoRC8AObrp+fx0cVtGu4ffC2TgXRC8zPl8moUHCB5HZ25d87mlsiiK0aNwBtcEQjRNBT/QrXbw/8aVXdKMHn9EqYEKEyxSGTpYQOaes1G1Qq8pDgqkZtlO2HRyCXpmeM7TSrRPkAh004BfisVpF6zP44n2Jvxz/gOVocNCyy9V6lkod28QM4pbaMvVJigD/w3BrsjSJrXlqc4ulBYOCceiBN4b/gHajYyupbhEt63a619Ay4wsL6a6w6B+A7TnoyE7BliWHJfzVxxIKM/W3M/J8Bx99Op863Q8eNuIMGRx++VbYfjm+VGYBA3Ap/KEu/wxBNBpJJncwHPG45V8Gh98ZIrGCc20MwijGowZbcS7d1nEgcOW5cddZpHL2XPAIRbColiheZzXTvBxZOY3iMSDSKDrICyJ/iQs1vdplVdH/JrLJsQ2jtTnfCrITIghq3KFX3qAgLWAIp8IffNSdTYptnbGfc8s+qcr3zyzyHp1aJg+jxTF4kD1ry5Wauv5V3xnOGwTFecNzXSLHBW20/pCQjk4uorD0plIhMSTc79+/r4RKPClRYTBYex1Ob5crtfvRQBBv6re/6FhtCqtduag67glqRA77/3ulblh9YRtMdDxkCyJDeNnAuCLPQFmdRRWJtH20Z8DstfJf+5oj5SSB64d0iF5/Ya4KfTWxfivj9Ap2/zbYaTo/1gO3tM6RYsCZharMBFr7Fm61mLSrQnEI4OF1gbVS4k/JE9UotOrnLJZuswoWodCSV8zbybkJSVIP7n8UaE9xCR39rJZmf27HOAPVOGc9pdkQUcRrI0qyVF9Z3j1RHDbxIfwbWzmPVjwIdPJvtmBYwEQIUsIW1S939hcVikK00ozPRI02cqhzVUNzpOxVdrwRPvlh1aIOf0xFEqD3YkGnCnFah/cFN3J2gB7N+bZSGawwkKFu1tpQMrp1W+27YNkyT0TpcFpTqgOqqLabrgcCUPxh97mREOGy4xItzQ9xSl6rq+8BZsHcrQFReS+QeMxJ3P6CnL9EP/eOLDjumLhvrcQrpPiknsofbzBv9gTP0lU+TIVwE6E7CcKfT36q+ZiEOHJ9ayf0dyUJLezAb2M8aNHwd0+OJmsVgTzRWA";const Oc=44032,od=4352,sd=4449,id=4519,wC=19,bC=21,Di=28,ad=bC*Di,NT=wC*ad,PT=Oc+NT,TT=od+wC,OT=sd+bC,RT=id+Di;function Ia(e){return e>>24&255}function vC(e){return e&16777215}let U0,fb,z0,pu;function MT(){let e=hC(BT);U0=new Map(pC(e).flatMap((t,n)=>t.map(r=>[r,n+1<<24]))),fb=new Set(Pc(e)),z0=new Map,pu=new Map;for(let[t,n]of mC(e)){if(!fb.has(t)&&n.length==2){let[r,o]=n,s=pu.get(r);s||(s=new Map,pu.set(r,s)),s.set(o,t)}z0.set(t,n.reverse())}}function xC(e){return e>=Oc&&e<PT}function LT(e,t){if(e>=od&&e<TT&&t>=sd&&t<OT)return Oc+(e-od)*ad+(t-sd)*Di;if(xC(e)&&t>id&&t<RT&&(e-Oc)%Di==0)return e+(t-id);{let n=pu.get(e);return n&&(n=n.get(t),n)?n:-1}}function CC(e){U0||MT();let t=[],n=[],r=!1;function o(s){let i=U0.get(s);i&&(r=!0,s|=i),t.push(s)}for(let s of e)for(;;){if(s<128)t.push(s);else if(xC(s)){let i=s-Oc,a=i/ad|0,c=i%ad/Di|0,l=i%Di;o(od+a),o(sd+c),l>0&&o(id+l)}else{let i=z0.get(s);i?n.push(...i):o(s)}if(!n.length)break;s=n.pop()}if(r&&t.length>1){let s=Ia(t[0]);for(let i=1;i<t.length;i++){let a=Ia(t[i]);if(a==0||s<=a){s=a;continue}let c=i-1;for(;;){let l=t[c+1];if(t[c+1]=t[c],t[c]=l,!c||(s=Ia(t[--c]),s<=a))break}s=Ia(t[i])}}return t}function FT(e){let t=[],n=[],r=-1,o=0;for(let s of e){let i=Ia(s),a=vC(s);if(r==-1)i==0?r=a:t.push(a);else if(o>0&&o>=i)i==0?(t.push(r,...n),n.length=0,r=a):n.push(a),o=i;else{let c=LT(r,a);c>=0?r=c:o==0&&i==0?(t.push(r),r=a):(n.push(a),o=i)}}return r>=0&&t.push(r,...n),t}function EC(e){return CC(e).map(vC)}function DT(e){return FT(CC(e))}const hb=45,AC=".",kC=65039,SC=1,cd=e=>Array.from(e);function Rc(e,t){return e.P.has(t)||e.Q.has(t)}class UT extends Array{get is_emoji(){return!0}}let $0,jC,Wo,W0,_C,ii,kh,Rs,Mo,pb,q0;function e1(){if($0)return;let e=hC(wT);const t=()=>Pc(e),n=()=>new Set(t()),r=(u,f)=>f.forEach(d=>u.add(d));$0=new Map(mC(e)),jC=n(),Wo=t(),W0=new Set(t().map(u=>Wo[u])),Wo=new Set(Wo),_C=n(),n();let o=pC(e),s=e();const i=()=>{let u=new Set;return t().forEach(f=>r(u,o[f])),r(u,t()),u};ii=Tc(u=>{let f=Tc(e).map(d=>d+96);if(f.length){let d=u>=s;f[0]-=32,f=Fi(f),d&&(f=`Restricted[${f}]`);let h=i(),p=i(),m=!e();return{N:f,P:h,Q:p,M:m,R:d}}}),kh=n(),Rs=new Map;let a=t().concat(cd(kh)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=e(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),kh.has(u)||Rs.set(u,h)});for(let{V:u,M:f}of new Set(Rs.values())){let d=[];for(let p of u){let m=ii.filter(y=>Rc(y,p)),v=d.find(({G:y})=>m.some(g=>y.has(g)));v||(v={G:new Set,V:[]},d.push(v)),v.V.push(p),r(v.G,m)}let h=d.flatMap(p=>cd(p.G));for(let{G:p,V:m}of d){let v=new Set(h.filter(y=>!p.has(y)));for(let y of m)f.set(y,v)}}Mo=new Set;let c=new Set;const l=u=>Mo.has(u)?c.add(u):Mo.add(u);for(let u of ii){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of Mo)!Rs.has(u)&&!c.has(u)&&Rs.set(u,SC);r(Mo,EC(Mo)),pb=ST(e).map(u=>UT.from(u)).sort(IT),q0=new Map;for(let u of pb){let f=[q0];for(let d of u){let h=f.map(p=>{let m=p.get(d);return m||(m=new Map,p.set(d,m)),m});d===kC?f.push(...h):f=h}for(let d of f)d.V=u}}function t1(e){return(IC(e)?"":`${n1(lf([e]))} `)+yC(e)}function n1(e){return`"${e}"‎`}function zT(e){if(e.length>=4&&e[2]==hb&&e[3]==hb)throw new Error(`invalid label extension: "${Fi(e.slice(0,4))}"`)}function $T(e){for(let n=e.lastIndexOf(95);n>0;)if(e[--n]!==95)throw new Error("underscore allowed only at start")}function WT(e){let t=e[0],n=ub.get(t);if(n)throw $a(`leading ${n}`);let r=e.length,o=-1;for(let s=1;s<r;s++){t=e[s];let i=ub.get(t);if(i){if(o==s)throw $a(`${n} + ${i}`);o=s+1,n=i}}if(o==r)throw $a(`trailing ${n}`)}function lf(e,t=1/0,n=yC){let r=[];qT(e[0])&&r.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let o=0,s=e.length;for(let i=0;i<s;i++){let a=e[i];IC(a)&&(r.push(Fi(e.slice(o,i))),r.push(n(a)),o=i+1)}return r.push(Fi(e.slice(o,s))),r.join("")}function qT(e,t){return e1(),Wo.has(e)}function IC(e){return e1(),_C.has(e)}function VT(e){return KT(HT(e,DT,XT))}function HT(e,t,n){if(!e)return[];e1();let r=0;return e.split(AC).map(o=>{let s=_T(o),i={input:s,offset:r};r+=s.length+1;try{let a=i.tokens=JT(s,t,n),c=a.length,l;if(!c)throw new Error("empty label");let u=i.output=a.flat();if($T(u),!(i.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))zT(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(Wo.has(u[0]))throw $a("leading combining mark");for(let m=1;m<c;m++){let v=a[m];if(!v.is_emoji&&Wo.has(v[0]))throw $a(`emoji + combining mark: "${Fi(a[m-1])} + ${lf([v[0]])}"`)}WT(u);let h=cd(new Set(d)),[p]=GT(h);YT(p,d),QT(p,h),l=p.N}}i.type=l}catch(a){i.error=a}return i})}function QT(e,t){let n,r=[];for(let o of t){let s=Rs.get(o);if(s===SC)return;if(s){let i=s.M.get(o);if(n=n?n.filter(a=>i.has(a)):cd(i),!n.length)return}else r.push(o)}if(n){for(let o of n)if(r.every(s=>Rc(o,s)))throw new Error(`whole-script confusable: ${e.N}/${o.N}`)}}function GT(e){let t=ii;for(let n of e){let r=t.filter(o=>Rc(o,n));if(!r.length)throw ii.some(o=>Rc(o,n))?NC(t[0],n):BC(n);if(t=r,r.length==1)break}return t}function KT(e){return e.map(({input:t,error:n,output:r})=>{if(n){let o=n.message;throw new Error(e.length==1?o:`Invalid label ${n1(lf(t,63))}: ${o}`)}return Fi(r)}).join(AC)}function BC(e){return new Error(`disallowed character: ${t1(e)}`)}function NC(e,t){let n=t1(t),r=ii.find(o=>o.P.has(t));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${e.N} + ${n}`)}function $a(e){return new Error(`illegal placement: ${e}`)}function YT(e,t){for(let n of t)if(!Rc(e,n))throw NC(e,n);if(e.M){let n=EC(t);for(let r=1,o=n.length;r<o;r++)if(W0.has(n[r])){let s=r+1;for(let i;s<o&&W0.has(i=n[s]);s++)for(let a=r;a<s;a++)if(n[a]==i)throw new Error(`duplicate non-spacing marks: ${t1(i)}`);if(s-r>db)throw new Error(`excessive non-spacing marks: ${n1(lf(n.slice(r-1,s)))} (${s-r}/${db})`);r=s}}}function JT(e,t,n){let r=[],o=[];for(e=e.slice().reverse();e.length;){let s=ZT(e);if(s)o.length&&(r.push(t(o)),o=[]),r.push(n(s));else{let i=e.pop();if(Mo.has(i))o.push(i);else{let a=$0.get(i);if(a)o.push(...a);else if(!jC.has(i))throw BC(i)}}}return o.length&&r.push(t(o)),r}function XT(e){return e.filter(t=>t!=kC)}function ZT(e,t){let n=q0,r,o=e.length;for(;o&&(n=n.get(e[--o]),!!n);){let{V:s}=n;s&&(r=s,e.length=o)}return r}function eO(e){return VT(e)}function tO(e){return eO(e)}const nO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},rO={block:Vj({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(r=>{if(typeof r=="string")return r;const o=rl(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?Ze(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:Wj({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Ze(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:D_({format(e){return{l1GasPrice:e.l1GasPrice?Ze(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Ze(e.l1GasUsed):null,l1Fee:e.l1Fee?Ze(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function oO(e,t){return aO(e)?iO(e):__(e,t)}const sO={transaction:oO};function iO(e){cO(e);const{sourceHash:t,data:n,from:r,gas:o,isSystemTx:s,mint:i,to:a,value:c}=e,l=[t,r,a??"0x",i?$t(i):"0x",c?$t(c):"0x",o?$t(o):"0x",s?"0x1":"0x",n??"0x"];return Ln(["0x7e",vo(l)])}function aO(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function cO(e){const{from:t,to:n}=e;if(t&&!We(t))throw new _t({address:t});if(n&&!We(n))throw new _t({address:n})}const Co={blockTime:2e3,contracts:nO,formatters:rO,serializers:sO},lO=at({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),uO=at({id:421614,name:"Arbitrum Sepolia",blockTime:250,nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),dO=at({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),ga=1,PC=at({...Co,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Co.contracts,disputeGameFactory:{[ga]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[ga]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[ga]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[ga]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:ga});({...PC});const ya=11155111,TC=at({...Co,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Co.contracts,disputeGameFactory:{[ya]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[ya]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[ya]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[ya]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:ya});({...TC});const fO=at({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),hO=at({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),pO=at({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),mO=at({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),uf=at({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),wa=1,gO=at({...Co,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...Co.contracts,disputeGameFactory:{[wa]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[wa]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[wa]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[wa]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:wa}),ba=11155111,yO=at({...Co,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...Co.contracts,disputeGameFactory:{[ba]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[ba]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[ba]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[ba]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:ba}),wO=at({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),bO=at({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),vO=at({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0});var Hr=function(){return Hr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Hr.apply(this,arguments)};function xO(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function CO(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var mu="right-scroll-bar-position",gu="width-before-scroll-bar",EO="with-scroll-bars-hidden",AO="--removed-body-scroll-bar-size";function Sh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kO(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var SO=typeof window<"u"?j.useLayoutEffect:j.useEffect,mb=new WeakMap;function jO(e,t){var n=kO(null,function(r){return e.forEach(function(o){return Sh(o,r)})});return SO(function(){var r=mb.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Sh(a,null)}),s.forEach(function(a){o.has(a)||Sh(a,i)})}mb.set(n,e)},[e]),n}var ld=function(){return ld=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ld.apply(this,arguments)};function _O(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function IO(e){return e}function BO(e,t){t===void 0&&(t=IO);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function NO(e){e===void 0&&(e={});var t=BO(null);return t.options=ld({async:!0,ssr:!1},e),t}var OC=function(e){var t=e.sideCar,n=_O(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return j.createElement(r,ld({},n))};OC.isSideCarExport=!0;function PO(e,t){return e.useMedium(t),OC}var RC=NO(),jh=function(){},df=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:jh,onWheelCapture:jh,onTouchMoveCapture:jh}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,g=e.gapMode,w=xO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,E=jO([n,t]),A=Hr(Hr({},w),o);return j.createElement(j.Fragment,null,u&&j.createElement(x,{sideCar:RC,removeScrollBar:l,shards:f,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:g}),i?j.cloneElement(j.Children.only(a),Hr(Hr({},A),{ref:E})):j.createElement(y,Hr({},A,{className:c,ref:E}),a))});df.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};df.classNames={fullWidth:gu,zeroRight:mu};var TO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=TO();return t&&e.setAttribute("nonce",t),e}function RO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function MO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var LO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=OO())&&(RO(t,n),MO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FO=function(){var e=LO();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},MC=function(){var e=FO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},DO={left:0,top:0,right:0,gap:0},_h=function(e){return parseInt(e||"",10)||0},UO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[_h(n),_h(r),_h(o)]},zO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DO;var t=UO(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$O=MC(),ai="data-scroll-locked",WO=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
1671
+ .`.concat(EO,` {
1672
+ overflow: hidden `).concat(r,`;
1673
+ padding-right: `).concat(a,"px ").concat(r,`;
1674
+ }
1675
+ body[`).concat(ai,`] {
1676
+ overflow: hidden `).concat(r,`;
1677
+ overscroll-behavior: contain;
1678
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
1679
+ padding-left: `.concat(o,`px;
1680
+ padding-top: `).concat(s,`px;
1681
+ padding-right: `).concat(i,`px;
1682
+ margin-left:0;
1683
+ margin-top:0;
1684
+ margin-right: `).concat(a,"px ").concat(r,`;
1685
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
1686
+ }
1687
+
1688
+ .`).concat(mu,` {
1689
+ right: `).concat(a,"px ").concat(r,`;
1690
+ }
1691
+
1692
+ .`).concat(gu,` {
1693
+ margin-right: `).concat(a,"px ").concat(r,`;
1694
+ }
1695
+
1696
+ .`).concat(mu," .").concat(mu,` {
1697
+ right: 0 `).concat(r,`;
1698
+ }
1699
+
1700
+ .`).concat(gu," .").concat(gu,` {
1701
+ margin-right: 0 `).concat(r,`;
1702
+ }
1703
+
1704
+ body[`).concat(ai,`] {
1705
+ `).concat(AO,": ").concat(a,`px;
1706
+ }
1707
+ `)},gb=function(){var e=parseInt(document.body.getAttribute(ai)||"0",10);return isFinite(e)?e:0},qO=function(){j.useEffect(function(){return document.body.setAttribute(ai,(gb()+1).toString()),function(){var e=gb()-1;e<=0?document.body.removeAttribute(ai):document.body.setAttribute(ai,e.toString())}},[])},VO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;qO();var s=j.useMemo(function(){return zO(o)},[o]);return j.createElement($O,{styles:WO(s,!t,o,n?"":"!important")})},V0=!1;if(typeof window<"u")try{var ql=Object.defineProperty({},"passive",{get:function(){return V0=!0,!0}});window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql)}catch{V0=!1}var Ns=V0?{passive:!1}:!1,HO=function(e){return e.tagName==="TEXTAREA"},LC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!HO(e)&&n[t]==="visible")},QO=function(e){return LC(e,"overflowY")},GO=function(e){return LC(e,"overflowX")},yb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=FC(e,r);if(o){var s=DC(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},KO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},YO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},FC=function(e,t){return e==="v"?QO(t):GO(t)},DC=function(e,t){return e==="v"?KO(t):YO(t)},JO=function(e,t){return e==="h"&&t==="rtl"?-1:1},XO=function(e,t,n,r,o){var s=JO(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,f=0,d=0;do{var h=DC(e,a),p=h[0],m=h[1],v=h[2],y=m-v-s*p;(p||y)&&FC(e,a)&&(f+=y,d+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(l=!0),l},Vl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wb=function(e){return[e.deltaX,e.deltaY]},bb=function(e){return e&&"current"in e?e.current:e},ZO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eR=function(e){return`
1708
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
1709
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
1710
+ `)},tR=0,Ps=[];function nR(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),o=j.useState(tR++)[0],s=j.useState(MC)[0],i=j.useRef(e);j.useEffect(function(){i.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=CO([e.lockRef.current],(e.shards||[]).map(bb),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=j.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Vl(m),g=n.current,w="deltaX"in m?m.deltaX:g[0]-y[0],x="deltaY"in m?m.deltaY:g[1]-y[1],E,A=m.target,k=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in m&&k==="h"&&A.type==="range")return!1;var S=yb(k,A);if(!S)return!0;if(S?E=k:(E=k==="v"?"h":"v",S=yb(k,A)),!S)return!1;if(!r.current&&"changedTouches"in m&&(w||x)&&(r.current=E),!E)return!0;var _=r.current||E;return XO(_,v,m,_==="h"?w:x)},[]),c=j.useCallback(function(m){var v=m;if(!(!Ps.length||Ps[Ps.length-1]!==s)){var y="deltaY"in v?wb(v):Vl(v),g=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&ZO(E.delta,y)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var w=(i.current.shards||[]).map(bb).filter(Boolean).filter(function(E){return E.contains(v.target)}),x=w.length>0?a(v,w[0]):!i.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),l=j.useCallback(function(m,v,y,g){var w={name:m,delta:v,target:y,should:g,shadowParent:rR(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(x){return x!==w})},1)},[]),u=j.useCallback(function(m){n.current=Vl(m),r.current=void 0},[]),f=j.useCallback(function(m){l(m.type,wb(m),m.target,a(m,e.lockRef.current))},[]),d=j.useCallback(function(m){l(m.type,Vl(m),m.target,a(m,e.lockRef.current))},[]);j.useEffect(function(){return Ps.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Ns),document.addEventListener("touchmove",c,Ns),document.addEventListener("touchstart",u,Ns),function(){Ps=Ps.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,Ns),document.removeEventListener("touchmove",c,Ns),document.removeEventListener("touchstart",u,Ns)}},[]);var h=e.removeScrollBar,p=e.inert;return j.createElement(j.Fragment,null,p?j.createElement(s,{styles:eR(o)}):null,h?j.createElement(VO,{gapMode:e.gapMode}):null)}function rR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oR=PO(RC,nR);var UC=j.forwardRef(function(e,t){return j.createElement(df,Hr({},e,{ref:t,sideCar:oR}))});UC.classNames=df.classNames;function vb(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function sR(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function zC(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r={};for(var o in e){var s=e[o],i=[...n,o];typeof s=="string"||typeof s=="number"||s==null?r[o]=t(s,i):typeof s=="object"&&!Array.isArray(s)?r[o]=zC(s,t,i):console.warn('Skipping invalid key "'.concat(i.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return r}function xb(e,t){var n={};if(typeof t=="object"){var r=e;zC(t,(a,c)=>{if(a!=null){var l=sR(r,c);n[vb(l)]=String(a)}})}else{var o=e;for(var s in o){var i=o[s];i!=null&&(n[vb(s)]=i)}}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(c=>"".concat(c,":").concat(this[c])).join(";")},writable:!1}),n}var H0={exports:{}};(function(e,t){(function(n,r){var o="1.0.41",s="",i="?",a="function",c="undefined",l="object",u="string",f="major",d="model",h="name",p="type",m="vendor",v="version",y="architecture",g="console",w="mobile",x="tablet",E="smarttv",A="wearable",k="embedded",S=500,_="Amazon",N="Apple",O="ASUS",P="BlackBerry",R="Browser",V="Chrome",M="Edge",F="Firefox",$="Google",T="Honor",L="Huawei",D="Lenovo",Q="LG",te="Microsoft",se="Motorola",H="Nvidia",X="OnePlus",re="Opera",ce="OPPO",yt="Samsung",wt="Sharp",ct="Sony",K="Xiaomi",me="Zebra",we="Facebook",_e="Chromium OS",Ie="Mac OS",Nt=" Browser",vf=function(de,be){var ie={};for(var Ee in de)be[Ee]&&be[Ee].length%2===0?ie[Ee]=be[Ee].concat(de[Ee]):ie[Ee]=de[Ee];return ie},hl=function(de){for(var be={},ie=0;ie<de.length;ie++)be[de[ie].toUpperCase()]=de[ie];return be},A1=function(de,be){return typeof de===u?ea(be).indexOf(ea(de))!==-1:!1},ea=function(de){return de.toLowerCase()},iE=function(de){return typeof de===u?de.replace(/[^\d\.]/g,s).split(".")[0]:r},xf=function(de,be){if(typeof de===u)return de=de.replace(/^\s\s*/,s),typeof be===c?de:de.substring(0,S)},ta=function(de,be){for(var ie=0,Ee,or,Fn,ve,oe,Dn;ie<be.length&&!oe;){var Cf=be[ie],j1=be[ie+1];for(Ee=or=0;Ee<Cf.length&&!oe&&Cf[Ee];)if(oe=Cf[Ee++].exec(de),oe)for(Fn=0;Fn<j1.length;Fn++)Dn=oe[++or],ve=j1[Fn],typeof ve===l&&ve.length>0?ve.length===2?typeof ve[1]==a?this[ve[0]]=ve[1].call(this,Dn):this[ve[0]]=ve[1]:ve.length===3?typeof ve[1]===a&&!(ve[1].exec&&ve[1].test)?this[ve[0]]=Dn?ve[1].call(this,Dn,ve[2]):r:this[ve[0]]=Dn?Dn.replace(ve[1],ve[2]):r:ve.length===4&&(this[ve[0]]=Dn?ve[3].call(this,Dn.replace(ve[1],ve[2])):r):this[ve]=Dn||r;ie+=2}},na=function(de,be){for(var ie in be)if(typeof be[ie]===l&&be[ie].length>0){for(var Ee=0;Ee<be[ie].length;Ee++)if(A1(be[ie][Ee],de))return ie===i?r:ie}else if(A1(be[ie],de))return ie===i?r:ie;return be.hasOwnProperty("*")?be["*"]:de},aE={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},k1={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},S1={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,v],[/opios[\/ ]+([\w\.]+)/i],[v,[h,re+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[h,re+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[h,re]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[h,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[h,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[h,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[h,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[h,"Smart Lenovo "+R]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+R],v],[/\bfocus\/([\w\.]+)/i],[v,[h,F+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[h,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[h,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[h,"MIUI"+Nt]],[/fxios\/([\w\.-]+)/i],[v,[h,F]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[h,"360"]],[/\b(qq)\/([\w\.]+)/i],[[h,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1"+Nt],v],[/samsungbrowser\/([\w\.]+)/i],[v,[h,yt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[h,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[h],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,we],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[h,V+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,V+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[h,"Android "+R]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[v,na,aE]],[/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[h,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[h,F+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[h,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[h,[v,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,s,ea]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,ea]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[m,yt],[p,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,yt],[p,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,N],[p,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,N],[p,x]],[/(macintosh);/i],[d,[m,N]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,wt],[p,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,T],[p,x]],[/honor([-\w ]+)[;\)]/i],[d,[m,T],[p,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[m,L],[p,x]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,L],[p,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g," "],[m,K],[p,x]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g," "],[m,K],[p,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,ce],[p,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,na,{OnePlus:["304","403","203"],"*":ce}],[p,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,"Vivo"],[p,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,"Realme"],[p,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[m,se],[p,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,se],[p,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,Q],[p,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,Q],[p,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[m,D],[p,x]],[/(nokia) (t[12][01])/i],[m,d,[p,x]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g," "],[p,w],[m,"Nokia"]],[/(pixel (c|tablet))\b/i],[d,[m,$],[p,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,$],[p,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[m,ct],[p,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[m,ct],[p,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,X],[p,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,_],[p,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[m,_],[p,w]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[p,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,P],[p,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,O],[p,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,O],[p,w]],[/(nexus 9)/i],[d,[m,"HTC"],[p,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g," "],[p,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[m,"TCL"],[p,x]],[/(itel) ((\w+))/i],[[m,ea],d,[p,na,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,"Acer"],[p,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,"Meizu"],[p,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,"Ulefone"],[p,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,"Energizer"],[p,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,"Cat"],[p,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,"Smartfren"],[p,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,"Nothing"],[p,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,"Archos"],[p,x]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,"Archos"],[p,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[p,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[m,d,[p,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,d,[p,x]],[/(surface duo)/i],[d,[m,te],[p,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,"Fairphone"],[p,w]],[/(u304aa)/i],[d,[m,"AT&T"],[p,w]],[/\bsie-(\w*)/i],[d,[m,"Siemens"],[p,w]],[/\b(rct\w+) b/i],[d,[m,"RCA"],[p,x]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,"Dell"],[p,x]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,"Verizon"],[p,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,"Barnes & Noble"],[p,x]],[/\b(tm\d{3}\w+) b/i],[d,[m,"NuVision"],[p,x]],[/\b(k88) b/i],[d,[m,"ZTE"],[p,x]],[/\b(nx\d{3}j) b/i],[d,[m,"ZTE"],[p,w]],[/\b(gen\d{3}) b.+49h/i],[d,[m,"Swiss"],[p,w]],[/\b(zur\d{3}) b/i],[d,[m,"Swiss"],[p,x]],[/\b((zeki)?tb.*\b) b/i],[d,[m,"Zeki"],[p,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],d,[p,x]],[/\b(ns-?\w{0,9}) b/i],[d,[m,"Insignia"],[p,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,"NextBook"],[p,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],d,[p,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],d,[p,w]],[/\b(ph-1) /i],[d,[m,"Essential"],[p,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,"Envizen"],[p,x]],[/\b(trio[-\w\. ]+) b/i],[d,[m,"MachSpeed"],[p,x]],[/\btu_(1491) b/i],[d,[m,"Rotor"],[p,x]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,H],[p,x]],[/(sprint) (\w+)/i],[m,d,[p,w]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[m,te],[p,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,me],[p,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,me],[p,w]],[/smart-tv.+(samsung)/i],[m,[p,E]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[m,yt],[p,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,Q],[p,E]],[/(apple) ?tv/i],[m,[d,N+" TV"],[p,E]],[/crkey/i],[[d,V+"cast"],[m,$],[p,E]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,_],[p,E]],[/(shield \w+ tv)/i],[d,[m,H],[p,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,wt],[p,E]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,ct],[p,E]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,K],[p,E]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[p,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,xf],[d,xf],[p,E]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[p,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[p,g]],[/droid.+; (shield)( bui|\))/i],[d,[m,H],[p,g]],[/(playstation \w+)/i],[d,[m,ct],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,te],[p,g]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,yt],[p,A]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[p,A]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,ce],[p,A]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,N],[p,A]],[/(opwwe\d{3})/i],[d,[m,X],[p,A]],[/(moto 360)/i],[d,[m,se],[p,A]],[/(smartwatch 3)/i],[d,[m,ct],[p,A]],[/(g watch r)/i],[d,[m,Q],[p,A]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,me],[p,A]],[/droid.+; (glass) \d/i],[d,[m,$],[p,A]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[p,A]],[/; (quest( \d| pro)?)/i],[d,[m,we],[p,A]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,k]],[/(aeobc)\b/i],[d,[m,_],[p,k]],[/(homepod).+mac os/i],[d,[m,N],[p,k]],[/windows iot/i],[[p,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[h,M+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[h,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,v],[/ladybird\//i],[[h,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,v],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[h,[v,na,k1]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,na,k1],[h,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,Ie],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,h],[/(ubuntu) ([\w\.]+) like android/i],[[h,/(.+)/,"$1 Touch"],v],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[h,v],[/\(bb(10);/i],[v,[h,P]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[v,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[h,F+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[h,V+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,_e],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,v],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,v]]},vn=function(de,be){if(typeof de===l&&(be=de,de=r),!(this instanceof vn))return new vn(de,be).getResult();var ie=typeof n!==c&&n.navigator?n.navigator:r,Ee=de||(ie&&ie.userAgent?ie.userAgent:s),or=ie&&ie.userAgentData?ie.userAgentData:r,Fn=be?vf(S1,be):S1,ve=ie&&ie.userAgent==Ee;return this.getBrowser=function(){var oe={};return oe[h]=r,oe[v]=r,ta.call(oe,Ee,Fn.browser),oe[f]=iE(oe[v]),ve&&ie&&ie.brave&&typeof ie.brave.isBrave==a&&(oe[h]="Brave"),oe},this.getCPU=function(){var oe={};return oe[y]=r,ta.call(oe,Ee,Fn.cpu),oe},this.getDevice=function(){var oe={};return oe[m]=r,oe[d]=r,oe[p]=r,ta.call(oe,Ee,Fn.device),ve&&!oe[p]&&or&&or.mobile&&(oe[p]=w),ve&&oe[d]=="Macintosh"&&ie&&typeof ie.standalone!==c&&ie.maxTouchPoints&&ie.maxTouchPoints>2&&(oe[d]="iPad",oe[p]=x),oe},this.getEngine=function(){var oe={};return oe[h]=r,oe[v]=r,ta.call(oe,Ee,Fn.engine),oe},this.getOS=function(){var oe={};return oe[h]=r,oe[v]=r,ta.call(oe,Ee,Fn.os),ve&&!oe[h]&&or&&or.platform&&or.platform!="Unknown"&&(oe[h]=or.platform.replace(/chrome os/i,_e).replace(/macos/i,Ie)),oe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ee},this.setUA=function(oe){return Ee=typeof oe===u&&oe.length>S?xf(oe,S):oe,this},this.setUA(Ee),this};vn.VERSION=o,vn.BROWSER=hl([h,v,f]),vn.CPU=hl([y]),vn.DEVICE=hl([d,m,p,g,w,E,x,A,k]),vn.ENGINE=vn.OS=hl([h,v]),e.exports&&(t=e.exports=vn),t.UAParser=vn;var js=typeof n!==c&&(n.jQuery||n.Zepto);if(js&&!js.ua){var pl=new vn;js.ua=pl.getResult(),js.ua.get=function(){return pl.getUA()},js.ua.set=function(de){pl.setUA(de);var be=pl.getResult();for(var ie in be)js.ua[ie]=be[ie]}}})(typeof window=="object"?window:uE)})(H0,H0.exports);var iR=H0.exports;/*!
1711
+ Copyright (c) 2023 Paul Miller (paulmillr.com)
1712
+ The library paulmillr-qr is dual-licensed under the Apache 2.0 OR MIT license.
1713
+ You can select a license of your choice.
1714
+ Licensed under the Apache License, Version 2.0 (the "License");
1715
+ you may not use this file except in compliance with the License.
1716
+ You may obtain a copy of the License at
1717
+
1718
+ http://www.apache.org/licenses/LICENSE-2.0
1719
+
1720
+ Unless required by applicable law or agreed to in writing, software
1721
+ distributed under the License is distributed on an "AS IS" BASIS,
1722
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1723
+ See the License for the specific language governing permissions and
1724
+ limitations under the License.
1725
+ */const va={newline:10,reset:27};function aR(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function cR(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function No(e,t){return e.toString(2).padStart(t,"0")}function Cb(e,t){const n=e%t;return n>=0?n:t+n}function Wn(e,t){return new Array(e).fill(t)}function Ih(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function Eb(e){let t=0,n=0;for(const s of e)t=Math.max(t,s.length),n+=s.length;const r=new Uint8Array(n);let o=0;for(let s=0;s<t;s++)for(const i of e)s<i.length&&(r[o++]=i[s]);return r}function lR(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function Ab(e){return{has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(aR(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}}}function kb(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,s=o<<1;for(let i=0;i<32;i+=s)for(let a=0;a<o;a++){const c=i+a,l=c+o,u=e[c]>>>0,f=e[l]>>>0,d=(u>>>o^f)&r;e[c]=(u^d<<o)>>>0,e[l]=(f^d)>>>0}}}const xa=e=>1<<(e&31)>>>0,Po=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class vt{constructor(t,n){Mr(this,"defined");Mr(this,"value");Mr(this,"tailMask");Mr(this,"words");Mr(this,"fullWords");Mr(this,"height");Mr(this,"width");const{height:r,width:o}=vt.size(t);if(this.height=r,this.width=o,this.tailMask=Po(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let s=0;s<r;s++){const i=n[s];if(!i||i.length!==o)throw new Error(`Bitmap: data width mismatch at y=${s}: exp=${o} got=${i==null?void 0:i.length}`);for(let a=0;a<o;a++)this.set(a,s,i[a])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(va.newline)),r=n.length;let o;const s=[];for(const i of n){const a=i.split("").map(c=>{if(c==="X")return!0;if(c===" ")return!1;if(c!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${c}`)});if(o!==void 0&&a.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${a.length}`);o=a.length,s.push(a)}return o===void 0&&(o=0),new vt({height:r,width:o},s)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=Cb(t.x,this.width),t.y=Cb(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=xa(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=xa(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:s}=this;o[t]|=n,s[t]=s[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),xa(t),r)}fillRectConst(t,n,r,o,s){if(r<=0||o<=0||s===void 0)return;const{value:i,defined:a,words:c}=this,l=t>>>5,u=t+r-1>>>5,f=t&31,d=t+r-1&31;for(let h=0;h<o;h++){const p=(n+h)*c;if(l===u){const m=Po(f,d-f+1);this.maskWord(p+l,m,s);continue}this.maskWord(p+l,Po(f,32-f),s);for(let m=l+1;m<u;m++)a[p+m]=4294967295,i[p+m]=s?4294967295:0;this.maskWord(p+u,Po(0,d+1),s)}}rectWords(t,n,r,o,s){for(let i=0;i<o;i++){const a=n+i;for(let c=0;c<r;){const l=t+c,{bit:u,word:f}=this.bitIndex(l,a),d=Math.min(32-u,r-c);s(f,l,c,i,d),c+=d}}}rect(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=vt.size(n,this.size({x:o,y:s}));if(typeof r!="function")return this.fillRectConst(o,s,a,i,r),this;const{defined:c,value:l}=this;return this.rectWords(o,s,a,i,(u,f,d,h,p)=>{let m=0,v=l[u];for(let y=0;y<p;y++){const g=xa(f+y),w=r({x:d+y,y:h},(v&g)!==0);w!==void 0&&(m|=g,v=v&~g|-w&g)}c[u]|=m,l[u]=v}),this}rectRead(t,n,r){const{x:o,y:s}=this.xy(t),{height:i,width:a}=vt.size(n,this.size({x:o,y:s})),{value:c}=this;return this.rectWords(o,s,a,i,(l,u,f,d,h)=>{const p=c[l];for(let m=0;m<h;m++){const v=xa(u+m);r({x:f+m,y:d},(p&v)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){const r=this.height+2*t,o=this.width+2*t,s=new vt({height:r,width:o});return s.rect(0,1/0,n),s.embed({x:t,y:t},this),s}embed(t,n){const{x:r,y:o}=this.xy(t),{height:s,width:i}=vt.size(n.size(),this.size({x:r,y:o}));if(i<=0||s<=0)return this;const{value:a,defined:c}=this,{words:l,value:u}=n;for(let f=0;f<s;f++){const d=f*l;for(let h=0;h<i;){const p=r+h,{word:m,bit:v}=this.bitIndex(p,o+f),{word:y,bit:g}=n.bitIndex(h,f),w=Math.min(32-v,i-h),x=u[y],E=g&&y+1<d+l?u[y+1]:0,A=g?(x>>>g|E<<32-g)>>>0:x,k=Po(v,w),S=(A&Po(0,w))<<v>>>0;c[m]|=k,a[m]=a[m]&~k|S,h+=w}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:s,width:i}=vt.size(n,this.size({x:r,y:o})),a=new vt({height:s,width:i});return this.rectRead({x:r,y:o},{height:s,width:i},(c,l)=>{this.isDefined(r+c.x,o+c.y)&&a.set(c.x,c.y,l)}),a}transpose(){const{height:t,width:n,value:r,defined:o,words:s}=this,i=new vt({height:n,width:t}),{words:a,value:c,defined:l,tailMask:u}=i,f=new Uint32Array(32),d=new Uint32Array(32);for(let h=0;h<t;h+=32)for(let p=0;p<s;p++){const m=Math.min(32,t-h);for(let v=0;v<m;v++){const y=this.wordIndex(32*p,h+v);f[v]=r[y],d[v]=o[y]}f.fill(0,m),d.fill(0,m),kb(f),kb(d);for(let v=0;v<32;v++){const y=p*32+v;if(y>=n)break;const g=i.wordIndex(h,y),w=h>>>5===a-1?u:4294967295;c[g]=f[v]&w,l[g]=d[v]&w}}return i}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new vt({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:s,y:i})=>this.get(s/t|0,i/t|0))}clone(){const t=new vt(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:s,words:i}=this;if(!(!t||!n))for(let a=0;a<t;a++){const c=a*i;for(let l=0;l<s;l++)if(r[c+l]!==4294967295)throw new Error("Invalid color type=undefined");if(i!==s&&(r[c+s]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{width:s,value:i,words:a}=this;let c=0;const l=this.wordIndex(0,t);for(let u=0,f=0;u<a;u++){const d=i[l+u],h=u===a-1&&s&31||32;for(let p=0;p<h;p++)if(f=(f<<1|d>>>p&1)&o,!(u*32+p+1<n)){for(const m of r)if(f===m){c++;break}}}return c}getRuns(t,n){const{width:r,value:o,words:s}=this;if(r===0)return;let i=0,a;const c=this.wordIndex(0,t);for(let l=0;l<s;l++){const u=o[c+l],f=l===s-1&&r&31||32;for(let d=0;d<f;d++){const h=(u&1<<d)!==0;if(h===a){i++;continue}a!==void 0&&n(i,a),a=h,i=1}}a!==void 0&&n(i,a)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:s}=this;if(!t||!n)return 0;let i=0;for(let a=0;a<t;a++){const c=a*r;for(let l=0;l<o;l++)i+=Ih(this.value[c+l]);r!==o&&(i+=Ih(this.value[c+o]&s))}return i}countBoxes2x2(t){const{width:n,words:r}=this;if(n<2||(t|0)<0||t+1>=this.height)return 0;const o=this.wordIndex(0,t)|0,s=this.wordIndex(0,t+1)|0,a=(n&31)===0?2147483647:Po(0,n-1&31);let c=0;for(let l=0;l<r;l++){const u=this.value[o+l],f=this.value[s+l],d=~(u^f)>>>0,h=l+1<r?this.value[o+l+1]>>>0:0,p=~(u^(u>>>1|(h&1)<<31)>>>0)>>>0,m=l+1<r?this.value[s+l+1]>>>0:0,v=~(f^(f>>>1|(m&1)<<31)>>>0)>>>0;let y=(d&p&v)>>>0;l===r-1&&(y&=a),c+=Ih(y)}return c}toString(){const t=String.fromCharCode(va.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let s=0;s<this.width;s++){const i=this.get(s,r);o+=this.isDefined(s,r)?i?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let s=0;s<n;s++){const i=this.get(s,o),a=o+1>=t?!0:this.get(s,o+1);!i&&!a?r+="█":!i&&a?r+="▀":i&&!a?r+="▄":i&&a&&(r+=" ")}r+=String.fromCharCode(va.newline)}return r}toTerm(){const t=String.fromCharCode(va.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,s=String.fromCharCode(va.newline);let i="";for(let a=0;a<this.height;a++){for(let c=0;c<this.width;c++){const l=this.get(c,a);i+=l?o:r}i+=s}return i}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(s,i)=>{if(!i)return;const{x:a,y:c}=s;if(!t){n+=`<rect x="${a}" y="${c}" width="1" height="1" />`;return}let l=`M${a} ${c}`;if(o){const f=`m${a-o.x} ${c-o.y}`;f.length<=l.length&&(l=f)}const u=a<10?`H${a}`:"h-1";r+=`${l}h1v1${u}Z`,o=s}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=a=>[a&255,a>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(a,c)=>r.push(+(c===!0)));const o=126,s=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...Wn(3*127,0),44,0,0,0,0,...n,0,7],i=Math.floor(r.length/o);for(let a=0;a<i;a++)s.push(o+1,128,...r.slice(o*a,o*(a+1)).map(c=>+c));return s.push(r.length%o+1,128,...r.slice(i*o).map(a=>+a)),s.push(1,129,0,59),new Uint8Array(s)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let s=0;for(let i=0;i<n;i++)for(let a=0;a<r;a++){const c=this.get(a,i)?0:255;o[s++]=c,o[s++]=c,o[s++]=c,t||(o[s++]=255)}return{height:n,width:r,data:o}}}const Sb=["low","medium","quartile","high"],jb=["numeric","alphanumeric","byte","kanji","eci"],uR=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],dR={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},fR={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},ht={size:{encode:e=>21+4*(e-1),decode:e=>(e-17)/4},sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=ht.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let s=Math.floor(r/o);s%2?s+=1:r%o*2>=o&&(s+=2);const i=[t];for(let a=1;a<o;a++)i.push(n-(o-a)*s);return i.push(n),i},ECCode:{low:1,medium:0,quartile:3,high:2},formatMask:21522,formatBits(e,t){const n=ht.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^ht.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:{numeric:Ab("0123456789"),alphanumerc:Ab("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")},lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][ht.sizeType(e)]},modeBits:{numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"},capacity(e,t){const n=uR[e-1],r=dR[t][e-1],o=fR[t][e-1],s=Math.floor(n/o)-r,i=o-n%o;return{words:r,numBlocks:o,shortBlocks:i,blockLen:s,capacity:(n-r*o)*8,total:(r+s)*o+o-i}}},r1=[(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0],J={tables:(e=>{const t=Wn(256,0),n=Wn(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>J.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return J.tables.log[e]%255},mul(e,t){return e===0||t===0?0:J.tables.exp[(J.tables.log[e]+J.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>J.tables.exp[J.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return J.tables.exp[255-J.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=Wn(e+1,0);return n[0]=t,J.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[J.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=Wn(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=J.add(n[r+o],J.mul(e[r],t[o]));return J.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=Wn(e.length,0);for(let r=0;r<e.length;r++)n[r]=J.mul(e[r],t);return J.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=Wn(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=J.mul(e[o],n);return J.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=Wn(r.length,0),s=r.length-n.length,i=r.slice(0,s);for(let a=0;a<i.length;a++)o[a]=i[a];for(let a=s;a<r.length;a++)o[a]=J.add(n[a-s],r[a]);return J.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let s=1;s<t.length;s++)t[s]!==0&&(n[r+s]=J.add(n[r+s],J.mul(t[s],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=J.mulPoly(t,[1,J.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return J.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=J.add(J.mul(t,n),e[r]);return n},euclidian(e,t,n){J.degree(e)<J.degree(t)&&([e,t]=[t,e]);let r=e,o=t,s=[0],i=[1];for(;2*J.degree(o)>=n;){let l=r,u=s;if(r=o,s=i,r[0]===0)throw new Error("rLast[0] === 0");o=l;let f=[0];const d=J.inv(r[0]);for(;J.degree(o)>=J.degree(r)&&o[0]!==0;){const h=J.degree(o)-J.degree(r),p=J.mul(o[0],d);f=J.addPoly(f,J.monomial(h,p)),o=J.addPoly(o,J.mulPolyMonomial(r,h,p))}if(f=J.mulPoly(f,s),i=J.addPoly(f,u),J.degree(o)>=J.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const a=J.coefficient(i,0);if(a==0)throw new Error("sigmaTilde(0) was zero");const c=J.inv(a);return[J.mulPolyScalar(i,c),J.mulPolyScalar(o,c)]}};function hR(e){return{encode(t){const n=J.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(J.remainderPoly(r,n))},decode(t){const n=t.slice(),r=J.polynomial(Array.from(t));let o=Wn(e,0),s=!1;for(let f=0;f<e;f++){const d=J.evalPoly(r,J.exp(f));o[o.length-1-f]=d,d!==0&&(s=!0)}if(!s)return n;o=J.polynomial(o);const i=J.monomial(e,1),[a,c]=J.euclidian(i,o,e),l=Wn(J.degree(a),0);let u=0;for(let f=1;f<256&&u<l.length;f++)J.evalPoly(a,f)===0&&(l[u++]=J.inv(f));if(u!==l.length)throw new Error("RS.decode: invalid errors number");for(let f=0;f<l.length;f++){const d=n.length-1-J.log(l[f]);if(d<0)throw new Error("RS.decode: invalid error location");const h=J.inv(l[f]);let p=1;for(let m=0;m<l.length;m++)f!==m&&(p=J.mul(p,J.add(1,J.mul(l[m],h))));n[d]=J.add(n[d],J.mul(J.evalPoly(c,h),J.inv(p)))}return n}}}function pR(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:s,total:i}=ht.capacity(e,t),a=hR(n);return{encode(c){const l=[],u=[];for(let p=0;p<o;p++){const m=p<r,v=s+(m?0:1);l.push(c.subarray(0,v)),u.push(a.encode(c.subarray(0,v))),c=c.subarray(v)}const f=Eb(l),d=Eb(u),h=new Uint8Array(f.length+d.length);return h.set(f),h.set(d,f.length),h},decode(c){if(c.length!==i)throw new Error(`interleave.decode: len(data)=${c.length}, total=${i}`);const l=[];for(let d=0;d<o;d++){const h=d<r;l.push(new Uint8Array(n+s+(h?0:1)))}let u=0;for(let d=0;d<s;d++)for(let h=0;h<o;h++)l[h][d]=c[u++];for(let d=r;d<o;d++)l[d][s]=c[u++];for(let d=s;d<s+n;d++)for(let h=0;h<o;h++){const p=h<r;l[h][d+(p?0:1)]=c[u++]}const f=[];for(const d of l)f.push(...Array.from(a.decode(d)).slice(0,-n));return Uint8Array.from(f)}}}function mR(e,t,n,r=!1){const o=ht.size.encode(e);let s=new vt(o+2);const i=new vt(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);s=s.embed(0,i).embed({x:-i.width,y:0},i).embed({x:0,y:-i.height},i),s=s.rectSlice(1,o);const a=new vt(1).rect(0,1,!0).border(1,!1).border(1,!0),c=ht.alignmentPatterns(e);for(const l of c)for(const u of c)s.isDefined(u,l)||s.embed({x:u-2,y:l-2},a);s=s.hLine({x:0,y:6},1/0,({x:l})=>s.isDefined(l,6)?void 0:l%2==0).vLine({x:6,y:0},1/0,({y:l})=>s.isDefined(6,l)?void 0:l%2==0);{const l=ht.formatBits(t,n),u=f=>!r&&(l>>f&1)==1;for(let f=0;f<6;f++)s.set(8,f,u(f));for(let f=6;f<8;f++)s.set(8,f+1,u(f));for(let f=8;f<15;f++)s.set(8,o-15+f,u(f));for(let f=0;f<8;f++)s.set(o-f-1,8,u(f));for(let f=8;f<9;f++)s.set(15-f-1+1,8,u(f));for(let f=9;f<15;f++)s.set(15-f-1,8,u(f));s.set(8,o-8,!r)}if(e>=7){const l=ht.versionBits(e);for(let u=0;u<18;u+=1){const f=!r&&(l>>u&1)==1,d=Math.floor(u/3),h=u%3+o-8-3;s.set(h,d,f),s.set(d,h,f)}}return s}function gR(e,t,n){const r=e.height,o=r1[t];let s=-1,i=r-1;for(let a=r-1;a>0;a-=2){for(a==6&&(a=5);;i+=s){for(let c=0;c<2;c+=1){const l=a-c;e.isDefined(l,i)||n(l,i,o(l,i))}if(i+s<0||i+s>=r)break}s=-s}}function yR(e){let t="numeric";for(let n of e)if(!ht.alphabet.numeric.has(n)&&(t="alphanumeric",!ht.alphabet.alphanumerc.has(n)))return"byte";return t}function wR(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function _b(e,t,n,r,o=wR){let s="",i=n.length;if(r==="numeric"){const d=ht.alphabet.numeric.decode(n.split("")),h=d.length;for(let p=0;p<h-2;p+=3)s+=No(d[p]*100+d[p+1]*10+d[p+2],10);h%3===1?s+=No(d[h-1],4):h%3===2&&(s+=No(d[h-2]*10+d[h-1],7))}else if(r==="alphanumeric"){const d=ht.alphabet.alphanumerc.decode(n.split("")),h=d.length;for(let p=0;p<h-1;p+=2)s+=No(d[p]*45+d[p+1],11);h%2==1&&(s+=No(d[h-1],6))}else if(r==="byte"){const d=o(n);i=d.length,s=Array.from(d).map(h=>No(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:a}=ht.capacity(e,t),c=No(i,ht.lengthBits(e,r));let l=ht.modeBits[r]+c+s;if(l.length>a)throw new Error("Capacity overflow");l+="0".repeat(Math.min(4,Math.max(0,a-l.length))),l.length%8&&(l+="0".repeat(8-l.length%8));const u="1110110000010001";for(let d=0;l.length!==a;d++)l+=u[d%u.length];const f=Uint8Array.from(l.match(/(.{8})/g).map(d=>+`0b${d}`));return pR(e,t).encode(f)}function Ib(e,t,n,r,o=!1){const s=mR(e,t,r,o);let i=0;const a=8*n.length;if(gR(s,r,(c,l,u)=>{let f=!1;i<a&&(f=(n[i>>>3]>>(7-i&7)&1)!==0,i++),s.set(c,l,f!==u)}),i!==a)throw new Error("QR: bytes left after draw");return s}const $C=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},WC=[!0,!1,!0,!0,!0,!1,!0],qC=[!1,!1,!1,!1],Hl=$C([...WC,...qC]),Bb=$C([...qC,...WC]);function bR(e){const{width:t,height:n}=e,r=e.transpose();let o=0;for(let u=0;u<n;u++)e.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});for(let u=0;u<t;u++)r.getRuns(u,f=>{f>=5&&(o+=3+(f-5))});let s=0;for(let u=0;u<n-1;u++)s+=3*e.countBoxes2x2(u);let i=0;for(let u=0;u<n;u++)i+=40*e.countPatternInRow(u,Hl.len,Hl.n,Bb.n);for(let u=0;u<t;u++)i+=40*r.countPatternInRow(u,Hl.len,Hl.n,Bb.n);let a=0;a=e.popcnt();const c=a/(n*t)*100,l=10*Math.floor(Math.abs(c-50)/5);return o+s+i+l}function vR(e,t,n,r){if(r===void 0){const o=lR();for(let s=0;s<r1.length;s++)o.add(bR(Ib(e,t,n,s,!0)),s);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return Ib(e,t,n,r)}function xR(e){if(!Sb.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${Sb}`)}function CR(e){if(!jb.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${jb}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function ER(e){if(![0,1,2,3,4,5,6,7].includes(e)||!r1[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function AR(e,t="raw",n={}){const r=n.ecc!==void 0?n.ecc:"medium";xR(r);const o=n.encoding!==void 0?n.encoding:yR(e);CR(o),n.mask!==void 0&&ER(n.mask);let s=n.version,i,a=new Error("Unknown error");if(s!==void 0)cR(s),i=_b(s,r,e,o,n.textEncoder);else for(let u=1;u<=40;u++)try{i=_b(u,r,e,o,n.textEncoder),s=u;break}catch(f){a=f}if(!s||!i)throw a;let c=vR(s,r,i,n.mask);c.assertDrawn();const l=n.border===void 0?2:n.border;if(!Number.isSafeInteger(l))throw new Error(`invalid border type=${typeof l}`);if(c=c.border(l,!1),n.scale!==void 0&&(c=c.scale(n.scale)),t==="raw")return c.toRaw();if(t==="ascii")return c.toASCII();if(t==="svg")return c.toSVG(n.optimize);if(t==="gif")return c.toGIF();if(t==="term")return c.toTerm();throw new Error(`Unknown output: ${t}`)}function kR(e,t={}){const{errorCorrection:n,version:r}=t,o=AR(e,"raw",{border:0,ecc:n,scale:1,version:r});return{edgeLength:o.length,finderLength:7,grid:o,value:e}}function Gn(e){const{arena:t,...n}=e;return b.jsxs(Gn.Root,{...n,children:[b.jsx(Gn.Finder,{}),b.jsx(Gn.Cells,{}),t&&b.jsx(Gn.Arena,{children:typeof t=="string"?b.jsx("img",{alt:"Arena",src:t,style:{borderRadius:1,height:"100%",objectFit:"cover",width:"100%"}}):t})]})}(function(e){e.Context=j.createContext(null);function t(s){const{children:i,size:a="100%",value:c,version:l,errorCorrection:u,...f}=s,d=j.useMemo(()=>(j.Children.map(i,w=>!j.isValidElement(w)||typeof w.type=="string"?null:"displayName"in w.type&&w.type.displayName==="Arena"?!0:null)??[]).some(Boolean),[i]),h=j.useMemo(()=>{let w=u;return d&&u==="low"&&(w="medium"),kR(c,{errorCorrection:w,version:l})},[c,d,u,l]),p=1,m=h.edgeLength*p,v=h.finderLength*p/2,y=d?Math.floor(m/4):0,g=j.useMemo(()=>({arenaSize:y,cellSize:p,edgeSize:m,qrcode:h,finderSize:v}),[y,m,h,v]);return b.jsx(e.Context.Provider,{value:g,children:b.jsxs("svg",{...f,width:a,height:a,viewBox:`0 0 ${m} ${m}`,xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("title",{children:"QR Code"}),i]})})}e.Root=t,function(s){s.displayName="Root"}(t=e.Root||(e.Root={}));function n(s){const{className:i,fill:a,innerClassName:c,radius:l=.25}=s,{cellSize:u,edgeSize:f,finderSize:d}=j.useContext(e.Context);function h({position:p}){let m=d-(d-u)-u/2;p==="top-right"&&(m=f-d-(d-u)-u/2);let v=d-(d-u)-u/2;p==="bottom-left"&&(v=f-d-(d-u)-u/2);let y=d-u*1.5;p==="top-right"&&(y=f-d-u*1.5);let g=d-u*1.5;return p==="bottom-left"&&(g=f-d-u*1.5),b.jsxs(b.Fragment,{children:[b.jsx("rect",{className:i,stroke:a??"currentColor",fill:"transparent",x:m,y:v,width:u+(d-u)*2,height:u+(d-u)*2,rx:2*l*(d-u),ry:2*l*(d-u),strokeWidth:u}),b.jsx("rect",{className:c,fill:a??"currentColor",x:y,y:g,width:u*3,height:u*3,rx:2*l*u,ry:2*l*u})]})}return b.jsxs(b.Fragment,{children:[b.jsx(h,{position:"top-left"}),b.jsx(h,{position:"top-right"}),b.jsx(h,{position:"bottom-left"})]})}e.Finder=n,function(s){s.displayName="Finder"}(n=e.Finder||(e.Finder={}));function r(s){const{className:i,fill:a="currentColor",inset:c=!0,radius:l=1}=s,{arenaSize:u,cellSize:f,qrcode:d}=j.useContext(e.Context),{edgeLength:h,finderLength:p}=d,m=j.useMemo(()=>{let v="";for(let y=0;y<d.grid.length;y++){const g=d.grid[y];if(g)for(let w=0;w<g.length;w++){if(!g[w])continue;const E=h/2-u/2,A=E+u;if(y>=E&&y<=A&&w>=E&&w<=A)continue;const k=y<p&&w<p,S=y<p&&w>=h-p,_=y>=h-p&&w<p;if(k||S||_)continue;const N=c?f*.1:0,O=(f-N*2)/2,P=w*f+f/2,R=y*f+f/2,V=P-O,M=P+O,F=R-O,$=R+O,T=l*O;v+=[`M ${V+T},${F}`,`L ${M-T},${F}`,`A ${T},${T} 0 0,1 ${M},${F+T}`,`L ${M},${$-T}`,`A ${T},${T} 0 0,1 ${M-T},${$}`,`L ${V+T},${$}`,`A ${T},${T} 0 0,1 ${V},${$-T}`,`L ${V},${F+T}`,`A ${T},${T} 0 0,1 ${V+T},${F}`,"z"].join(" ")}}return v},[u,f,h,p,d.grid,c,l]);return b.jsx("path",{className:i,d:m,fill:a})}e.Cells=r,function(s){s.displayName="Cells"}(r=e.Cells||(e.Cells={}));function o(s){const{children:i}=s,{arenaSize:a,cellSize:c,edgeSize:l}=j.useContext(e.Context),u=Math.ceil(l/2-a/2),f=a+a%2,d=c/2;return b.jsx("foreignObject",{x:u,y:u,width:f,height:f,children:b.jsx("div",{style:{alignItems:"center",display:"flex",fontSize:1,justifyContent:"center",height:"100%",overflow:"hidden",width:"100%",padding:d,boxSizing:"border-box"},children:i})})}e.Arena=o,function(s){s.displayName="Arena"}(o=e.Arena||(e.Arena={}))})(Gn||(Gn={}));ff.type="coinbaseWallet";function ff(e={}){return e.version==="3"||e.headlessMode?jR(e):SR(e)}function SR(e){let t,n,r,o;return s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:ff.type,async connect({chainId:i,withCapabilities:a,...c}={}){try{const l=await this.getProvider(),u=(await l.request({method:"eth_requestAccounts",params:"instantOnboarding"in c&&c.instantOnboarding?[{onboarding:"instant"}]:[]})).map(d=>Te(d));n||(n=this.onAccountsChanged.bind(this),l.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),l.on("chainChanged",r)),o||(o=this.onDisconnect.bind(this),l.on("disconnect",o));let f=await this.getChainId();if(i&&f!==i){const d=await this.switchChain({chainId:i}).catch(h=>{if(h.code===ge.code)throw h;return{id:f}});f=(d==null?void 0:d.id)??f}return{accounts:a?u.map(d=>({address:d,capabilities:{}})):u,chainId:f}}catch(l){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(l.message)?new ge(l):l}},async disconnect(){var a;const i=await this.getProvider();n&&(i.removeListener("accountsChanged",n),n=void 0),r&&(i.removeListener("chainChanged",r),r=void 0),o&&(i.removeListener("disconnect",o),o=void 0),i.disconnect(),(a=i.close)==null||a.call(i)},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>Te(a))},async getChainId(){const a=await(await this.getProvider()).request({method:"eth_chainId"});return Number(a)},async getProvider(){if(!t){const i=(()=>{var l;return typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:((l=e.preference)==null?void 0:l.options)??"all"}})(),{createCoinbaseWalletSDK:a}=await W(async()=>{const{createCoinbaseWalletSDK:l}=await import("./index-B7r6Bd0d.js");return{createCoinbaseWalletSDK:l}},__vite__mapDeps([0,1,2]));t=a({...e,appChainIds:s.chains.map(l=>l.id),preference:i}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:i,chainId:a}){var u,f,d,h;const c=s.chains.find(p=>p.id===a);if(!c)throw new kt(new xo);const l=await this.getProvider();try{return await l.request({method:"wallet_switchEthereumChain",params:[{chainId:z(c.id)}]}),c}catch(p){if(p.code===4902)try{let m;i!=null&&i.blockExplorerUrls?m=i.blockExplorerUrls:m=(u=c.blockExplorers)!=null&&u.default.url?[(f=c.blockExplorers)==null?void 0:f.default.url]:[];let v;(d=i==null?void 0:i.rpcUrls)!=null&&d.length?v=i.rpcUrls:v=[((h=c.rpcUrls.default)==null?void 0:h.http[0])??""];const y={blockExplorerUrls:m,chainId:z(a),chainName:(i==null?void 0:i.chainName)??c.name,iconUrls:i==null?void 0:i.iconUrls,nativeCurrency:(i==null?void 0:i.nativeCurrency)??c.nativeCurrency,rpcUrls:v};return await l.request({method:"wallet_addEthereumChain",params:[y]}),c}catch(m){throw new ge(m)}throw new kt(p)}},onAccountsChanged(i){i.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:i.map(a=>Te(a))})},onChainChanged(i){const a=Number(i);s.emitter.emit("change",{chainId:a})},async onDisconnect(i){s.emitter.emit("disconnect");const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),r&&(a.removeListener("chainChanged",r),r=void 0),o&&(a.removeListener("disconnect",o),o=void 0)}})}function jR(e){let n,r,o,s,i;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:ff.type,async connect({chainId:c,withCapabilities:l}={}){try{const u=await this.getProvider(),f=(await u.request({method:"eth_requestAccounts"})).map(h=>Te(h));o||(o=this.onAccountsChanged.bind(this),u.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),u.on("chainChanged",s)),i||(i=this.onDisconnect.bind(this),u.on("disconnect",i));let d=await this.getChainId();if(c&&d!==c){const h=await this.switchChain({chainId:c}).catch(p=>{if(p.code===ge.code)throw p;return{id:d}});d=(h==null?void 0:h.id)??d}return{accounts:l?f.map(h=>({address:h,capabilities:{}})):f,chainId:d}}catch(u){throw/(user closed modal|accounts received is empty|user denied account)/i.test(u.message)?new ge(u):u}},async disconnect(){const c=await this.getProvider();o&&(c.removeListener("accountsChanged",o),o=void 0),s&&(c.removeListener("chainChanged",s),s=void 0),i&&(c.removeListener("disconnect",i),i=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(l=>Te(l))},async getChainId(){const l=await(await this.getProvider()).request({method:"eth_chainId"});return Number(l)},async getProvider(){var c;if(!r){const l=await(async()=>{const{default:p}=await W(async()=>{const{default:m}=await import("./index-Dt_15Vcx.js").then(v=>v.i);return{default:m}},__vite__mapDeps([3,1,4]));return typeof p!="function"&&typeof p.default=="function"?p.default:p})();n=new l({...e,reloadOnDisconnect:!1});const u=(c=n.walletExtension)==null?void 0:c.getChainId(),f=a.chains.find(p=>e.chainId?p.id===e.chainId:p.id===u)||a.chains[0],d=e.chainId||(f==null?void 0:f.id),h=e.jsonRpcUrl||(f==null?void 0:f.rpcUrls.default.http[0]);r=n.makeWeb3Provider(h,d)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:l}){var d,h,p,m;const u=a.chains.find(v=>v.id===l);if(!u)throw new kt(new xo);const f=await this.getProvider();try{return await f.request({method:"wallet_switchEthereumChain",params:[{chainId:z(u.id)}]}),u}catch(v){if(v.code===4902)try{let y;c!=null&&c.blockExplorerUrls?y=c.blockExplorerUrls:y=(d=u.blockExplorers)!=null&&d.default.url?[(h=u.blockExplorers)==null?void 0:h.default.url]:[];let g;(p=c==null?void 0:c.rpcUrls)!=null&&p.length?g=c.rpcUrls:g=[((m=u.rpcUrls.default)==null?void 0:m.http[0])??""];const w={blockExplorerUrls:y,chainId:z(l),chainName:(c==null?void 0:c.chainName)??u.name,iconUrls:c==null?void 0:c.iconUrls,nativeCurrency:(c==null?void 0:c.nativeCurrency)??u.nativeCurrency,rpcUrls:g};return await f.request({method:"wallet_addEthereumChain",params:[w]}),u}catch(y){throw new ge(y)}throw new kt(v)}},onAccountsChanged(c){c.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:c.map(l=>Te(l))})},onChainChanged(c){const l=Number(c);a.emitter.emit("change",{chainId:l})},async onDisconnect(c){a.emitter.emit("disconnect");const l=await this.getProvider();o&&(l.removeListener("accountsChanged",o),o=void 0),s&&(l.removeListener("chainChanged",s),s=void 0),i&&(l.removeListener("disconnect",i),i=void 0)}})}o1.type="metaMask";function o1(e={}){let t,n,r,o,s,i,a,c;return l=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:o1.type,async setup(){const u=await this.getProvider();u!=null&&u.on&&(i||(i=this.onConnect.bind(this),u.on("connect",i)),o||(o=this.onAccountsChanged.bind(this),u.on("accountsChanged",o)))},async connect({chainId:u,isReconnecting:f,withCapabilities:d}={}){const h=await this.getProvider();a||(a=this.onDisplayUri,h.on("display_uri",a));let p=[];f&&(p=await this.getAccounts().catch(()=>[]));try{let m,v;p!=null&&p.length||(e.connectAndSign||e.connectWith?(e.connectAndSign?m=await t.connectAndSign({msg:e.connectAndSign}):e.connectWith&&(v=await t.connectWith({method:e.connectWith.method,params:e.connectWith.params})),p=await this.getAccounts()):p=(await t.connect()).map(w=>Te(w)));let y=await this.getChainId();if(u&&y!==u){const g=await this.switchChain({chainId:u}).catch(w=>{if(w.code===ge.code)throw w;return{id:y}});y=(g==null?void 0:g.id)??y}return a&&(h.removeListener("display_uri",a),a=void 0),m?h.emit("connectAndSign",{accounts:p,chainId:y,signResponse:m}):v&&h.emit("connectWith",{accounts:p,chainId:y,connectWithResponse:v}),i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c)),{accounts:d?p.map(g=>({address:g,capabilities:{}})):p,chainId:y}}catch(m){const v=m;throw v.code===ge.code?new ge(v):v.code===Jn.code?new Jn(v):v}},async disconnect(){const u=await this.getProvider();s&&(u.removeListener("chainChanged",s),s=void 0),c&&(u.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),u.on("connect",i)),await t.terminate()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(d=>Te(d))},async getChainId(){const u=await this.getProvider(),f=u.getChainId()||await(u==null?void 0:u.request({method:"eth_chainId"}));return Number(f)},async getProvider(){async function u(){var m,v,y,g,w;const f=await(async()=>{const{default:x}=await W(async()=>{const{default:E}=await import("./metamask-sdk-CCICWViI.js");return{default:E}},[]);return typeof x!="function"&&typeof x.default=="function"?x.default:x})(),d={};for(const x of l.chains)d[z(x.id)]=(m=$3({chain:x,transports:l.transports}))==null?void 0:m[0];t=new f({_source:"wagmi",forceDeleteProvider:!1,forceInjectProvider:!1,injectProvider:!1,...e,readonlyRPCMap:d,dappMetadata:{...e.dappMetadata,name:(v=e.dappMetadata)!=null&&v.name?(y=e.dappMetadata)==null?void 0:y.name:"wagmi",url:(g=e.dappMetadata)!=null&&g.url?(w=e.dappMetadata)==null?void 0:w.url:typeof window<"u"?window.location.origin:"https://wagmi.sh"},useDeeplink:e.useDeeplink??!0});const h=await t.init(),p=h!=null&&h.activeProvider?h.activeProvider:t.getProvider();if(!p)throw new Yt;return p}return n||(r||(r=u()),n=await r),n},async isAuthorized(){try{return!!(await ms(()=>Kd(()=>this.getAccounts(),{timeout:200}),{delay:201,retryCount:3})).length}catch{return!1}},async switchChain({addEthereumChainParameter:u,chainId:f}){var v,y;const d=await this.getProvider(),h=l.chains.find(g=>g.id===f);if(!h)throw new kt(new xo);try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:z(f)}]}),await p(),await m(f),h}catch(g){const w=g;if(w.code===ge.code)throw new ge(w);if(w.code===4902||((y=(v=w==null?void 0:w.data)==null?void 0:v.originalError)==null?void 0:y.code)===4902)try{return await d.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(()=>{const{default:x,...E}=h.blockExplorers??{};if(u!=null&&u.blockExplorerUrls)return u.blockExplorerUrls;if(x)return[x.url,...Object.values(E).map(A=>A.url)]})(),chainId:z(f),chainName:(u==null?void 0:u.chainName)??h.name,iconUrls:u==null?void 0:u.iconUrls,nativeCurrency:(u==null?void 0:u.nativeCurrency)??h.nativeCurrency,rpcUrls:(()=>{var x,E;return(x=u==null?void 0:u.rpcUrls)!=null&&x.length?u.rpcUrls:[((E=h.rpcUrls.default)==null?void 0:E.http[0])??""]})()}]}),await p(),await m(f),h}catch(x){const E=x;throw E.code===ge.code?new ge(E):new kt(E)}throw new kt(w)}async function p(){await ms(async()=>{const g=tn(await d.request({method:"eth_chainId"}));if(g!==f)throw new Error("User rejected switch after adding network.");return g},{delay:50,retryCount:20})}async function m(g){await new Promise(w=>{const x=E=>{"chainId"in E&&E.chainId===g&&(l.emitter.off("change",x),w())};l.emitter.on("change",x),l.emitter.emit("change",{chainId:g})})}},async onAccountsChanged(u){if(u.length===0)if(t.isExtensionActive())this.onDisconnect();else return;else if(l.emitter.listenerCount("connect")){const f=(await this.getChainId()).toString();this.onConnect({chainId:f})}else l.emitter.emit("change",{accounts:u.map(f=>Te(f))})},onChainChanged(u){const f=Number(u);l.emitter.emit("change",{chainId:f})},async onConnect(u){const f=await this.getAccounts();if(f.length===0)return;const d=Number(u.chainId);l.emitter.emit("connect",{accounts:f,chainId:d});const h=await this.getProvider();i&&(h.removeListener("connect",i),i=void 0),o||(o=this.onAccountsChanged.bind(this),h.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),h.on("disconnect",c))},async onDisconnect(u){const f=await this.getProvider();u&&u.code===1013&&f&&(await this.getAccounts()).length||(l.emitter.emit("disconnect"),s&&(f.removeListener("chainChanged",s),s=void 0),c&&(f.removeListener("disconnect",c),c=void 0),i||(i=this.onConnect.bind(this),f.on("connect",i)))},onDisplayUri(u){l.emitter.emit("message",{type:"display_uri",data:u})}})}s1.type="safe";function s1(e={}){const{shimDisconnect:t=!1}=e;let n,r;return o=>({id:"safe",name:"Safe",type:s1.type,async connect({withCapabilities:s}={}){var l;const i=await this.getProvider();if(!i)throw new Yt;const a=await this.getAccounts(),c=await this.getChainId();return r||(r=this.onDisconnect.bind(this),i.on("disconnect",r)),t&&await((l=o.storage)==null?void 0:l.removeItem("safe.disconnected")),{accounts:s?a.map(u=>({address:u,capabilities:{}})):a,chainId:c}},async disconnect(){var i;const s=await this.getProvider();if(!s)throw new Yt;r&&(s.removeListener("disconnect",r),r=void 0),t&&await((i=o.storage)==null?void 0:i.setItem("safe.disconnected",!0))},async getAccounts(){const s=await this.getProvider();if(!s)throw new Yt;return(await s.request({method:"eth_accounts"})).map(Te)},async getProvider(){if(typeof window<"u"&&(window==null?void 0:window.parent)!==window){if(!n){const{default:i}=await W(async()=>{const{default:u}=await import("./index-BgHayQna.js").then(f=>f.e);return{default:u}},[]),a=new i(e),c=await Kd(()=>a.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!c)throw new Error("Could not load Safe information");const l=await(async()=>{const u=await W(()=>import("./index-BjRfNTdk.js").then(f=>f.i),__vite__mapDeps([5,6,4]));return typeof u.SafeAppProvider!="function"&&typeof u.default.SafeAppProvider=="function"?u.default.SafeAppProvider:u.SafeAppProvider})();n=new l(c,a)}return n}},async getChainId(){const s=await this.getProvider();if(!s)throw new Yt;return Number(s.chainId)},async isAuthorized(){var s;try{return t&&await((s=o.storage)==null?void 0:s.getItem("safe.disconnected"))?!1:!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){o.emitter.emit("disconnect")}})}i1.type="walletConnect";function i1(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let s,i,a,c,l,u;return f=>({id:"walletConnect",name:"WalletConnect",type:i1.type,async setup(){const d=await this.getProvider().catch(()=>null);d&&(a||(a=this.onConnect.bind(this),d.on("connect",a)),l||(l=this.onSessionDelete.bind(this),d.on("session_delete",l)))},async connect({chainId:d,withCapabilities:h,...p}={}){var m,v;try{const y=await this.getProvider();if(!y)throw new Yt;c||(c=this.onDisplayUri,y.on("display_uri",c));let g=d;if(!g){const A=await((m=f.storage)==null?void 0:m.getItem("state"))??{};f.chains.some(S=>S.id===A.chainId)?g=A.chainId:g=(v=f.chains[0])==null?void 0:v.id}if(!g)throw new Error("No chains found on connector.");const w=await this.isChainsStale();if(y.session&&w&&await y.disconnect(),!y.session||w){const A=f.chains.filter(k=>k.id!==g).map(k=>k.id);await y.connect({optionalChains:[g,...A],..."pairingTopic"in p?{pairingTopic:p.pairingTopic}:{}}),this.setRequestedChainsIds(f.chains.map(k=>k.id))}const x=(await y.enable()).map(A=>Te(A));let E=await this.getChainId();if(d&&E!==d){const A=await this.switchChain({chainId:d}).catch(k=>{var S;if(k.code===ge.code&&((S=k.cause)==null?void 0:S.message)!=="Missing or invalid. request() method: wallet_addEthereumChain")throw k;return{id:E}});E=(A==null?void 0:A.id)??E}return c&&(y.removeListener("display_uri",c),c=void 0),a&&(y.removeListener("connect",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),y.on("accountsChanged",s)),i||(i=this.onChainChanged.bind(this),y.on("chainChanged",i)),u||(u=this.onDisconnect.bind(this),y.on("disconnect",u)),l||(l=this.onSessionDelete.bind(this),y.on("session_delete",l)),{accounts:h?x.map(A=>({address:A,capabilities:{}})):x,chainId:E}}catch(y){throw/(user rejected|connection request reset)/i.test(y==null?void 0:y.message)?new ge(y):y}},async disconnect(){const d=await this.getProvider();try{await(d==null?void 0:d.disconnect())}catch(h){if(!/No matching key/i.test(h.message))throw h}finally{i&&(d==null||d.removeListener("chainChanged",i),i=void 0),u&&(d==null||d.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),d==null||d.on("connect",a)),s&&(d==null||d.removeListener("accountsChanged",s),s=void 0),l&&(d==null||d.removeListener("session_delete",l),l=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(h=>Te(h))},async getProvider({chainId:d}={}){var p;async function h(){const m=f.chains.map(y=>y.id);if(!m.length)return;const{EthereumProvider:v}=await W(async()=>{const{EthereumProvider:y}=await import("./index.es-BaHcVq9H.js").then(g=>g.X);return{EthereumProvider:y}},__vite__mapDeps([7,4,2]));return await v.init({...e,disableProviderPing:!0,optionalChains:m,projectId:e.projectId,rpcMap:Object.fromEntries(f.chains.map(y=>{const[g]=$3({chain:y,transports:f.transports});return[y.id,g]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=h()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),d&&await((p=this.switchChain)==null?void 0:p.call(this,{chainId:d})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[d,h]=await Promise.all([this.getAccounts(),this.getProvider()]);return d.length?await this.isChainsStale()&&h.session?(await h.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:d,chainId:h}){var v,y,g;const p=await this.getProvider();if(!p)throw new Yt;const m=f.chains.find(w=>w.id===h);if(!m)throw new kt(new xo);try{await Promise.all([new Promise(x=>{const E=({chainId:A})=>{A===h&&(f.emitter.off("change",E),x())};f.emitter.on("change",E)}),p.request({method:"wallet_switchEthereumChain",params:[{chainId:z(h)}]})]);const w=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...w,h]),m}catch(w){const x=w;if(/(user rejected)/i.test(x.message))throw new ge(x);try{let E;d!=null&&d.blockExplorerUrls?E=d.blockExplorerUrls:E=(v=m.blockExplorers)!=null&&v.default.url?[(y=m.blockExplorers)==null?void 0:y.default.url]:[];let A;(g=d==null?void 0:d.rpcUrls)!=null&&g.length?A=d.rpcUrls:A=[...m.rpcUrls.default.http];const k={blockExplorerUrls:E,chainId:z(h),chainName:(d==null?void 0:d.chainName)??m.name,iconUrls:d==null?void 0:d.iconUrls,nativeCurrency:(d==null?void 0:d.nativeCurrency)??m.nativeCurrency,rpcUrls:A};await p.request({method:"wallet_addEthereumChain",params:[k]});const S=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...S,h]),m}catch(E){throw new ge(E)}}},onAccountsChanged(d){d.length===0?this.onDisconnect():f.emitter.emit("change",{accounts:d.map(h=>Te(h))})},onChainChanged(d){const h=Number(d);f.emitter.emit("change",{chainId:h})},async onConnect(d){const h=Number(d.chainId),p=await this.getAccounts();f.emitter.emit("connect",{accounts:p,chainId:h})},async onDisconnect(d){this.setRequestedChainsIds([]),f.emitter.emit("disconnect");const h=await this.getProvider();s&&(h.removeListener("accountsChanged",s),s=void 0),i&&(h.removeListener("chainChanged",i),i=void 0),u&&(h.removeListener("disconnect",u),u=void 0),l&&(h.removeListener("session_delete",l),l=void 0),a||(a=this.onConnect.bind(this),h.on("connect",a))},onDisplayUri(d){f.emitter.emit("message",{type:"display_uri",data:d})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var h,p,m;return n?((m=(p=(h=n.session)==null?void 0:h.namespaces[o])==null?void 0:p.accounts)==null?void 0:m.map(v=>Number.parseInt(v.split(":")[1]||"",10)))??[]:[]},async getRequestedChainsIds(){var d;return await((d=f.storage)==null?void 0:d.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!t)return!1;const d=f.chains.map(m=>m.id),h=this.getNamespaceChainsIds();if(h.length&&!h.some(m=>d.includes(m)))return!1;const p=await this.getRequestedChainsIds();return!d.every(m=>p.includes(m))},async setRequestedChainsIds(d){var h;await((h=f.storage)==null?void 0:h.setItem(this.requestedChainsStorageKey,d))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}var ud={},_R=768,Ts=zA({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),VC=Gx({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Q0=QA({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},accentColorForeground:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonBorder:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},actionButtonBorderMobile:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},closeButton:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},closeButtonBackground:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonBackgroundError:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonInnerBackground:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectButtonText:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},connectButtonTextError:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},connectionIndicator:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},downloadBottomCardBackground:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},downloadTopCardBackground:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},error:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},generalBorder:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},generalBorderDim:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},menuItemBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBackdrop:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalBackground:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalBorder:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalText:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},modalTextDim:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},modalTextSecondary:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileAction:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},profileActionHover:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},profileForeground:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"},selectedOptionBorder:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},standby:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},accentColorForeground:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonBorder:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},actionButtonBorderMobile:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},closeButton:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},closeButtonBackground:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonBackgroundError:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonInnerBackground:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectButtonText:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},connectButtonTextError:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},connectionIndicator:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},downloadBottomCardBackground:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},downloadTopCardBackground:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},error:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},generalBorder:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},generalBorderDim:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},menuItemBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBackdrop:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalBackground:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalBorder:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalText:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},modalTextDim:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},modalTextSecondary:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileAction:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},profileActionHover:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},profileForeground:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"},selectedOptionBorder:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},standby:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},dialog:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},profileDetailsAction:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},selectedOption:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"},selectedWallet:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},walletLogo:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"}}},color:{values:{accentColor:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},accentColorForeground:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonBorder:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},actionButtonBorderMobile:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},actionButtonSecondaryBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},closeButton:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},closeButtonBackground:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonBackgroundError:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonInnerBackground:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectButtonText:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},connectButtonTextError:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},connectionIndicator:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},downloadBottomCardBackground:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},downloadTopCardBackground:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},error:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},generalBorder:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},generalBorderDim:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},menuItemBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBackdrop:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalBackground:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalBorder:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalText:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},modalTextDim:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},modalTextSecondary:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileAction:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},profileActionHover:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},profileForeground:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"},selectedOptionBorder:{conditions:{base:"ju367vhc",hover:"ju367vhd",active:"ju367vhe"},defaultClass:"ju367vhc"},standby:{conditions:{base:"ju367vhf",hover:"ju367vhg",active:"ju367vhh"},defaultClass:"ju367vhf"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"},none:{defaultClass:"ju367vz"}}},pointerEvents:{values:{none:{defaultClass:"ju367v10"},all:{defaultClass:"ju367v11"}}},minHeight:{values:{8:{defaultClass:"ju367v12"},44:{defaultClass:"ju367v13"}}},flexDirection:{values:{row:{defaultClass:"ju367v14"},column:{defaultClass:"ju367v15"}}},fontFamily:{values:{body:{defaultClass:"ju367v16"}}},fontSize:{values:{12:{defaultClass:"ju367v17"},13:{defaultClass:"ju367v18"},14:{defaultClass:"ju367v19"},16:{defaultClass:"ju367v1a"},18:{defaultClass:"ju367v1b"},20:{defaultClass:"ju367v1c"},23:{defaultClass:"ju367v1d"}}},fontWeight:{values:{regular:{defaultClass:"ju367v1e"},medium:{defaultClass:"ju367v1f"},semibold:{defaultClass:"ju367v1g"},bold:{defaultClass:"ju367v1h"},heavy:{defaultClass:"ju367v1i"}}},gap:{values:{0:{defaultClass:"ju367v1j"},1:{defaultClass:"ju367v1k"},2:{defaultClass:"ju367v1l"},3:{defaultClass:"ju367v1m"},4:{defaultClass:"ju367v1n"},5:{defaultClass:"ju367v1o"},6:{defaultClass:"ju367v1p"},8:{defaultClass:"ju367v1q"},10:{defaultClass:"ju367v1r"},12:{defaultClass:"ju367v1s"},14:{defaultClass:"ju367v1t"},16:{defaultClass:"ju367v1u"},18:{defaultClass:"ju367v1v"},20:{defaultClass:"ju367v1w"},24:{defaultClass:"ju367v1x"},28:{defaultClass:"ju367v1y"},32:{defaultClass:"ju367v1z"},36:{defaultClass:"ju367v20"},44:{defaultClass:"ju367v21"},64:{defaultClass:"ju367v22"},"-1":{defaultClass:"ju367v23"}}},height:{values:{1:{defaultClass:"ju367v24"},2:{defaultClass:"ju367v25"},4:{defaultClass:"ju367v26"},8:{defaultClass:"ju367v27"},12:{defaultClass:"ju367v28"},20:{defaultClass:"ju367v29"},24:{defaultClass:"ju367v2a"},28:{defaultClass:"ju367v2b"},30:{defaultClass:"ju367v2c"},32:{defaultClass:"ju367v2d"},34:{defaultClass:"ju367v2e"},36:{defaultClass:"ju367v2f"},40:{defaultClass:"ju367v2g"},44:{defaultClass:"ju367v2h"},48:{defaultClass:"ju367v2i"},54:{defaultClass:"ju367v2j"},60:{defaultClass:"ju367v2k"},200:{defaultClass:"ju367v2l"},full:{defaultClass:"ju367v2m"},max:{defaultClass:"ju367v2n"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2o"},"flex-end":{defaultClass:"ju367v2p"},center:{defaultClass:"ju367v2q"},"space-between":{defaultClass:"ju367v2r"},"space-around":{defaultClass:"ju367v2s"}}},textAlign:{values:{left:{defaultClass:"ju367v2t"},center:{defaultClass:"ju367v2u"},inherit:{defaultClass:"ju367v2v"}}},marginBottom:{values:{0:{defaultClass:"ju367v2w"},1:{defaultClass:"ju367v2x"},2:{defaultClass:"ju367v2y"},3:{defaultClass:"ju367v2z"},4:{defaultClass:"ju367v30"},5:{defaultClass:"ju367v31"},6:{defaultClass:"ju367v32"},8:{defaultClass:"ju367v33"},10:{defaultClass:"ju367v34"},12:{defaultClass:"ju367v35"},14:{defaultClass:"ju367v36"},16:{defaultClass:"ju367v37"},18:{defaultClass:"ju367v38"},20:{defaultClass:"ju367v39"},24:{defaultClass:"ju367v3a"},28:{defaultClass:"ju367v3b"},32:{defaultClass:"ju367v3c"},36:{defaultClass:"ju367v3d"},44:{defaultClass:"ju367v3e"},64:{defaultClass:"ju367v3f"},"-1":{defaultClass:"ju367v3g"}}},marginLeft:{values:{0:{defaultClass:"ju367v3h"},1:{defaultClass:"ju367v3i"},2:{defaultClass:"ju367v3j"},3:{defaultClass:"ju367v3k"},4:{defaultClass:"ju367v3l"},5:{defaultClass:"ju367v3m"},6:{defaultClass:"ju367v3n"},8:{defaultClass:"ju367v3o"},10:{defaultClass:"ju367v3p"},12:{defaultClass:"ju367v3q"},14:{defaultClass:"ju367v3r"},16:{defaultClass:"ju367v3s"},18:{defaultClass:"ju367v3t"},20:{defaultClass:"ju367v3u"},24:{defaultClass:"ju367v3v"},28:{defaultClass:"ju367v3w"},32:{defaultClass:"ju367v3x"},36:{defaultClass:"ju367v3y"},44:{defaultClass:"ju367v3z"},64:{defaultClass:"ju367v40"},"-1":{defaultClass:"ju367v41"}}},marginRight:{values:{0:{defaultClass:"ju367v42"},1:{defaultClass:"ju367v43"},2:{defaultClass:"ju367v44"},3:{defaultClass:"ju367v45"},4:{defaultClass:"ju367v46"},5:{defaultClass:"ju367v47"},6:{defaultClass:"ju367v48"},8:{defaultClass:"ju367v49"},10:{defaultClass:"ju367v4a"},12:{defaultClass:"ju367v4b"},14:{defaultClass:"ju367v4c"},16:{defaultClass:"ju367v4d"},18:{defaultClass:"ju367v4e"},20:{defaultClass:"ju367v4f"},24:{defaultClass:"ju367v4g"},28:{defaultClass:"ju367v4h"},32:{defaultClass:"ju367v4i"},36:{defaultClass:"ju367v4j"},44:{defaultClass:"ju367v4k"},64:{defaultClass:"ju367v4l"},"-1":{defaultClass:"ju367v4m"}}},marginTop:{values:{0:{defaultClass:"ju367v4n"},1:{defaultClass:"ju367v4o"},2:{defaultClass:"ju367v4p"},3:{defaultClass:"ju367v4q"},4:{defaultClass:"ju367v4r"},5:{defaultClass:"ju367v4s"},6:{defaultClass:"ju367v4t"},8:{defaultClass:"ju367v4u"},10:{defaultClass:"ju367v4v"},12:{defaultClass:"ju367v4w"},14:{defaultClass:"ju367v4x"},16:{defaultClass:"ju367v4y"},18:{defaultClass:"ju367v4z"},20:{defaultClass:"ju367v50"},24:{defaultClass:"ju367v51"},28:{defaultClass:"ju367v52"},32:{defaultClass:"ju367v53"},36:{defaultClass:"ju367v54"},44:{defaultClass:"ju367v55"},64:{defaultClass:"ju367v56"},"-1":{defaultClass:"ju367v57"}}},maxWidth:{values:{1:{defaultClass:"ju367v58"},2:{defaultClass:"ju367v59"},4:{defaultClass:"ju367v5a"},8:{defaultClass:"ju367v5b"},12:{defaultClass:"ju367v5c"},20:{defaultClass:"ju367v5d"},24:{defaultClass:"ju367v5e"},28:{defaultClass:"ju367v5f"},30:{defaultClass:"ju367v5g"},32:{defaultClass:"ju367v5h"},34:{defaultClass:"ju367v5i"},36:{defaultClass:"ju367v5j"},40:{defaultClass:"ju367v5k"},44:{defaultClass:"ju367v5l"},48:{defaultClass:"ju367v5m"},54:{defaultClass:"ju367v5n"},60:{defaultClass:"ju367v5o"},200:{defaultClass:"ju367v5p"},full:{defaultClass:"ju367v5q"},max:{defaultClass:"ju367v5r"}}},minWidth:{values:{1:{defaultClass:"ju367v5s"},2:{defaultClass:"ju367v5t"},4:{defaultClass:"ju367v5u"},8:{defaultClass:"ju367v5v"},12:{defaultClass:"ju367v5w"},20:{defaultClass:"ju367v5x"},24:{defaultClass:"ju367v5y"},28:{defaultClass:"ju367v5z"},30:{defaultClass:"ju367v60"},32:{defaultClass:"ju367v61"},34:{defaultClass:"ju367v62"},36:{defaultClass:"ju367v63"},40:{defaultClass:"ju367v64"},44:{defaultClass:"ju367v65"},48:{defaultClass:"ju367v66"},54:{defaultClass:"ju367v67"},60:{defaultClass:"ju367v68"},200:{defaultClass:"ju367v69"},full:{defaultClass:"ju367v6a"},max:{defaultClass:"ju367v6b"}}},overflow:{values:{hidden:{defaultClass:"ju367v6c"}}},paddingBottom:{values:{0:{defaultClass:"ju367v6d"},1:{defaultClass:"ju367v6e"},2:{defaultClass:"ju367v6f"},3:{defaultClass:"ju367v6g"},4:{defaultClass:"ju367v6h"},5:{defaultClass:"ju367v6i"},6:{defaultClass:"ju367v6j"},8:{defaultClass:"ju367v6k"},10:{defaultClass:"ju367v6l"},12:{defaultClass:"ju367v6m"},14:{defaultClass:"ju367v6n"},16:{defaultClass:"ju367v6o"},18:{defaultClass:"ju367v6p"},20:{defaultClass:"ju367v6q"},24:{defaultClass:"ju367v6r"},28:{defaultClass:"ju367v6s"},32:{defaultClass:"ju367v6t"},36:{defaultClass:"ju367v6u"},44:{defaultClass:"ju367v6v"},64:{defaultClass:"ju367v6w"},"-1":{defaultClass:"ju367v6x"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6y"},1:{defaultClass:"ju367v6z"},2:{defaultClass:"ju367v70"},3:{defaultClass:"ju367v71"},4:{defaultClass:"ju367v72"},5:{defaultClass:"ju367v73"},6:{defaultClass:"ju367v74"},8:{defaultClass:"ju367v75"},10:{defaultClass:"ju367v76"},12:{defaultClass:"ju367v77"},14:{defaultClass:"ju367v78"},16:{defaultClass:"ju367v79"},18:{defaultClass:"ju367v7a"},20:{defaultClass:"ju367v7b"},24:{defaultClass:"ju367v7c"},28:{defaultClass:"ju367v7d"},32:{defaultClass:"ju367v7e"},36:{defaultClass:"ju367v7f"},44:{defaultClass:"ju367v7g"},64:{defaultClass:"ju367v7h"},"-1":{defaultClass:"ju367v7i"}}},paddingRight:{values:{0:{defaultClass:"ju367v7j"},1:{defaultClass:"ju367v7k"},2:{defaultClass:"ju367v7l"},3:{defaultClass:"ju367v7m"},4:{defaultClass:"ju367v7n"},5:{defaultClass:"ju367v7o"},6:{defaultClass:"ju367v7p"},8:{defaultClass:"ju367v7q"},10:{defaultClass:"ju367v7r"},12:{defaultClass:"ju367v7s"},14:{defaultClass:"ju367v7t"},16:{defaultClass:"ju367v7u"},18:{defaultClass:"ju367v7v"},20:{defaultClass:"ju367v7w"},24:{defaultClass:"ju367v7x"},28:{defaultClass:"ju367v7y"},32:{defaultClass:"ju367v7z"},36:{defaultClass:"ju367v80"},44:{defaultClass:"ju367v81"},64:{defaultClass:"ju367v82"},"-1":{defaultClass:"ju367v83"}}},paddingTop:{values:{0:{defaultClass:"ju367v84"},1:{defaultClass:"ju367v85"},2:{defaultClass:"ju367v86"},3:{defaultClass:"ju367v87"},4:{defaultClass:"ju367v88"},5:{defaultClass:"ju367v89"},6:{defaultClass:"ju367v8a"},8:{defaultClass:"ju367v8b"},10:{defaultClass:"ju367v8c"},12:{defaultClass:"ju367v8d"},14:{defaultClass:"ju367v8e"},16:{defaultClass:"ju367v8f"},18:{defaultClass:"ju367v8g"},20:{defaultClass:"ju367v8h"},24:{defaultClass:"ju367v8i"},28:{defaultClass:"ju367v8j"},32:{defaultClass:"ju367v8k"},36:{defaultClass:"ju367v8l"},44:{defaultClass:"ju367v8m"},64:{defaultClass:"ju367v8n"},"-1":{defaultClass:"ju367v8o"}}},position:{values:{absolute:{defaultClass:"ju367v8p"},fixed:{defaultClass:"ju367v8q"},relative:{defaultClass:"ju367v8r"}}},WebkitUserSelect:{values:{none:{defaultClass:"ju367v8s"}}},right:{values:{0:{defaultClass:"ju367v8t"}}},transition:{values:{default:{defaultClass:"ju367v8u"},transform:{defaultClass:"ju367v8v"}}},userSelect:{values:{none:{defaultClass:"ju367v8w"}}},width:{values:{1:{defaultClass:"ju367v8x"},2:{defaultClass:"ju367v8y"},4:{defaultClass:"ju367v8z"},8:{defaultClass:"ju367v90"},12:{defaultClass:"ju367v91"},20:{defaultClass:"ju367v92"},24:{defaultClass:"ju367v93"},28:{defaultClass:"ju367v94"},30:{defaultClass:"ju367v95"},32:{defaultClass:"ju367v96"},34:{defaultClass:"ju367v97"},36:{defaultClass:"ju367v98"},40:{defaultClass:"ju367v99"},44:{defaultClass:"ju367v9a"},48:{defaultClass:"ju367v9b"},54:{defaultClass:"ju367v9c"},60:{defaultClass:"ju367v9d"},200:{defaultClass:"ju367v9e"},full:{defaultClass:"ju367v9f"},max:{defaultClass:"ju367v9g"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9h"}}}}}),Nb={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},IR={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},BR="_12cbo8i3 ju367v8r",NR={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function ze({active:e,hover:t}){return[BR,t&&NR[t],IR[e]]}var HC=j.createContext(null);function PR(){const{adapter:e}=j.useContext(HC)??{};if(!e)throw new Error("No authentication adapter found");return e}function hf(){const e=j.useContext(HC);return(e==null?void 0:e.status)??null}function a1(){const e=hf(),{isConnected:t}=gt();return t?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function TR(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function OR(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function RR(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function pf(){return OR()||RR()}function nt(){return TR()||pf()}var MR="iekbcc0",LR={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},FR=({reset:e,...t})=>{if(!e)return Q0(t);const n=LR[e],r=Q0(t);return fC(MR,n,r)},I=C.forwardRef(({as:e="div",className:t,testId:n,...r},o)=>{const s={},i={};for(const c in r)Q0.properties.has(c)?s[c]=r[c]:i[c]=r[c];const a=FR({reset:typeof e=="string"?e:"div",...s});return C.createElement(e,{className:fC(a,t),...i,"data-testid":n?`rk-${n.replace(/^rk-/,"")}`:void 0,ref:o})});I.displayName="Box";var QC=new Map,Bh=new Map;async function GC(e){const t=Bh.get(e);if(t)return t;const n=async()=>e().then(async o=>(QC.set(e,o),o)),r=n().catch(o=>n().catch(s=>{Bh.delete(e)}));return Bh.set(e,r),r}async function tr(...e){return await Promise.all(e.map(t=>typeof t=="function"?GC(t):t))}function DR(){const[,e]=j.useReducer(t=>t+1,0);return e}function mf(e){const t=typeof e=="function"?QC.get(e):void 0,n=DR();return j.useEffect(()=>{typeof e=="function"&&!t&&GC(e).then(n)},[e,t,n]),typeof e=="function"?t:e}function tt({alt:e,background:t,borderColor:n,borderRadius:r,useAsImage:o,boxShadow:s,height:i,src:a,width:c,testId:l}){const u=pf(),f=mf(a),d=f&&/^http/.test(f),[h,p]=j.useReducer(()=>!0,!1);return C.createElement(I,{"aria-label":e,borderRadius:r,boxShadow:s,height:typeof i=="string"?i:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:t,height:typeof i=="number"?i:void 0,width:typeof c=="number"?c:void 0},width:typeof c=="string"?c:void 0,testId:l},C.createElement(I,{...d?{"aria-hidden":!0,as:"img",onLoad:p,src:f}:{"aria-hidden":!0,as:"img",src:f},height:"full",position:"absolute",...u?{WebkitUserSelect:"none"}:{},style:{WebkitTouchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...!o&&d?{opacity:h?1:0}:{}},width:"full"}),n?C.createElement(I,{...typeof n=="object"&&"custom"in n?{style:{borderColor:n.custom}}:{borderColor:n},borderRadius:r,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var UR="_1luule42",zR="_1luule43",$R=e=>j.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Mc=({height:e=21,width:t=21})=>{const n=$R("spinner");return C.createElement("svg",{className:UR,fill:"none",height:e,viewBox:"0 0 21 21",width:t,xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Loading"),C.createElement("clipPath",{id:n},C.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),C.createElement("foreignObject",{clipPath:`url(#${n})`,height:"21",width:"21",x:"0",y:"0"},C.createElement("div",{className:zR})))},fe=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],Pb=[{color:fe[0],emoji:"🌶"},{color:fe[1],emoji:"🤑"},{color:fe[2],emoji:"🐙"},{color:fe[3],emoji:"🫐"},{color:fe[4],emoji:"🐳"},{color:fe[0],emoji:"🤶"},{color:fe[5],emoji:"🌲"},{color:fe[6],emoji:"🌞"},{color:fe[7],emoji:"🐒"},{color:fe[8],emoji:"🐵"},{color:fe[9],emoji:"🦊"},{color:fe[10],emoji:"🐼"},{color:fe[11],emoji:"🦄"},{color:fe[12],emoji:"🐷"},{color:fe[13],emoji:"🐧"},{color:fe[8],emoji:"🦩"},{color:fe[14],emoji:"👽"},{color:fe[0],emoji:"🎈"},{color:fe[8],emoji:"🍉"},{color:fe[1],emoji:"🎉"},{color:fe[15],emoji:"🐲"},{color:fe[16],emoji:"🌎"},{color:fe[17],emoji:"🍊"},{color:fe[18],emoji:"🐭"},{color:fe[19],emoji:"🍣"},{color:fe[1],emoji:"🐥"},{color:fe[20],emoji:"👾"},{color:fe[15],emoji:"🥦"},{color:fe[0],emoji:"👹"},{color:fe[17],emoji:"🙀"},{color:fe[4],emoji:"⛱"},{color:fe[21],emoji:"⛵️"},{color:fe[17],emoji:"🥳"},{color:fe[8],emoji:"🤯"},{color:fe[22],emoji:"🤠"}];function WR(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}function qR(e){const n=Math.abs(WR((typeof e=="string"?e:"").toLowerCase())%Pb.length);return Pb[n??0]}var VR=({address:e,ensImage:t,size:n})=>{const[r,o]=j.useState(!1);j.useEffect(()=>{if(t){const a=new Image;a.src=t,a.onload=()=>o(!0)}},[t]);const{color:s,emoji:i}=j.useMemo(()=>qR(e),[e]);return t?r?C.createElement(I,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${t})`,backgroundPosition:"center",height:n,width:n}}):C.createElement(I,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:n,width:n}},C.createElement(Mc,null)):C.createElement(I,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!t&&{backgroundColor:s},height:n,width:n}},i)},KC=VR,YC=j.createContext(KC);function JC({address:e,imageUrl:t,loading:n,size:r}){const o=j.useContext(YC);return C.createElement(I,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${r}px`,width:`${r}px`},userSelect:"none"},C.createElement(I,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(r*.55)}px`,height:`${r}px`,transform:n?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:n?void 0:".1s",width:`${r}px`,willChange:"transform"},userSelect:"none"},C.createElement(o,{address:e,ensImage:t,size:r})),n&&C.createElement(I,{color:"accentColor",display:"flex",height:"full",position:"absolute",width:"full"},C.createElement(Mc,{height:"100%",width:"100%"})))}var Tb=()=>C.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Dropdown"),C.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),Ob={defaultLocale:"en",locale:"en"},HR=class{constructor(e){this.listeners=new Set,this.defaultLocale=Ob.defaultLocale,this.enableFallback=!1,this.locale=Ob.locale,this.cachedLocales=[],this.translations={};for(const[t,n]of Object.entries(e))this.cachedLocales=[...this.cachedLocales,t],this.translations={...this.translations,...this.flattenTranslation(n,t)}}missingMessage(e){return`[missing: "${this.locale}.${e}" translation]`}flattenTranslation(e,t){const n={},r=(o,s)=>{for(const i of Object.keys(o)){const a=`${s}.${i}`,c=o[i];typeof c=="object"&&c!==null?r(c,a):n[a]=c}};return r(e,t),n}translateWithReplacements(e,t={}){let n=e;for(const r in t){const o=t[r];n=n.replace(`%{${r}}`,o)}return n}t(e,t,n){const r=`${this.locale}.${e}`,o=this.translations[r];if(!o){if(this.enableFallback){const s=`${this.defaultLocale}.${e}`,i=this.translations[s];if(i)return this.translateWithReplacements(i,t)}return n!=null&&n.rawKeyIfTranslationMissing?e:this.missingMessage(e)}return this.translateWithReplacements(o,t)}isLocaleCached(e){return this.cachedLocales.includes(e)}updateLocale(e){this.locale=e,this.notifyListeners()}setTranslations(e,t){this.isLocaleCached(e)||(this.cachedLocales=[...this.cachedLocales,e],this.translations={...this.translations,...this.flattenTranslation(t,e)}),this.locale=e,this.notifyListeners()}notifyListeners(){for(const e of this.listeners)e()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},hn=new HR({en:JSON.parse(Dp),"en-US":JSON.parse(Dp)});hn.defaultLocale="en-US";hn.locale="en-US";hn.enableFallback=!0;var QR=async e=>{switch(e){case"ar":case"ar-AR":return(await W(async()=>{const{default:t}=await import("./ar_AR-44JUQ6EW-BMX-am0v.js");return{default:t}},[])).default;case"de":case"de-DE":return(await W(async()=>{const{default:t}=await import("./de_DE-PYAO5YD6-BWlqPWgO.js");return{default:t}},[])).default;case"en":case"en-US":return(await W(async()=>{const{default:t}=await Promise.resolve().then(()=>gv);return{default:t}},void 0)).default;case"es":case"es-419":return(await W(async()=>{const{default:t}=await import("./es_419-HRGOJ6VT-D-qzxUM-.js");return{default:t}},[])).default;case"fr":case"fr-FR":return(await W(async()=>{const{default:t}=await import("./fr_FR-IGGVC6RM-D8LpUM75.js");return{default:t}},[])).default;case"hi":case"hi-IN":return(await W(async()=>{const{default:t}=await import("./hi_IN-XSKAA3MF-C3QUpWyP.js");return{default:t}},[])).default;case"id":case"id-ID":return(await W(async()=>{const{default:t}=await import("./id_ID-KUOB4UAL-K9y-nRWm.js");return{default:t}},[])).default;case"ja":case"ja-JP":return(await W(async()=>{const{default:t}=await import("./ja_JP-4WRQ63RX-Ct5pF4ug.js");return{default:t}},[])).default;case"ko":case"ko-KR":return(await W(async()=>{const{default:t}=await import("./ko_KR-I2K7AIEP-B5gw8Mwb.js");return{default:t}},[])).default;case"ms":case"ms-MY":return(await W(async()=>{const{default:t}=await import("./ms_MY-6VZW6Q3Z-BtFD07hR.js");return{default:t}},[])).default;case"pt":case"pt-BR":return(await W(async()=>{const{default:t}=await import("./pt_BR-N3XOZ4SV-CvVpfsHb.js");return{default:t}},[])).default;case"ru":case"ru-RU":return(await W(async()=>{const{default:t}=await import("./ru_RU-IITAPRET-DOj6Jzj7.js");return{default:t}},[])).default;case"th":case"th-TH":return(await W(async()=>{const{default:t}=await import("./th_TH-3ZQCKCQE-BcHUN2Q4.js");return{default:t}},[])).default;case"tr":case"tr-TR":return(await W(async()=>{const{default:t}=await import("./tr_TR-QUPUGMUF-CwpF6ZFn.js");return{default:t}},[])).default;case"ua":case"uk-UA":return(await W(async()=>{const{default:t}=await import("./uk_UA-SSN6SV5E-IlYYyRC6.js");return{default:t}},[])).default;case"vi":case"vi-VN":return(await W(async()=>{const{default:t}=await import("./vi_VN-7BUVRNYY-CZ9S75qZ.js");return{default:t}},[])).default;case"zh":case"zh-CN":case"zh-Hans":return(await W(async()=>{const{default:t}=await import("./zh_CN-HJBN674C-Baf0GEeT.js");return{default:t}},[])).default;case"zh-HK":return(await W(async()=>{const{default:t}=await import("./zh_HK-JW3WLRKE-VztJKXL5.js");return{default:t}},[])).default;case"zh-Hant":case"zh-TW":return(await W(async()=>{const{default:t}=await import("./zh_TW-VNNRNXY7-aWfg7Qp4.js");return{default:t}},[])).default;default:return(await W(async()=>{const{default:t}=await Promise.resolve().then(()=>gv);return{default:t}},void 0)).default}};async function Rb(e){if(hn.isLocaleCached(e)){hn.updateLocale(e);return}const n=await QR(e);hn.setTranslations(e,JSON.parse(n))}var GR=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},qe=j.createContext({i18n:hn}),KR=({children:e,locale:t})=>{const[n,r]=j.useState(0),o=j.useMemo(()=>GR(),[]);j.useEffect(()=>hn.onChange(()=>{r(a=>a+1)}),[]),j.useEffect(()=>{t&&t!==hn.locale?Rb(t):!t&&o&&o!==hn.locale&&Rb(o)},[t,o]);const s=j.useMemo(()=>({t:(a,c)=>hn.t(a,c),i18n:hn}),[n]);return C.createElement(qe.Provider,{value:s},e)};function XC(e){return e!=null}var Mb={iconBackground:"#7290CC",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./apechain-SX5YFU6N-q5qBv-mp.js");return{default:e}},[])).default},Nh={iconBackground:"#96bedc",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./arbitrum-WURIBY6W-CqVkHBr5.js");return{default:e}},[])).default},Lb={iconBackground:"#e84141",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./avalanche-KOMJD3XY-Dsn_JPR4.js");return{default:e}},[])).default},Ph={iconBackground:"#0052ff",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./base-OAXLRA4F-CoYTVIiL.js");return{default:e}},[])).default},Th={iconBackground:"#814625",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./berachain-NJECWIVC-DumxnFvf.js");return{default:e}},[])).default},Fb={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./blast-V555OVXZ-BbhJh1tj.js");return{default:e}},[])).default},Db={iconBackground:"#ebac0e",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./bsc-N647EYR2-B2nLKXWV.js");return{default:e}},[])).default},Ub={iconBackground:"#FCFF52",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./celo-GEP4TUHG-CenIBYLU.js");return{default:e}},[])).default},zb={iconBackground:"#002D74",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./cronos-HJPAQTAE-BEOvlOC4.js");return{default:e}},[])).default},YR={iconBackground:"#A36EFD",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./degen-FQQ4XGHB-CeHTs88l.js");return{default:e}},[])).default},Ur={iconBackground:"#484c50",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./ethereum-RGGVA4PY-SWGOlkuk.js");return{default:e}},[])).default},$b={iconBackground:"transparent",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./flow-5FQJFCTK-CUie2reO.js");return{default:e}},[])).default},JR={iconBackground:"#04795c",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./gnosis-37ZC4RBL-B137OtHZ.js");return{default:e}},[])).default},Wb={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./gravity-J5YQHTYH-Bj6B0uod.js");return{default:e}},[])).default},XR={iconBackground:"#f9f7ec",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./hardhat-TX56IT5N-CV1FY-wE.js");return{default:e}},[])).default},ZR={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./hyperevm-VKPAA4SA-CHwraEsx.js");return{default:e}},[])).default},qb={iconBackground:"#7132F5",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./ink-FZMYZWHG-62p-5IK5.js");return{default:e}},[])).default},Vb={iconBackground:"transparent",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./kaia-65D2U3PU-JmuLQ4gC.js");return{default:e}},[])).default},Oh={iconBackground:"#ffffff",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./linea-QRMVQ5DY-DuI3vv0d.js");return{default:e}},[])).default},Rh={iconBackground:"#ffffff",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./manta-SI27YFEJ-CpVOKa06.js");return{default:e}},[])).default},Hb={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./mantle-CKIUT334-DR2WgqzU.js");return{default:e}},[])).default},eM={iconBackground:"transparent",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./monad-4KWC6TSS-DVXSkpiz.js");return{default:e}},[])).default},Ql={iconBackground:"#ff5a57",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./optimism-HAF2GUT7-ec6Nqxs9.js");return{default:e}},[])).default},Mh={iconBackground:"#9f71ec",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./polygon-WW6ZI7PM-DXlmm4L1.js");return{default:e}},[])).default},tM={iconBackground:"#1273EA",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./ronin-EMCPYXZT-N-QBHZdV.js");return{default:e}},[])).default},nM={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./sanko-RHQYXGM5-OX010CbN.js");return{default:e}},[])).default},rM={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./superposition-HG6MMR2Y-bRkgatRO.js");return{default:e}},[])).default},Qb={iconBackground:"#FFEEDA",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./scroll-5OBGQVOV-DJFECiai.js");return{default:e}},[])).default},Gb={iconBackground:"#F50DB4",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./unichain-C5BWO2ZY-BfguYsnu.js");return{default:e}},[])).default},Kb={iconBackground:"#f9f7ec",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./xdc-KJ3TDBYO-DNV6zchh.js");return{default:e}},[])).default},Yb={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./zetachain-TLDS5IPW-Udhyw16T.js");return{default:e}},[])).default},Jb={iconBackground:"#f9f7ec",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./zksync-DH7HK5U4-Dt4usFw6.js");return{default:e}},[])).default},Lh={iconBackground:"#000000",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./zora-FYL5H3IO-iB4wygST.js");return{default:e}},[])).default},oM={apechain:{chainId:33139,name:"ApeChain",...Mb},apechainCurtis:{chainId:33111,name:"ApeChain Curtis",...Mb},arbitrum:{chainId:42161,name:"Arbitrum",...Nh},arbitrumGoerli:{chainId:421613,...Nh},arbitrumSepolia:{chainId:421614,...Nh},avalanche:{chainId:43114,...Lb},avalancheFuji:{chainId:43113,...Lb},base:{chainId:8453,name:"Base",...Ph},baseGoerli:{chainId:84531,...Ph},baseSepolia:{chainId:84532,...Ph},berachain:{chainId:80094,name:"Berachain",...Th},berachainArtio:{chainId:80085,name:"Berachain Artio",...Th},berachainBArtio:{chainId:80084,name:"Berachain bArtio",...Th},blast:{chainId:81457,name:"Blast",...Fb},blastSepolia:{chainId:168587773,...Fb},bsc:{chainId:56,name:"BSC",...Db},bscTestnet:{chainId:97,...Db},celo:{chainId:42220,name:"Celo",...Ub},celoAlfajores:{chainId:44787,name:"Celo Alfajores",...Ub},cronos:{chainId:25,...zb},cronosTestnet:{chainId:338,...zb},degen:{chainId:666666666,name:"Degen",...YR},flow:{chainId:747,...$b},flowTestnet:{chainId:545,...$b},gnosis:{chainId:100,name:"Gnosis",...JR},goerli:{chainId:5,...Ur},gravity:{chainId:1625,name:"Gravity",...Wb},gravitySepolia:{chainId:13505,name:"Gravity Sepolia",...Wb},hardhat:{chainId:31337,...XR},holesky:{chainId:17e3,...Ur},hyperevm:{chainId:999,...ZR},ink:{chainId:57073,...qb},inkSepolia:{chainId:763373,...qb},kaia:{chainId:8217,name:"Kaia",...Vb},kairos:{chainId:1001,name:"Kairos",...Vb},kovan:{chainId:42,...Ur},linea:{chainId:59144,name:"Linea",...Oh},lineaGoerli:{chainId:59140,name:"Linea Goerli",...Oh},lineaSepolia:{chainId:59141,name:"Linea Sepolia",...Oh},localhost:{chainId:1337,...Ur},mainnet:{chainId:1,name:"Ethereum",...Ur},manta:{chainId:169,name:"Manta",...Rh},mantaSepolia:{chainId:3441006,...Rh},mantaTestnet:{chainId:3441005,...Rh},mantle:{chainId:5e3,...Hb},mantleTestnet:{chainId:5001,...Hb},monadTestnet:{chainId:10143,name:"Monad Testnet",...eM},optimism:{chainId:10,name:"Optimism",...Ql},optimismGoerli:{chainId:420,...Ql},optimismKovan:{chainId:69,...Ql},optimismSepolia:{chainId:11155420,...Ql},polygon:{chainId:137,name:"Polygon",...Mh},polygonAmoy:{chainId:80002,...Mh},polygonMumbai:{chainId:80001,...Mh},rinkeby:{chainId:4,...Ur},ronin:{chainId:2020,...tM},ropsten:{chainId:3,...Ur},sanko:{chainId:1996,name:"Sanko",...nM},scroll:{chainId:534352,...Qb},scrollSepolia:{chainId:534351,...Qb},sepolia:{chainId:11155111,...Ur},superposition:{chainId:55244,name:"Superposition",...rM},unichain:{chainId:130,...Gb},unichainSepolia:{chainId:1301,...Gb},xdc:{chainId:50,name:"XDC",...Kb},xdcTestnet:{chainId:51,...Kb},zetachain:{chainId:7e3,name:"ZetaChain",...Yb},zetachainAthensTestnet:{chainId:7001,name:"Zeta Athens",...Yb},zkSync:{chainId:324,name:"zkSync",...Jb},zkSyncTestnet:{chainId:280,...Jb},zora:{chainId:7777777,name:"Zora",...Lh},zoraSepolia:{chainId:999999999,...Lh},zoraTestnet:{chainId:999,...Lh}},sM=Object.fromEntries(Object.values(oM).filter(XC).map(({chainId:e,...t})=>[e,t])),iM=e=>e.map(t=>{const n=sM[t.id]??{};return{...t,name:n.name??t.name,iconUrl:t.iconUrl??n.iconUrl,iconBackground:t.iconBackground??n.iconBackground}}),c1=j.createContext({chains:[]});function aM({children:e,initialChain:t}){const{chains:n}=Ke();return C.createElement(c1.Provider,{value:j.useMemo(()=>({chains:iM(n),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[n,t])},e)}var ks=()=>j.useContext(c1).chains,cM=()=>j.useContext(c1).initialChainId,lM=()=>{const e=ks();return j.useMemo(()=>{const t={};for(const n of e)t[n.id]=n;return t},[e])},ZC=j.createContext({showBalance:void 0,setShowBalance:()=>{}});function uM({children:e}){const[t,n]=j.useState();return C.createElement(ZC.Provider,{value:{showBalance:t,setShowBalance:n}},e)}var e8=()=>j.useContext(ZC);function dM(){const[e,t]=j.useState(!1);return j.useEffect(()=>(t(!0),()=>{t(!1)}),[]),j.useCallback(()=>e,[e])}function t8(){const e=ks(),t=uf.id;return e.some(r=>r.id===t)}function fM(e){const t=t8(),n=o=>{try{return tO(o)}catch{}},{data:r}=hT({chainId:uf.id,name:e?n(e):void 0,query:{enabled:t}});return r}async function To(e,t){if(t={headers:{},method:"get",...t,timeout:t.timeout??1e4},!e)throw new Error("rainbowFetch: Missing url argument");const n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout),{body:o,params:s,headers:i,...a}=t,c=o&&typeof o=="object"?JSON.stringify(t.body):t.body,l=await fetch(`${e}${pM(s)}`,{...a,body:c,headers:{Accept:"application/json","Content-Type":"application/json",...i},signal:n.signal});clearTimeout(r);const u=await hM(l);if(l.ok){const{headers:h,status:p}=l;return{data:u,headers:h,status:p}}throw mM({requestBody:o,response:l,responseBody:typeof u=="string"?{error:u}:u})}function hM(e){const t=e.headers.get("Content-Type");return t!=null&&t.startsWith("application/json")?e.json():e.text()}function pM(e){return e&&Object.keys(e).length?`?${new URLSearchParams(e)}`:""}function mM({requestBody:e,response:t,responseBody:n}){const r=(n==null?void 0:n.error)||(t==null?void 0:t.statusText)||"There was an error with the request.",o=new Error(r);return o.response=t,o.responseBody=n,o.requestBody=e,o}var gM=class{constructor(e={}){const{baseUrl:t="",...n}=e;this.baseUrl=t,this.opts=n}get(e,t){return To(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"get"})}delete(e,t){return To(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"delete"})}head(e,t){return To(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"head"})}options(e,t){return To(`${this.baseUrl}${e}`,{...this.opts,...t||{},method:"options"})}post(e,t,n){return To(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"post"})}put(e,t,n){return To(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"put"})}patch(e,t,n){return To(`${this.baseUrl}${e}`,{...this.opts,...n||{},body:t,method:"patch"})}};function yM({baseUrl:e,headers:t,params:n,timeout:r}){return new gM({baseUrl:e,headers:t,params:n,timeout:r})}var wM=!!(typeof process<"u"&&typeof ud<"u"&&ud.RAINBOW_PROVIDER_API_KEY),bM=yM({baseUrl:"https://enhanced-provider.rainbow.me",headers:{"x-api-key":typeof process<"u"&&typeof ud<"u"&&ud.RAINBOW_PROVIDER_API_KEY||"LzbasoBiLqltex3VkcQ7LRmL4PtfiiZ1EMJrizrgfonWN6byJReu/l6yrUoo3zLW"}});function vM(e,t,n={}){return[e,t,n]}function yu(e){return`rk-ens-name-${e}`}function xM(e){try{const t=e?JSON.parse(e):null;return typeof t=="object"?t:null}catch{return null}}function CM(e,t){if(!We(e))return;const n=new Date,r=new Date(n.getTime()+180*6e4);localStorage.setItem(yu(e),JSON.stringify({ensName:t,expires:r.getTime()}))}function EM(e){const t=xM(localStorage.getItem(yu(e)));if(!t)return null;const{ensName:n,expires:r}=t;return typeof n!="string"||Number.isNaN(Number(r))||new Date().getTime()>Number(r)?(localStorage.removeItem(yu(e)),null):n}async function AM({address:e}){const t=EM(e);if(t)return t;const r=(await bM.get("/v1/resolve-ens",{params:{address:e}})).data.data;return r&&CM(e,r),r}function kM(e){const t=t8(),{data:n}=pT({chainId:uf.id,address:e,query:{enabled:t}}),{data:r}=cC({queryKey:vM("address",e),queryFn:()=>AM({address:e}),enabled:!t&&!!e&&wM,staleTime:10*(60*1e3),retry:1});return n||r}function n8({address:e,includeBalance:t}){const n=kM(e),r=fM(n),{data:o}=lC({address:t?e:void 0});return{ensName:n,ensAvatar:r,balance:o}}function l1(){const{chain:e}=gt();return(e==null?void 0:e.id)??null}var r8="rk-transactions";function SM(e){try{const t=e?JSON.parse(e):{};return typeof t=="object"?t:{}}catch{return{}}}function Xb(){return SM(typeof localStorage<"u"?localStorage.getItem(r8):null)}var jM=/^0x([A-Fa-f0-9]{64})$/;function _M(e){const t=[];return jM.test(e.hash)||t.push("Invalid transaction hash"),typeof e.description!="string"&&t.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&t.push("Transaction confirmations must be a positiver integer"),t}function IM({provider:e}){let t=Xb(),n=e;const r=new Set,o=new Set,s=new Map;function i(g){n=g}function a(g,w){var x;return((x=t[g])==null?void 0:x[w])??[]}function c(g,w,x){const E=_M(x);if(E.length>0)throw new Error(["Unable to add transaction",...E].join(`
1726
+ `));d(g,w,A=>[{...x,status:"pending"},...A.filter(({hash:k})=>k!==x.hash)])}function l(g,w){d(g,w,()=>[])}function u(g,w,x,E){d(g,w,A=>A.map(k=>k.hash===x?{...k,status:E}:k))}async function f(g,w){await Promise.all(a(g,w).filter(x=>x.status==="pending").map(async x=>{const{confirmations:E,hash:A}=x,k=s.get(A);if(k)return await k;const S=n.waitForTransactionReceipt({confirmations:E,hash:A,timeout:3e5}).then(({status:_})=>{s.delete(A),_!==void 0&&(u(g,w,A,_===0||_==="reverted"?"failed":"confirmed"),m(_))}).catch(()=>{u(g,w,A,"failed")});return s.set(A,S),await S}))}function d(g,w,x){t=Xb(),t[g]=t[g]??{};let E=0;const A=10,k=x(t[g][w]??[]).filter(({status:S})=>S==="pending"?!0:E++<=A);t[g][w]=k.length>0?k:void 0,h(),p(),f(g,w)}function h(){localStorage.setItem(r8,JSON.stringify(t))}function p(){for(const g of r)g()}function m(g){for(const w of o)w(g)}function v(g){return r.add(g),()=>{r.delete(g)}}function y(g){return o.add(g),()=>{o.delete(g)}}return{addTransaction:c,clearTransactions:l,getTransactions:a,onTransactionStatus:y,onChange:v,setProvider:i,waitForPendingTransactions:f}}var Zb,o8=C.createContext(null);function BM({children:e}){const t=mT(),{address:n}=gt(),r=l1(),{refetch:o}=lC({address:n,query:{enabled:!1}}),[s]=C.useState(()=>Zb??(Zb=IM({provider:t}))),i=C.useCallback(a=>{a==="success"&&o()},[o]);return C.useEffect(()=>{s.setProvider(t)},[s,t]),C.useEffect(()=>{n&&r&&s.waitForPendingTransactions(n,r)},[s,n,r]),C.useEffect(()=>{if(s&&n&&r)return s.onTransactionStatus(i)},[s,n,r,i]),C.createElement(o8.Provider,{value:s},e)}function s8(){const e=C.useContext(o8);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function i8(){const e=s8(),{address:t}=gt(),n=l1(),[r,o]=j.useState(()=>e&&t&&n?e.getTransactions(t,n):[]);return j.useEffect(()=>{if(e&&t&&n)return o(e.getTransactions(t,n)),e.onChange(()=>{o(e.getTransactions(t,n))})},[e,t,n]),r}var ev=e=>typeof e=="function"?e():e;function NM(e,{extends:t}={}){const n={...xb(Nb,ev(e))};if(!t)return n;const r=xb(Nb,ev(t));return Object.fromEntries(Object.entries(n).filter(([s,i])=>i!==r[s]))}function tv(e,t={}){return Object.entries(NM(e,t)).map(([n,r])=>`${n}:${r.replace(/[:;{}</>]/g,"")};`).join("")}var a8={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},ll=j.createContext(a8),c8=j.createContext(!1);function PM(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,e()},t)}}var l8=()=>{const[e,t]=j.useState({height:void 0,width:void 0});return j.useEffect(()=>{const n=PM(()=>{t({height:window.innerHeight,width:window.innerWidth})},500);return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)},[]),e},ul=j.createContext({connector:null,setConnector:()=>{}});function TM({children:e}){const[t,n]=j.useState(null);return C.createElement(ul.Provider,{value:j.useMemo(()=>({connector:t,setConnector:n}),[t])},e)}var dl={COMPACT:"compact",WIDE:"wide"},gf=j.createContext(dl.WIDE);function OM({children:e,modalSize:t}){const{width:n}=l8(),r=n&&n<_R,{connector:o}=j.useContext(ul);return C.createElement(gf.Provider,{value:r||o?dl.COMPACT:t},e)}var u1=j.createContext(!1),RM="rk-version";function MM({version:e}){localStorage.setItem(RM,e)}function LM(){const e=j.useCallback(()=>{MM({version:"2.2.10"})},[]);j.useEffect(()=>{e()},[e])}function FM(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]=r)}return n}function d1(){return typeof navigator<"u"&&typeof navigator.userAgent<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function DM(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function f1(){var t,n;if(typeof navigator>"u")return"Browser";const e=(t=navigator.userAgent)==null?void 0:t.toLowerCase();return(n=navigator.brave)!=null&&n.isBrave?"Brave":(e==null?void 0:e.indexOf("edg/"))>-1?"Edge":(e==null?void 0:e.indexOf("op"))>-1?"Opera":DM()?"Arc":(e==null?void 0:e.indexOf("chrome"))>-1?"Chrome":(e==null?void 0:e.indexOf("firefox"))>-1?"Firefox":d1()?"Safari":"Browser"}var UM=iR.UAParser(),{os:h1}=UM;function zM(){return h1.name==="Windows"}function $M(){return h1.name==="Mac OS"}function WM(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(h1.name)}function p1(){return zM()?"Windows":$M()?"macOS":WM()?"Linux":"Desktop"}var qM=e=>{var n,r,o,s,i,a,c,l,u,f,d;const t=f1();return{Arc:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Brave:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.chrome,Chrome:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome,Edge:((s=e==null?void 0:e.downloadUrls)==null?void 0:s.edge)||((i=e==null?void 0:e.downloadUrls)==null?void 0:i.chrome),Firefox:(a=e==null?void 0:e.downloadUrls)==null?void 0:a.firefox,Opera:((c=e==null?void 0:e.downloadUrls)==null?void 0:c.opera)||((l=e==null?void 0:e.downloadUrls)==null?void 0:l.chrome),Safari:(u=e==null?void 0:e.downloadUrls)==null?void 0:u.safari,Browser:(f=e==null?void 0:e.downloadUrls)==null?void 0:f.browserExtension}[t]??((d=e==null?void 0:e.downloadUrls)==null?void 0:d.browserExtension)},VM=e=>{var n,r,o;return(pf()?(n=e==null?void 0:e.downloadUrls)==null?void 0:n.ios:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.android)??((o=e==null?void 0:e.downloadUrls)==null?void 0:o.mobile)},HM=e=>{var n,r,o,s,i;const t=p1();return{Windows:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.windows,macOS:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.macos,Linux:(o=e==null?void 0:e.downloadUrls)==null?void 0:o.linux,Desktop:(s=e==null?void 0:e.downloadUrls)==null?void 0:s.desktop}[t]??((i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop)},u8=(e,t)=>e.some(n=>n.id===t),QM=e=>!!e.isRainbowKitConnector,nv=e=>{var t;return!!(!e.isRainbowKitConnector&&((t=e.icon)!=null&&t.replace(/\n/g,"").startsWith("data:image"))&&e.uid&&e.name)},GM=(e,t)=>e.id==="walletConnect"&&t?{...e,walletConnectModalConnector:t}:e,KM=({wallets:e,recentWallets:t})=>[...t,...e.filter(n=>!u8(t,n.id))],d8="rk-recent";function YM(e){try{const t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}}function f8(){return typeof localStorage<"u"?YM(localStorage.getItem(d8)):[]}function JM(e){return[...new Set(e)]}function XM(e){const t=JM([e,...f8()]);localStorage.setItem(d8,JSON.stringify(t))}function Lc(e=!1){var x,E,A;const t=ks(),n=cM(),{connectAsync:r,connectors:o}=dT(),s=o,{setIsWalletConnectModalOpen:i}=L8(),a=s.map(k=>({...k,...k.rkDetails||{}}));async function c(k,S){var O,P;const _=await k.getChainId(),N=await r({...S,chainId:(S==null?void 0:S.chainId)??n??((O=t.find(({id:R})=>R===_))==null?void 0:O.id)??((P=t[0])==null?void 0:P.id),connector:k});return N&&XM(k.id),N}async function l(k){try{i(!0),await c(k),i(!1)}catch(S){const _=S.name==="UserRejectedRequestError"||S.message==="Connection request reset. Please try again.";if(i(!1),!_)throw S}}const u=async(k,S)=>{const _=await k.getProvider();return k.id==="coinbase"?_.qrUrl:new Promise(N=>_.once("display_uri",O=>{N(S(O))}))},f=a.find(k=>k.id==="walletConnect"&&k.isWalletConnectModalConnector),d=a.filter(nv).map(k=>({...k,groupIndex:0})),h=a.filter(QM).filter(k=>!k.isWalletConnectModalConnector).filter(k=>e?!d.some(_=>_.id===k.rdns):!0).map(k=>GM(k,f)),p=[...d,...h],m=FM(p,k=>k.id),y=f8().map(k=>m[k]).filter(Boolean).slice(0,3),g=[],w=KM({wallets:p,recentWallets:y});for(const k of w){if(!k)continue;const S=nv(k),_=u8(y,k.id);if(S){g.push({...k,iconUrl:k.icon,ready:!0,connect:c.bind(null,k),groupName:"Installed",recent:_});continue}g.push({...k,ready:k.installed??!0,connect:c.bind(null,k),desktopDownloadUrl:HM(k),extensionDownloadUrl:qM(k),groupName:k.groupName,mobileDownloadUrl:VM(k),getQrCodeUri:(x=k.qrCode)!=null&&x.getUri?()=>u(k,k.qrCode.getUri):void 0,getDesktopUri:(E=k.desktop)!=null&&E.getUri?()=>u(k,k.desktop.getUri):void 0,getMobileUri:(A=k.mobile)!=null&&A.getUri?()=>{var N;return u(k,(N=k.mobile)==null?void 0:N.getUri)}:void 0,recent:_,showWalletConnectModal:k.walletConnectModalConnector?()=>l(k.walletConnectModalConnector):void 0})}return g}var h8=async()=>(await W(async()=>{const{default:e}=await import("./assets-Q6ZU7ZJ5-P8HioiAD.js");return{default:e}},[])).default,ZM=()=>tr(h8),eL=()=>C.createElement(tt,{background:"#d0d5de",borderRadius:"10",height:"48",src:h8,width:"48"}),p8=async()=>(await W(async()=>{const{default:e}=await import("./login-UP3DZBGS-Db_wM5oQ.js");return{default:e}},[])).default,tL=()=>tr(p8),nL=()=>C.createElement(tt,{background:"#d0d5de",borderRadius:"10",height:"48",src:p8,width:"48"}),ee=C.forwardRef(({as:e="div",children:t,className:n,color:r,display:o,font:s="body",id:i,size:a="16",style:c,tabIndex:l,textAlign:u="inherit",weight:f="regular",testId:d},h)=>C.createElement(I,{as:e,className:n,color:r,display:o,fontFamily:s,fontSize:a,fontWeight:f,id:i,ref:h,style:c,tabIndex:l,textAlign:u,testId:d},t));ee.displayName="Text";var rL={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function jt({disabled:e=!1,href:t,label:n,onClick:r,rel:o="noreferrer noopener",size:s="medium",target:i="_blank",testId:a,type:c="primary"}){const l=c==="primary",u=s!=="large",f=nt(),d=e?"actionButtonSecondaryBackground":l?"accentColor":u?"actionButtonSecondaryBackground":null,{fontSize:h,height:p,paddingX:m,paddingY:v}=rL[s],y=!f||!u;return C.createElement(I,{...t?e?{}:{as:"a",href:t,rel:o,target:i}:{as:"button",type:"button"},onClick:e?void 0:r,...y?{borderColor:f&&!u&&!l?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&ze({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:m,paddingY:v,style:{willChange:"transform"},testId:a,textAlign:"center",transition:"transform",...d?{background:d}:{},...p?{height:p}:{}},C.createElement(ee,{color:e?"modalTextSecondary":l?"accentColorForeground":"accentColor",size:h,weight:"bold"},n))}var oL=()=>nt()?C.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Close"),C.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):C.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Close"),C.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),bs=({"aria-label":e="Close",onClose:t})=>{const n=nt();return C.createElement(I,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ze({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},C.createElement(oL,null))},m8=async()=>(await W(async()=>{const{default:e}=await import("./sign-A7IJEUT5-CGsRnPrd.js");return{default:e}},[])).default;function sL({onClose:e,onCloseModal:t}){const{i18n:n}=j.useContext(qe),[{status:r,...o},s]=C.useState({status:"idle"}),i=PR(),a=j.useCallback(async()=>{try{const p=await i.getNonce();s(m=>({...m,nonce:p}))}catch{s(p=>({...p,errorMessage:n.t("sign_in.message.preparing_error"),status:"idle"}))}},[i,n.t]),c=j.useRef(!1);C.useEffect(()=>{c.current||(c.current=!0,a())},[a]);const l=nt(),{address:u,chain:f}=gt(),{signMessageAsync:d}=gT(),h=async()=>{try{const p=f==null?void 0:f.id,{nonce:m}=o;if(!u||!p||!m)return;s(g=>({...g,errorMessage:void 0,status:"signing"}));const v=i.createMessage({address:u,chainId:p,nonce:m});let y;try{y=await d({message:v})}catch(g){return g instanceof ge?s(w=>({...w,status:"idle"})):s(w=>({...w,errorMessage:n.t("sign_in.signature.signing_error"),status:"idle"}))}s(g=>({...g,status:"verifying"}));try{if(await i.verify({message:v,signature:y})){t();return}throw new Error}catch{return s(g=>({...g,errorMessage:n.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{s({errorMessage:n.t("sign_in.signature.oops_error"),status:"idle"})}};return C.createElement(I,{position:"relative"},C.createElement(I,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},C.createElement(bs,{onClose:e})),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:l?"60px":"36px"}},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"6":"4",style:{maxWidth:l?320:280}},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"32":"16"},C.createElement(tt,{height:40,src:m8,width:40}),C.createElement(ee,{color:"modalText",size:l?"20":"18",textAlign:"center",weight:"heavy"},n.t("sign_in.label"))),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:l?"16":"12"},C.createElement(ee,{color:"modalTextSecondary",size:l?"16":"14",textAlign:"center"},n.t("sign_in.description")),r==="idle"&&o.errorMessage?C.createElement(ee,{color:"error",size:l?"16":"14",textAlign:"center",weight:"bold"},o.errorMessage):null)),C.createElement(I,{alignItems:l?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},C.createElement(jt,{disabled:!o.nonce||r==="signing"||r==="verifying",label:o.nonce?r==="signing"?n.t("sign_in.signature.waiting"):r==="verifying"?n.t("sign_in.signature.verifying"):n.t("sign_in.message.send"):n.t("sign_in.message.preparing"),onClick:h,size:l?"large":"medium",testId:"auth-message-button"}),l?C.createElement(jt,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):C.createElement(I,{as:"button",borderRadius:"full",className:ze({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},C.createElement(ee,{color:"closeButton",size:l?"16":"14",weight:"bold"},n.t("sign_in.message.cancel"))))))}function iL(){const e=ks(),t=Lc(),n=hf()==="unauthenticated",r=j.useCallback(()=>{tr(...t.map(o=>o.iconUrl),...e.map(o=>o.iconUrl).filter(XC)),nt()||(ZM(),tL()),n&&tr(m8)},[t,e,n]);j.useEffect(()=>{r()},[r])}var g8="WALLETCONNECT_DEEPLINK_CHOICE";function aL({mobileUri:e,name:t}){localStorage.setItem(g8,JSON.stringify({href:e.split("?")[0],name:t}))}function cL(){localStorage.removeItem(g8)}var y8=j.createContext(void 0),G0="data-rk",w8=e=>({[G0]:e||""}),lL=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${G0}="${e}"]`:`[${G0}]`},uL=()=>{const e=j.useContext(y8);return w8(e)},dL=Hx();function fL({appInfo:e,avatar:t,children:n,coolMode:r=!1,id:o,initialChain:s,locale:i,modalSize:a=dl.WIDE,showRecentTransactions:c=!1,theme:l=dL}){if(iL(),LM(),K3({onDisconnect:cL}),typeof l=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const u=lL(o),f={...a8,...e},d=t??KC;return C.createElement(aM,{initialChain:s},C.createElement(TM,null,C.createElement(KR,{locale:i},C.createElement(c8.Provider,{value:r},C.createElement(OM,{modalSize:a},C.createElement(u1.Provider,{value:c},C.createElement(BM,null,C.createElement(YC.Provider,{value:d},C.createElement(ll.Provider,{value:f},C.createElement(y8.Provider,{value:o},C.createElement(uM,null,C.createElement(SF,null,l?C.createElement("div",{...w8(o)},C.createElement("style",{dangerouslySetInnerHTML:{__html:[`${u}{${tv("lightMode"in l?l.lightMode:l)}}`,"darkMode"in l?`@media(prefers-color-scheme:dark){${u}{${tv(l.darkMode,{extends:l.lightMode})}}}`:null].join("")}}),n):n))))))))))))}var hL="_9pm4ki5 ju367va ju367v15 ju367v8r",pL="_9pm4ki3 ju367v9h ju367vb3 ju367va ju367v2q ju367v8q",rv=(e,t)=>{const n=e.querySelectorAll("button:not(:disabled), a[href]");n.length!==0&&n[t==="end"?n.length-1:0].focus()};function mL(e){const t=j.useRef(null);return j.useEffect(()=>{const n=document.activeElement;return()=>{var r;(r=n.focus)==null||r.call(n)}},[]),j.useEffect(()=>{if(t.current){const n=t.current.querySelector("[data-auto-focus]");n?n.focus():t.current.focus()}},[]),C.createElement(C.Fragment,null,C.createElement("div",{onFocus:j.useCallback(()=>t.current&&rv(t.current,"end"),[]),tabIndex:0}),C.createElement("div",{ref:t,style:{outline:"none"},tabIndex:-1,...e}),C.createElement("div",{onFocus:j.useCallback(()=>t.current&&rv(t.current,"start"),[]),tabIndex:0}))}var gL=e=>e.stopPropagation();function dd({children:e,onClose:t,open:n,titleId:r}){j.useEffect(()=>{const l=u=>n&&u.key==="Escape"&&t();return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[n,t]);const[o,s]=j.useState(!0);j.useEffect(()=>{s(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const i=j.useCallback(()=>t(),[t]),a=uL(),c=nt();return C.createElement(C.Fragment,null,n?zx.createPortal(C.createElement(UC,{enabled:o},C.createElement(I,{...a},C.createElement(I,{...a,alignItems:c?"flex-end":"center","aria-labelledby":r,"aria-modal":!0,className:pL,onClick:i,position:"fixed",role:"dialog"},C.createElement(mL,{className:hL,onClick:gL,role:"document"},e)))),document.body):null)}var yL="_1ckjpok7",wL="_1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",bL="_1ckjpok4 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",vL="_1ckjpok6 ju367vq",xL="_1ckjpok3 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r",CL="_1ckjpok2 _1ckjpok1 ju367vb6 ju367vdr ju367vp ju367vt ju367vv ju367vel ju367va ju367v15 ju367v6c ju367v8r";function fd({bottomSheetOnMobile:e=!1,children:t,marginTop:n,padding:r="16",paddingBottom:o,wide:s=!1}){const i=nt(),c=j.useContext(gf)===dl.COMPACT;return C.createElement(I,{marginTop:n},C.createElement(I,{className:[s?i?CL:c?bL:xL:wL,i?vL:null,i&&e?yL:null].join(" ")},C.createElement(I,{padding:r,paddingBottom:o??r},t)))}var ov=["k","m","b","t"];function Gl(e,t=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${t}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function b8(e){if(e<1)return Gl(e,3);if(e<10**2)return Gl(e,2);if(e<10**4)return new Intl.NumberFormat().format(Number.parseFloat(Gl(e,1)));const t=10**1;let n=String(e);for(let r=ov.length-1;r>=0;r--){const o=10**((r+1)*3);if(o<=e){e=e*t/o/t,n=Gl(e,1)+ov[r];break}}return n}function v8(e){return e.length<8?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function x8(e){if(!e)return"";const t=e.split("."),n=t.pop();return t.join(".").length>24?`${t.join(".").substring(0,24)}...`:`${t.join(".")}.${n}`}var EL=()=>C.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Copied"),C.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),AL=()=>C.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Copy"),C.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),kL=()=>C.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Disconnect"),C.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function SL(){const e=s8(),{address:t}=gt(),n=l1();return j.useCallback(()=>{if(!t||!n)throw new Error("No address or chain ID found");e.clearTransactions(t,n)},[e,t,n])}var C8=e=>{var t,n;return(n=(t=e==null?void 0:e.blockExplorers)==null?void 0:t.default)==null?void 0:n.url},E8=()=>C.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Link"),C.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),jL=()=>C.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Cancel"),C.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),_L=()=>C.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Success"),C.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),IL=e=>{switch(e){case"pending":return Mc;case"confirmed":return _L;case"failed":return jL;default:return Mc}};function BL({tx:e}){const t=nt(),n=IL(e.status),r=e.status==="failed"?"error":"accentColor",{chain:o}=gt(),s=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",i=C8(o);return C.createElement(C.Fragment,null,C.createElement(I,{...i?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ze({active:"shrink"}),href:`${i}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:t?"16":"14"},C.createElement(I,{color:r},C.createElement(n,null)),C.createElement(I,{display:"flex",flexDirection:"column",gap:t?"3":"1"},C.createElement(I,null,C.createElement(ee,{color:"modalText",font:"body",size:t?"16":"14",weight:"bold"},e==null?void 0:e.description)),C.createElement(I,null,C.createElement(ee,{color:e.status==="pending"?"modalTextSecondary":r,font:"body",size:"14",weight:t?"medium":"regular"},s)))),i&&C.createElement(I,{alignItems:"center",color:"modalTextDim",display:"flex"},C.createElement(E8,null))))}var NL=3;function PL({address:e}){const t=i8(),n=SL(),{chain:r}=gt(),o=C8(r),s=t.slice(0,NL),i=s.length>0,a=nt(),{appName:c}=j.useContext(ll),{i18n:l}=j.useContext(qe);return C.createElement(C.Fragment,null,C.createElement(I,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:a?"8":"18"},i&&C.createElement(I,{paddingBottom:a?"4":"0",paddingTop:"8",paddingX:a?"12":"6"},C.createElement(I,{display:"flex",justifyContent:"space-between"},C.createElement(ee,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.recent.title")),C.createElement(I,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},C.createElement(I,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:ze({active:"shrink"}),onClick:n,paddingX:a?"8":"12",paddingY:a?"4":"5",transition:"default",type:"button"},C.createElement(ee,{color:"modalTextSecondary",size:a?"16":"14",weight:"semibold"},l.t("profile.transactions.clear.label")))))),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},i?s.map(u=>C.createElement(BL,{key:u.hash,tx:u})):C.createElement(C.Fragment,null,C.createElement(I,{padding:a?"12":"8"},C.createElement(ee,{color:"modalTextDim",size:a?"16":"14",weight:a?"medium":"bold"},c?l.t("profile.transactions.description",{appName:c}):l.t("profile.transactions.description_fallback"))),a&&C.createElement(I,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),o&&C.createElement(I,{paddingBottom:"18",paddingX:a?"8":"18"},C.createElement(I,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:ze({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${o}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...a?{paddingLeft:"12"}:{}},C.createElement(ee,{color:"modalText",font:"body",size:a?"16":"14",weight:a?"semibold":"bold"},l.t("profile.explorer.label")),C.createElement(E8,null))))}function sv({action:e,icon:t,label:n,testId:r,url:o}){const s=nt();return C.createElement(I,{...o?{as:"a",href:o,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...s?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:ze({active:"shrinkSm",hover:s?void 0:"grow"}),display:"flex",onClick:e,padding:s?"6":"8",style:{willChange:"transform"},testId:r,transition:"default",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},C.createElement(I,{color:"modalText",height:"max"},t),C.createElement(I,null,C.createElement(ee,{color:"modalText",size:s?"12":"13",weight:"semibold"},n))))}function TL({address:e,ensAvatar:t,ensName:n,balance:r,onClose:o,onDisconnect:s}){const i=j.useContext(u1),[a,c]=j.useState(!1),l=j.useCallback(()=>{e&&(navigator.clipboard.writeText(e),c(!0))},[e]);if(j.useEffect(()=>{if(a){const v=setTimeout(()=>{c(!1)},1500);return()=>clearTimeout(v)}},[a]),!e)return null;const u=n?x8(n):v8(e),f=r==null?void 0:r.formatted,d=f?b8(Number.parseFloat(f)):void 0,h="rk_profile_title",p=nt(),{i18n:m}=j.useContext(qe);return C.createElement(C.Fragment,null,C.createElement(I,{display:"flex",flexDirection:"column"},C.createElement(I,{background:"profileForeground",padding:"16"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:p?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},C.createElement(I,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},C.createElement(bs,{onClose:o}))," ",C.createElement(I,{marginTop:p?"24":"0"},C.createElement(JC,{address:e,imageUrl:t,size:p?82:74})),C.createElement(I,{display:"flex",flexDirection:"column",gap:p?"4":"0",textAlign:"center"},C.createElement(I,{textAlign:"center"},C.createElement(ee,{as:"h1",color:"modalText",id:h,size:p?"20":"18",weight:"heavy"},u)),!!r&&C.createElement(I,{textAlign:"center"},C.createElement(ee,{as:"h1",color:"modalTextSecondary",id:h,size:p?"16":"14",weight:"semibold"},d," ",r.symbol)))),C.createElement(I,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},C.createElement(sv,{action:l,icon:a?C.createElement(EL,null):C.createElement(AL,null),label:a?m.t("profile.copy_address.copied"):m.t("profile.copy_address.label")}),C.createElement(sv,{action:s,icon:C.createElement(kL,null),label:m.t("profile.disconnect.label"),testId:"disconnect-button"}))),i&&C.createElement(C.Fragment,null,C.createElement(I,{background:"generalBorder",height:"1",marginTop:"-1"}),C.createElement(I,null,C.createElement(PL,{address:e})))))}function OL({onClose:e,open:t}){const{address:n}=gt(),{balance:r,ensAvatar:o,ensName:s}=n8({address:n,includeBalance:t}),{disconnect:i}=Zg();return n?C.createElement(C.Fragment,null,n&&C.createElement(dd,{onClose:e,open:t,titleId:"rk_account_modal_title"},C.createElement(fd,{bottomSheetOnMobile:!0,padding:"0"},C.createElement(TL,{address:n,ensAvatar:o,ensName:s,balance:r,onClose:e,onDisconnect:i})))):null}var RL=({size:e})=>C.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Disconnect"),C.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),ML="v9horb0",m1=C.forwardRef(({children:e,currentlySelected:t=!1,onClick:n,testId:r,...o},s)=>{const i=nt();return C.createElement(I,{as:"button",borderRadius:"menuButton",disabled:t,display:"flex",onClick:n,ref:s,testId:r,type:"button"},C.createElement(I,{borderRadius:"menuButton",className:[i?ML:void 0,!t&&ze({active:"shrink"})],padding:i?"8":"6",transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...o},e))});m1.displayName="MenuButton";var LL=({chainId:e,currentChainId:t,switchChain:n,chainIconSize:r,isLoading:o,src:s,name:i,iconBackground:a,idx:c})=>{const l=nt(),{i18n:u}=j.useContext(qe),f=ks(),d=t===e;return C.createElement(j.Fragment,null,C.createElement(m1,{currentlySelected:d,onClick:d?void 0:()=>n({chainId:e}),testId:`chain-option-${e}`},C.createElement(I,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:r},s&&C.createElement(I,{height:"full",marginRight:"8"},C.createElement(tt,{alt:i,background:a,borderRadius:"full",height:r,src:s,width:r,testId:`chain-option-${e}-icon`})),C.createElement("div",null,i??i)),d&&C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},C.createElement(ee,{color:"accentColorForeground",size:"14",weight:"medium"},u.t("chains.connected")),C.createElement(I,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),o&&C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},C.createElement(ee,{color:"modalText",size:"14",weight:"medium"},u.t("chains.confirm")),C.createElement(I,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),l&&c<f.length-1&&C.createElement(I,{background:"generalBorderDim",height:"1",marginX:"8"}))},FL=LL,DL="_18dqw9x0",UL="_18dqw9x1";function zL({onClose:e,open:t}){const{chainId:n}=gt(),{chains:r}=Ke(),[o,s]=j.useState(null),{switchChain:i}=yT({mutation:{onMutate:({chainId:p})=>{s(p)},onSuccess:()=>{o&&s(null)},onError:()=>{o&&s(null)},onSettled:()=>{e()}}}),{i18n:a}=j.useContext(qe),{disconnect:c}=Zg(),l="rk_chain_modal_title",u=nt(),f=r.some(p=>p.id===n),d=u?"36":"28",h=ks();return n?C.createElement(dd,{onClose:e,open:t,titleId:l},C.createElement(fd,{bottomSheetOnMobile:!0,paddingBottom:"0"},C.createElement(I,{display:"flex",flexDirection:"column",gap:"14"},C.createElement(I,{display:"flex",flexDirection:"row",justifyContent:"space-between"},u&&C.createElement(I,{width:"30"}),C.createElement(I,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},C.createElement(ee,{as:"h1",color:"modalText",id:l,size:u?"20":"18",weight:"heavy"},a.t("chains.title"))),C.createElement(bs,{onClose:e})),!f&&C.createElement(I,{marginX:"8",textAlign:u?"center":"left"},C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t("chains.wrong_network"))),C.createElement(I,{className:u?UL:DL,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},h.map(({iconBackground:p,iconUrl:m,id:v,name:y},g)=>C.createElement(FL,{key:v,chainId:v,currentChainId:n,switchChain:i,chainIconSize:d,isLoading:o===v,src:m,name:y,iconBackground:p,idx:g})),!f&&C.createElement(C.Fragment,null,C.createElement(I,{background:"generalBorderDim",height:"1",marginX:"8"}),C.createElement(m1,{onClick:()=>c(),testId:"chain-option-disconnect"},C.createElement(I,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:d},C.createElement(I,{alignItems:"center",color:"error",height:d,justifyContent:"center",marginRight:"8"},C.createElement(RL,{size:Number(d)})),C.createElement("div",null,a.t("chains.disconnect"))))))))))):null}function $L(e,t){const n={};for(const r of e){const o=t(r);o&&(n[o]||(n[o]=[]),n[o].push(r))}return n}var g1=({children:e,href:t})=>C.createElement(I,{as:"a",color:"accentColor",href:t,rel:"noreferrer",target:"_blank"},e),y1=({children:e})=>C.createElement(ee,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function iv({compactModeEnabled:e=!1,getWallet:t}){const{disclaimer:n,learnMoreUrl:r}=j.useContext(ll),{i18n:o}=j.useContext(qe);return C.createElement(C.Fragment,null,C.createElement(I,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},C.createElement(I,{marginBottom:"10"},!e&&C.createElement(ee,{color:"modalText",size:"18",weight:"heavy"},o.t("intro.title"))),C.createElement(I,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},C.createElement(I,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},C.createElement(eL,null)),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.digital_asset.title")),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.digital_asset.description")))),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},C.createElement(I,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},C.createElement(nL,null)),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},o.t("intro.login.title")),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("intro.login.description"))))),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},C.createElement(jt,{label:o.t("intro.get.label"),onClick:t}),C.createElement(I,{as:"a",className:ze({active:"shrink",hover:"grow"}),display:"block",href:r,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},C.createElement(ee,{color:"accentColor",size:"14",weight:"bold"},o.t("intro.learn_more.label")))),n&&!e&&C.createElement(I,{marginBottom:"8",marginTop:"12",textAlign:"center"},C.createElement(n,{Link:g1,Text:y1}))))}var A8=()=>C.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Back"),C.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),WL=()=>C.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},C.createElement("title",null,"Info"),C.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),qL=({"aria-label":e="Info",onClick:t})=>{const n=nt();return C.createElement(I,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:n?"0":"1",className:ze({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:n?"30":"28",justifyContent:"center",onClick:t,style:{willChange:"transform"},transition:"default",type:"button",width:n?"30":"28"},C.createElement(WL,null))},k8=e=>{const t=j.useRef(null),n=j.useContext(c8),r=mf(e);return j.useEffect(()=>{if(n&&t.current&&r)return HL(t.current,r)},[n,r]),t},VL=()=>{const e="_rk_coolMode",t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(n),n},av=0;function HL(e,t){av++;const n=[15,20,25,35,45],r=35;let o=[],s=!1,i=0,a=0;const c=VL();function l(){const x=n[Math.floor(Math.random()*n.length)],E=Math.random()*10,A=Math.random()*25,k=Math.random()*360,S=Math.random()*35*(Math.random()<=.5?-1:1),_=a-x/2,N=i-x/2,O=Math.random()<=.5?-1:1,P=document.createElement("div");P.innerHTML=`<img src="${t}" width="${x}" height="${x}" style="border-radius: 25%">`,P.setAttribute("style",["position:absolute","will-change:transform",`top:${_}px`,`left:${N}px`,`transform:rotate(${k}deg)`].join(";")),c.appendChild(P),o.push({direction:O,element:P,left:N,size:x,speedHorz:E,speedUp:A,spinSpeed:S,spinVal:k,top:_})}function u(){for(const x of o)x.left=x.left-x.speedHorz*x.direction,x.top=x.top-x.speedUp,x.speedUp=Math.min(x.size,x.speedUp-1),x.spinVal=x.spinVal+x.spinSpeed,x.top>=Math.max(window.innerHeight,document.body.clientHeight)+x.size&&(o=o.filter(E=>E!==x),x.element.remove()),x.element.setAttribute("style",["position:absolute","will-change:transform",`top:${x.top}px`,`left:${x.left}px`,`transform:rotate(${x.spinVal}deg)`].join(";"))}let f;function d(){s&&o.length<r&&l(),u(),f=requestAnimationFrame(d)}d();const h="ontouchstart"in window||navigator.msMaxTouchPoints,p=h?"touchstart":"mousedown",m=h?"touchend":"mouseup",v=h?"touchmove":"mousemove",y=x=>{var E,A;"touches"in x?(i=(E=x.touches)==null?void 0:E[0].clientX,a=(A=x.touches)==null?void 0:A[0].clientY):(i=x.clientX,a=x.clientY)},g=x=>{y(x),s=!0},w=()=>{s=!1};return e.addEventListener(v,y,{passive:!1}),e.addEventListener(p,g),e.addEventListener(m,w),e.addEventListener("mouseleave",w),()=>{e.removeEventListener(v,y),e.removeEventListener(p,g),e.removeEventListener(m,w),e.removeEventListener("mouseleave",w);const x=setInterval(()=>{f&&o.length===0&&(cancelAnimationFrame(f),clearInterval(x),--av===0&&c.remove())},500)}}var QL="g5kl0l0",S8=({as:e="button",currentlySelected:t=!1,iconBackground:n,iconUrl:r,name:o,onClick:s,ready:i,recent:a,testId:c,isRainbowKitConnector:l,...u})=>{const f=k8(r),[d,h]=C.useState(!1),{i18n:p}=C.useContext(qe);return C.createElement(I,{display:"flex",flexDirection:"column",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),ref:f},C.createElement(I,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:t?void 0:[QL,ze({active:"shrink"})],disabled:t,onClick:s,padding:"5",style:{willChange:"transform"},testId:c,transition:"default",width:"full",...t?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...u},C.createElement(I,{color:t?"accentColorForeground":"modalText",disabled:!i,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},C.createElement(tt,{background:n,...!d&&l?{borderColor:"actionButtonBorder"}:{},useAsImage:!l,borderRadius:"6",height:"28",src:r,width:"28"}),C.createElement(I,null,C.createElement(I,{style:{marginTop:a?-2:void 0},maxWidth:"200"},o),a&&C.createElement(ee,{color:t?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},p.t("connect.recent")))))))};S8.displayName="ModalSelection";var GL="rk-latest-id";function KL(e){localStorage.setItem(GL,e)}var Fh=(e,t=1)=>{let n=e.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=Number.parseInt(n.substring(0,2),16),o=Number.parseInt(n.substring(2,4),16),s=Number.parseInt(n.substring(4,6),16);return t>1&&t<=100&&(t=t/100),`rgba(${r},${o},${s},${t})`},YL=e=>e?[Fh(e,.2),Fh(e,.14),Fh(e,.1)]:null,JL=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),j8=async()=>(await W(async()=>{const{default:e}=await import("./connect-UA7M4XW6-IY3X6Bmr.js");return{default:e}},[])).default,XL=()=>tr(j8),ZL=()=>C.createElement(tt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:j8,width:"48"}),_8=async()=>(await W(async()=>{const{default:e}=await import("./create-FASO7PVG-D_rvSpre.js");return{default:e}},[])).default,I8=()=>tr(_8),eF=()=>C.createElement(tt,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:_8,width:"48"}),B8=async()=>(await W(async()=>{const{default:e}=await import("./refresh-S4T5V5GX-CwqIaaxK.js");return{default:e}},[])).default,tF=()=>tr(B8),nF=()=>C.createElement(tt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:B8,width:"48"}),N8=async()=>(await W(async()=>{const{default:e}=await import("./scan-4UYSQ56Q-CjMz6-XC.js");return{default:e}},[])).default,P8=()=>tr(N8),rF=()=>C.createElement(tt,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:N8,width:"48"}),oF="_1vwt0cg0",sF="_1vwt0cg2 ju367v7a ju367v7v",iF="_1vwt0cg3",aF="_1vwt0cg4";function T8({ecc:e="medium",logoBackground:t,logoSize:n=50,logoUrl:r,size:o=200,uri:s}){const i="20",a=o-Number.parseInt(i,10)*2,c=mf(r);return C.createElement(I,{borderColor:"generalBorder",borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:oF,padding:i,width:"max"},C.createElement(I,{style:{height:a,userSelect:"none",width:a},userSelect:"none"},C.createElement(Gn.Root,{errorCorrection:e,size:a,value:s},C.createElement(Gn.Cells,{radius:1}),C.createElement(Gn.Finder,{radius:.25}),c&&C.createElement(Gn.Arena,null,C.createElement("img",{alt:"Wallet Logo",src:c,style:{objectFit:"cover",height:"88%",width:"88%",borderRadius:"22.5%",backgroundColor:t}})))))}var O8=async()=>{switch(f1()){case"Arc":return(await W(async()=>{const{default:t}=await import("./Arc-VDBY7LNS-BChRXCXW.js");return{default:t}},[])).default;case"Brave":return(await W(async()=>{const{default:t}=await import("./Brave-BRAKJXDS-mq-Xo37j.js");return{default:t}},[])).default;case"Chrome":return(await W(async()=>{const{default:t}=await import("./Chrome-65Q5P54Y-DR9MQEVr.js");return{default:t}},[])).default;case"Edge":return(await W(async()=>{const{default:t}=await import("./Edge-XSPUTORV-DEoZslQE.js");return{default:t}},[])).default;case"Firefox":return(await W(async()=>{const{default:t}=await import("./Firefox-AAHGJQIP-Bp_Hm04m.js");return{default:t}},[])).default;case"Opera":return(await W(async()=>{const{default:t}=await import("./Opera-KQZLSACL-Cwv5MDFy.js");return{default:t}},[])).default;case"Safari":return(await W(async()=>{const{default:t}=await import("./Safari-ZPL37GXR-C4Ggg6rz.js");return{default:t}},[])).default;default:return(await W(async()=>{const{default:t}=await import("./Browser-76IHF3Y2-BMhRaC5Z.js");return{default:t}},[])).default}},cF=()=>tr(O8),R8=async()=>{switch(p1()){case"Windows":return(await W(async()=>{const{default:t}=await import("./Windows-PPTHQER6-BlyV2p7Y.js");return{default:t}},[])).default;case"macOS":return(await W(async()=>{const{default:t}=await import("./Macos-MW4AE7LN-Vvm8Drw3.js");return{default:t}},[])).default;case"Linux":return(await W(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default;default:return(await W(async()=>{const{default:t}=await import("./Linux-OO4TNCLJ-B0aw93n9.js");return{default:t}},[])).default}},lF=()=>tr(R8);function uF({getWalletDownload:e,compactModeEnabled:t}){const r=Lc().filter(s=>s.isRainbowKitConnector).splice(0,5),{i18n:o}=j.useContext(qe);return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},r==null?void 0:r.filter(s=>{var i;return s.extensionDownloadUrl||s.desktopDownloadUrl||s.qrCode&&((i=s.downloadUrls)==null?void 0:i.qrCode)}).map(s=>{const{downloadUrls:i,iconBackground:a,iconUrl:c,id:l,name:u,qrCode:f}=s,d=(i==null?void 0:i.qrCode)&&f,h=!!s.extensionDownloadUrl,p=(i==null?void 0:i.qrCode)&&h,m=(i==null?void 0:i.qrCode)&&!!s.desktopDownloadUrl;return C.createElement(I,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:s.id,width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},C.createElement(tt,{background:a,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:c,width:"48"}),C.createElement(I,{display:"flex",flexDirection:"column",gap:"2"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},u),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},p?o.t("get.mobile_and_extension.description"):m?o.t("get.mobile_and_desktop.description"):d?o.t("get.mobile.description"):h?o.t("get.extension.description"):null))),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(jt,{label:o.t("get.action.label"),onClick:()=>e(l),type:"secondary"})))})),C.createElement(I,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},o.t("get.looking_for.title")),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t?o.t("get.looking_for.desktop.compact_description"):o.t("get.looking_for.desktop.wide_description"))))}var Dh="44";function dF({changeWalletStep:e,compactModeEnabled:t,connectionError:n,onClose:r,qrCodeUri:o,reconnect:s,wallet:i}){const{downloadUrls:a,iconBackground:c,iconUrl:l,name:u,qrCode:f,ready:d,showWalletConnectModal:h,getDesktopUri:p}=i,m=!!p,v=d1(),{i18n:y}=j.useContext(qe),g=!!i.extensionDownloadUrl,w=(a==null?void 0:a.qrCode)&&g,x=(a==null?void 0:a.qrCode)&&!!i.desktopDownloadUrl,E=f&&o,A=async()=>{const N=await(p==null?void 0:p());window.open(N,v?"_blank":"_self")},k=h?{description:t?y.t("connect.walletconnect.description.compact"):y.t("connect.walletconnect.description.full"),label:y.t("connect.walletconnect.open.label"),onClick:()=>{r(),h()}}:E?{description:y.t("connect.secondary_action.get.description",{wallet:u}),label:y.t("connect.secondary_action.get.label"),onClick:()=>e(w||x?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:S}=l8(),_=S&&S<768;return j.useEffect(()=>{cF(),lF()},[]),C.createElement(I,{display:"flex",flexDirection:"column",height:"full",width:"full"},E?C.createElement(I,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},C.createElement(T8,{logoBackground:c,logoSize:t?60:72,logoUrl:l,size:t?318:_?Math.max(280,Math.min(S-308,382)):382,uri:o})):C.createElement(I,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},C.createElement(I,{borderRadius:"10",height:Dh,overflow:"hidden"},C.createElement(tt,{useAsImage:!i.isRainbowKitConnector,height:Dh,src:l,width:Dh})),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},C.createElement(ee,{color:"modalText",size:"18",weight:"bold"},d?y.t("connect.status.opening",{wallet:u}):g?y.t("connect.status.not_installed",{wallet:u}):y.t("connect.status.not_available",{wallet:u})),!d&&g?C.createElement(I,{paddingTop:"20"},C.createElement(jt,{href:i.extensionDownloadUrl,label:y.t("connect.secondary_action.install.label"),type:"secondary"})):null,d&&!E&&C.createElement(C.Fragment,null,C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},C.createElement(ee,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},y.t("connect.status.confirm"))),C.createElement(I,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},n?C.createElement(jt,{label:y.t("connect.secondary_action.retry.label"),onClick:async()=>{m&&A(),s(i)}}):C.createElement(I,{color:"modalTextSecondary"},C.createElement(Mc,null))))))),C.createElement(I,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},d&&k&&C.createElement(C.Fragment,null,C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},k.description),C.createElement(jt,{label:k.label,onClick:k.onClick,type:"secondary"}))))}var Uh=({actionLabel:e,description:t,iconAccent:n,iconBackground:r,iconUrl:o,isCompact:s,onAction:i,title:a,url:c,variant:l})=>{const u=l==="browser",f=!u&&n&&YL(n);return C.createElement(I,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:s?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},C.createElement(I,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),u&&C.createElement(I,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},C.createElement(I,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},C.createElement(I,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},C.createElement(tt,{borderRadius:"full",height:"200",src:o,width:"200"})),C.createElement(I,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},C.createElement(tt,{borderRadius:"full",height:"200",src:o,width:"200"})))),!u&&f&&C.createElement(I,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},C.createElement(I,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[0]} 0%, ${f[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),C.createElement(I,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${f[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),C.createElement(I,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},C.createElement(I,null,C.createElement(tt,{height:"60",src:o,width:"60",...r?{background:r,borderColor:"generalBorder",borderRadius:"10"}:null})),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},a),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t),C.createElement(I,{marginTop:"14",width:"max"},C.createElement(jt,{href:c,label:e,onClick:i,size:"medium"})))))};function fF({changeWalletStep:e,wallet:t}){const n=f1(),r=p1(),s=j.useContext(gf)==="compact",{desktop:i,desktopDownloadUrl:a,extension:c,extensionDownloadUrl:l,mobileDownloadUrl:u}=t,{i18n:f}=j.useContext(qe);return j.useEffect(()=>{I8(),P8(),tF(),XL()},[]),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},l&&C.createElement(Uh,{actionLabel:f.t("get_options.extension.download.label",{browser:n}),description:f.t("get_options.extension.description"),iconUrl:O8,isCompact:s,onAction:()=>e(c!=null&&c.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:f.t("get_options.extension.title",{wallet:t.name,browser:n}),url:l,variant:"browser"}),a&&C.createElement(Uh,{actionLabel:f.t("get_options.desktop.download.label",{platform:r}),description:f.t("get_options.desktop.description"),iconUrl:R8,isCompact:s,onAction:()=>e(i!=null&&i.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:f.t("get_options.desktop.title",{wallet:t.name,platform:r}),url:a,variant:"desktop"}),u&&C.createElement(Uh,{actionLabel:f.t("get_options.mobile.download.label",{wallet:t.name}),description:f.t("get_options.mobile.description"),iconAccent:t.iconAccent,iconBackground:t.iconBackground,iconUrl:t.iconUrl,isCompact:s,onAction:()=>{e("DOWNLOAD")},title:f.t("get_options.mobile.title",{wallet:t.name}),variant:"app"})))}function hF({changeWalletStep:e,wallet:t}){const{downloadUrls:n,qrCode:r}=t,{i18n:o}=j.useContext(qe);return j.useEffect(()=>{I8(),P8()},[]),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},C.createElement(I,{style:{maxWidth:220,textAlign:"center"}},C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"semibold"},o.t("get_mobile.description"))),C.createElement(I,{height:"full"},n!=null&&n.qrCode?C.createElement(T8,{logoSize:0,size:268,uri:n.qrCode}):null),C.createElement(I,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},C.createElement(jt,{label:o.t("get_mobile.continue.label"),onClick:()=>e(r!=null&&r.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Er={connect:()=>C.createElement(ZL,null),create:()=>C.createElement(eF,null),install:e=>C.createElement(tt,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>C.createElement(nF,null),scan:()=>C.createElement(rF,null)};function pF({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=j.useContext(qe);return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},C.createElement(I,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.qrCode)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},C.createElement(I,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Er[a.step])==null?void 0:l.call(Er,t)),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},C.createElement(jt,{label:n.t("get_instructions.mobile.connect.label"),onClick:()=>e(t)}),C.createElement(I,{as:"a",className:ze({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.qrCode)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},C.createElement(ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.mobile.learn_more.label")))))}function mF({wallet:e}){var n,r,o,s;const{i18n:t}=j.useContext(qe);return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},C.createElement(I,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.steps.map((i,a)=>{var c;return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:a},C.createElement(I,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(c=Er[i.step])==null?void 0:c.call(Er,e)),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},t.t(i.title,void 0,{rawKeyIfTranslationMissing:!0})),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},t.t(i.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},C.createElement(jt,{label:t.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),C.createElement(I,{as:"a",className:ze({active:"shrink",hover:"grow"}),display:"block",href:(s=(o=e==null?void 0:e.extension)==null?void 0:o.instructions)==null?void 0:s.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},C.createElement(ee,{color:"accentColor",size:"14",weight:"bold"},t.t("get_instructions.extension.learn_more.label")))))}function gF({connectWallet:e,wallet:t}){var r,o,s,i;const{i18n:n}=j.useContext(qe);return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},C.createElement(I,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(o=(r=t==null?void 0:t.desktop)==null?void 0:r.instructions)==null?void 0:o.steps.map((a,c)=>{var l;return C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:c},C.createElement(I,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Er[a.step])==null?void 0:l.call(Er,t)),C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},C.createElement(ee,{color:"modalText",size:"14",weight:"bold"},n.t(a.title,void 0,{rawKeyIfTranslationMissing:!0})),C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},n.t(a.description,void 0,{rawKeyIfTranslationMissing:!0}))))})),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},C.createElement(jt,{label:n.t("get_instructions.desktop.connect.label"),onClick:()=>e(t)}),C.createElement(I,{as:"a",className:ze({active:"shrink",hover:"grow"}),display:"block",href:(i=(s=t==null?void 0:t.desktop)==null?void 0:s.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},C.createElement(ee,{color:"accentColor",size:"14",weight:"bold"},n.t("get_instructions.desktop.learn_more.label")))))}function yF({onClose:e}){const t="rk_connect_title",[n,r]=j.useState(),[o,s]=j.useState(),[i,a]=j.useState(),c=!!(o!=null&&o.qrCode)&&i,[l,u]=j.useState(!1),d=j.useContext(gf)===dl.COMPACT,{disclaimer:h}=j.useContext(ll),{i18n:p}=j.useContext(qe),m=d1(),v=j.useRef(!1),{connector:y}=j.useContext(ul),w=Lc(!y).filter(H=>H.ready||!!H.extensionDownloadUrl).sort((H,X)=>H.groupIndex-X.groupIndex),x=Lc(),E=$L(w,H=>H.groupName),A=["Recommended","Other","Popular","More","Others","Installed"];j.useEffect(()=>{y&&!v.current&&(R("CONNECT"),N(y),v.current=!0)},[y]);const k=H=>{var X,re;u(!1),H.ready&&((re=(X=H==null?void 0:H.connect)==null?void 0:X.call(H))==null||re.catch(()=>{u(!0)}))},S=async H=>{const X=w.find(re=>H.id===re.id);X!=null&&X.getDesktopUri&&setTimeout(async()=>{var ce;const re=await((ce=X==null?void 0:X.getDesktopUri)==null?void 0:ce.call(X));re&&window.open(re,m?"_blank":"_self")},0)},_=async H=>{var ce;const X=w.find(yt=>H.id===yt.id),re=await((ce=X==null?void 0:X.getQrCodeUri)==null?void 0:ce.call(X));a(re),setTimeout(()=>{s(X),R("CONNECT")},re?0:50)},N=async H=>{KL(H.id),H.ready&&(_(H),S(H)),k(H),r(H.id),H.ready||(s(H),R(H!=null&&H.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT"))},O=H=>{var wt;const X=x.find(ct=>H===ct.id),re=(wt=X==null?void 0:X.downloadUrls)==null?void 0:wt.qrCode,ce=!!(X!=null&&X.desktopDownloadUrl),yt=!!(X!=null&&X.extensionDownloadUrl);s(X),R(re&&(yt||ce)?"DOWNLOAD_OPTIONS":re?"DOWNLOAD":ce?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},P=()=>{r(void 0),s(void 0),a(void 0)},R=(H,X=!1)=>{X&&H==="GET"&&V==="GET"?P():!X&&H==="GET"?M("GET"):!X&&H==="CONNECT"&&M("CONNECT"),$(H)},[V,M]=j.useState("NONE"),[F,$]=j.useState("NONE");let T=null,L=null,D=null,Q;j.useEffect(()=>{u(!1)},[F,o]);const se=!!(!!(o!=null&&o.extensionDownloadUrl)&&(o!=null&&o.mobileDownloadUrl));switch(F){case"NONE":T=C.createElement(iv,{getWallet:()=>R("GET")});break;case"LEARN_COMPACT":T=C.createElement(iv,{compactModeEnabled:d,getWallet:()=>R("GET")}),L=p.t("intro.title"),D="NONE";break;case"GET":T=C.createElement(uF,{getWalletDownload:O,compactModeEnabled:d}),L=p.t("get.title"),D=d?"LEARN_COMPACT":"NONE";break;case"CONNECT":T=o&&C.createElement(dF,{changeWalletStep:R,compactModeEnabled:d,connectionError:l,onClose:e,qrCodeUri:i,reconnect:k,wallet:o}),L=c&&(o.name==="WalletConnect"?p.t("connect_scan.fallback_title"):p.t("connect_scan.title",{wallet:o.name})),D=d?y?null:"NONE":null,Q=d?y?()=>{}:P:()=>{};break;case"DOWNLOAD_OPTIONS":T=o&&C.createElement(fF,{changeWalletStep:R,wallet:o}),L=o&&p.t("get_options.short_title",{wallet:o.name}),D=y?"CONNECT":d?"NONE":V;break;case"DOWNLOAD":T=o&&C.createElement(hF,{changeWalletStep:R,wallet:o}),L=o&&p.t("get_mobile.title",{wallet:o.name}),D=se?"DOWNLOAD_OPTIONS":V;break;case"INSTRUCTIONS_MOBILE":T=o&&C.createElement(pF,{connectWallet:N,wallet:o}),L=o&&p.t("get_options.title",{wallet:d&&o.shortName||o.name}),D="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":T=o&&C.createElement(mF,{wallet:o}),L=o&&p.t("get_options.title",{wallet:d&&o.shortName||o.name}),D="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":T=o&&C.createElement(gF,{connectWallet:N,wallet:o}),L=o&&p.t("get_options.title",{wallet:d&&o.shortName||o.name}),D="DOWNLOAD_OPTIONS";break}return C.createElement(I,{display:"flex",flexDirection:"row",style:{maxHeight:d?468:504}},(d?F==="NONE":!0)&&C.createElement(I,{className:d?aF:iF,display:"flex",flexDirection:"column",marginTop:"16"},C.createElement(I,{display:"flex",justifyContent:"space-between"},d&&h&&C.createElement(I,{marginLeft:"16",width:"28"},C.createElement(qL,{onClick:()=>R("LEARN_COMPACT")})),d&&!h&&C.createElement(I,{marginLeft:"16",width:"28"}),C.createElement(I,{marginLeft:d?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},C.createElement(ee,{as:"h1",color:"modalText",id:t,size:"18",weight:"heavy",testId:"connect-header-label"},p.t("connect.title"))),d&&C.createElement(I,{marginRight:"16"},C.createElement(bs,{onClose:e}))),C.createElement(I,{className:sF,paddingBottom:"18"},Object.entries(E).map(([H,X],re)=>X.length>0&&C.createElement(j.Fragment,{key:re},H?C.createElement(I,{marginBottom:"8",marginTop:"16",marginX:"6"},C.createElement(ee,{color:H==="Installed"?"accentColor":"modalTextSecondary",size:"14",weight:"bold"},A.includes(H)?p.t(`connector_group.${H.toLowerCase()}`):H)):null,C.createElement(I,{display:"flex",flexDirection:"column",gap:"4"},X.map(ce=>C.createElement(S8,{currentlySelected:ce.id===n,iconBackground:ce.iconBackground,iconUrl:ce.iconUrl,key:ce.id,name:ce.name,onClick:()=>N(ce),ready:ce.ready,recent:ce.recent,testId:`wallet-option-${ce.id}`,isRainbowKitConnector:ce.isRainbowKitConnector})))))),d&&C.createElement(C.Fragment,null,C.createElement(I,{background:"generalBorder",height:"1",marginTop:"-1"}),h?C.createElement(I,{paddingX:"24",paddingY:"16",textAlign:"center"},C.createElement(h,{Link:g1,Text:y1})):C.createElement(I,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},C.createElement(I,{paddingY:"4"},C.createElement(ee,{color:"modalTextSecondary",size:"14",weight:"medium"},p.t("connect.new_to_ethereum.description"))),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},C.createElement(I,{className:ze({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>R("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},C.createElement(ee,{color:"accentColor",size:"14",weight:"bold"},p.t("connect.new_to_ethereum.learn_more.label"))))))),(d?F!=="NONE":!0)&&C.createElement(C.Fragment,null,!d&&C.createElement(I,{background:"generalBorder",minWidth:"1",width:"1"}),C.createElement(I,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},C.createElement(I,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},C.createElement(I,{width:"28"},D&&C.createElement(I,{as:"button",className:ze({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{D&&R(D,!0),Q==null||Q()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},C.createElement(A8,null))),C.createElement(I,{display:"flex",justifyContent:"center",style:{flexGrow:1}},L&&C.createElement(ee,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},L)),C.createElement(bs,{onClose:e})),C.createElement(I,{display:"flex",flexDirection:"column",style:{minHeight:d?396:432}},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},T)))))}var wF="_1am14412",bF="_1am14410",vF="_1am14413",xF=({wallet:e})=>C.createElement("svg",{className:vF,viewBox:"0 0 86 86",width:"86",height:"86"},C.createElement("title",null,"Loading"),C.createElement("rect",{x:"3",y:"3",width:80,height:80,rx:20,ry:20,strokeDasharray:`${160/3} ${2*160/3}`,strokeDashoffset:160,className:wF,style:{stroke:(e==null?void 0:e.iconAccent)||"#0D3887"}}));function M8({onClose:e,wallet:t,connecting:n}){const{connect:r,iconBackground:o,iconUrl:s,id:i,name:a,getMobileUri:c,ready:l,shortName:u,showWalletConnectModal:f}=t,d=k8(s),h=j.useRef(!1),{i18n:p}=j.useContext(qe),m=j.useCallback(async()=>{if(i!=="walletConnect"&&(async()=>{const y=await(c==null?void 0:c());if(y)if(y&&aL({mobileUri:y,name:a}),y.startsWith("http")){const g=document.createElement("a");g.href=y,g.target="_blank",g.rel="noreferrer noopener",g.click()}else window.location.href=y})(),f){f(),e==null||e();return}try{await(r==null?void 0:r())}catch{}},[r,c,f,e,a,i]);return j.useEffect(()=>{n&&!h.current&&(m(),h.current=!0)},[n,m]),C.createElement(I,{as:"button",color:l?"modalText":"modalTextSecondary",disabled:!l,fontFamily:"body",key:i,onClick:m,ref:d,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${i}`,type:"button",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},C.createElement(I,{display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"8",paddingTop:"10",position:"relative"},n?C.createElement(xF,{wallet:t}):null,C.createElement(tt,{background:o,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:s,width:"60"})),n?null:C.createElement(I,{display:"flex",flexDirection:"column",textAlign:"center"},C.createElement(ee,{as:"h2",color:t.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},C.createElement(I,{as:"span",position:"relative"},u??a,!t.ready&&" (unsupported)")),t.recent&&C.createElement(ee,{color:"accentColor",size:"12",weight:"medium"},p.t("connect.recent")))))}function CF({onClose:e}){var h;const t="rk_connect_title",n=Lc().filter(p=>p.isRainbowKitConnector),{disclaimer:r,learnMoreUrl:o}=j.useContext(ll);let s=null,i=null,a=!1,c=null;const[l,u]=j.useState("CONNECT"),{i18n:f}=j.useContext(qe),d=pf();switch(l){case"CONNECT":{s=f.t("connect.title"),a=!0,i=C.createElement(I,null,C.createElement(I,{background:"profileForeground",className:bF,display:"flex",paddingBottom:"20",paddingTop:"6",paddingX:"20",style:{gap:"calc((100% - 40px - 240px + 47px) / 4)"}},n.filter(p=>p.ready).map(p=>C.createElement(I,{key:p.id,width:"60"},C.createElement(M8,{onClose:e,wallet:p})))),C.createElement(I,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},C.createElement(I,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},C.createElement(ee,{color:"modalText",size:"16",weight:"bold"},f.t("intro.title")),C.createElement(ee,{color:"modalTextSecondary",size:"16"},f.t("intro.description")))),C.createElement(I,{paddingTop:"32",paddingX:"20"},C.createElement(I,{display:"flex",gap:"14",justifyContent:"center"},C.createElement(jt,{label:f.t("intro.get.label"),onClick:()=>u("GET"),size:"large",type:"secondary"}),C.createElement(jt,{href:o,label:f.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&C.createElement(I,{marginTop:"28",marginX:"32",textAlign:"center"},C.createElement(r,{Link:g1,Text:y1})));break}case"GET":{s=f.t("get.title"),c="CONNECT";const p=(h=n==null?void 0:n.filter(m=>{var v,y,g;return((v=m.downloadUrls)==null?void 0:v.ios)||((y=m.downloadUrls)==null?void 0:y.android)||((g=m.downloadUrls)==null?void 0:g.mobile)}))==null?void 0:h.splice(0,3);i=C.createElement(I,null,C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},p.map((m,v)=>{const{downloadUrls:y,iconBackground:g,iconUrl:w,name:x}=m;return!(y!=null&&y.ios)&&!(y!=null&&y.android)&&!(y!=null&&y.mobile)?null:C.createElement(I,{display:"flex",gap:"16",key:m.id,paddingX:"20",width:"full"},C.createElement(I,{style:{minHeight:48,minWidth:48}},C.createElement(tt,{background:g,borderColor:"generalBorder",borderRadius:"10",height:"48",src:w,width:"48"})),C.createElement(I,{display:"flex",flexDirection:"column",width:"full"},C.createElement(I,{alignItems:"center",display:"flex",height:"48"},C.createElement(I,{width:"full"},C.createElement(ee,{color:"modalText",size:"18",weight:"bold"},x)),C.createElement(jt,{href:(d?y==null?void 0:y.ios:y==null?void 0:y.android)||(y==null?void 0:y.mobile),label:f.t("get.action.label"),size:"small",type:"secondary"})),v<p.length-1&&C.createElement(I,{background:"generalBorderDim",height:"1",marginY:"10",width:"full"})))})),C.createElement(I,{style:{marginBottom:"42px"}}),C.createElement(I,{alignItems:"center",display:"flex",flexDirection:"column",gap:"36",paddingX:"36",style:{textAlign:"center"}},C.createElement(I,{display:"flex",flexDirection:"column",gap:"12",textAlign:"center"},C.createElement(ee,{color:"modalText",size:"16",weight:"bold"},f.t("get.looking_for.title")),C.createElement(ee,{color:"modalTextSecondary",size:"16"},f.t("get.looking_for.mobile.description")))));break}}return C.createElement(I,{display:"flex",flexDirection:"column",paddingBottom:"36"},C.createElement(I,{background:a?"profileForeground":"modalBackground",display:"flex",flexDirection:"column",paddingBottom:"4",paddingTop:"14"},C.createElement(I,{display:"flex",justifyContent:"center",paddingBottom:"6",paddingX:"20",position:"relative"},c&&C.createElement(I,{display:"flex",position:"absolute",style:{left:0,marginBottom:-20,marginTop:-20}},C.createElement(I,{alignItems:"center",as:"button",className:ze({active:"shrinkSm",hover:"growLg"}),color:"accentColor",display:"flex",marginLeft:"4",marginTop:"20",onClick:()=>u(c),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},C.createElement(A8,null))),C.createElement(I,{marginTop:"4",textAlign:"center",width:"full"},C.createElement(ee,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},s)),C.createElement(I,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},C.createElement(I,{style:{marginBottom:-20,marginTop:-20}},C.createElement(bs,{onClose:e}))))),C.createElement(I,{display:"flex",flexDirection:"column"},i))}var EF=({onClose:e})=>{const{connector:t}=j.useContext(ul),{i18n:n}=j.useContext(qe),r=(t==null?void 0:t.name)||"";return C.createElement(I,null,C.createElement(I,{display:"flex",paddingBottom:"32",justifyContent:"center",alignItems:"center",background:"profileForeground",flexDirection:"column"},C.createElement(I,{width:"full",display:"flex",justifyContent:"flex-end",marginTop:"18",marginRight:"24"},C.createElement(bs,{onClose:e})),C.createElement(I,{width:"60"},C.createElement(M8,{onClose:e,wallet:t,connecting:!0})),C.createElement(I,{marginTop:"20"},C.createElement(ee,{textAlign:"center",color:"modalText",size:"18",weight:"semibold"},n.t("connect.status.connect_mobile",{wallet:r}))),C.createElement(I,{maxWidth:"full",marginTop:"8"},C.createElement(ee,{textAlign:"center",color:"modalText",size:"16",weight:"medium"},n.t("connect.status.confirm_mobile",{wallet:r})))))};function AF({onClose:e}){const{connector:t}=j.useContext(ul);return nt()?t?C.createElement(EF,{onClose:e}):C.createElement(CF,{onClose:e}):C.createElement(yF,{onClose:e})}function kF({onClose:e,open:t}){const n="rk_connect_title",r=a1(),{disconnect:o}=Zg(),{isConnecting:s}=gt(),i=C.useCallback(()=>{e(),o()},[e,o]),a=C.useCallback(()=>{s&&o(),e()},[e,o,s]);return r==="disconnected"?C.createElement(dd,{onClose:a,open:t,titleId:n},C.createElement(fd,{bottomSheetOnMobile:!0,padding:"0",wide:!0},C.createElement(AF,{onClose:a}))):r==="unauthenticated"?C.createElement(dd,{onClose:i,open:t,titleId:n},C.createElement(fd,{bottomSheetOnMobile:!0,padding:"0"},C.createElement(sL,{onClose:i,onCloseModal:e}))):null}function zh(){const[e,t]=j.useState(!1);return{closeModal:j.useCallback(()=>t(!1),[]),isModalOpen:e,openModal:j.useCallback(()=>t(!0),[])}}var Xi=j.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1,isWalletConnectModalOpen:!1,setIsWalletConnectModalOpen:()=>{}});function SF({children:e}){const{closeModal:t,isModalOpen:n,openModal:r}=zh(),{closeModal:o,isModalOpen:s,openModal:i}=zh(),{closeModal:a,isModalOpen:c,openModal:l}=zh(),[u,f]=j.useState(!1),d=a1(),{chainId:h}=gt(),{chains:p}=Ke(),m=p.some(g=>g.id===h),v=j.useCallback(({keepConnectModalOpen:g=!1}={})=>{g||t(),o(),a()},[t,o,a]),y=hf()==="unauthenticated";return K3({onConnect:()=>v({keepConnectModalOpen:y}),onDisconnect:()=>v()}),j.useEffect(()=>{y&&v()},[y,v]),C.createElement(Xi.Provider,{value:j.useMemo(()=>({accountModalOpen:s,chainModalOpen:c,connectModalOpen:n,isWalletConnectModalOpen:u,openAccountModal:m&&d==="connected"?i:void 0,openChainModal:d==="connected"?l:void 0,openConnectModal:d==="disconnected"||d==="unauthenticated"?r:void 0,setIsWalletConnectModalOpen:f}),[d,s,c,n,i,l,r,m,u])},e,C.createElement(kF,{onClose:t,open:n}),C.createElement(OL,{onClose:o,open:s}),C.createElement(zL,{onClose:a,open:c}))}function jF(){const{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}=j.useContext(Xi);return{accountModalOpen:e,chainModalOpen:t,connectModalOpen:n}}function _F(){const{accountModalOpen:e,openAccountModal:t}=j.useContext(Xi);return{accountModalOpen:e,openAccountModal:t}}function IF(){const{chainModalOpen:e,openChainModal:t}=j.useContext(Xi);return{chainModalOpen:e,openChainModal:t}}function L8(){const{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}=j.useContext(Xi);return{isWalletConnectModalOpen:e,setIsWalletConnectModalOpen:t}}function BF(){const{connectModalOpen:e,openConnectModal:t}=j.useContext(Xi),{isWalletConnectModalOpen:n}=L8();return{connectModalOpen:e||n,openConnectModal:t}}var $h=()=>{};function w1({children:e}){const t=dM(),{address:n}=gt(),{chainId:r}=gt(),{chains:o}=Ke(),s=o.some(P=>P.id===r),i=lM(),a=hf()??void 0,c=r?i[r]:void 0,l=(c==null?void 0:c.name)??void 0,u=(c==null?void 0:c.iconUrl)??void 0,f=(c==null?void 0:c.iconBackground)??void 0,d=mf(u),h=j.useContext(u1),p=i8().some(({status:P})=>P==="pending")&&h,{showBalance:m}=e8(),y=typeof m=="boolean"?m:m?VC(m)[nt()?"smallScreen":"largeScreen"]:!0,{balance:g,ensAvatar:w,ensName:x}=n8({address:n,includeBalance:y}),E=g?`${b8(Number.parseFloat(g.formatted))} ${g.symbol}`:void 0,{openConnectModal:A}=BF(),{openChainModal:k}=IF(),{openAccountModal:S}=_F(),{accountModalOpen:_,chainModalOpen:N,connectModalOpen:O}=jF();return C.createElement(C.Fragment,null,e({account:n?{address:n,balanceDecimals:g==null?void 0:g.decimals,balanceFormatted:g==null?void 0:g.formatted,balanceSymbol:g==null?void 0:g.symbol,displayBalance:E,displayName:x?x8(x):v8(n),ensAvatar:w??void 0,ensName:x??void 0,hasPendingTransactions:p}:void 0,accountModalOpen:_,authenticationStatus:a,chain:r?{hasIcon:!!u,iconBackground:f,iconUrl:d,id:r,name:l,unsupported:!s}:void 0,chainModalOpen:N,connectModalOpen:O,mounted:t(),openAccountModal:S??$h,openChainModal:k??$h,openConnectModal:A??$h}))}w1.displayName="ConnectButton.Custom";var Ba={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function hd({accountStatus:e=Ba.accountStatus,chainStatus:t=Ba.chainStatus,label:n=Ba.label,showBalance:r=Ba.showBalance}){const o=ks(),s=a1(),{setShowBalance:i}=e8(),[a,c]=j.useState(!1),{i18n:l}=j.useContext(qe);return j.useEffect(()=>{i(r),a||c(!0)},[r,i]),a?C.createElement(w1,null,({account:u,chain:f,mounted:d,openAccountModal:h,openChainModal:p,openConnectModal:m})=>{const v=d&&s!=="loading",y=(f==null?void 0:f.unsupported)??!1;return C.createElement(I,{display:"flex",gap:"12",...!v&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},v&&u&&s==="connected"?C.createElement(C.Fragment,null,f&&(o.length>1||y)&&C.createElement(I,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:y?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ze({active:"shrink",hover:"grow"}),color:y?"connectButtonTextError":"connectButtonText",display:Ts(t,g=>g==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:y?"unsupported":"supported",onClick:p,paddingX:"10",paddingY:"8",testId:y?"wrong-network-button":"chain-button",transition:"default",type:"button"},y?C.createElement(I,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},l.t("connect_wallet.wrong_network.label")):C.createElement(I,{alignItems:"center",display:"flex",gap:"6"},f.hasIcon?C.createElement(I,{display:Ts(t,g=>g==="full"||g==="icon"?"block":"none"),height:"24",width:"24"},C.createElement(tt,{alt:f.name??"Chain icon",background:f.iconBackground,borderRadius:"full",height:"24",src:f.iconUrl,width:"24"})):null,C.createElement(I,{display:Ts(t,g=>g==="icon"&&!f.iconUrl||g==="full"||g==="name"?"block":"none")},f.name??f.id)),C.createElement(Tb,null)),!y&&C.createElement(I,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:ze({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:h,testId:"account-button",transition:"default",type:"button"},u.displayBalance&&C.createElement(I,{display:Ts(r,g=>g?"block":"none"),padding:"8",paddingLeft:"12"},u.displayBalance),C.createElement(I,{background:VC(r)[nt()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},C.createElement(I,{alignItems:"center",display:"flex",gap:"6",height:"24"},C.createElement(I,{display:Ts(e,g=>g==="full"||g==="avatar"?"block":"none")},C.createElement(JC,{address:u.address,imageUrl:u.ensAvatar,loading:u.hasPendingTransactions,size:24})),C.createElement(I,{alignItems:"center",display:"flex",gap:"6"},C.createElement(I,{display:Ts(e,g=>g==="full"||g==="address"?"block":"none")},u.displayName),C.createElement(Tb,null)))))):C.createElement(I,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:ze({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:m,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},d&&n==="Connect Wallet"?l.t("connect_wallet.label"):n))}):C.createElement(C.Fragment,null)}hd.__defaultProps=Ba;hd.Custom=w1;var NF=({appName:e,appDescription:t,appUrl:n,appIcon:r})=>({name:e,description:t??e,url:n??(typeof window<"u"?window.location.origin:""),icons:[...r?[r]:[]]});function PF(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0))}function TF(e,t){const n=[];for(const r of e)n.some(o=>o[t]===r[t])||n.push(r);return n}var OF=(e,{projectId:t,walletConnectParameters:n,appName:r,appDescription:o,appUrl:s,appIcon:i})=>{if(!e.length)throw new Error("No wallet list was provided");for(const{wallets:h,groupName:p}of e)if(!h.length)throw new Error(`No wallets provided for group: ${p}`);let a=-1;const c=[],l=[],u=[],f=NF({appName:r,appDescription:o,appUrl:s,appIcon:i});for(const[h,{groupName:p,wallets:m}]of e.entries())for(const v of m){a++;const y=v({projectId:t,appName:r,appIcon:i,options:{metadata:f,...n},walletConnectParameters:{metadata:f,...n}});if(y!=null&&y.iconAccent&&!JL(y==null?void 0:y.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${y.name}`);const g={...y,groupIndex:h+1,groupName:p,index:a};typeof y.hidden=="function"?u.push(g):l.push(g)}const d=TF([...l,...u],"id");for(const{createConnector:h,groupIndex:p,groupName:m,hidden:v,...y}of d){if(typeof v=="function"&&v())continue;const g=E=>({rkDetails:PF({...y,groupIndex:p,groupName:m,isRainbowKitConnector:!0,...E||{}})});y.id==="walletConnect"&&c.push(h(g({isWalletConnectModalConnector:!0,showQrModal:!0})));const x=h(g());c.push(x)}return c};function fl(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function RF(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function MF(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function yf(){return RF()||MF()}function pd(){return fl()||yf()}var cv=new Map,LF=({projectId:e,walletConnectParameters:t,rkDetailsShowQrModal:n,rkDetailsIsWalletConnectModalConnector:r})=>{let o={telemetryEnabled:!1,...t||{},projectId:e,showQrModal:!1};n&&(o={...o,showQrModal:!0}),"customStoragePrefix"in o||(o={...o,customStoragePrefix:r?"clientOne":"clientTwo"});const s=JSON.stringify(o),i=cv.get(s);if(i)return i;const a=i1(o);return cv.set(s,a),a};function FF({projectId:e,walletDetails:t,walletConnectParameters:n}){return r=>({...LF({projectId:e,walletConnectParameters:n,rkDetailsShowQrModal:t.rkDetails.showQrModal,rkDetailsIsWalletConnectModalConnector:t.rkDetails.isWalletConnectModalConnector})(r),...t})}function Rr({projectId:e,walletConnectParameters:t}){const n="21fef48091f12692cad574a6f7753643";if(!e||e==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");return e==="YOUR_PROJECT_ID"&&(e=n),r=>FF({projectId:e,walletDetails:r,walletConnectParameters:t})}var DF=({projectId:e,walletConnectParameters:t})=>({id:"uniswap",name:"Uniswap Wallet",iconUrl:async()=>(await W(async()=>{const{default:n}=await import("./uniswapWallet-VSBIGDAA-CRZ1phba.js");return{default:n}},[])).default,iconBackground:"#FFD8EA",downloadUrls:{ios:"https://apps.apple.com/app/apple-store/id6443944476",mobile:"https://wallet.uniswap.org/",qrCode:"https://wallet.uniswap.org/"},mobile:{getUri:n=>`uniswap://wc?uri=${encodeURIComponent(n)}`},qrCode:{getUri:n=>n,instructions:{learnMoreUrl:"https://wallet.uniswap.org/",steps:[{description:"wallet_connectors.uniswap.qr_code.step1.description",step:"install",title:"wallet_connectors.uniswap.qr_code.step1.title"},{description:"wallet_connectors.uniswap.qr_code.step2.description",step:"create",title:"wallet_connectors.uniswap.qr_code.step2.title"},{description:"wallet_connectors.uniswap.qr_code.step3.description",step:"scan",title:"wallet_connectors.uniswap.qr_code.step3.title"}]}},createConnector:Rr({projectId:e,walletConnectParameters:t})});function F8(e){const t=typeof window<"u"?window:void 0;if(typeof t>"u"||typeof t.ethereum>"u")return;const n=t.ethereum.providers;return n?n.find(r=>r[e]):t.ethereum[e]?t.ethereum:void 0}function D8(e){const t=(n,r)=>{const[o,...s]=r.split("."),i=n[o];if(i)return s.length===0?i:t(i,s.join("."))};if(typeof window<"u")return t(window,e)}function nr({flag:e,namespace:t}){return!!(t&&typeof D8(t)<"u"||e&&typeof F8(e)<"u")}function UF({flag:e,namespace:t}){var o;const n=typeof window<"u"?window:void 0;if(typeof n>"u")return;if(t){const s=D8(t);if(s)return s}const r=(o=n.ethereum)==null?void 0:o.providers;if(e){const s=F8(e);if(s)return s}return typeof r<"u"&&r.length>0?r[0]:n.ethereum}function zF(e){return t=>{const n=e?{target:()=>({id:t.rkDetails.id,name:t.rkDetails.name,provider:e})}:{};return r=>({...rf(n)(r),...t})}}function Mn({flag:e,namespace:t,target:n}){const r=n||UF({flag:e,namespace:t});return zF(r)}var $F=({projectId:e,options:t})=>({id:"walletConnect",name:"WalletConnect",installed:void 0,iconUrl:async()=>(await W(async()=>{const{default:r}=await import("./walletConnectWallet-YHWKVTDY-D3lyiczV.js");return{default:r}},[])).default,iconBackground:"#3b99fc",qrCode:{getUri:r=>r},createConnector:Rr({projectId:e,walletConnectParameters:t})}),WF=({projectId:e,walletConnectParameters:t})=>{const n=nr({namespace:"zerionWallet",flag:"isZerion"}),r=!n,o=s=>yf()?`zerion://wc?uri=${encodeURIComponent(s)}`:s;return{id:"zerion",name:"Zerion",rdns:"io.zerion.wallet",iconUrl:async()=>(await W(async()=>{const{default:s}=await import("./zerionWallet-YD6NMGW7-B9ZZFYu1.js");return{default:s}},[])).default,iconAccent:"#2962ef",iconBackground:"#2962ef",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.zerion.android",ios:"https://apps.apple.com/app/apple-store/id1456732565",mobile:"https://link.zerion.io/pt3gdRP0njb",qrCode:"https://link.zerion.io/pt3gdRP0njb",chrome:"https://chrome.google.com/webstore/detail/klghhnkeealcohjjanjjdaeeggmfmlpl",browserExtension:"https://zerion.io/extension"},mobile:{getUri:r?o:void 0},qrCode:r?{getUri:o,instructions:{learnMoreUrl:"https://zerion.io/blog/announcing-the-zerion-smart-wallet/",steps:[{description:"wallet_connectors.zerion.qr_code.step1.description",step:"install",title:"wallet_connectors.zerion.qr_code.step1.title"},{description:"wallet_connectors.zerion.qr_code.step2.description",step:"create",title:"wallet_connectors.zerion.qr_code.step2.title"},{description:"wallet_connectors.zerion.qr_code.step3.description",step:"scan",title:"wallet_connectors.zerion.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://help.zerion.io/en/",steps:[{description:"wallet_connectors.zerion.extension.step1.description",step:"install",title:"wallet_connectors.zerion.extension.step1.title"},{description:"wallet_connectors.zerion.extension.step2.description",step:"create",title:"wallet_connectors.zerion.extension.step2.title"},{description:"wallet_connectors.zerion.extension.step3.description",step:"refresh",title:"wallet_connectors.zerion.extension.step3.title"}]}},createConnector:r?Rr({projectId:e,walletConnectParameters:t}):Mn({namespace:"zerionWallet",flag:"isZerion"})}},qF=({projectId:e,walletConnectParameters:t})=>{const n=pd()?nr({flag:"isTrust"}):nr({flag:"isTrustWallet"}),r=!n,o=l=>`trust://wc?uri=${encodeURIComponent(l)}`,s=l=>l,i={getUri:r?o:void 0};let a;return r&&(a={getUri:s,instructions:{learnMoreUrl:"https://trustwallet.com/",steps:[{description:"wallet_connectors.trust.qr_code.step1.description",step:"install",title:"wallet_connectors.trust.qr_code.step1.title"},{description:"wallet_connectors.trust.qr_code.step2.description",step:"create",title:"wallet_connectors.trust.qr_code.step2.title"},{description:"wallet_connectors.trust.qr_code.step3.description",step:"scan",title:"wallet_connectors.trust.qr_code.step3.title"}]}}),{id:"trust",name:"Trust Wallet",rdns:"com.trustwallet.app",iconUrl:async()=>(await W(async()=>{const{default:l}=await import("./trustWallet-42DZQQWY-B0DkYL5U.js");return{default:l}},[])).default,installed:n||void 0,iconAccent:"#3375BB",iconBackground:"#fff",downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",ios:"https://apps.apple.com/us/app/trust-crypto-bitcoin-wallet/id1288339409",mobile:"https://trustwallet.com/download",qrCode:"https://trustwallet.com/download",chrome:"https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",browserExtension:"https://trustwallet.com/browser-extension"},mobile:i,qrCode:a,extension:{instructions:{learnMoreUrl:"https://trustwallet.com/browser-extension",steps:[{description:"wallet_connectors.trust.extension.step1.description",step:"install",title:"wallet_connectors.trust.extension.step1.title"},{description:"wallet_connectors.trust.extension.step2.description",step:"create",title:"wallet_connectors.trust.extension.step2.title"},{description:"wallet_connectors.trust.extension.step3.description",step:"refresh",title:"wallet_connectors.trust.extension.step3.title"}]}},createConnector:r?Rr({projectId:e,walletConnectParameters:t}):pd()?Mn({flag:"isTrust"}):Mn({flag:"isTrustWallet"})}},VF=()=>({id:"rabby",name:"Rabby Wallet",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./rabbyWallet-GFVPHCTK-CCnTfCkL.js");return{default:e}},[])).default,rdns:"io.rabby",iconBackground:"#8697FF",installed:nr({flag:"isRabby"}),downloadUrls:{chrome:"https://chrome.google.com/webstore/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch",browserExtension:"https://rabby.io"},extension:{instructions:{learnMoreUrl:"https://rabby.io/",steps:[{description:"wallet_connectors.rabby.extension.step1.description",step:"install",title:"wallet_connectors.rabby.extension.step1.title"},{description:"wallet_connectors.rabby.extension.step2.description",step:"create",title:"wallet_connectors.rabby.extension.step2.title"},{description:"wallet_connectors.rabby.extension.step3.description",step:"refresh",title:"wallet_connectors.rabby.extension.step3.title"}]}},createConnector:Mn({flag:"isRabby"})}),HF=({projectId:e,walletConnectParameters:t})=>{const n=nr({flag:"isRainbow"}),r=!n,o=s=>fl()?s:yf()?`rainbow://wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(s)}&connector=rainbowkit`;return{id:"rainbow",name:"Rainbow",rdns:"me.rainbow",iconUrl:async()=>(await W(async()=>{const{default:s}=await import("./rainbowWallet-O26YNBMX-DUhYus-9.js");return{default:s}},[])).default,iconBackground:"#0c2f78",installed:r?void 0:n,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},mobile:{getUri:r?o:void 0},qrCode:r?{getUri:o,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0,createConnector:r?Rr({projectId:e,walletConnectParameters:t}):Mn({flag:"isRainbow"})}},QF=()=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./safeWallet-5MNKTR5Z-D-5imDLD.js");return{default:e}},[])).default,installed:!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,downloadUrls:{},createConnector:e=>t=>({...s1()(t),...e})}),GF=({projectId:e,walletConnectParameters:t})=>{const r=!nr({namespace:"okxwallet"});return{id:"okx",name:"OKX Wallet",rdns:"com.okex.wallet",iconUrl:async()=>(await W(async()=>{const{default:o}=await import("./okxWallet-QOP2OIPE-KJdrgOlU.js");return{default:o}},[])).default,iconAccent:"#000",iconBackground:"#000",downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.okinc.okex.gp",ios:"https://itunes.apple.com/app/id1327268470?mt=8",mobile:"https://okx.com/download",qrCode:"https://okx.com/download",chrome:"https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",edge:"https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",firefox:"https://addons.mozilla.org/firefox/addon/okexwallet/",browserExtension:"https://okx.com/download"},mobile:{getUri:r?o=>fl()?o:`okex://main/wc?uri=${encodeURIComponent(o)}`:void 0},qrCode:r?{getUri:o=>o,instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"wallet_connectors.okx.qr_code.step1.description",step:"install",title:"wallet_connectors.okx.qr_code.step1.title"},{description:"wallet_connectors.okx.qr_code.step2.description",step:"create",title:"wallet_connectors.okx.qr_code.step2.title"},{description:"wallet_connectors.okx.qr_code.step3.description",step:"scan",title:"wallet_connectors.okx.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://okx.com/web3/",steps:[{description:"wallet_connectors.okx.extension.step1.description",step:"install",title:"wallet_connectors.okx.extension.step1.title"},{description:"wallet_connectors.okx.extension.step2.description",step:"create",title:"wallet_connectors.okx.extension.step2.title"},{description:"wallet_connectors.okx.extension.step3.description",step:"refresh",title:"wallet_connectors.okx.extension.step3.title"}]}},createConnector:r?Rr({projectId:e,walletConnectParameters:t}):Mn({namespace:"okxwallet"})}},KF=()=>({id:"phantom",name:"Phantom",rdns:"app.phantom",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./phantomWallet-5SZPLGFE-CJVw8oe2.js");return{default:e}},[])).default,iconBackground:"#9A8AEE",installed:nr({namespace:"phantom.ethereum"}),downloadUrls:{android:"https://play.google.com/store/apps/details?id=app.phantom",ios:"https://apps.apple.com/app/phantom-solana-wallet/1598432977",mobile:"https://phantom.app/download",qrCode:"https://phantom.app/download",chrome:"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa",firefox:"https://addons.mozilla.org/firefox/addon/phantom-app/",browserExtension:"https://phantom.app/download"},extension:{instructions:{steps:[{description:"wallet_connectors.phantom.extension.step1.description",step:"install",title:"wallet_connectors.phantom.extension.step1.title"},{description:"wallet_connectors.phantom.extension.step2.description",step:"create",title:"wallet_connectors.phantom.extension.step2.title"},{description:"wallet_connectors.phantom.extension.step3.description",step:"refresh",title:"wallet_connectors.phantom.extension.step3.title"}],learnMoreUrl:"https://help.phantom.app"}},createConnector:Mn({namespace:"phantom.ethereum"})}),YF=({projectId:e,walletConnectParameters:t})=>({id:"ledger",iconBackground:"#000",iconAccent:"#000",name:"Ledger",iconUrl:async()=>(await W(async()=>{const{default:n}=await import("./ledgerWallet-ENWBDTSW-BuYJ6Opm.js");return{default:n}},[])).default,downloadUrls:{android:"https://play.google.com/store/apps/details?id=com.ledger.live",ios:"https://apps.apple.com/us/app/ledger-live-web3-wallet/id1361671700",mobile:"https://www.ledger.com/ledger-live",qrCode:"https://r354.adj.st/?adj_t=t2esmlk",windows:"https://www.ledger.com/ledger-live/download",macos:"https://www.ledger.com/ledger-live/download",linux:"https://www.ledger.com/ledger-live/download",desktop:"https://www.ledger.com/ledger-live"},mobile:{getUri:n=>fl()?n:`ledgerlive://wc?uri=${encodeURIComponent(n)}`},desktop:{getUri:n=>`ledgerlive://wc?uri=${encodeURIComponent(n)}`,instructions:{learnMoreUrl:"https://support.ledger.com/hc/en-us/articles/4404389503889-Getting-started-with-Ledger-Live",steps:[{description:"wallet_connectors.ledger.desktop.step1.description",step:"install",title:"wallet_connectors.ledger.desktop.step1.title"},{description:"wallet_connectors.ledger.desktop.step2.description",step:"create",title:"wallet_connectors.ledger.desktop.step2.title"},{description:"wallet_connectors.ledger.desktop.step3.description",step:"connect",title:"wallet_connectors.ledger.desktop.step3.title"}]}},qrCode:{getUri:n=>`ledgerlive://wc?uri=${encodeURIComponent(n)}`,instructions:{learnMoreUrl:"https://support.ledger.com/hc/en-us/articles/4404389503889-Getting-started-with-Ledger-Live",steps:[{description:"wallet_connectors.ledger.qr_code.step1.description",step:"install",title:"wallet_connectors.ledger.qr_code.step1.title"},{description:"wallet_connectors.ledger.qr_code.step2.description",step:"create",title:"wallet_connectors.ledger.qr_code.step2.title"},{description:"wallet_connectors.ledger.qr_code.step3.description",step:"scan",title:"wallet_connectors.ledger.qr_code.step3.title"}]}},createConnector:Rr({projectId:e,walletConnectParameters:t})});function JF(e){return!(!(e!=null&&e.isMetaMask)||e.isBraveWallet&&!e._events&&!e._state||e.isApexWallet||e.isAvalanche||e.isBackpack||e.isBifrost||e.isBitKeep||e.isBitski||e.isBinance||e.isBlockWallet||e.isCoinbaseWallet||e.isDawn||e.isEnkrypt||e.isExodus||e.isFrame||e.isFrontier||e.isGamestop||e.isHyperPay||e.isImToken||e.isKuCoinWallet||e.isMathWallet||e.isNestWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPhantom||e.isZilPay||e.isPortal||e.isxPortal||e.isRabby||e.isRainbow||e.isStatus||e.isTalisman||e.isTally||e.isTokenPocket||e.isTokenary||e.isTrust||e.isTrustWallet||e.isCTRL||e.isZeal||e.isCoin98||e.isMEWwallet||e.isSafeheron||e.isSafePal||e.isWigwam||e.isZerion||e.__seif)}var U8=({projectId:e,walletConnectParameters:t})=>{const{...n}=U8,r=typeof window<"u"?JF(window.ethereum):!1,o=!r&&!pd(),s=r||pd();return{id:"metaMask",name:"MetaMask",rdns:"io.metamask",iconUrl:async()=>(await W(async()=>{const{default:i}=await import("./metaMaskWallet-SITXT2FV-BlemcphV.js");return{default:i}},[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:r||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},mobile:{getUri:s?i=>i:void 0},qrCode:o?{getUri:i=>`https://metamask.app.link/wc?uri=${encodeURIComponent(i)}`,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}},createConnector:o?Rr({projectId:e,walletConnectParameters:t}):i=>a=>{var l,u,f;const c=o1({dappMetadata:{connector:"rainbowkit",name:(l=t==null?void 0:t.metadata)==null?void 0:l.name,iconUrl:(u=t==null?void 0:t.metadata)==null?void 0:u.icons[0],url:(f=t==null?void 0:t.metadata)==null?void 0:f.url},headless:!0,checkInstallationImmediately:!1,enableAnalytics:!1,...n})(a);return{...c,...i,getChainId:async()=>{var d;try{return await c.getChainId()}catch{return((d=a.chains[0])==null?void 0:d.id)??1}}}}}},XF=()=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./injectedWallet-AWJSZPMG-Df9x-YJA.js");return{default:e}},[])).default,iconBackground:"#fff",createConnector:Mn({})}),ZF=()=>({id:"frame",name:"Frame",rdns:"sh.frame",installed:nr({flag:"isFrame"}),iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./frameWallet-HPFOBTAW-MHZLeKL3.js");return{default:e}},[])).default,iconBackground:"#121C20",downloadUrls:{browserExtension:"https://frame.sh/"},extension:{instructions:{learnMoreUrl:"https://docs.frame.sh/docs/Getting%20Started/Installation/",steps:[{description:"wallet_connectors.frame.extension.step1.description",step:"install",title:"wallet_connectors.frame.extension.step1.title"},{description:"wallet_connectors.frame.extension.step2.description",step:"create",title:"wallet_connectors.frame.extension.step2.title"},{description:"wallet_connectors.frame.extension.step3.description",step:"refresh",title:"wallet_connectors.frame.extension.step3.title"}]}},createConnector:Mn({flag:"isFrame"})}),eD=()=>({id:"brave",name:"Brave Wallet",rdns:"com.brave.wallet",iconUrl:async()=>(await W(async()=>{const{default:e}=await import("./braveWallet-SZMR4SAC-BWuwvIcO.js");return{default:e}},[])).default,iconBackground:"#fff",installed:nr({flag:"isBraveWallet"}),downloadUrls:{},createConnector:Mn({flag:"isBraveWallet"})}),z8=({appName:e,appIcon:t})=>{const{preference:n,...r}=z8,o=i=>i,s=yf();return{id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",rdns:"com.coinbase.wallet",iconUrl:async()=>(await W(async()=>{const{default:i}=await import("./coinbaseWallet-OKXU3TRC-DnGdeF1T.js");return{default:i}},[])).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:!0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},...s?{}:{qrCode:{getUri:o,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"wallet_connectors.coinbase.qr_code.step1.description",step:"install",title:"wallet_connectors.coinbase.qr_code.step1.title"},{description:"wallet_connectors.coinbase.qr_code.step2.description",step:"create",title:"wallet_connectors.coinbase.qr_code.step2.title"},{description:"wallet_connectors.coinbase.qr_code.step3.description",step:"scan",title:"wallet_connectors.coinbase.qr_code.step3.title"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"wallet_connectors.coinbase.extension.step1.description",step:"install",title:"wallet_connectors.coinbase.extension.step1.title"},{description:"wallet_connectors.coinbase.extension.step2.description",step:"create",title:"wallet_connectors.coinbase.extension.step2.title"},{description:"wallet_connectors.coinbase.extension.step3.description",step:"refresh",title:"wallet_connectors.coinbase.extension.step3.title"}]}}},createConnector:i=>{const a=typeof n=="string"?{options:n,telemetry:!1}:{options:"all",...n,telemetry:!1},c=ff({appName:e,appLogoUrl:t,...r,preference:a});return l=>({...c(l),...i})}}},tD=({projectId:e,walletConnectParameters:t})=>{const n=nr({namespace:"bitkeep.ethereum",flag:"isBitKeep"}),r=!n;return{id:"bitget",name:"Bitget Wallet",rdns:"com.bitget.web3",iconUrl:async()=>(await W(async()=>{const{default:o}=await import("./bitgetWallet-F7U5Y4MR-C5MU6z4Q.js");return{default:o}},[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:r?void 0:n,downloadUrls:{android:"https://web3.bitget.com/en/wallet-download?type=0",ios:"https://apps.apple.com/app/bitkeep/id1395301115",mobile:"https://web3.bitget.com/en/wallet-download?type=2",qrCode:"https://web3.bitget.com/en/wallet-download",chrome:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",browserExtension:"https://web3.bitget.com/en/wallet-download"},extension:{instructions:{learnMoreUrl:"https://web3.bitget.com/en/academy",steps:[{description:"wallet_connectors.bitget.extension.step1.description",step:"install",title:"wallet_connectors.bitget.extension.step1.title"},{description:"wallet_connectors.bitget.extension.step2.description",step:"create",title:"wallet_connectors.bitget.extension.step2.title"},{description:"wallet_connectors.bitget.extension.step3.description",step:"refresh",title:"wallet_connectors.bitget.extension.step3.description"}]}},mobile:{getUri:r?o=>fl()?o:`bitkeep://wc?uri=${encodeURIComponent(o)}`:void 0},qrCode:r?{getUri:o=>o,instructions:{learnMoreUrl:"https://web3.bitget.com/en/academy",steps:[{description:"wallet_connectors.bitget.qr_code.step1.description",step:"install",title:"wallet_connectors.bitget.qr_code.step1.title"},{description:"wallet_connectors.bitget.qr_code.step2.description",step:"create",title:"wallet_connectors.bitget.qr_code.step2.title"},{description:"wallet_connectors.bitget.qr_code.step3.description",step:"scan",title:"wallet_connectors.bitget.qr_code.step3.title"}]}}:void 0,createConnector:r?Rr({projectId:e,walletConnectParameters:t}):Mn({namespace:"bitkeep.ethereum",flag:"isBitKeep"})}};const nD="166a180f2c8191ed5f637bdcecef77d6",lv=[uf,vO,hO,wO,bO,lO,uO,gO,yO,PC,TC,fO,dO,pO,mO],rD=OF([{groupName:"Popular",wallets:[U8,z8,$F,YF,qF,VF,QF]},{groupName:"More Wallets",wallets:[HF,KF,eD,WF,GF,DF,tD,ZF,XF]}],{appName:"Hardhat AirSign",projectId:nD}),oD=FN({connectors:rD,chains:lv,transports:Object.fromEntries(lv.map(e=>[e.id,nN()]))}),sD=new MP;function iD({children:e}){return b.jsx(zN,{config:oD,children:b.jsx(JP,{client:sD,children:b.jsx(fL,{theme:qx({accentColor:"#3b82f6",accentColorForeground:"white",borderRadius:"medium"}),children:e})})})}const rr=Object.create(null);rr.open="0";rr.close="1";rr.ping="2";rr.pong="3";rr.message="4";rr.upgrade="5";rr.noop="6";const wu=Object.create(null);Object.keys(rr).forEach(e=>{wu[rr[e]]=e});const K0={type:"error",data:"parser error"},$8=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",W8=typeof ArrayBuffer=="function",q8=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,b1=({type:e,data:t},n,r)=>$8&&t instanceof Blob?n?r(t):uv(t,r):W8&&(t instanceof ArrayBuffer||q8(t))?n?r(t):uv(new Blob([t]),r):r(rr[e]+(t||"")),uv=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function dv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Wh;function aD(e,t){if($8&&e.data instanceof Blob)return e.data.arrayBuffer().then(dv).then(t);if(W8&&(e.data instanceof ArrayBuffer||q8(e.data)))return t(dv(e.data));b1(e,!1,n=>{Wh||(Wh=new TextEncoder),t(Wh.encode(n))})}const fv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Na=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<fv.length;e++)Na[fv.charCodeAt(e)]=e;const cD=e=>{let t=e.length*.75,n=e.length,r,o=0,s,i,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)s=Na[e.charCodeAt(r)],i=Na[e.charCodeAt(r+1)],a=Na[e.charCodeAt(r+2)],c=Na[e.charCodeAt(r+3)],u[o++]=s<<2|i>>4,u[o++]=(i&15)<<4|a>>2,u[o++]=(a&3)<<6|c&63;return l},lD=typeof ArrayBuffer=="function",v1=(e,t)=>{if(typeof e!="string")return{type:"message",data:V8(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:uD(e.substring(1),t)}:wu[n]?e.length>1?{type:wu[n],data:e.substring(1)}:{type:wu[n]}:K0},uD=(e,t)=>{if(lD){const n=cD(e);return V8(n,t)}else return{base64:!0,data:e}},V8=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},H8="",dD=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((s,i)=>{b1(s,!1,a=>{r[i]=a,++o===n&&t(r.join(H8))})})},fD=(e,t)=>{const n=e.split(H8),r=[];for(let o=0;o<n.length;o++){const s=v1(n[o],t);if(r.push(s),s.type==="error")break}return r};function hD(){return new TransformStream({transform(e,t){aD(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);const s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let qh;function Kl(e){return e.reduce((t,n)=>t+n.length,0)}function Yl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function pD(e,t){qh||(qh=new TextDecoder);const n=[];let r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(Kl(n)<1)break;const c=Yl(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Kl(n)<2)break;const c=Yl(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Kl(n)<8)break;const c=Yl(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),u=l.getUint32(0);if(u>Math.pow(2,21)-1){a.enqueue(K0);break}o=u*Math.pow(2,32)+l.getUint32(4),r=3}else{if(Kl(n)<o)break;const c=Yl(n,o);a.enqueue(v1(s?c:qh.decode(c),t)),r=0}if(o===0||o>e){a.enqueue(K0);break}}}})}const Q8=4;function Ue(e){if(e)return mD(e)}function mD(e){for(var t in Ue.prototype)e[t]=Ue.prototype[t];return e}Ue.prototype.on=Ue.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ue.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ue.prototype.off=Ue.prototype.removeListener=Ue.prototype.removeAllListeners=Ue.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ue.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};Ue.prototype.emitReserved=Ue.prototype.emit;Ue.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ue.prototype.hasListeners=function(e){return!!this.listeners(e).length};const wf=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),fn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),gD="arraybuffer";function G8(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const yD=fn.setTimeout,wD=fn.clearTimeout;function bf(e,t){t.useNativeTimers?(e.setTimeoutFn=yD.bind(fn),e.clearTimeoutFn=wD.bind(fn)):(e.setTimeoutFn=fn.setTimeout.bind(fn),e.clearTimeoutFn=fn.clearTimeout.bind(fn))}const bD=1.33;function vD(e){return typeof e=="string"?xD(e):Math.ceil((e.byteLength||e.size)*bD)}function xD(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function K8(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function CD(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ED(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class AD extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class x1 extends Ue{constructor(t){super(),this.writable=!1,bf(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new AD(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=v1(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=CD(t);return n.length?"?"+n:""}}class kD extends x1{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};fD(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,dD(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=K8()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Y8=!1;try{Y8=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const SD=Y8;function jD(){}class _D extends kD{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let ci=class bu extends Ue{constructor(t,n,r){super(),this.createRequest=t,bf(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=G8(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=bu.requestsCount++,bu.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=jD,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete bu.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ci.requestsCount=0;ci.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hv);else if(typeof addEventListener=="function"){const e="onpagehide"in fn?"pagehide":"unload";addEventListener(e,hv,!1)}}function hv(){for(let e in ci.requests)ci.requests.hasOwnProperty(e)&&ci.requests[e].abort()}const ID=function(){const e=J8({xdomain:!1});return e&&e.responseType!==null}();class BD extends _D{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=ID&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ci(J8,this.uri(),t)}}function J8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||SD))return new XMLHttpRequest}catch{}if(!t)try{return new fn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const X8=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ND extends x1{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=X8?{}:G8(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}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 n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;b1(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&wf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=K8()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Vh=fn.WebSocket||fn.MozWebSocket;class PD extends ND{createSocket(t,n,r){return X8?new Vh(t,n,r):n?new Vh(t,n):new Vh(t)}doWrite(t,n){this.ws.send(n)}}class TD extends x1{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=>{const n=pD(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=hD();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&wf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const OD={websocket:PD,webtransport:TD,polling:BD},RD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,MD=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Y0(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=RD.exec(e||""),s={},i=14;for(;i--;)s[MD[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=LD(s,s.path),s.queryKey=FD(s,s.query),s}function LD(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function FD(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}const J0=typeof addEventListener=="function"&&typeof removeEventListener=="function",vu=[];J0&&addEventListener("offline",()=>{vu.forEach(e=>e())},!1);class mo extends Ue{constructor(t,n){if(super(),this.binaryType=gD,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Y0(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Y0(n.host).host);bf(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ED(this.opts.query)),J0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},vu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Q8,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&mo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}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",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",mo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")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":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}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(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const 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,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=vD(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,wf(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(mo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),J0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=vu.indexOf(this._offlineEventListener);r!==-1&&vu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}mo.protocol=Q8;class DD extends mo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;mo.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;mo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,u(),n.close(),n=null)}const i=f=>{const d=new Error("probe error: "+f);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(f){n&&f.name!==n.name&&s()}const u=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let UD=class extends DD{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>OD[o]).filter(o=>!!o)),super(t,r)}};function zD(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Y0(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const $D=typeof ArrayBuffer=="function",WD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Z8=Object.prototype.toString,qD=typeof Blob=="function"||typeof Blob<"u"&&Z8.call(Blob)==="[object BlobConstructor]",VD=typeof File=="function"||typeof File<"u"&&Z8.call(File)==="[object FileConstructor]";function C1(e){return $D&&(e instanceof ArrayBuffer||WD(e))||qD&&e instanceof Blob||VD&&e instanceof File}function xu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xu(e[n]))return!0;return!1}if(C1(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xu(e[n]))return!0;return!1}function HD(e){const t=[],n=e.data,r=e;return r.data=X0(n,t),r.attachments=t.length,{packet:r,buffers:t}}function X0(e,t){if(!e)return e;if(C1(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=X0(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=X0(e[r],t));return n}return e}function QD(e,t){return e.data=Z0(e.data,t),delete e.attachments,e}function Z0(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Z0(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Z0(e[n],t));return e}const GD=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var pe;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(pe||(pe={}));class KD{constructor(t){this.replacer=t}encode(t){return(t.type===pe.EVENT||t.type===pe.ACK)&&xu(t)?this.encodeAsBinary({type:t.type===pe.EVENT?pe.BINARY_EVENT:pe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===pe.BINARY_EVENT||t.type===pe.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=HD(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class E1 extends Ue{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===pe.BINARY_EVENT;r||n.type===pe.BINARY_ACK?(n.type=r?pe.EVENT:pe.ACK,this.reconstructor=new YD(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(C1(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(pe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pe.BINARY_EVENT||r.type===pe.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const i=t.substring(s,n);if(i!=Number(i)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const a=Number(i);if(!JD(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const s=n+1;for(;++n;){const i=t.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(E1.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case pe.CONNECT:return pv(n);case pe.DISCONNECT:return n===void 0;case pe.CONNECT_ERROR:return typeof n=="string"||pv(n);case pe.EVENT:case pe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&GD.indexOf(n[0])===-1);case pe.ACK:case pe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class YD{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=QD(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const JD=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function pv(e){return Object.prototype.toString.call(e)==="[object Object]"}const XD=Object.freeze(Object.defineProperty({__proto__:null,Decoder:E1,Encoder:KD,get PacketType(){return pe}},Symbol.toStringTag,{value:"Module"}));function Sn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ZD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eE extends Ue{constructor(t,n,r){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=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Sn(t,"open",this.onopen.bind(this)),Sn(t,"packet",this.onpacket.bind(this)),Sn(t,"error",this.onerror.bind(this)),Sn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,s;if(ZD.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:pe.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const u=this.ids++,f=n.pop();this._registerAckCallback(u,f),i.id=u}const a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...n){return new Promise((r,o)=>{const s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:pe.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,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case pe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new 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 pe.EVENT:case pe.BINARY_EVENT:this.onevent(t);break;case pe.ACK:case pe.BINARY_ACK:this.onack(t);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:pe.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,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:pe.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){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}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){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Zi(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zi.prototype.reset=function(){this.attempts=0};Zi.prototype.setMin=function(e){this.ms=e};Zi.prototype.setMax=function(e){this.max=e};Zi.prototype.setJitter=function(e){this.jitter=e};class em extends Ue{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,bf(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||XD;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new UD(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Sn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},i=Sn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Sn(t,"ping",this.onping.bind(this)),Sn(t,"data",this.ondata.bind(this)),Sn(t,"error",this.onerror.bind(this)),Sn(t,"close",this.onclose.bind(this)),Sn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){wf(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new eE(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],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,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ca={};function Cu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=zD(e,t.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Ca[o]&&s in Ca[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||i;let c;return a?c=new em(r,t):(Ca[o]||(Ca[o]=new em(r,t)),c=Ca[o]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Cu,{Manager:em,Socket:eE,io:Cu,connect:Cu});function eU(e){const t=j.useRef(null),n=j.useRef(e);n.current=e;const[r,o]=j.useState("disconnected"),[s,i]=j.useState([]),[a,c]=j.useState([]),l=j.useCallback(m=>{var y;const v=(y=n.current)==null?void 0:y.call(n);v!=null&&v.isConnected&&v.address&&(console.log("[AirSign] Re-announcing wallet to server:",v.address),m.emit("signer:connected",{address:v.address,chainId:v.chainId}))},[]);j.useEffect(()=>{o("connecting");const m=Cu(window.location.origin,{transports:["websocket","polling"]});return t.current=m,m.on("connect",()=>{console.log("[AirSign] Connected to signing server"),o("connected"),l(m)}),m.on("disconnect",()=>{console.log("[AirSign] Disconnected from signing server"),o("disconnected")}),m.on("connect_error",v=>{console.error("[AirSign] Connection error:",v.message),o("disconnected")}),m.on("signing:requestWalletState",()=>{console.log("[AirSign] Server requested wallet state"),l(m)}),m.on("signing:request",v=>{console.log("[AirSign] Received signing request:",v.id),i(y=>[...y,v])}),m.on("rpc:request",async v=>{try{const y=window.ethereum;if(!y){m.emit("rpc:response",{rpcId:v.rpcId,error:{code:-32e3,message:"No injected provider (window.ethereum) available"}});return}const g=await y.request({method:v.method,params:v.params||[]});m.emit("rpc:response",{rpcId:v.rpcId,result:g})}catch(y){m.emit("rpc:response",{rpcId:v.rpcId,error:{code:y.code||-32e3,message:y.message||"RPC call failed"}})}}),()=>{m.disconnect(),t.current=null}},[l]);const u=j.useCallback((m,v)=>{var y;(y=t.current)!=null&&y.connected&&t.current.emit("signer:connected",{address:m,chainId:v})},[]),f=j.useCallback(()=>{var m;(m=t.current)!=null&&m.connected&&t.current.emit("signer:disconnected")},[]),d=j.useCallback(m=>{var v;(v=t.current)!=null&&v.connected&&t.current.emit("signer:chainChanged",m)},[]),h=j.useCallback(m=>{var v;(v=t.current)!=null&&v.connected&&t.current.emit("signer:accountChanged",m)},[]),p=j.useCallback(m=>{var v;(v=t.current)!=null&&v.connected&&(t.current.emit("signing:response",m),i(y=>{const g=y.find(w=>w.id===m.id);return g&&c(w=>[{...g,response:m},...w]),y.filter(w=>w.id!==m.id)}))},[]);return{socket:t.current,status:r,pendingRequests:s,completedRequests:a,notifyWalletConnected:u,notifyWalletDisconnected:f,notifyChainChanged:d,notifyAccountChanged:h,sendResponse:p}}function tU({request:e,onResponse:t}){const[n,r]=j.useState(!1),[o,s]=j.useState(null),[i,a]=j.useState(!1),{data:c}=uC(),l=async()=>{if(!c){s("Wallet not connected");return}r(!0),s(null);try{if(e.type==="sendTransaction"){const w=e.transaction,x={to:w.to,data:w.data,value:w.value?BigInt(w.value):void 0,gas:w.gasLimit?BigInt(w.gasLimit):void 0,nonce:w.nonce};w.maxFeePerGas?(x.maxFeePerGas=BigInt(w.maxFeePerGas),w.maxPriorityFeePerGas&&(x.maxPriorityFeePerGas=BigInt(w.maxPriorityFeePerGas))):w.gasPrice&&(x.gasPrice=BigInt(w.gasPrice));const E=await c.sendTransaction(x);t({id:e.id,success:!0,result:E})}else if(e.type==="signMessage"){const g=e,w=await c.signMessage({message:g.message});t({id:e.id,success:!0,result:w})}}catch(g){const w=(g==null?void 0:g.shortMessage)||(g==null?void 0:g.message)||"Transaction rejected";s(w),t({id:e.id,success:!1,error:w})}finally{r(!1)}},u=()=>{t({id:e.id,success:!1,error:"Transaction rejected by signer"})},f=e.type==="sendTransaction",d=f?e.transaction:null,h=f?e.metadata:null,p=g=>{if(!g||g==="0x0"||g==="0x00")return"0 ETH";try{const w=BigInt(g),x=Number(w)/1e18;return x<1e-4?`${Number(w)} wei`:`${x.toFixed(6)} ETH`}catch{return g}},m=g=>g?`${g.slice(0,6)}...${g.slice(-4)}`:"",v=!!(d!=null&&d.data&&d.data!=="0x"&&d.data.length>2),y=v?(d.data.length-2)/2:0;return b.jsxs("div",{className:"glass rounded-2xl overflow-hidden",children:[b.jsx("div",{className:"px-5 pt-5 pb-3",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("div",{className:`w-9 h-9 rounded-xl flex items-center justify-center text-lg ${f?"bg-blue-500/15":"bg-purple-500/15"}`,children:f?d!=null&&d.to?"↗️":"📦":"✍️"}),b.jsxs("div",{children:[b.jsx("h3",{className:"text-white text-sm font-semibold",children:f?d!=null&&d.to?(h==null?void 0:h.functionName)||"Contract Call":h!=null&&h.contractName?`Deploy ${h.contractName}`:"Deploy Contract":"Sign Message"}),(h==null?void 0:h.contractName)&&(d==null?void 0:d.to)&&b.jsx("p",{className:"text-gray-500 text-[11px]",children:h.contractName})]})]}),b.jsx("span",{className:"text-[10px] font-medium text-gray-500 bg-white/[0.04] px-2 py-1 rounded-lg",children:f?d!=null&&d.to?"Call":"Deploy":"Sign"})]})}),f&&d&&b.jsxs("div",{className:"mx-5 mb-3 rounded-xl bg-black/20 p-3.5 space-y-2",children:[d.to&&b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"To"}),b.jsx("span",{className:"text-blue-400 text-[11px] font-mono",children:m(d.to)})]}),b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"Value"}),b.jsx("span",{className:"text-white text-[11px] font-mono",children:p(d.value)})]}),v&&b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"Data"}),b.jsxs("button",{onClick:()=>a(!i),className:"text-gray-400 hover:text-gray-300 text-[11px] font-mono transition-colors",children:[d.data.slice(0,10)," (",y,"B) ",i?"▴":"▾"]})]}),i&&v&&b.jsx("div",{className:"mt-1 p-2 rounded-lg bg-black/30 font-mono text-[10px] text-gray-500 break-all max-h-32 overflow-y-auto leading-relaxed",children:d.data})]}),!f&&b.jsx("div",{className:"mx-5 mb-3 rounded-xl bg-black/20 p-3.5",children:b.jsx("p",{className:"text-gray-300 text-xs break-all leading-relaxed",children:e.message})}),o&&b.jsx("div",{className:"mx-5 mb-3 rounded-xl bg-red-500/10 border border-red-500/20 p-3",children:b.jsx("p",{className:"text-red-400 text-xs",children:o})}),b.jsxs("div",{className:"px-5 pb-5 flex gap-2.5",children:[b.jsx("button",{onClick:u,disabled:n,className:`flex-1 py-3 rounded-xl text-sm font-semibold transition-all
1727
+ bg-white/5 hover:bg-white/8 text-gray-300 hover:text-white
1728
+ disabled:opacity-50 disabled:cursor-not-allowed`,children:"Reject"}),b.jsx("button",{onClick:l,disabled:n,className:`flex-[2] py-3 rounded-xl text-sm font-semibold transition-all
1729
+ bg-blue-500 hover:bg-blue-400 text-white
1730
+ disabled:opacity-70 disabled:cursor-not-allowed`,children:n?b.jsxs("span",{className:"flex items-center justify-center gap-2",children:[b.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Confirming..."]}):f?"Confirm":"Sign"})]})]})}const mv={1:"https://etherscan.io",5:"https://goerli.etherscan.io",11155111:"https://sepolia.etherscan.io",137:"https://polygonscan.com",80001:"https://mumbai.polygonscan.com",42161:"https://arbiscan.io",10:"https://optimistic.etherscan.io",8453:"https://basescan.org",56:"https://bscscan.com",43114:"https://snowtrace.io"};function nU(e,t){return`${mv[e]||mv[1]}/tx/${t}`}function rU(e){return e?`${e.slice(0,10)}...${e.slice(-6)}`:""}function oU({pendingRequests:e,completedRequests:t,onResponse:n}){const r=As();return b.jsxs("div",{className:"w-full",children:[e.length>0&&b.jsxs("div",{className:"mb-6",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx("div",{className:"w-1.5 h-1.5 bg-orange-400 rounded-full pulse-ring"}),b.jsxs("h2",{className:"text-[11px] font-semibold text-gray-500 uppercase tracking-wider",children:["Pending (",e.length,")"]})]}),b.jsx("div",{className:"space-y-3",children:e.map(o=>b.jsx(tU,{request:o,onResponse:n},o.id))})]}),e.length===0&&t.length===0&&b.jsxs("div",{className:"text-center py-16",children:[b.jsx("div",{className:"w-14 h-14 rounded-2xl bg-white/[0.03] flex items-center justify-center mx-auto mb-4",children:b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-600",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12,6 12,12 16,14"})]})}),b.jsx("p",{className:"text-gray-400 text-sm mb-1",children:"Waiting for requests"}),b.jsx("p",{className:"text-gray-600 text-xs",children:"Run a deploy script or use the Runner tab"})]}),t.length>0&&b.jsxs("div",{children:[b.jsxs("h2",{className:"text-[11px] font-semibold text-gray-500 uppercase tracking-wider mb-3",children:["History (",t.length,")"]}),b.jsx("div",{className:"space-y-1.5",children:t.map(o=>{const s=o.response.success,i=o.response.result||"",a=o.type==="sendTransaction";return b.jsxs("div",{className:"glass-subtle rounded-xl p-3.5 flex items-start gap-3",children:[b.jsx("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 ${s?"bg-green-500/10":"bg-red-500/10"}`,children:s?b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2.5",strokeLinecap:"round",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}):b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ff453a",strokeWidth:"2.5",strokeLinecap:"round",children:b.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[b.jsx("span",{className:"text-[13px] text-gray-300 font-medium",children:a?"Transaction":"Message"}),b.jsx("span",{className:`text-[10px] font-medium ${s?"text-green-400":"text-red-400"}`,children:s?"Signed":"Failed"})]}),i&&b.jsx("p",{className:"text-[11px] text-gray-600 font-mono truncate",children:rU(i)}),s&&i&&a&&b.jsxs("a",{href:nU(r,i),target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-blue-400 hover:text-blue-300 transition-colors mt-1 inline-flex items-center gap-1",children:["View on Explorer",b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:b.jsx("path",{d:"M7 17L17 7M7 7h10v10"})})]}),!s&&o.response.error&&b.jsx("p",{className:"text-[11px] text-red-400/60 mt-0.5 truncate",children:o.response.error})]})]},o.id)})})]})]})}function sU({requests:e,onResponse:t}){return e.length===0?null:b.jsxs("div",{className:"fixed inset-0 z-50 modal-overlay",children:[b.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-6",children:b.jsxs("div",{className:"modal-content w-full max-w-md",children:[b.jsx("div",{className:"flex justify-center mb-4",children:b.jsxs("div",{className:"glass px-4 py-1.5 rounded-full flex items-center gap-2",children:[b.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400 pulse-ring"}),b.jsxs("span",{className:"text-xs font-medium text-orange-300",children:[e.length," signing ",e.length===1?"request":"requests"]})]})}),b.jsx("div",{className:"space-y-3 max-h-[70vh] overflow-y-auto",children:e.map(n=>b.jsx(iU,{request:n,onResponse:t},n.id))})]})})]})}function iU({request:e,onResponse:t}){const[n,r]=j.useState(!1),[o,s]=j.useState(null),[i,a]=j.useState(!1),{data:c}=uC(),l=e.type==="sendTransaction",u=l?e.transaction:null,f=l?e.metadata:null,d=async()=>{if(!c){s("Wallet not connected");return}r(!0),s(null);try{if(e.type==="sendTransaction"){const g=e.transaction,w={to:g.to,data:g.data,value:g.value?BigInt(g.value):void 0,gas:g.gasLimit?BigInt(g.gasLimit):void 0,nonce:g.nonce};g.maxFeePerGas?(w.maxFeePerGas=BigInt(g.maxFeePerGas),g.maxPriorityFeePerGas&&(w.maxPriorityFeePerGas=BigInt(g.maxPriorityFeePerGas))):g.gasPrice&&(w.gasPrice=BigInt(g.gasPrice));const x=await c.sendTransaction(w);t({id:e.id,success:!0,result:x})}else if(e.type==="signMessage"){const g=e.message,w=await c.signMessage({message:g});t({id:e.id,success:!0,result:w})}}catch(g){const w=(g==null?void 0:g.shortMessage)||(g==null?void 0:g.message)||"Transaction rejected";s(w),t({id:e.id,success:!1,error:w})}finally{r(!1)}},h=()=>{t({id:e.id,success:!1,error:"Transaction rejected by signer"})},p=g=>{if(!g||g==="0x0"||g==="0x00")return"0 ETH";try{const w=BigInt(g),x=Number(w)/1e18;return x<1e-4?`${Number(w)} wei`:`${x.toFixed(6)} ETH`}catch{return g}},m=g=>g?`${g.slice(0,6)}...${g.slice(-4)}`:"",v=!!(u!=null&&u.data&&u.data!=="0x"&&u.data.length>2),y=v?(u.data.length-2)/2:0;return b.jsxs("div",{className:"glass rounded-2xl overflow-hidden",children:[b.jsx("div",{className:"px-5 pt-5 pb-3",children:b.jsx("div",{className:"flex items-center justify-between mb-1",children:b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("div",{className:`w-9 h-9 rounded-xl flex items-center justify-center text-lg ${l?"bg-blue-500/15":"bg-purple-500/15"}`,children:l?u!=null&&u.to?"↗️":"📦":"✍️"}),b.jsxs("div",{children:[b.jsx("h3",{className:"text-white text-sm font-semibold",children:l?u!=null&&u.to?(f==null?void 0:f.functionName)||"Contract Call":f!=null&&f.contractName?`Deploy ${f.contractName}`:"Deploy Contract":"Sign Message"}),(f==null?void 0:f.contractName)&&(u==null?void 0:u.to)&&b.jsx("p",{className:"text-gray-500 text-[11px]",children:f.contractName})]})]})})}),l&&u&&b.jsxs("div",{className:"mx-5 mb-3 rounded-xl bg-black/20 p-3.5 space-y-2",children:[u.to&&b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"To"}),b.jsx("span",{className:"text-blue-400 text-[11px] font-mono",children:m(u.to)})]}),b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"Value"}),b.jsx("span",{className:"text-white text-[11px] font-mono",children:p(u.value)})]}),v&&b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-gray-500 text-[11px]",children:"Data"}),b.jsxs("button",{onClick:()=>a(!i),className:"text-gray-400 hover:text-gray-300 text-[11px] font-mono transition-colors",children:[u.data.slice(0,10)," (",y,"B) ",i?"▴":"▾"]})]}),i&&v&&b.jsx("div",{className:"mt-1 p-2 rounded-lg bg-black/30 font-mono text-[10px] text-gray-500 break-all max-h-24 overflow-y-auto leading-relaxed",children:u.data})]}),!l&&b.jsx("div",{className:"mx-5 mb-3 rounded-xl bg-black/20 p-3.5",children:b.jsx("p",{className:"text-gray-300 text-xs break-all leading-relaxed",children:e.message})}),o&&b.jsx("div",{className:"mx-5 mb-3 rounded-xl bg-red-500/10 border border-red-500/20 p-3",children:b.jsx("p",{className:"text-red-400 text-xs",children:o})}),b.jsxs("div",{className:"px-5 pb-5 flex gap-2.5",children:[b.jsx("button",{onClick:h,disabled:n,className:`flex-1 py-3 rounded-xl text-sm font-semibold transition-all
1731
+ bg-white/5 hover:bg-white/8 text-gray-300 hover:text-white
1732
+ disabled:opacity-50 disabled:cursor-not-allowed`,children:"Reject"}),b.jsx("button",{onClick:d,disabled:n,className:`flex-[2] py-3 rounded-xl text-sm font-semibold transition-all
1733
+ bg-blue-500 hover:bg-blue-400 text-white
1734
+ disabled:opacity-70 disabled:cursor-not-allowed`,children:n?b.jsxs("span",{className:"flex items-center justify-center gap-2",children:[b.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Confirming..."]}):l?"Confirm":"Sign"})]})]})}function aU(e){const[t,n]=j.useState([]),[r,o]=j.useState([]),[s,i]=j.useState([]),[a,c]=j.useState("idle"),[l,u]=j.useState([]),[f,d]=j.useState(null),[h,p]=j.useState(null),[m,v]=j.useState(!0),y=j.useCallback(async()=>{v(!0);try{const[E,A,k]=await Promise.all([fetch("/api/scripts").then(S=>S.json()),fetch("/api/tasks").then(S=>S.json()),fetch("/api/networks").then(S=>S.json())]);n(E.scripts||[]),o(A.tasks||[]),i(k.networks||[])}catch(E){console.error("[Runner] Failed to fetch project data:",E)}finally{v(!1)}},[]);j.useEffect(()=>{y()},[y]),j.useEffect(()=>{if(!e)return;const E=S=>{c("running"),p(S.processId),d(null),u([{stream:"system",data:`Running ${S.type}: ${S.name}${S.network?` --network ${S.network}`:""}
1735
+ `,timestamp:Date.now()}])},A=S=>{u(_=>[..._,{stream:S.stream,data:S.data,timestamp:Date.now()}])},k=S=>{const _=S.code===0?"finished":"error";c(_),d(S.code),u(N=>[...N,{stream:"system",data:`
1736
+ Process exited with code ${S.code}${S.signal?` (${S.signal})`:""}
1737
+ `,timestamp:Date.now()}])};return e.on("process:started",E),e.on("process:output",A),e.on("process:exit",k),()=>{e.off("process:started",E),e.off("process:output",A),e.off("process:exit",k)}},[e]);const g=j.useCallback(async(E,A,k,S,_)=>{c("running"),d(null),u([{stream:"system",data:`Starting ${E}: ${A}${k?` --network ${k}`:""}...
1738
+ `,timestamp:Date.now()}]);try{const N=await fetch("/api/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:E,name:A,network:k,params:S,envVars:_})}),O=await N.json();if(!N.ok){c("error"),u(P=>[...P,{stream:"stderr",data:`Error: ${O.error}
1739
+ `,timestamp:Date.now()}]);return}p(O.processId)}catch(N){c("error"),u(O=>[...O,{stream:"stderr",data:`Failed to start process: ${N.message}
1740
+ `,timestamp:Date.now()}])}},[]),w=j.useCallback(async()=>{try{await fetch("/api/execute/kill",{method:"POST"}),u(E=>[...E,{stream:"system",data:`
1741
+ Process killed by user.
1742
+ `,timestamp:Date.now()}]),c("error")}catch(E){console.error("[Runner] Failed to kill process:",E)}},[]),x=j.useCallback(()=>{u([]),c("idle"),d(null),p(null)},[]);return{scripts:t,tasks:r,networks:s,loading:m,runnerStatus:a,output:l,exitCode:f,processId:h,execute:g,kill:w,clearOutput:x,refresh:y}}function cU({socket:e}){const{scripts:t,tasks:n,networks:r,loading:o,runnerStatus:s,output:i,exitCode:a,execute:c,kill:l,clearOutput:u,refresh:f}=aU(e),[d,h]=j.useState(null),[p,m]=j.useState(""),[v,y]=j.useState({}),[g,w]=j.useState(""),[x,E]=j.useState("all");j.useEffect(()=>{if(!p&&r.length>0){const P=r.find(R=>R.remoteSigner);m((P==null?void 0:P.name)||r[0].name)}},[r,p]);const A=P=>{h(P),y({}),w("")},k=()=>{if(!d)return;let P,R;if(d.type==="task"){P={...v};for(const V of Object.keys(P))P[V]||delete P[V]}if(g.trim()){R={};for(const V of g.split(`
1743
+ `)){const M=V.indexOf("=");M>0&&(R[V.slice(0,M).trim()]=V.slice(M+1).trim())}}c(d.type,d.item.name,p||void 0,P,R)},S=s==="running",_=x==="tasks"?[]:t,N=x==="scripts"?[]:n,O=[..._.map(P=>({type:"script",item:P})),...N.map(P=>({type:"task",item:P}))];return o?b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"w-8 h-8 border-2 border-gray-600 border-t-blue-400 rounded-full animate-spin mx-auto mb-4"}),b.jsx("p",{className:"text-gray-500 text-sm",children:"Loading project..."})]})}):b.jsxs("div",{className:"flex-1 flex min-h-0",children:[b.jsxs("div",{className:"w-64 flex-shrink-0 flex flex-col border-r border-white/[0.06]",children:[b.jsx("div",{className:"p-3 pb-2",children:b.jsx("div",{className:"segment-control flex",children:["all","scripts","tasks"].map(P=>b.jsx("button",{onClick:()=>E(P),className:`flex-1 text-[11px] font-medium py-1.5 px-2 rounded-lg transition-all ${x===P?"segment-active text-white":"text-gray-500 hover:text-gray-400"}`,children:P==="all"?"All":P==="scripts"?"Scripts":"Tasks"},P))})}),b.jsxs("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:[O.length===0&&b.jsxs("div",{className:"text-center py-10 px-4",children:[b.jsx("p",{className:"text-gray-600 text-xs",children:"No items found"}),b.jsx("button",{onClick:f,className:"mt-2 text-blue-400 hover:text-blue-300 text-xs transition-colors",children:"Refresh"})]}),O.map(P=>{const R=(d==null?void 0:d.type)===P.type&&d.item.name===P.item.name;return b.jsx("button",{onClick:()=>A(P),className:`w-full text-left px-3 py-2.5 rounded-xl mb-0.5 transition-all ${R?"bg-blue-500/15 text-white":"text-gray-400 hover:bg-white/[0.04] hover:text-gray-300"}`,children:b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("span",{className:`text-xs ${R?"opacity-100":"opacity-50"}`,children:P.type==="script"?"📄":"🔧"}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("p",{className:`text-[13px] font-medium truncate ${R?"text-white":""}`,children:P.item.name}),P.type==="task"&&P.item.description&&b.jsx("p",{className:"text-[11px] text-gray-600 truncate mt-0.5",children:P.item.description})]}),P.type==="task"&&P.item.params.length>0&&b.jsxs("span",{className:"text-[10px] text-gray-600 bg-white/[0.04] px-1.5 py-0.5 rounded-md",children:[P.item.params.length,"p"]})]})},`${P.type}-${P.item.name}`)})]})]}),b.jsx("div",{className:"flex-1 flex flex-col border-r border-white/[0.06] min-w-0",children:d?b.jsxs("div",{className:"flex-1 flex flex-col overflow-y-auto",children:[b.jsx("div",{className:"p-5 pb-4 border-b border-white/[0.04]",children:b.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[b.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center text-lg ${d.type==="script"?"bg-green-500/10":"bg-purple-500/10"}`,children:d.type==="script"?"📄":"🔧"}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("h2",{className:"text-white text-base font-semibold truncate",children:d.item.name}),d.type==="task"&&d.item.description&&b.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:d.item.description})]}),b.jsx("span",{className:`text-[10px] font-medium px-2 py-1 rounded-lg ${d.type==="script"?"bg-green-500/10 text-green-400":"bg-purple-500/10 text-purple-400"}`,children:d.type})]})}),b.jsxs("div",{className:"flex-1 p-5 space-y-5",children:[b.jsxs("div",{children:[b.jsx("label",{className:"block text-gray-400 text-[11px] font-medium uppercase tracking-wider mb-2",children:"Network"}),b.jsxs("select",{value:p,onChange:P=>m(P.target.value),className:`w-full glass-subtle rounded-xl px-3.5 py-2.5 text-sm text-white
1744
+ focus:outline-none focus:ring-1 focus:ring-blue-500/40
1745
+ appearance-none cursor-pointer`,style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636366' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center"},children:[b.jsx("option",{value:"",children:"None (default)"}),r.map(P=>b.jsxs("option",{value:P.name,children:[P.name,P.remoteSigner?" • AirSign":"",P.chainId?` (${P.chainId})`:""]},P.name))]})]}),d.type==="task"&&d.item.params.length>0&&b.jsxs("div",{children:[b.jsx("label",{className:"block text-gray-400 text-[11px] font-medium uppercase tracking-wider mb-2",children:"Parameters"}),b.jsx("div",{className:"space-y-3",children:d.item.params.map(P=>b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[b.jsxs("span",{className:"text-gray-300 text-xs font-mono",children:["--",P.name]}),!P.isOptional&&b.jsx("span",{className:"text-[9px] font-semibold text-orange-400 bg-orange-400/10 px-1.5 py-0.5 rounded",children:"REQUIRED"})]}),P.description&&b.jsx("p",{className:"text-gray-600 text-[11px] mb-1.5",children:P.description}),P.isFlag?b.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer group",children:[b.jsx("div",{className:`w-10 h-6 rounded-full relative transition-colors ${v[P.name]==="true"?"bg-blue-500":"bg-gray-700"}`,children:b.jsx("div",{className:`absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-transform ${v[P.name]==="true"?"left-5":"left-1"}`})}),b.jsx("span",{className:"text-gray-400 text-xs group-hover:text-gray-300 transition-colors",children:v[P.name]==="true"?"Enabled":"Disabled"})]}):b.jsx("input",{type:"text",placeholder:P.defaultValue||`Enter ${P.name}...`,value:v[P.name]||"",onChange:R=>y({...v,[P.name]:R.target.value}),className:`w-full glass-subtle rounded-xl px-3.5 py-2.5 text-sm text-white font-mono
1746
+ placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-blue-500/40`})]},P.name))})]}),d.type==="script"&&b.jsxs("div",{children:[b.jsx("label",{className:"block text-gray-400 text-[11px] font-medium uppercase tracking-wider mb-2",children:"Environment Variables"}),b.jsx("textarea",{value:g,onChange:P=>w(P.target.value),placeholder:`KEY=value
1747
+ GREETER_ADDRESS=0x...`,rows:3,className:`w-full glass-subtle rounded-xl px-3.5 py-2.5 text-sm text-white font-mono
1748
+ placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-blue-500/40 resize-none`}),b.jsx("p",{className:"text-gray-700 text-[10px] mt-1.5",children:"One KEY=VALUE per line"})]})]}),b.jsx("div",{className:"p-4 border-t border-white/[0.04]",children:b.jsx("div",{className:"flex gap-2.5",children:S?b.jsx("button",{onClick:l,className:`flex-1 py-3 rounded-xl text-sm font-semibold transition-all
1749
+ bg-red-500/15 hover:bg-red-500/25 text-red-400 hover:text-red-300`,children:"Stop Process"}):b.jsx("button",{onClick:k,disabled:!d,className:`flex-1 py-3 rounded-xl text-sm font-semibold transition-all
1750
+ bg-green-500 hover:bg-green-400 text-white
1751
+ disabled:opacity-40 disabled:cursor-not-allowed
1752
+ shadow-lg shadow-green-500/20`,children:b.jsxs("span",{className:"flex items-center justify-center gap-2",children:[b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:b.jsx("path",{d:"M8 5v14l11-7z"})}),"Run"]})})})})]}):b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center px-8",children:[b.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/[0.03] flex items-center justify-center mx-auto mb-4",children:b.jsx("span",{className:"text-2xl opacity-30",children:"📋"})}),b.jsx("p",{className:"text-gray-500 text-sm mb-1",children:"Select a script or task"}),b.jsx("p",{className:"text-gray-700 text-xs",children:"Choose from the list to configure and run"})]})})}),b.jsxs("div",{className:"w-80 flex-shrink-0 flex flex-col min-h-0",children:[b.jsxs("div",{className:"px-4 py-3 border-b border-white/[0.04] flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${s==="running"?"bg-orange-400 animate-pulse":s==="finished"?"bg-green-400":s==="error"?"bg-red-400":"bg-gray-700"}`}),b.jsx("span",{className:"text-[11px] font-medium text-gray-400",children:"Console"}),a!==null&&b.jsx("span",{className:`text-[10px] font-mono px-1.5 py-0.5 rounded-md ${a===0?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:a===0?"success":`exit ${a}`})]}),i.length>0&&s!=="running"&&b.jsx("button",{onClick:u,className:"text-gray-600 hover:text-gray-400 text-[11px] transition-colors",children:"Clear"})]}),b.jsx(lU,{output:i,status:s})]})]})}function lU({output:e,status:t}){const n=j.useRef(null);return j.useEffect(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e]),e.length===0?b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center px-8",children:[b.jsx("div",{className:"w-10 h-10 rounded-xl bg-white/[0.02] flex items-center justify-center mx-auto mb-3",children:b.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-gray-700",children:b.jsx("path",{d:"M4 17l6-6-6-6M12 19h8",strokeLinecap:"round",strokeLinejoin:"round"})})}),b.jsx("p",{className:"text-gray-600 text-xs",children:"Output will appear here"})]})}):b.jsxs("div",{ref:n,className:"flex-1 overflow-y-auto p-4 font-mono text-[11px] leading-[1.7] whitespace-pre-wrap",children:[e.map((r,o)=>b.jsx("span",{className:r.stream==="stderr"?"text-red-400/80":r.stream==="system"?"text-blue-400/70":"text-gray-400",children:r.data},o)),t==="running"&&b.jsx("span",{className:"inline-block w-1.5 h-3.5 bg-gray-500 animate-pulse ml-0.5 -mb-0.5 rounded-sm"})]})}function uU(){const[e,t]=j.useState([]),[n,r]=j.useState([]),[o,s]=j.useState({}),[i,a]=j.useState(!0),[c,l]=j.useState([]),u=j.useCallback(async()=>{a(!0);try{const[w,x,E]=await Promise.all([fetch("/api/contracts").then(A=>A.json()),fetch("/api/contracts/addresses").then(A=>A.json()),fetch("/api/networks").then(A=>A.json())]);t(w.contracts||[]),s(x.addresses||{}),r(E.networks||[])}catch(w){console.error("[Contracts] Failed to fetch data:",w)}finally{a(!1)}},[]);j.useEffect(()=>{u()},[u]);const f=j.useCallback(w=>{l(x=>[{...w,id:`${Date.now()}-${Math.random().toString(36).slice(2,6)}`,timestamp:Date.now()},...x].slice(0,200))},[]),d=j.useCallback(async(w,x,E,A,k,S)=>{try{const N=await(await fetch("/api/contract/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractAddress:w,abi:x,functionName:E,args:A,networkName:k})})).json();return f({type:N.success?"read":"error",contractName:S,functionName:E,args:A,result:N.result,error:N.error}),N}catch(_){const N={success:!1,error:_.message};return f({type:"error",contractName:S,functionName:E,args:A,error:_.message}),N}},[f]),h=j.useCallback(async(w,x,E,A,k)=>{try{const _=await(await fetch("/api/contract/events",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractAddress:w,abi:x,txHash:E,networkName:A})})).json();if(_.success&&_.events)for(const N of _.events)f({type:"event",contractName:k,functionName:N.name,result:N.args,txHash:E});return _}catch(S){return{success:!1,error:S.message}}},[f]),p=j.useCallback(async(w,x,E,A,k,S,_)=>{var N;try{const O=await fetch("/api/contract/write",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractAddress:w,abi:x,functionName:E,args:A,networkName:k,value:_||"0"})});if(!O.ok&&((N=O.headers.get("content-type"))!=null&&N.includes("text/html"))){const R="Server returned HTML — rebuild the plugin (npm run build in packages/plugin)";return f({type:"error",contractName:S,functionName:E,args:A,error:R}),{success:!1,error:R}}const P=await O.json();return f({type:P.success?"write":"error",contractName:S,functionName:E,args:A,txHash:P.txHash,result:P.txHash?`tx: ${P.txHash}`:void 0,error:P.error}),P.success&&P.txHash&&setTimeout(async()=>{try{const V=await(await fetch("/api/contract/events",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractAddress:w,abi:x,txHash:P.txHash,networkName:k})})).json();if(V.success&&V.events)for(const M of V.events)f({type:"event",contractName:S,functionName:M.name,result:M.args,txHash:P.txHash})}catch{}},3e3),P}catch(O){const P=O.message;return f({type:"error",contractName:S,functionName:E,args:A,error:P}),{success:!1,error:P}}},[f]),m=j.useCallback(async(w,x,E)=>{try{await fetch("/api/contracts/addresses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractName:w,networkName:x,address:E})}),s(A=>({...A,[w]:{...A[w]||{},[x]:E}})),t(A=>A.map(k=>k.contractName===w?{...k,deployedAddresses:{...k.deployedAddresses,[x]:E}}:k))}catch(A){console.error("[Contracts] Failed to save address:",A)}},[]),v=j.useCallback(async(w,x)=>{try{return await(await fetch("/api/contract/proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractAddress:w,networkName:x})})).json()}catch{return{isProxy:!1}}},[]),y=j.useCallback(async()=>{try{await fetch("/api/contracts/rescan",{method:"POST"}),await u()}catch(w){console.error("[Contracts] Failed to rescan:",w)}},[u]),g=j.useCallback(()=>{l([])},[]);return{contracts:e,networks:n,addresses:o,loading:i,activityLog:c,executeRead:d,executeWrite:p,fetchEvents:h,saveAddress:m,checkProxy:v,rescan:y,clearLog:g,refresh:u}}const Ss="w-full bg-white/[0.04] border border-white/[0.08] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:outline-none focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/20 transition-colors font-mono",Bo="text-[11px] text-gray-500 mb-1 flex items-center gap-1.5",md="text-[10px] text-red-400 mt-1";function dU({param:e,value:t,onChange:n,disabled:r}){const o=!t||/^0x[a-fA-F0-9]{40}$/.test(t);return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-blue-400",children:"address"}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("input",{className:`${Ss} ${o?"":"border-red-500/50"}`,placeholder:"0x...",value:t,onChange:s=>n(s.target.value),disabled:r,spellCheck:!1}),!o&&b.jsx("p",{className:md,children:"Invalid address (expected 0x + 40 hex chars)"})]})}function fU({param:e,value:t,onChange:n,disabled:r}){const o=e.type.startsWith("int"),s=!t||(o?/^-?\d+$/.test(t):/^\d+$/.test(t));return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-green-400",children:e.type}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("input",{className:`${Ss} ${s?"":"border-red-500/50"}`,placeholder:"0",value:t,onChange:i=>n(i.target.value),disabled:r,inputMode:"numeric"}),!s&&b.jsx("p",{className:md,children:o?"Expected integer value":"Expected non-negative integer"})]})}function hU({param:e,value:t,onChange:n,disabled:r}){return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-yellow-400",children:"bool"}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("button",{type:"button",onClick:()=>n("true"),disabled:r,className:`flex-1 py-2 rounded-lg text-sm font-medium transition-colors ${t==="true"?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-white/[0.04] text-gray-500 border border-white/[0.08] hover:border-white/[0.12]"}`,children:"true"}),b.jsx("button",{type:"button",onClick:()=>n("false"),disabled:r,className:`flex-1 py-2 rounded-lg text-sm font-medium transition-colors ${t==="false"?"bg-red-500/20 text-red-400 border border-red-500/30":"bg-white/[0.04] text-gray-500 border border-white/[0.08] hover:border-white/[0.12]"}`,children:"false"})]})]})}function pU({param:e,value:t,onChange:n,disabled:r}){const o=/^bytes\d+$/.test(e.type),s=o?parseInt(e.type.replace("bytes",""),10)*2+2:0,i=!t||/^0x([a-fA-F0-9]*)$/.test(t),a=!o||!t||t.length===s;return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-purple-400",children:e.type}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("input",{className:`${Ss} ${!i||!a?"border-red-500/50":""}`,placeholder:o?`0x${"00".repeat(parseInt(e.type.replace("bytes",""),10)||1)}`:"0x...",value:t,onChange:c=>n(c.target.value),disabled:r,spellCheck:!1}),!i&&b.jsx("p",{className:md,children:"Expected hex bytes (0x...)"}),i&&!a&&b.jsxs("p",{className:md,children:["Expected ",s," chars for ",e.type]})]})}function mU({param:e,value:t,onChange:n,disabled:r}){return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-orange-400",children:"string"}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("input",{className:Ss,placeholder:'""',value:t,onChange:o=>n(o.target.value),disabled:r})]})}function gU({param:e,value:t,onChange:n,disabled:r}){return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-cyan-400",children:e.type}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("textarea",{className:`${Ss} min-h-[60px] resize-y`,placeholder:"[value1, value2, ...] or JSON array",value:t,onChange:o=>n(o.target.value),disabled:r,rows:2}),b.jsx("p",{className:"text-[10px] text-gray-600 mt-1",children:'Enter as JSON array, e.g. ["0x...", "0x..."] or [1, 2, 3]'})]})}function yU({param:e,value:t,onChange:n,disabled:r}){var o;return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-pink-400",children:"tuple"}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name}),e.internalType&&b.jsxs("span",{className:"text-gray-600 text-[10px]",children:["(",e.internalType,")"]})]}),b.jsx("textarea",{className:`${Ss} min-h-[60px] resize-y`,placeholder:`JSON object with fields: ${((o=e.components)==null?void 0:o.map(s=>s.name||s.type).join(", "))||"..."}`,value:t,onChange:s=>n(s.target.value),disabled:r,rows:3}),e.components&&b.jsxs("p",{className:"text-[10px] text-gray-600 mt-1",children:["Fields: ",e.components.map(s=>`${s.name}: ${s.type}`).join(", ")]})]})}function wU({param:e,value:t,onChange:n,disabled:r}){return b.jsxs("div",{children:[b.jsxs("label",{className:Bo,children:[b.jsx("span",{className:"text-gray-400",children:e.type}),e.name&&b.jsx("span",{className:"text-gray-400",children:e.name})]}),b.jsx("input",{className:Ss,placeholder:e.type,value:t,onChange:o=>n(o.target.value),disabled:r})]})}function tE(e){const{param:t}=e,n=t.type;return n==="address"?b.jsx(dU,{...e}):n==="bool"?b.jsx(hU,{...e}):n==="string"?b.jsx(mU,{...e}):/^u?int\d*$/.test(n)?b.jsx(fU,{...e}):/^bytes\d*$/.test(n)?b.jsx(pU,{...e}):n.endsWith("[]")?b.jsx(gU,{...e}):n==="tuple"||n.startsWith("tuple")?b.jsx(yU,{...e}):b.jsx(wU,{...e})}function nE(e,t){if(!t&&t!=="false")return t;if(e==="bool")return t==="true";if(e==="address"||/^u?int\d*$/.test(e)||/^bytes\d*$/.test(e))return t.trim();if(e==="string")return t;if(e.endsWith("[]")||e==="tuple"||e.startsWith("tuple"))try{return JSON.parse(t)}catch{throw new Error(`Invalid JSON for ${e}: ${t}`)}return t}const Ea=e=>!e||/^0x[a-fA-F0-9]{40}$/.test(e);function bU({contracts:e,networks:t,selectedNetwork:n,onSave:r,onClose:o,onCheckProxy:s}){const[i,a]=j.useState(n),[c,l]=j.useState({}),[u,f]=j.useState(new Set),[d,h]=j.useState({}),[p,m]=j.useState(null);j.useEffect(()=>{const A={};for(const k of e)A[k.contractName]=k.deployedAddresses[i]||"";l(A),f(new Set),h({})},[i,e]);const v=(A,k)=>{l(S=>({...S,[A]:k})),f(S=>new Set(S).add(A)),h(S=>{const _={...S};return delete _[A],_})},y=async A=>{if(!s)return;const k=c[A];if(!(!k||!Ea(k))){m(A);try{const S=await s(k,i);h(_=>({..._,[A]:S}))}finally{m(null)}}},g=()=>{for(const A of u){const k=c[A];k&&Ea(k)&&r(A,i,k)}o()},w=u.size,x=[...u].every(A=>Ea(c[A]||"")),E=Object.values(c).filter(A=>!!A&&Ea(A)).length;return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:b.jsxs("div",{className:"glass rounded-2xl w-[560px] max-h-[85vh] flex flex-col border border-white/[0.08] shadow-2xl",children:[b.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-5 py-4 border-b border-white/[0.06]",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-white text-sm font-semibold",children:"Contract Addresses"}),b.jsxs("p",{className:"text-gray-500 text-[11px] mt-0.5",children:[E," of ",e.length," configured for ",i]})]}),b.jsx("button",{onClick:o,className:"w-7 h-7 rounded-lg bg-white/[0.04] flex items-center justify-center hover:bg-white/[0.08] transition-colors",children:b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-gray-500",children:b.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),b.jsx("div",{className:"flex-shrink-0 px-5 py-3 border-b border-white/[0.06]",children:b.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(A=>{const k=e.filter(S=>!!S.deployedAddresses[A.name]).length;return b.jsxs("button",{onClick:()=>a(A.name),className:`px-3 py-1.5 rounded-lg text-[11px] font-medium transition-colors flex items-center gap-1.5 ${i===A.name?"bg-blue-500/20 text-blue-400 border border-blue-500/30":"bg-white/[0.04] text-gray-500 border border-white/[0.08] hover:border-white/[0.12]"}`,children:[A.name,k>0&&b.jsx("span",{className:`text-[9px] px-1 py-0.5 rounded-full ${i===A.name?"bg-blue-500/30 text-blue-300":"bg-white/[0.06] text-gray-600"}`,children:k})]},A.name)})})}),b.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-3 space-y-3",children:e.map(A=>{var P;const k=c[A.contractName]||"",S=Ea(k),_=u.has(A.contractName),N=d[A.contractName],O=p===A.contractName;return b.jsxs("div",{className:`rounded-xl border p-3 transition-colors ${_?"bg-blue-500/[0.03] border-blue-500/20":"bg-white/[0.02] border-white/[0.06]"}`,children:[b.jsxs("div",{className:"flex items-center justify-between mb-2",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${k&&S?"bg-green-400":"bg-gray-700"}`}),b.jsx("span",{className:"text-white text-[12px] font-medium",children:A.contractName}),b.jsxs("span",{className:"text-gray-700 text-[10px]",children:[A.functions.read.length,"R / ",A.functions.write.length,"W"]})]}),s&&k&&S&&b.jsx("button",{onClick:()=>y(A.contractName),disabled:O,className:"text-[10px] text-gray-600 hover:text-blue-400 transition-colors flex items-center gap-1",children:O?b.jsx("div",{className:"w-2.5 h-2.5 border border-blue-400 border-t-transparent rounded-full animate-spin"}):N?N.isProxy?b.jsx("span",{className:"text-purple-400",children:"Proxy"}):b.jsx("span",{className:"text-gray-600",children:"Not proxy"}):"Check proxy"})]}),b.jsx("input",{className:`w-full bg-white/[0.04] border rounded-lg px-3 py-2 text-[12px] text-white font-mono placeholder-gray-600 focus:outline-none focus:ring-1 transition-colors ${k&&!S?"border-red-500/50 focus:border-red-500/50 focus:ring-red-500/20":"border-white/[0.08] focus:border-blue-500/50 focus:ring-blue-500/20"}`,placeholder:"0x...",value:k,onChange:R=>v(A.contractName,R.target.value),spellCheck:!1}),k&&!S&&b.jsx("p",{className:"text-[10px] text-red-400 mt-1",children:"Invalid address"}),(N==null?void 0:N.isProxy)&&b.jsx("div",{className:"mt-2 bg-purple-500/10 border border-purple-500/20 rounded-lg px-2.5 py-1.5",children:b.jsxs("p",{className:"text-[10px] text-purple-400",children:["ERC-1967 Proxy → ",b.jsxs("span",{className:"font-mono text-gray-400",children:[(P=N.implementationAddress)==null?void 0:P.slice(0,10),"..."]}),N.matchedContract&&b.jsxs("span",{className:"text-purple-300 ml-1",children:["(",N.matchedContract,")"]})]})}),A.sourceName&&b.jsx("p",{className:"text-[9px] text-gray-700 mt-1 truncate",children:A.sourceName})]},A.contractName)})}),b.jsxs("div",{className:"flex-shrink-0 flex items-center justify-between px-5 py-4 border-t border-white/[0.06]",children:[b.jsx("span",{className:"text-gray-600 text-[11px]",children:w>0?`${w} changed`:"No changes"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-white transition-colors",children:"Cancel"}),b.jsx("button",{onClick:g,disabled:w===0||!x,className:"px-4 py-2 rounded-lg text-sm font-medium bg-blue-500 text-white hover:bg-blue-600 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Save All"})]})]})]})})}function vU(e){try{return/^\d+$/.test(e)&&e.length>10}catch{return!1}}function xU(e){try{const t=BigInt(e),n=Number(t)/1e18;return n===0&&t>0n?`~0 ETH (${e} wei)`:`${n.toFixed(n<.001?8:4)} ETH`}catch{return e}}function CU(e){return/^0x[a-fA-F0-9]+$/.test(e)&&e.length>10}function EU(e){try{return BigInt(e).toString(10)}catch{return e}}function AU(e){try{const t=parseInt(e,10);return t>142e7&&t<22e8}catch{return!1}}function kU(e){try{return new Date(parseInt(e,10)*1e3).toLocaleString()}catch{return e}}function SU({name:e,value:t,mode:n}){const r=typeof t=="object"?JSON.stringify(t):String(t),[o,s]=j.useState(!1),i=()=>{navigator.clipboard.writeText(r),s(!0),setTimeout(()=>s(!1),1500)},a=n==="formatted"&&vU(r),c=n==="formatted"&&CU(r),l=n==="formatted"&&AU(r);return b.jsxs("div",{className:"flex items-start gap-2 py-1.5 group",children:[b.jsx("span",{className:"text-gray-500 text-[11px] min-w-[80px] pt-0.5",children:e}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"text-white text-[12px] font-mono break-all",children:r}),b.jsx("button",{onClick:i,className:"opacity-0 group-hover:opacity-100 flex-shrink-0 p-0.5 rounded hover:bg-white/[0.06] transition-all",children:o?b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}):b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-gray-600",children:[b.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),b.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})})]}),a&&b.jsx("p",{className:"text-[10px] text-green-400/70 mt-0.5",children:xU(r)}),c&&b.jsxs("p",{className:"text-[10px] text-blue-400/70 mt-0.5",children:["= ",EU(r)]}),l&&b.jsx("p",{className:"text-[10px] text-yellow-400/70 mt-0.5",children:kU(r)})]})]})}function jU({event:e,mode:t}){const[n,r]=j.useState(!0),o=Object.entries(e.args);return b.jsxs("div",{className:"bg-white/[0.03] border border-white/[0.06] rounded-xl overflow-hidden",children:[b.jsxs("button",{onClick:()=>r(!n),className:"w-full flex items-center gap-2 px-3 py-2.5 hover:bg-white/[0.02] transition-colors",children:[b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor",className:`text-gray-600 transition-transform ${n?"rotate-90":""}`,children:b.jsx("path",{d:"M8 5v14l11-7z"})}),b.jsx("span",{className:"text-purple-400 text-[12px] font-medium",children:e.name}),b.jsxs("span",{className:"text-gray-600 text-[10px]",children:["#",e.logIndex]}),b.jsx("span",{className:"text-gray-700 text-[10px] font-mono ml-auto truncate max-w-[200px]",children:e.address})]}),n&&o.length>0&&b.jsx("div",{className:"px-3 pb-2.5 border-t border-white/[0.04]",children:o.map(([s,i])=>b.jsx(SU,{name:s,value:i,mode:t},s))}),n&&o.length===0&&b.jsx("div",{className:"px-3 pb-2.5 border-t border-white/[0.04]",children:b.jsx("p",{className:"text-gray-600 text-[11px] py-1.5",children:"No indexed or data parameters"})})]})}function rE({events:e,loading:t}){const[n,r]=j.useState("formatted");return t?b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("div",{className:"w-5 h-5 border-2 border-gray-700 border-t-purple-400 rounded-full animate-spin"})}):e.length===0?b.jsx("div",{className:"text-center py-6",children:b.jsx("p",{className:"text-gray-600 text-[12px]",children:"No events found"})}):b.jsxs("div",{className:"space-y-2",children:[b.jsxs("div",{className:"flex items-center justify-between mb-2",children:[b.jsxs("span",{className:"text-gray-500 text-[11px]",children:[e.length," event",e.length!==1?"s":""]}),b.jsxs("div",{className:"flex gap-1",children:[b.jsx("button",{onClick:()=>r("raw"),className:`px-2 py-1 rounded text-[10px] font-medium transition-colors ${n==="raw"?"bg-white/[0.08] text-white":"text-gray-600 hover:text-gray-400"}`,children:"Raw"}),b.jsx("button",{onClick:()=>r("formatted"),className:`px-2 py-1 rounded text-[10px] font-medium transition-colors ${n==="formatted"?"bg-white/[0.08] text-white":"text-gray-600 hover:text-gray-400"}`,children:"Formatted"})]})]}),e.map((o,s)=>b.jsx(jU,{event:o,mode:n},`${o.name}-${o.logIndex}-${s}`))]})}const _U={1:"https://etherscan.io",5:"https://goerli.etherscan.io",11155111:"https://sepolia.etherscan.io",137:"https://polygonscan.com",80001:"https://mumbai.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org",56:"https://bscscan.com",43114:"https://snowtrace.io",31337:""};function oE(e,t){const n=_U[e];return n?`${n}/tx/${t}`:null}function sE(e){return e?`${e.slice(0,8)}...${e.slice(-6)}`:""}function IU({socket:e}){const t=As(),{contracts:n,networks:r,loading:o,activityLog:s,executeRead:i,executeWrite:a,fetchEvents:c,saveAddress:l,checkProxy:u,rescan:f,clearLog:d}=uU(),[h,p]=j.useState(null),[m,v]=j.useState(""),[y,g]=j.useState(null),[w,x]=j.useState("all"),[E,A]=j.useState({}),[k,S]=j.useState("0"),[_,N]=j.useState({}),[O,P]=j.useState(new Set),[R,V]=j.useState(!1),[M,F]=j.useState(null),[$,T]=j.useState(""),[L,D]=j.useState([]),[Q,te]=j.useState(!1);j.useEffect(()=>{if(!m&&r.length>0){const K=r.find(me=>me.remoteSigner);v((K==null?void 0:K.name)||r[0].name)}},[r,m]),j.useEffect(()=>{!h&&n.length>0&&p(n[0])},[n,h]),j.useEffect(()=>{g(null),A({}),N({}),P(new Set)},[h]);const se=(h==null?void 0:h.deployedAddresses[m])||"",H=h?w==="read"?h.functions.read:w==="write"?h.functions.write:[...h.functions.read,...h.functions.write]:[],X=K=>{g(K),A({}),S("0")},re=(K,me)=>{A(we=>({...we,[K]:me}))},ce=async()=>{if(!h||!y||!se)return;const K=y.signature;P(me=>new Set(me).add(K)),N(me=>{const we={...me};return delete we[K],we});try{const me=y.inputs.map((_e,Ie)=>{const Nt=_e.name||`arg${Ie}`,vf=E[Nt]||"";return nE(_e.type,vf)});if(y.stateMutability==="view"||y.stateMutability==="pure"){const _e=await i(se,h.abi,y.name,me,m,h.contractName);N(Ie=>({...Ie,[K]:_e}))}else{if(!e){N(Ie=>({...Ie,[K]:{success:!1,error:"Not connected to server"}}));return}const _e=await a(se,h.abi,y.name,me,m,h.contractName,y.payable?k:"0");N(Ie=>({...Ie,[K]:_e})),_e.success&&_e.txHash&&(T(_e.txHash),setTimeout(async()=>{try{const Ie=await c(se,h.abi,_e.txHash,m,h.contractName);Ie.success&&Ie.events&&Ie.events.length>0&&(N(Nt=>({...Nt,[K]:{...Nt[K],events:Ie.events}})),D(Ie.events))}catch{}},4e3))}}catch(me){N(we=>({...we,[K]:{success:!1,error:me.message}}))}finally{P(me=>{const we=new Set(me);return we.delete(K),we})}},yt=async K=>{const me=$;if(!(!h||!me||!se)){te(!0);try{const we=await c(se,h.abi,me,m,h.contractName);we.success&&we.events&&D(we.events)}finally{te(!1)}}},wt=y?O.has(y.signature):!1,ct=y&&_[y.signature]||null;return o?b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"w-5 h-5 border-2 border-gray-700 border-t-blue-400 rounded-full animate-spin mx-auto mb-3"}),b.jsx("p",{className:"text-gray-500 text-sm",children:"Loading contracts..."})]})}):n.length===0?b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center max-w-sm",children:[b.jsx("div",{className:"w-14 h-14 rounded-2xl bg-white/[0.03] flex items-center justify-center mx-auto mb-4",children:b.jsx("span",{className:"text-2xl",children:"📜"})}),b.jsx("h3",{className:"text-white text-sm font-medium mb-2",children:"No contracts found"}),b.jsxs("p",{className:"text-gray-500 text-[12px] mb-4",children:["Compile your contracts first with ",b.jsx("code",{className:"text-gray-400 bg-white/[0.04] px-1.5 py-0.5 rounded text-[11px]",children:"npx hardhat compile"})," then click rescan."]}),b.jsx("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-blue-500/20 text-blue-400 hover:bg-blue-500/30 transition-colors",children:"Rescan Artifacts"})]})}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex-1 flex min-h-0",children:[b.jsxs("div",{className:"w-64 flex-shrink-0 border-r border-white/[0.06] flex flex-col",children:[b.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.06]",children:[b.jsx("label",{className:"text-[10px] text-gray-600 uppercase tracking-wider mb-1.5 block",children:"Network"}),b.jsx("select",{value:m,onChange:K=>v(K.target.value),className:"w-full bg-white/[0.04] border border-white/[0.08] rounded-lg px-2.5 py-1.5 text-[12px] text-white focus:outline-none focus:border-blue-500/50 appearance-none cursor-pointer",children:r.map(K=>b.jsxs("option",{value:K.name,children:[K.name,K.chainId?` (${K.chainId})`:""]},K.name))})]}),b.jsxs("div",{className:"px-3 py-2 flex items-center justify-between border-b border-white/[0.06]",children:[b.jsxs("span",{className:"text-[10px] text-gray-600 uppercase tracking-wider",children:["Contracts (",n.length,")"]}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("button",{onClick:()=>V(!0),className:"text-[10px] text-blue-400 hover:text-blue-300 transition-colors",title:"Set addresses for all contracts",children:"Set Addresses"}),b.jsx("button",{onClick:f,className:"text-[10px] text-gray-600 hover:text-gray-400 transition-colors",title:"Rescan artifacts",children:b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[b.jsx("path",{d:"M23 4v6h-6M1 20v-6h6"}),b.jsx("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]})})]})]}),b.jsx("div",{className:"flex-1 overflow-y-auto px-2 pb-2",children:n.map(K=>{const me=!!K.deployedAddresses[m],we=(h==null?void 0:h.contractName)===K.contractName;return b.jsx("div",{className:`rounded-xl mb-1 transition-colors ${we?"bg-white/[0.06] border border-white/[0.08]":"hover:bg-white/[0.03] border border-transparent"}`,children:b.jsxs("button",{onClick:()=>p(K),className:"w-full text-left px-3 py-2.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${me?"bg-green-400":"bg-gray-700"}`}),b.jsx("span",{className:"text-[12px] text-white font-medium truncate flex-1",children:K.contractName}),b.jsx("span",{onClick:_e=>{_e.stopPropagation(),F(K)},className:"text-[10px] text-gray-600 hover:text-orange-400 transition-colors px-1.5 py-0.5 rounded hover:bg-white/[0.04] flex-shrink-0",title:"Deploy contract",children:b.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:b.jsx("path",{d:"M12 5v14M5 12h14"})})})]}),b.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-4",children:[b.jsxs("span",{className:"text-[10px] text-gray-600",children:[K.functions.read.length,"R / ",K.functions.write.length,"W"]}),K.events.length>0&&b.jsxs("span",{className:"text-[10px] text-gray-700",children:[K.events.length,"E"]})]})]})},K.contractName)})})]}),b.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:h?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"px-4 py-3 border-b border-white/[0.06] flex items-center justify-between",children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("h3",{className:"text-white text-[14px] font-semibold",children:h.contractName}),se?b.jsx("p",{className:"text-gray-500 text-[11px] font-mono truncate",children:se}):b.jsxs("p",{className:"text-yellow-500/70 text-[11px]",children:["No address set for ",m]})]}),b.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[b.jsx("button",{onClick:()=>F(h),className:"px-3 py-1.5 rounded-lg text-[11px] font-medium bg-orange-500/15 border border-orange-500/20 text-orange-400 hover:bg-orange-500/25 transition-colors",children:"Deploy"}),b.jsx("button",{onClick:()=>V(!0),className:"px-3 py-1.5 rounded-lg text-[11px] font-medium bg-white/[0.04] border border-white/[0.08] text-gray-400 hover:text-white hover:border-white/[0.12] transition-colors",children:se?"Change":"Set Address"})]})]}),b.jsx("div",{className:"px-4 py-2 border-b border-white/[0.06] flex items-center gap-1",children:["all","read","write"].map(K=>b.jsx("button",{onClick:()=>x(K),className:`px-3 py-1 rounded-lg text-[11px] font-medium transition-colors ${w===K?"bg-white/[0.08] text-white":"text-gray-600 hover:text-gray-400"}`,children:K==="all"?`All (${h.functions.read.length+h.functions.write.length})`:K==="read"?`Read (${h.functions.read.length})`:`Write (${h.functions.write.length})`},K))}),b.jsxs("div",{className:"flex-1 flex min-h-0",children:[b.jsxs("div",{className:"w-48 flex-shrink-0 border-r border-white/[0.06] overflow-y-auto py-1",children:[H.map(K=>{const me=K.stateMutability==="view"||K.stateMutability==="pure",we=(y==null?void 0:y.signature)===K.signature,_e=O.has(K.signature),Ie=!!_[K.signature];return b.jsxs("button",{onClick:()=>X(K),className:`w-full text-left px-3 py-2 transition-colors flex items-center gap-2 ${we?"bg-white/[0.06]":"hover:bg-white/[0.03]"}`,children:[b.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${_e?"bg-yellow-400 animate-pulse":me?"bg-green-400":K.payable?"bg-orange-400":"bg-blue-400"}`}),b.jsx("span",{className:"text-[12px] text-gray-300 truncate",children:K.name}),K.inputs.length>0&&b.jsxs("span",{className:"text-[10px] text-gray-700 ml-auto flex-shrink-0",children:["(",K.inputs.length,")"]}),Ie&&!_e&&b.jsx("span",{className:`w-1 h-1 rounded-full ml-auto flex-shrink-0 ${_[K.signature].success?"bg-green-500":"bg-red-500"}`})]},K.signature)}),H.length===0&&b.jsx("p",{className:"text-gray-600 text-[11px] px-3 py-4 text-center",children:"No functions"})]}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:y?b.jsx(NU,{fn:y,inputValues:E,payableValue:k,callResult:ct,calling:wt,hasAddress:!!se,chainId:t,onInputChange:re,onPayableChange:S,onCall:ce}):b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-gray-600 text-[12px]",children:"Select a function to interact"})})})]})]}):b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsx("p",{className:"text-gray-600 text-sm",children:"Select a contract from the list"})})}),b.jsxs("div",{className:"w-80 flex-shrink-0 border-l border-white/[0.06] flex flex-col",children:[b.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.06]",children:[b.jsx("label",{className:"text-[10px] text-gray-600 uppercase tracking-wider mb-1.5 block",children:"Event Lookup"}),b.jsxs("div",{className:"flex gap-1.5",children:[b.jsx("input",{className:"flex-1 bg-white/[0.04] border border-white/[0.08] rounded-lg px-2.5 py-1.5 text-[11px] text-white font-mono placeholder-gray-600 focus:outline-none focus:border-blue-500/50",placeholder:"Tx hash 0x...",value:$,onChange:K=>T(K.target.value),spellCheck:!1}),b.jsx("button",{onClick:()=>yt(),disabled:!$||!h||!se||Q,className:"px-2.5 py-1.5 rounded-lg text-[11px] font-medium bg-purple-500/20 text-purple-400 hover:bg-purple-500/30 disabled:opacity-30 transition-colors",children:Q?"...":"Decode"})]})]}),L.length>0&&b.jsx("div",{className:"px-3 py-2 border-b border-white/[0.06] max-h-[250px] overflow-y-auto",children:b.jsx(rE,{events:L,loading:Q})}),b.jsxs("div",{className:"px-3 py-2 flex items-center justify-between border-b border-white/[0.06]",children:[b.jsx("span",{className:"text-[10px] text-gray-600 uppercase tracking-wider",children:"Activity Log"}),s.length>0&&b.jsx("button",{onClick:d,className:"text-[10px] text-gray-600 hover:text-gray-400 transition-colors",children:"Clear"})]}),b.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:s.length===0?b.jsx("p",{className:"text-gray-700 text-[11px] text-center py-6",children:"No activity yet"}):b.jsx("div",{className:"space-y-1.5",children:s.map(K=>b.jsx(RU,{entry:K},K.id))})})]})]}),R&&b.jsx(bU,{contracts:n,networks:r,selectedNetwork:m,onSave:l,onClose:()=>V(!1),onCheckProxy:u}),M&&b.jsx(BU,{contract:M,networks:r,selectedNetwork:m,socket:e,chainId:t,onClose:()=>F(null),onDeployed:(K,me,we)=>{l(K,me,we),F(null)}})]})}function BU({contract:e,networks:t,selectedNetwork:n,socket:r,chainId:o,onClose:s,onDeployed:i}){var E;const a=e.abi.find(A=>A.type==="constructor"),c=((E=a==null?void 0:a.inputs)==null?void 0:E.map(A=>({name:A.name||"",type:A.type,components:A.components,internalType:A.internalType})))||[],l=(a==null?void 0:a.stateMutability)==="payable",[u,f]=j.useState(n),[d,h]=j.useState({}),[p,m]=j.useState("0"),[v,y]=j.useState(!1),[g,w]=j.useState(null),x=async()=>{if(!r){w({success:!1,error:"Not connected to server"});return}y(!0),w(null);try{const A=c.map((N,O)=>{const P=N.name||`arg${O}`,R=d[P]||"";return nE(N.type,R)}),k=await fetch("/api/contract/deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contractName:e.contractName,abi:e.abi,args:A,networkName:u,value:l?p:"0"})});if(!(k.headers.get("content-type")||"").includes("application/json")){w({success:!1,error:"Server endpoint not available. Rebuild the plugin: cd packages/plugin && npm run build, then restart the server."});return}const _=await k.json();w(_),_.success&&_.address&&i(e.contractName,u,_.address)}catch(A){w({success:!1,error:A.message})}finally{y(!1)}};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:b.jsxs("div",{className:"glass rounded-2xl w-[480px] max-h-[80vh] overflow-y-auto border border-white/[0.08] shadow-2xl",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/[0.06]",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-white text-sm font-semibold",children:"Deploy Contract"}),b.jsx("p",{className:"text-gray-500 text-[11px] mt-0.5",children:e.contractName})]}),b.jsx("button",{onClick:s,className:"w-7 h-7 rounded-lg bg-white/[0.04] flex items-center justify-center hover:bg-white/[0.08] transition-colors",children:b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-gray-500",children:b.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[b.jsxs("div",{children:[b.jsx("label",{className:"text-[11px] text-gray-500 mb-1.5 block",children:"Deploy to Network"}),b.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(A=>b.jsx("button",{onClick:()=>f(A.name),className:`px-3 py-1.5 rounded-lg text-[11px] font-medium transition-colors ${u===A.name?"bg-orange-500/20 text-orange-400 border border-orange-500/30":"bg-white/[0.04] text-gray-500 border border-white/[0.08] hover:border-white/[0.12]"}`,children:A.name},A.name))})]}),c.length>0?b.jsxs("div",{children:[b.jsx("label",{className:"text-[11px] text-gray-500 mb-2 block",children:"Constructor Parameters"}),b.jsx("div",{className:"space-y-3",children:c.map((A,k)=>{const S=A.name||`arg${k}`;return b.jsx(tE,{param:A,value:d[S]||"",onChange:_=>h(N=>({...N,[S]:_})),disabled:v},S)})})]}):b.jsx("p",{className:"text-gray-600 text-[11px]",children:"No constructor parameters required."}),l&&b.jsxs("div",{children:[b.jsx("label",{className:"text-[11px] text-orange-400 mb-1 block",children:"ETH Value (in wei)"}),b.jsx("input",{className:"w-full bg-white/[0.04] border border-orange-500/20 rounded-lg px-3 py-2 text-sm text-white font-mono placeholder-gray-600 focus:outline-none focus:border-orange-500/40 focus:ring-1 focus:ring-orange-500/20",placeholder:"0",value:p,onChange:A=>m(A.target.value),disabled:v})]}),b.jsx("button",{onClick:x,disabled:v,className:"w-full py-2.5 rounded-xl text-sm font-medium bg-orange-500 text-white hover:bg-orange-600 disabled:opacity-40 transition-colors",children:v?b.jsxs("span",{className:"flex items-center justify-center gap-2",children:[b.jsx("div",{className:"w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Deploying..."]}):`Deploy ${e.contractName} to ${u}`}),g&&b.jsx("div",{className:`rounded-xl border overflow-hidden ${g.success?"bg-green-500/5 border-green-500/20":"bg-red-500/5 border-red-500/20"}`,children:g.success?b.jsxs("div",{className:"p-3",children:[b.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2.5",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}),b.jsx("span",{className:"text-green-400 text-[11px] font-medium",children:"Transaction Sent!"})]}),g.txHash&&b.jsx(TU,{txHash:g.txHash,chainId:o}),g.address&&b.jsxs("div",{className:"mt-2 bg-white/[0.03] rounded-lg px-3 py-2 border border-white/[0.06]",children:[b.jsx("p",{className:"text-[10px] text-gray-500 mb-1",children:"Contract Address"}),b.jsx("p",{className:"text-white text-[12px] font-mono break-all",children:g.address})]})]}):b.jsxs("div",{className:"p-3",children:[b.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#ff453a",strokeWidth:"2.5",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("path",{d:"M15 9l-6 6M9 9l6 6"})]}),b.jsx("span",{className:"text-red-400 text-[11px] font-medium",children:"Failed"})]}),b.jsx("p",{className:"text-red-300 text-[12px] font-mono break-all",children:g.error})]})})]})]})})}function NU({fn:e,inputValues:t,payableValue:n,callResult:r,calling:o,hasAddress:s,chainId:i,onInputChange:a,onPayableChange:c,onCall:l}){const u=e.stateMutability==="view"||e.stateMutability==="pure";return b.jsxs("div",{className:"p-4 space-y-4",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-medium ${u?"bg-green-500/15 text-green-400":e.payable?"bg-orange-500/15 text-orange-400":"bg-blue-500/15 text-blue-400"}`,children:e.stateMutability}),b.jsx("h4",{className:"text-white text-[14px] font-semibold font-mono",children:e.name})]}),e.outputs.length>0&&b.jsxs("p",{className:"text-gray-600 text-[11px] ml-1",children:["Returns: ",e.outputs.map(f=>`${f.type}${f.name?` ${f.name}`:""}`).join(", ")]})]}),e.inputs.length>0&&b.jsx("div",{className:"space-y-3",children:e.inputs.map((f,d)=>{const h=f.name||`arg${d}`;return b.jsx(tE,{param:f,value:t[h]||"",onChange:p=>a(h,p),disabled:o},h)})}),e.payable&&b.jsxs("div",{children:[b.jsx("label",{className:"text-[11px] text-orange-400 mb-1 block",children:"ETH Value (in wei)"}),b.jsx("input",{className:"w-full bg-white/[0.04] border border-orange-500/20 rounded-lg px-3 py-2 text-sm text-white font-mono placeholder-gray-600 focus:outline-none focus:border-orange-500/40 focus:ring-1 focus:ring-orange-500/20",placeholder:"0",value:n,onChange:f=>c(f.target.value),disabled:o})]}),b.jsx("button",{onClick:l,disabled:o||!s,className:`w-full py-2.5 rounded-xl text-sm font-medium transition-colors ${u?"bg-green-500/20 text-green-400 hover:bg-green-500/30 disabled:opacity-30":"bg-blue-500 text-white hover:bg-blue-600 disabled:opacity-30"}`,children:o?b.jsxs("span",{className:"flex items-center justify-center gap-2",children:[b.jsx("div",{className:"w-3.5 h-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}),u?"Reading...":"Sending..."]}):s?u?`Read ${e.name}`:`Write ${e.name}`:"Set address first"}),r&&b.jsxs("div",{className:`rounded-xl border overflow-hidden ${r.success?"bg-green-500/5 border-green-500/20":"bg-red-500/5 border-red-500/20"}`,children:[b.jsx("div",{className:"flex items-center gap-1.5 px-3 pt-3 pb-2",children:r.success?b.jsxs(b.Fragment,{children:[b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2.5",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}),b.jsx("span",{className:"text-green-400 text-[11px] font-medium",children:"Success"})]}):b.jsxs(b.Fragment,{children:[b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#ff453a",strokeWidth:"2.5",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("path",{d:"M15 9l-6 6M9 9l6 6"})]}),b.jsx("span",{className:"text-red-400 text-[11px] font-medium",children:"Error"})]})}),r.txHash&&b.jsx(PU,{txHash:r.txHash,chainId:i}),r.success&&!r.txHash&&r.result!==void 0&&b.jsx("div",{className:"px-3 pb-3",children:b.jsx(OU,{value:r.result})}),r.error&&b.jsx("div",{className:"px-3 pb-3",children:b.jsx("p",{className:"text-red-300 text-[12px] font-mono break-all",children:r.error})}),r.events&&r.events.length>0&&b.jsxs("div",{className:"border-t border-white/[0.06] px-3 py-2.5",children:[b.jsxs("p",{className:"text-gray-500 text-[10px] uppercase tracking-wider mb-2",children:["Emitted Events (",r.events.length,")"]}),b.jsx(rE,{events:r.events})]})]})]})}function PU({txHash:e,chainId:t}){const[n,r]=j.useState(!1),o=oE(t,e),s=()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return b.jsx("div",{className:"px-3 pb-3",children:b.jsxs("div",{className:"flex items-center gap-2 bg-white/[0.03] rounded-lg px-3 py-2 border border-white/[0.06]",children:[b.jsx("span",{className:"text-white text-[12px] font-mono",children:sE(e)}),b.jsx("button",{onClick:s,className:"p-1 rounded hover:bg-white/[0.06] transition-colors group",title:"Copy full hash",children:n?b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}):b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-gray-600 group-hover:text-gray-400",children:[b.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),b.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}),b.jsx("div",{className:"flex-1"}),o&&b.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-2 py-1 rounded-md bg-blue-500/10 text-blue-400 text-[11px] font-medium hover:bg-blue-500/20 transition-colors",children:["View on Explorer",b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:b.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3"})})]})]})})}function TU({txHash:e,chainId:t}){const[n,r]=j.useState(!1),o=oE(t,e),s=()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return b.jsxs("div",{className:"flex items-center gap-2 bg-white/[0.03] rounded-lg px-3 py-2 border border-white/[0.06]",children:[b.jsx("span",{className:"text-white text-[12px] font-mono",children:sE(e)}),b.jsx("button",{onClick:s,className:"p-1 rounded hover:bg-white/[0.06] transition-colors group",title:"Copy full hash",children:n?b.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})}):b.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-gray-600 group-hover:text-gray-400",children:[b.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),b.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}),b.jsx("div",{className:"flex-1"}),o&&b.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-2 py-1 rounded-md bg-blue-500/10 text-blue-400 text-[11px] font-medium hover:bg-blue-500/20 transition-colors",children:["View on Explorer",b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:b.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3"})})]})]})}function OU({value:e}){return e==null?b.jsx("p",{className:"text-gray-500 text-[12px] font-mono",children:"void"}):typeof e=="object"?b.jsx("pre",{className:"text-gray-300 text-[11px] font-mono bg-white/[0.03] rounded-lg p-2 overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify(e,null,2)}):b.jsx("p",{className:"text-white text-[12px] font-mono break-all",children:String(e)})}function RU({entry:e}){const t=new Date(e.timestamp).toLocaleTimeString(),n={read:"text-green-400",write:"text-blue-400",event:"text-purple-400",error:"text-red-400"},r={read:"↓",write:"↑",event:"◆",error:"✕"};return b.jsxs("div",{className:"bg-white/[0.02] rounded-lg px-2.5 py-2 border border-white/[0.04]",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{className:`text-[10px] ${n[e.type]}`,children:r[e.type]}),b.jsxs("span",{className:"text-white text-[11px] font-medium truncate",children:[e.contractName,".",e.functionName]}),b.jsx("span",{className:"text-gray-700 text-[10px] ml-auto flex-shrink-0",children:t})]}),e.result!==void 0&&b.jsx("p",{className:"text-gray-500 text-[10px] font-mono mt-1 truncate",children:typeof e.result=="object"?JSON.stringify(e.result):String(e.result)}),e.error&&b.jsx("p",{className:"text-red-400/70 text-[10px] mt-1 truncate",children:e.error}),e.txHash&&b.jsx("p",{className:"text-gray-600 text-[10px] font-mono mt-0.5 truncate",children:e.txHash})]})}function MU(){const{address:e,isConnected:t}=gt(),n=As(),[r,o]=j.useState("signer"),s=j.useCallback(()=>({address:e,chainId:n,isConnected:t}),[e,n,t]),{socket:i,status:a,pendingRequests:c,completedRequests:l,notifyWalletConnected:u,notifyWalletDisconnected:f,notifyChainChanged:d,notifyAccountChanged:h,sendResponse:p}=eU(s),m=j.useRef(!1),v=j.useRef(),y=j.useRef();j.useEffect(()=>{t&&e&&a==="connected"?m.current?v.current&&v.current!==e&&h(e):u(e,n):!t&&m.current&&f(),m.current=t,v.current=e},[t,e,a,n,u,f,h]),j.useEffect(()=>{t&&y.current&&y.current!==n&&d(n),y.current=n},[n,t,d]);const g=(r==="runner"||r==="contracts")&&c.length>0;return b.jsxs("div",{className:"h-screen bg-[#0a0a0a] flex flex-col overflow-hidden",children:[b.jsx("header",{className:"flex-shrink-0 glass border-b border-white/[0.06] px-5 py-3 z-10",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center shadow-lg shadow-blue-500/20",children:b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",children:b.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 2.18l7 3.12v5.7c0 4.83-3.4 9.36-7 10.55V3.18z"})})}),b.jsxs("div",{children:[b.jsx("h1",{className:"text-white font-semibold text-[15px] leading-tight tracking-tight",children:"AirSign"}),b.jsx("p",{className:"text-gray-600 text-[10px] mt-0.5",children:"Hardhat Remote Signer"})]}),a==="connected"&&t&&b.jsxs("div",{className:"ml-6 segment-control flex",children:[b.jsxs("button",{onClick:()=>o("signer"),className:`relative text-[12px] font-medium py-1.5 px-4 rounded-lg transition-all ${r==="signer"?"segment-active text-white":"text-gray-500 hover:text-gray-400"}`,children:["Signer",c.length>0&&r!=="runner"&&b.jsx("span",{className:"absolute -top-1 -right-1 w-4 h-4 bg-orange-500 rounded-full text-[9px] font-bold text-white flex items-center justify-center",children:c.length})]}),b.jsx("button",{onClick:()=>o("runner"),className:`relative text-[12px] font-medium py-1.5 px-4 rounded-lg transition-all ${r==="runner"?"segment-active text-white":"text-gray-500 hover:text-gray-400"}`,children:"Runner"}),b.jsx("button",{onClick:()=>o("contracts"),className:`relative text-[12px] font-medium py-1.5 px-4 rounded-lg transition-all ${r==="contracts"?"segment-active text-white":"text-gray-500 hover:text-gray-400"}`,children:"Contracts"})]})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium ${a==="connected"?"bg-green-500/10 text-green-400":a==="connecting"?"bg-yellow-500/10 text-yellow-400":"bg-red-500/10 text-red-400"}`,children:[b.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${a==="connected"?"bg-green-400":a==="connecting"?"bg-yellow-400 animate-pulse":"bg-red-400"}`}),a==="connected"?"Connected":a==="connecting"?"Connecting":"Offline"]}),b.jsx(hd,{showBalance:!1,chainStatus:"icon",accountStatus:"avatar"})]})]})}),b.jsxs("main",{className:"flex-1 flex flex-col min-h-0",children:[a!=="connected"&&b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/[0.03] flex items-center justify-center mx-auto mb-5",children:b.jsx("div",{className:"w-6 h-6 border-2 border-gray-700 border-t-blue-400 rounded-full animate-spin"})}),b.jsx("h2",{className:"text-white text-lg font-semibold mb-2",children:"Connecting to server"}),b.jsxs("p",{className:"text-gray-500 text-sm max-w-xs",children:["Make sure the AirSign server is running with ",b.jsx("code",{className:"text-gray-400 bg-white/[0.04] px-1.5 py-0.5 rounded text-xs",children:"npx hardhat airsign-start"})]})]})}),a==="connected"&&!t&&b.jsx("div",{className:"flex-1 flex items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/[0.03] flex items-center justify-center mx-auto mb-5",children:b.jsx("span",{className:"text-3xl",children:"👛"})}),b.jsx("h2",{className:"text-white text-lg font-semibold mb-2",children:"Connect your wallet"}),b.jsx("p",{className:"text-gray-500 text-sm mb-6 max-w-xs",children:"Link your browser wallet to start signing transactions"}),b.jsx("div",{className:"flex justify-center",children:b.jsx(hd,{})})]})}),a==="connected"&&t&&r==="signer"&&b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"max-w-lg mx-auto px-6 py-8",children:[b.jsxs("div",{className:"glass rounded-2xl p-4 mb-6 flex items-center gap-3",children:[b.jsx("div",{className:"w-9 h-9 rounded-xl bg-green-500/10 flex items-center justify-center",children:b.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#30d158",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M20 6L9 17l-5-5"})})}),b.jsxs("div",{children:[b.jsx("p",{className:"text-white text-sm font-medium",children:"Ready to sign"}),b.jsx("p",{className:"text-gray-500 text-[11px]",children:"Listening for signing requests from Hardhat"})]})]}),b.jsx(oU,{pendingRequests:c,completedRequests:l,onResponse:p})]})}),a==="connected"&&t&&r==="runner"&&b.jsx(cU,{socket:i}),a==="connected"&&t&&r==="contracts"&&b.jsx(IU,{socket:i})]}),g&&b.jsx(sU,{requests:c,onResponse:p})]})}Hh.createRoot(document.getElementById("root")).render(b.jsx(C.StrictMode,{children:b.jsx(iD,{children:b.jsx(MU,{})})}));const gv=Object.freeze(Object.defineProperty({__proto__:null,default:Dp},Symbol.toStringTag,{value:"Module"}));export{Xc as $,ZA as A,U as B,i2 as C,w2 as D,Ks as E,z as F,Zk as G,za as H,_t as I,sk as J,ez as K,$U as L,Vi as M,Tn as N,O3 as O,XB as P,v3 as Q,Ne as R,ot as S,hc as T,ge as U,Y as V,Ac as W,Ku as X,wn as Y,B2 as Z,W as _,sg as a,Wt as a0,AS as a1,Yp as a2,ig as a3,Ze as a4,Io as a5,Qj as a6,j3 as a7,je as a8,_o as a9,pg as aa,er as ab,Ng as ac,Br as ad,Ki as ae,IN as af,at as ag,wo as ah,_3 as ai,ts as aj,zt as ak,SS as al,pk as am,Te as an,Yc as ao,DU as ap,tn as aq,_S as b,tl as c,dS as d,mt as e,Cs as f,_v as g,Zn as h,Mi as i,FU as j,uE as k,Dd as l,Cu as m,Vt as n,I5 as o,Y_ as p,R3 as q,Ld as r,Ge as s,nN as t,$t as u,Ln as v,c0 as w,We as x,Wi as y,Bi as z};
1753
+ //# sourceMappingURL=index-D2ubWGvc.js.map