@dcl/shop 0.1.0-29588647657.commit-2cc8158 → 0.1.0-29734911263.commit-97d18ef

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 (270) hide show
  1. package/assets/{AnimatedBackground-urlvv1u-.js → AnimatedBackground-Dc0wzLz1.js} +1 -1
  2. package/assets/Assets-DPWTLJJO.js +1 -0
  3. package/assets/Cart-BBaYBkcV.css +1 -0
  4. package/assets/Cart-C5IFRFSf.js +1 -0
  5. package/assets/{CircularProgress-CPG7ZOfs.js → CircularProgress-BDWVwtML.js} +4 -4
  6. package/assets/Collection-M5DaYZlo.js +1 -0
  7. package/assets/CollectionCarousel-FF2VKnCi.css +1 -0
  8. package/assets/CollectionCarousel-_a53Z75p.js +1 -0
  9. package/assets/{ConstantsUtil-CCJ0yRd8.js → ConstantsUtil-BbIzv5xN.js} +1 -1
  10. package/assets/ContentClient-BiP6T0o-.js +1 -0
  11. package/assets/Creator-CTzdaC_3.js +1 -0
  12. package/assets/{CssVarsProvider-CNdYCyi9.js → CssVarsProvider-CwWOpnL3.js} +3 -3
  13. package/assets/DeploymentBuilder-DUGl9QwQ.js +3 -0
  14. package/assets/{ExchangeController-BnfYxF48.js → ExchangeController-nU1L87yP.js} +1 -1
  15. package/assets/GetCredits-BpLPWa0W.js +1 -0
  16. package/assets/{HelpersUtil-C5w2ExFs.js → HelpersUtil-CvduV3iF.js} +1 -1
  17. package/assets/ImportListings-BNQe3kWr.js +1 -0
  18. package/assets/{ItemDetail-BMi8a81V.css → ItemDetail-Bu2_xAf0.css} +1 -1
  19. package/assets/ItemDetail-Cei4y0nZ.js +2 -0
  20. package/assets/MarketCheckout-Do7I_hLx.js +1 -0
  21. package/assets/MyAssets-Bxikz0O1.js +1 -0
  22. package/assets/MyFavorites-dmVn-jNs.js +1 -0
  23. package/assets/MyPurchases-62SCltGJ.js +1 -0
  24. package/assets/{NetworkUtil-Yv-DdqEo.js → NetworkUtil-CLSFaUe_.js} +1 -1
  25. package/assets/NotFound-CaztEVTk.js +1 -0
  26. package/assets/StoreSettings-DjI99hf0.js +1 -0
  27. package/assets/Success-KQj99-pf.js +1 -0
  28. package/assets/{SwapController-CUPcRb3X.js → SwapController-rop7Cy13.js} +1 -1
  29. package/assets/TradeService-D1JN9Ta2.js +1 -0
  30. package/assets/W3MFrameProviderSingleton-igVJGnIP.js +24 -0
  31. package/assets/{WebCryptoP256-CmfR3sjC.js → WebCryptoP256-DhJgbrxa.js} +1 -1
  32. package/assets/{basic-CrYMfATs.js → basic-ClmBw3no.js} +1 -1
  33. package/assets/biconomy-Bh94ZwGM.js +1 -0
  34. package/assets/{buy-gasless-uH5qu5A8.js → buy-gasless-COqF6TfJ.js} +1 -1
  35. package/assets/buy-qpkIddNt.js +1 -0
  36. package/assets/cart-checkout-0Ra3OSr3.js +1 -0
  37. package/assets/{categories-Dqa3M8i7.js → categories-Chd4fnsf.js} +1 -1
  38. package/assets/ccip-C1vfcfuy.js +1 -0
  39. package/assets/ccip-DLAoDUFz.js +1 -0
  40. package/assets/{chains-sL9nr1ux.js → chains-DxiOcj_1.js} +1 -1
  41. package/assets/collection-s3UDaDJs.js +1 -0
  42. package/assets/{common-Dyx8k-hp.js → common-B-aETE4R.js} +1 -1
  43. package/assets/controller-BTZuhR9-.js +2 -0
  44. package/assets/{core-pBN9FKMw.js → core-C_85sR5Z.js} +8 -8
  45. package/assets/{custom-CEHsyFlW.js → custom-H6a3SIvl.js} +1 -1
  46. package/assets/{data-capture-BSdkL8U7.js → data-capture-BVpYsiYY.js} +1 -1
  47. package/assets/dcl-schemas-BICTSpB5.js +13 -0
  48. package/assets/decimals-CpjItqe-.js +1 -0
  49. package/assets/{decimals-BA-bLcGh.js → decimals-DhBB7VPD.js} +1 -1
  50. package/assets/{detectExtension-G5UH8a-M.js → detectExtension-DPopT1Kb.js} +1 -1
  51. package/assets/{email-BMkLtjTu.js → email-CCv85Jjp.js} +7 -7
  52. package/assets/{embedded-wallet-CMLY6maG.js → embedded-wallet-C9sVH0T_.js} +1 -1
  53. package/assets/emotion-styled.browser.esm-7U6PLHlL.js +1 -0
  54. package/assets/engine-DPnRS4Vr.js +1 -0
  55. package/assets/estimate-l1-fee-0Ox9h9v8.js +1 -0
  56. package/assets/eth_estimateGas-B9zdAB24.js +1 -0
  57. package/assets/{eth_getStorageAt-DEYLIJ2f.js → eth_getStorageAt-Bp0VdFG_.js} +1 -1
  58. package/assets/eth_getTransactionCount-D3ux_Uy2.js +1 -0
  59. package/assets/{ethereum-gQdvRN4F.js → ethereum-7lBI8s3D.js} +1 -1
  60. package/assets/{ethers-DArfy-QF.js → ethers-w2AslR0v.js} +4 -4
  61. package/assets/extractIPFS-DnEM7HGg.js +1 -0
  62. package/assets/features-C3BsUywQ.js +5 -0
  63. package/assets/fetchTokenMetadata-r_xnkq91.js +2 -0
  64. package/assets/get-ecosystem-wallet-info-rMoPuP61.js +1 -0
  65. package/assets/getBalance-DxuNPttj.js +2 -0
  66. package/assets/getInstalledModules-BNrMQMSM.js +1 -0
  67. package/assets/getNFT-BlFsKfLP.js +2 -0
  68. package/assets/getNFT-CU0p112E.js +1 -0
  69. package/assets/{getOverlayAlpha-CPeU_wtJ.js → getOverlayAlpha-B57gNsKL.js} +1 -1
  70. package/assets/{hashTypedData-BiAfRLxc.js → hashTypedData-C1FGwn-3.js} +1 -1
  71. package/assets/{hashTypedData-_My6_zHk.js → hashTypedData-DiQfP4ez.js} +1 -1
  72. package/assets/{import-BM47oMM1.js → import-DU_OhvUC.js} +1 -1
  73. package/assets/in-app-wallet-calls-BREibEL9.js +1 -0
  74. package/assets/index-6A6nGPwX.js +1 -0
  75. package/assets/{index-gt71uI0K.js → index-6Kyym41O.js} +1 -1
  76. package/assets/{index-DMU6YRL7.js → index-6Yrg17AO.js} +1 -1
  77. package/assets/{index-BNhDGSX8.js → index-B1DKag9y.js} +1 -1
  78. package/assets/{index-C-uQhIOu.js → index-B29hZWU0.js} +7 -7
  79. package/assets/{index-CFasXWsQ.js → index-B6hUxDdz.js} +2 -2
  80. package/assets/index-B7Kupr-o.js +1 -0
  81. package/assets/index-B857ik7x.js +74 -0
  82. package/assets/index-BABdIN2I.js +2 -0
  83. package/assets/{index-XztZBEgs.js → index-BBeG1LQT.js} +3 -3
  84. package/assets/{index-CRWbHzp3.js → index-BFflIlJl.js} +1 -1
  85. package/assets/{index-DUwiQnps.js → index-BHgXtxHt.js} +1 -1
  86. package/assets/index-BKCbqIDV.js +2 -0
  87. package/assets/{index-CSy-_M5R.js → index-BLfwzasm.js} +1 -1
  88. package/assets/{index-BY2ihj74.js → index-BQUzfdXy.js} +2 -2
  89. package/assets/{index-Dy65iyWb.js → index-BToZY4wT.js} +1 -1
  90. package/assets/{index-7a1mhp_I.js → index-BdSETUQy.js} +1 -1
  91. package/assets/{index-DMWWvHVt.js → index-BhQRaolS.js} +1 -1
  92. package/assets/index-BmdMMxfk.js +5 -0
  93. package/assets/{index-xVgoxgG9.js → index-BtMWp3zQ.js} +3 -3
  94. package/assets/{index-D8bR8hF2.js → index-Bu7y6WnQ.js} +1 -1
  95. package/assets/{index-0YKOyKsz.js → index-BvkmByTC.js} +1 -1
  96. package/assets/index-BxVm-10z.js +2 -0
  97. package/assets/index-C3UC6Rs5.js +1 -0
  98. package/assets/{index-D8XdtECa.js → index-C3Zl4Bwc.js} +1 -1
  99. package/assets/{index-Bs2u8R9P.js → index-C4CMYXNA.js} +2 -2
  100. package/assets/{index-BQzrms9Y.js → index-C4TyPwon.js} +1 -1
  101. package/assets/{index-57pYnjcK.js → index-CBQ1afGx.js} +1 -1
  102. package/assets/{index-BvrUtN1i.js → index-CEy7C-8g.js} +1 -1
  103. package/assets/{index-CWkyddUj.js → index-CFOnfjiX.js} +2 -2
  104. package/assets/index-CNSWvtL0.js +38 -0
  105. package/assets/{index-fGWdBWqW.js → index-CNkjr1DA.js} +1 -1
  106. package/assets/{index-COmrTRgF.js → index-CONsWgTr.js} +1 -1
  107. package/assets/{index-DqO1kUFU.js → index-CPGmwqDl.js} +1 -1
  108. package/assets/{index-fJZF9Wlt.js → index-CPJOSm7j.js} +2 -2
  109. package/assets/{index-DhmytMhG.js → index-C_M9XsGM.js} +1 -1
  110. package/assets/index-CkdLU61h.js +1 -0
  111. package/assets/{index-CGf6vfVT.js → index-Clrgbbm8.js} +1 -1
  112. package/assets/index-CuqC8d2-.js +2 -0
  113. package/assets/{index-oExJUWSQ.js → index-CvEf0SP-.js} +1 -1
  114. package/assets/index-CvvKgwgx.js +3 -0
  115. package/assets/{index-Bi6W-t7S.js → index-D4Qahz_H.js} +1 -1
  116. package/assets/{index-B4HZUf7-.js → index-D4gUO6YF.js} +1 -1
  117. package/assets/index-DAGAMRoL.js +2 -0
  118. package/assets/{index-X5dRqFqG.js → index-DUvTWkbt.js} +1 -1
  119. package/assets/{index-Dih2AmlD.js → index-DVRw_gw9.js} +1 -1
  120. package/assets/{index-DWVC6kWx.js → index-DWwpSRi-.js} +1 -1
  121. package/assets/{index-COd6Hpl3.js → index-DYCwB2y3.js} +2 -2
  122. package/assets/{index-C1L7bhks.js → index-D_bGCuiT.js} +1 -1
  123. package/assets/{index-BseAK0jv.js → index-DaX1PcgD.js} +1 -1
  124. package/assets/{index-C6Uar8kN.js → index-Dbqfw_1n.js} +1 -1
  125. package/assets/{index-Ncc_A7mr.js → index-DfD3kcZV.js} +3 -3
  126. package/assets/{index-C-GvP7Ri.js → index-DxzGOm1i.js} +1 -1
  127. package/assets/{index-BE03Fup7.js → index-GCfy9KhE.js} +2 -2
  128. package/assets/{index-1w11c9kT.js → index-GPWVD-So.js} +1 -1
  129. package/assets/{index-Bwj5NrhW.js → index-HDuUFApJ.js} +1 -1
  130. package/assets/index-HN6Rk25C.js +1 -0
  131. package/assets/index-YhrkEkkQ.js +1 -0
  132. package/assets/{index-2lgRM28O.js → index-h7-uke9P.js} +1 -1
  133. package/assets/{index-BAYW-Y7J.css → index-jbcqNek9.css} +1 -1
  134. package/assets/{index-BvJT7BsV.js → index-kSkl-zIU.js} +1 -1
  135. package/assets/{index-pOWOYTZf.js → index-l4HYDe7V.js} +1 -1
  136. package/assets/{index-BhW68dt9.js → index-r1XpXEwi.js} +1 -1
  137. package/assets/{index.es-CAdXWwOm.js → index.es-BWh_1tnr.js} +4 -4
  138. package/assets/{index.es-CiB5ifZN.js → index.es-DtmgeITt.js} +1 -1
  139. package/assets/index.es-SxKlpBqs.js +1 -0
  140. package/assets/intl-CBcMB1D2.js +22 -0
  141. package/assets/{localBatchGatewayRequest--Sv8eIOm.js → localBatchGatewayRequest-Bisheu8W.js} +1 -1
  142. package/assets/{mana-rate-DgCtJ5pM.js → mana-rate-CPIzN4Vi.js} +1 -1
  143. package/assets/{native-DBJATukw.js → native-BHXbWt16.js} +1 -1
  144. package/assets/networks-2BN2k4cV.js +1 -0
  145. package/assets/{onramp-CBfgz1Ty.js → onramp-ezPwBLqh.js} +1 -1
  146. package/assets/openzeppelin-DKT-fJnL.js +1 -0
  147. package/assets/ownerOf-6bPfyUUB.js +1 -0
  148. package/assets/parseNft-C64AqdIb.js +2 -0
  149. package/assets/{parseSignature-CjbZVQR3.js → parseSignature-7t7DXXbe.js} +1 -1
  150. package/assets/{parseSignature-DEAl-96W.js → parseSignature-C5pd7yT7.js} +3 -3
  151. package/assets/{pay-with-exchange-CRwxKD_d.js → pay-with-exchange-Brk67N1Q.js} +1 -1
  152. package/assets/{payments-CFEkq9jj.js → payments-D1TsNJWo.js} +1 -1
  153. package/assets/{qr-overlay-CS6qAFtp.js → qr-overlay-CLl0wVbt.js} +6 -6
  154. package/assets/{receive-D_7ieG-4.js → receive-Bt81cJu3.js} +1 -1
  155. package/assets/resolveImplementation-D-DhhnNB.js +1 -0
  156. package/assets/{rpc-Cd5PGlK-.js → rpc-Bhmgfz1e.js} +1 -1
  157. package/assets/{secp256k1-D_53A2qu.js → secp256k1-B6MVDYDd.js} +1 -1
  158. package/assets/secp256k1-CdH-AER_.js +1 -0
  159. package/assets/secp256k1-DcIYGay5.js +1 -0
  160. package/assets/{send--YozeJBn.js → send-Dzpx6XEO.js} +1 -1
  161. package/assets/{send-batch-transaction-DiGyQeR5.js → send-batch-transaction-twz9plvu.js} +1 -1
  162. package/assets/{send-eip712-transaction-Dqu8RfN0.js → send-eip712-transaction-DuYMjY_7.js} +2 -2
  163. package/assets/send-gasless-transaction-RKoViIvt.js +2 -0
  164. package/assets/{sendRawTransaction-rRmixG-d.js → sendRawTransaction-B5C16ilB.js} +3 -3
  165. package/assets/sentry-BPJvc5GU.js +33 -0
  166. package/assets/{serializeTransaction-CzGG2kBz.js → serializeTransaction-COuCzUc4.js} +1 -1
  167. package/assets/session-proposal-DKbxmMJ5.js +1 -0
  168. package/assets/session-request-DuILxTGu.js +2 -0
  169. package/assets/{sha256-Bt6mLy1E.js → sha256-Bj4vNOnb.js} +1 -1
  170. package/assets/{signing-BwuIt3X5.js → signing-DW4tyFl0.js} +5 -5
  171. package/assets/{socials-BStKssws.js → socials-CBCHs9Sz.js} +1 -1
  172. package/assets/{swaps-Bid0ju8o.js → swaps-21QHpuMJ.js} +1 -1
  173. package/assets/{thirdweb-BMJ7fr_N.js → thirdweb-C69j7iTG.js} +3 -3
  174. package/assets/totalSupply-BjrHK1ZH.js +1 -0
  175. package/assets/trade-encoding-BtlpyT8N.js +1 -0
  176. package/assets/{transactionReceipt-C1w204dJ.js → transactionReceipt-CK-ZZNkd.js} +1 -1
  177. package/assets/transactions-DYJvsdj0.js +16 -0
  178. package/assets/{useInfiniteGrid-BAS-zEte.js → useInfiniteGrid-Bso7ZIlQ.js} +1 -1
  179. package/assets/useStore-BomIn5qc.js +2 -0
  180. package/assets/useTheme-gY3T76jp.js +1 -0
  181. package/assets/useTheme-qyEpY8zT.js +1 -0
  182. package/assets/{utils-BDQ8DS2k.js → utils-CsEYBURh.js} +1 -1
  183. package/assets/{verifyHash-yypMHIUe.js → verifyHash-DpeDDe0l.js} +1 -1
  184. package/assets/{w3m-modal-D4BKzcIi.js → w3m-modal-B5GRQ8Bk.js} +1 -1
  185. package/assets/{w3m-modal-Cf0rHk1f.js → w3m-modal-BHGgG_1M.js} +17 -17
  186. package/assets/{wait-for-tx-receipt-Dq_saZBt.js → wait-for-tx-receipt-D9A_u2fN.js} +1 -1
  187. package/assets/wallet-kind-B9P1TeIH.js +1 -0
  188. package/assets/{wallets-DthYtMmh.js → wallets-DvzXHK5n.js} +6 -6
  189. package/assets/web-connector-B4y564hP.js +9 -0
  190. package/assets/{writeContract-CYBPanmL.js → writeContract-ChFbWN7V.js} +1 -1
  191. package/assets/{zora-sepolia-B35hC1NB.js → zora-sepolia-CKeXJ6uD.js} +1 -1
  192. package/assets/{zoraTestnet-CupsSsoK.js → zoraTestnet-B1VFNgcm.js} +1 -1
  193. package/index.html +11 -8
  194. package/package.json +2 -2
  195. package/assets/Assets-Bgol1TFW.js +0 -1
  196. package/assets/Cart-BLK0NtgY.js +0 -1
  197. package/assets/Cart-C612IvK3.css +0 -1
  198. package/assets/Collection-oY08s2SC.js +0 -1
  199. package/assets/ContentClient-CcNIfFcB.js +0 -1
  200. package/assets/Creator-Geua9taX.js +0 -1
  201. package/assets/DeploymentBuilder-DOqh7sYP.js +0 -3
  202. package/assets/GetCredits-COdRHzqV.js +0 -1
  203. package/assets/ImportListings-B-zcLoS1.js +0 -1
  204. package/assets/ItemDetail-BEVnVvI_.js +0 -2
  205. package/assets/MarketCheckout-k3hh1fMb.js +0 -1
  206. package/assets/MyAssets-CtamOoiB.js +0 -1
  207. package/assets/MyFavorites-DB_RHGeZ.js +0 -1
  208. package/assets/MyPurchases-DLo5AL4P.js +0 -1
  209. package/assets/NotFound-CALTSbn3.js +0 -1
  210. package/assets/StoreSettings-IyPLWce9.js +0 -1
  211. package/assets/Success-CPrrgz5q.js +0 -1
  212. package/assets/TradeService-DE_CcjPe.js +0 -1
  213. package/assets/W3MFrameProviderSingleton-KZXDtdeN.js +0 -24
  214. package/assets/biconomy-CHSrNezt.js +0 -1
  215. package/assets/buy-C_OnDZx3.js +0 -1
  216. package/assets/cart-checkout-DJSPllz1.js +0 -1
  217. package/assets/ccip-CYomOMLt.js +0 -1
  218. package/assets/ccip-h7KPERy4.js +0 -1
  219. package/assets/collection-DOsbvafd.js +0 -1
  220. package/assets/controller-KHxYFosg.js +0 -2
  221. package/assets/decimals-CwI_mnkm.js +0 -1
  222. package/assets/emotion-styled.browser.esm-Bcg9MXM8.js +0 -1
  223. package/assets/engine-ZKKEGTTG.js +0 -1
  224. package/assets/estimate-l1-fee-XHZSoWjk.js +0 -1
  225. package/assets/eth_estimateGas-Bq7UQHDY.js +0 -1
  226. package/assets/eth_getTransactionCount-sK45qAke.js +0 -1
  227. package/assets/extractIPFS-BTNSHVMw.js +0 -1
  228. package/assets/features-jLiVGuCn.js +0 -5
  229. package/assets/fetchTokenMetadata-CLRXW5Ae.js +0 -2
  230. package/assets/get-ecosystem-wallet-info-HaXmkjKB.js +0 -1
  231. package/assets/getBalance-D85PcSgJ.js +0 -2
  232. package/assets/getInstalledModules-BbkWCUI_.js +0 -1
  233. package/assets/getNFT-Ba-KxS5w.js +0 -1
  234. package/assets/getNFT-CpSdZEPv.js +0 -2
  235. package/assets/in-app-wallet-calls-DB4mrEuh.js +0 -1
  236. package/assets/index-B1e1ZADY.js +0 -1
  237. package/assets/index-B9Xqc0Hi.js +0 -2
  238. package/assets/index-BS31iF_T.js +0 -2
  239. package/assets/index-BUYyFeCt.js +0 -2
  240. package/assets/index-C0OEAd0W.js +0 -1
  241. package/assets/index-C8L1dg3z.js +0 -1
  242. package/assets/index-CYWpV70P.js +0 -103
  243. package/assets/index-Ct5KJb97.js +0 -1
  244. package/assets/index-DMLSNnyb.js +0 -1
  245. package/assets/index-DPAyBtUP.js +0 -1
  246. package/assets/index-DYJHRYX4.js +0 -2
  247. package/assets/index-Df8J_8ta.js +0 -74
  248. package/assets/index-T4DqOE4M.js +0 -3
  249. package/assets/index-eL578oJV.js +0 -5
  250. package/assets/index-wsdLqN_j.js +0 -2
  251. package/assets/index.es-CsD1tXVc.js +0 -1
  252. package/assets/network-DRGleXEI.js +0 -1
  253. package/assets/networks-BqVCrj8Y.js +0 -1
  254. package/assets/openzeppelin-D2z1DmVV.js +0 -1
  255. package/assets/ownerOf-DFlcEy6_.js +0 -1
  256. package/assets/parseNft-msnZvn_A.js +0 -2
  257. package/assets/resolveImplementation-BxK03jeA.js +0 -1
  258. package/assets/secp256k1-BDhwR6SH.js +0 -1
  259. package/assets/secp256k1-D5XG5Cq2.js +0 -1
  260. package/assets/send-gasless-transaction-B5uz3mX0.js +0 -2
  261. package/assets/session-proposal-CCHvDJo0.js +0 -1
  262. package/assets/session-request-BkhA5-RY.js +0 -2
  263. package/assets/totalSupply--8jNML7t.js +0 -1
  264. package/assets/trade-encoding-Drnx1u3j.js +0 -1
  265. package/assets/transactions-KwvVTP9x.js +0 -16
  266. package/assets/useStore-D0Fp5fnX.js +0 -2
  267. package/assets/useTheme-CBsdNYl2.js +0 -1
  268. package/assets/useTheme-DU7pyJai.js +0 -1
  269. package/assets/wallet-kind-D_7fqJZh.js +0 -1
  270. package/assets/web-connector-Cahc_-N0.js +0 -9
@@ -1 +1 @@
1
- import{e as d}from"./index-BUYyFeCt.js";import{o}from"./browser-ponyfill-Cl4XgbUp.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-CSy-_M5R.js";import"./index-C6Uar8kN.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
1
+ import{e as d}from"./index-DAGAMRoL.js";import{o}from"./browser-ponyfill-Cl4XgbUp.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-BLfwzasm.js";import"./index-Dbqfw_1n.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
@@ -0,0 +1 @@
1
+ import{B as M}from"./dcl-schemas-BICTSpB5.js";import{B as Tt,q as Mt,K as ot,t as J,u as Bt,Y as F,P as $t,F as B,V as R,v as z,w as At,x as Lt}from"./wallets-DvzXHK5n.js";import"./index-Dbqfw_1n.js";import{b as Jt,o as g,c as Et}from"./index-BLfwzasm.js";import{f as P}from"./index.es-DtmgeITt.js";import{N as zt}from"./index-DAGAMRoL.js";import"./signing-DW4tyFl0.js";import"./utils-CsEYBURh.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./index-CNSWvtL0.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./store-CraP4F4Y.js";import"./hashTypedData-C1FGwn-3.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-C4TyPwon.js";import"./ethereum-7lBI8s3D.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./events-DQ172AOg.js";const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n==null?void 0:n(i,t,e,s);if(a!=null)return a;if(it(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&ve(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...Nt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function ve(i){switch(Dt(i)){case xt:case ie:case se:case ne:case Rt:case Zt:case de:case fe:case pe:case ue:case le:case te:case Ft:case re:case Qt:case ee:case _t:case Xt:case ae:case oe:case ce:case he:return!0;default:return!1}}function ge(i,t){return me(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const r=new i.constructor(i==null?void 0:i.valueOf());return y(r,i),r}case xt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function ut(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ce(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ie(i,...t){return Ce(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function C(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((n=e==null?void 0:e.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ie(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ee(U(U({},r[d]),c),{chains:z(u,(t=r[d])==null?void 0:t.chains),methods:z(l,(e=r[d])==null?void 0:e.methods),events:z(h,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,Ct=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=Ct(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n==null?void 0:n[`${yt}:${c}`];if(u){const l=u==null?void 0:u[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),Ct(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(It)for(var e of It(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=n.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);n.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const r=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),u=a.some(h=>(h==null?void 0:h.status)==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function Ye(i,t,e){return await e(parseInt(i)).request(Et("eth_getTransactionReceipt",[t]))}async function Qe({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ke(Ve({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Lt(Yt)}}))}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)At(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Ze({resultId:i,storage:t}){const e=await t.getItem(_),s=e==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,I=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){I(this,"name","polkadot"),I(this,"client"),I(this,"httpProviders"),I(this,"events"),I(this,"namespace"),I(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(C(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u==null?void 0:u.sessionProperties)==null?void 0:r.capabilities)||{},h=`${o}${c.join(",")}`,w=l==null?void 0:l[h];if(w)return w;let d;try{d=Ue(u,o,c)}catch(L){console.warn("Failed to extract capabilities from session",L)}if(d)return d;const at=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Q(Y({},u.sessionProperties||{}),{capabilities:Q(Y({},l||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Ze({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Wt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},u=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,l=(n=c==null?void 0:c.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Qe({sendCalls:{request:r,result:a},storage:this.storage}),a}}var hi=Object.defineProperty,pi=(i,t,e)=>t in i?hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>pi(i,typeof t!="symbol"?t+"":t,e);class ui{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var li=Object.defineProperty,di=(i,t,e)=>t in i?li(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=C(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ci=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ci(i,typeof t!="symbol"?t+"":t,e);class Ii{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=C(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=B(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new zt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(this,"disableProviderPing",!1),this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Tt(Mt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Jt(a,r))).catch(r=>e(r,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ot("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=gt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=gt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!J(e))return;for(const s of e)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await Bt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ct,relayUrl:this.providerOpts.relayUrl||Gt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(e=>F(e)))];V("client",this.client),V("events",this.events),V("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Se(e,this.session);if((s==null?void 0:s.length)===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ii({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const hs=nt;export{hs as UniversalProvider,nt as default};
@@ -0,0 +1,22 @@
1
+ var Q=function(e,t){return Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},Q(e,t)};function A(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Q(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return c=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},c.apply(this,arguments)};function ae(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Te(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function Se(e,t){return function(r,n){t(r,n,e)}}function _e(e,t,r,n,a,i){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var s=n.kind,h=s==="getter"?"get":s==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,l=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,m=!1,p=r.length-1;p>=0;p--){var d={};for(var b in n)d[b]=b==="access"?{}:n[b];for(var b in n.access)d.access[b]=n.access[b];d.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(y||null))};var E=(0,r[p])(s==="accessor"?{get:l.get,set:l.set}:l[h],d);if(s==="accessor"){if(E===void 0)continue;if(E===null||typeof E!="object")throw new TypeError("Object expected");(f=o(E.get))&&(l.get=f),(f=o(E.set))&&(l.set=f),(f=o(E.init))&&a.unshift(f)}else(f=o(E))&&(s==="field"?a.unshift(f):l[h]=f)}u&&Object.defineProperty(u,n.name,l),m=!0}function He(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0}function Ie(e){return typeof e=="symbol"?e:"".concat(e)}function Ae(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Ne(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Pe(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(l){try{u(n.next(l))}catch(f){o(f)}}function h(l){try{u(n.throw(l))}catch(f){o(f)}}function u(l){l.done?i(l.value):a(l.value).then(s,h)}u((n=n.apply(e,t||[])).next())})}function Be(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(l){return h([u,l])}}function h(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Z=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});function we(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Z(t,e,r)}function k(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ie(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function Oe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ie(arguments[t]));return e}function Re(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n}function S(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function C(e){return this instanceof C?(this.v=e,this):new C(e)}function Le(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,i=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),a[Symbol.asyncIterator]=function(){return this},a;function o(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){n[p]&&(a[p]=function(b){return new Promise(function(E,y){i.push([p,b,E,y])>1||h(p,b)})},d&&(a[p]=d(a[p])))}function h(p,d){try{u(n[p](d))}catch(b){m(i[0][3],b)}}function u(p){p.value instanceof C?Promise.resolve(p.value.v).then(l,f):m(i[0][2],p)}function l(p){h("next",p)}function f(p){h("throw",p)}function m(p,d){p(d),i.shift(),i.length&&h(i[0][0],i[0][1])}}function Me(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,i){t[a]=e[a]?function(o){return(r=!r)?{value:C(e[a](o)),done:!1}:i?i(o):o}:i}}function Ce(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof k=="function"?k(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(o){return new Promise(function(s,h){o=e[i](o),a(s,h,o.done,o.value)})}}function a(i,o,s,h){Promise.resolve(h).then(function(u){i({value:u,done:s})},o)}}function De(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var ct=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Y=function(e){return Y=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Y(e)};function Fe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Y(e),n=0;n<r.length;n++)r[n]!=="default"&&Z(t,e,r[n]);return ct(t,e),t}function Ge(e){return e&&e.__esModule?e:{default:e}}function Ue(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function je(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r}function Ve(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Xe(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,a;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(a=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");a&&(n=function(){try{a.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var mt=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function ke(e){function t(i){e.error=e.hasError?new mt(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var r,n=0;function a(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(a);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(a,function(o){return t(o),a()})}else n|=1}catch(o){t(o)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a()}function Ze(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,a,i,o){return n?t?".jsx":".js":a&&(!i||!o)?r:a+i+"."+o.toLowerCase()+"js"}):e}const pt={__extends:A,__assign:c,__rest:ae,__decorate:Te,__param:Se,__esDecorate:_e,__runInitializers:He,__propKey:Ie,__setFunctionName:Ae,__metadata:Ne,__awaiter:Pe,__generator:Be,__createBinding:Z,__exportStar:we,__values:k,__read:ie,__spread:Oe,__spreadArrays:Re,__spreadArray:S,__await:C,__asyncGenerator:Le,__asyncDelegator:Me,__asyncValues:Ce,__makeTemplateObject:De,__importStar:Fe,__importDefault:Ge,__classPrivateFieldGet:Ue,__classPrivateFieldSet:je,__classPrivateFieldIn:Ve,__addDisposableResource:Xe,__disposeResources:ke,__rewriteRelativeImportExtension:Ze},Rr=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Xe,get __assign(){return c},__asyncDelegator:Me,__asyncGenerator:Le,__asyncValues:Ce,__await:C,__awaiter:Pe,__classPrivateFieldGet:Ue,__classPrivateFieldIn:Ve,__classPrivateFieldSet:je,__createBinding:Z,__decorate:Te,__disposeResources:ke,__esDecorate:_e,__exportStar:we,__extends:A,__generator:Be,__importDefault:Ge,__importStar:Fe,__makeTemplateObject:De,__metadata:Ne,__param:Se,__propKey:Ie,__read:ie,__rest:ae,__rewriteRelativeImportExtension:Ze,__runInitializers:He,__setFunctionName:Ae,__spread:Oe,__spreadArray:S,__spreadArrays:Re,__values:k,default:pt},Symbol.toStringTag,{value:"Module"}));function H(e,t){var r=t&&t.cache?t.cache:Et,n=t&&t.serializer?t.serializer:yt,a=t&&t.strategy?t.strategy:bt;return a(e,{cache:r,serializer:n})}function gt(e){return e==null||typeof e=="number"||typeof e=="boolean"}function vt(e,t,r,n){var a=gt(n)?n:r(n),i=t.get(a);return typeof i>"u"&&(i=e.call(this,n),t.set(a,i)),i}function We(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return typeof i>"u"&&(i=e.apply(this,n),t.set(a,i)),i}function ze(e,t,r,n,a){return r.bind(t,e,n,a)}function bt(e,t){var r=e.length===1?vt:We;return ze(e,this,r,t.cache.create(),t.serializer)}function dt(e,t){return ze(e,this,We,t.cache.create(),t.serializer)}var yt=function(){return JSON.stringify(arguments)};function oe(){this.cache=Object.create(null)}oe.prototype.get=function(e){return this.cache[e]};oe.prototype.set=function(e,t){this.cache[e]=t};var Et={create:function(){return new oe}},I={variadic:dt};function xt(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}H(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,S([void 0],t,!1)))},{strategy:I.variadic});H(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,S([void 0],t,!1)))},{strategy:I.variadic});H(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,S([void 0],t,!1)))},{strategy:I.variadic});H(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.Locale).bind.apply(e,S([void 0],t,!1)))},{strategy:I.variadic});H(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.ListFormat).bind.apply(e,S([void 0],t,!1)))},{strategy:I.variadic});var g;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(g||(g={}));var x;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(x||(x={}));var D;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(D||(D={}));function he(e){return e.type===x.literal}function Tt(e){return e.type===x.argument}function Je(e){return e.type===x.number}function qe(e){return e.type===x.date}function Qe(e){return e.type===x.time}function Ye(e){return e.type===x.select}function $e(e){return e.type===x.plural}function St(e){return e.type===x.pound}function Ke(e){return e.type===x.tag}function et(e){return!!(e&&typeof e=="object"&&e.type===D.number)}function $(e){return!!(e&&typeof e=="object"&&e.type===D.dateTime)}var tt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,_t=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Ht(e){var t={};return e.replace(_t,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var It=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function At(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(It).filter(function(m){return m.length>0}),r=[],n=0,a=t;n<a.length;n++){var i=a[n],o=i.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var s=o[0],h=o.slice(1),u=0,l=h;u<l.length;u++){var f=l[u];if(f.length===0)throw new Error("Invalid number skeleton")}r.push({stem:s,options:h})}return r}function Nt(e){return e.replace(/^(.*?)-/,"")}var le=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,rt=/^(@+)?(\+|#+)?[rs]?$/g,Pt=/(\*)(0+)|(#+)(0+)|(0+)/g,nt=/^(0+)$/;function fe(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(rt,function(r,n,a){return typeof a!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):a==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof a=="string"?a.length:0)),""}),t}function at(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Bt(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!nt.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ce(e){var t={},r=at(e);return r||t}function wt(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Nt(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=c(c(c({},t),{notation:"scientific"}),a.options.reduce(function(h,u){return c(c({},h),ce(u))},{}));continue;case"engineering":t=c(c(c({},t),{notation:"engineering"}),a.options.reduce(function(h,u){return c(c({},h),ce(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Pt,function(h,u,l,f,m,p){if(u)t.minimumIntegerDigits=l.length;else{if(f&&m)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(nt.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(le.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(le,function(h,u,l,f,m,p){return l==="*"?t.minimumFractionDigits=u.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:m&&p?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+p.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var i=a.options[0];i==="w"?t=c(c({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=c(c({},t),fe(i)));continue}if(rt.test(a.stem)){t=c(c({},t),fe(a.stem));continue}var o=at(a.stem);o&&(t=c(c({},t),o));var s=Bt(a.stem);s&&(t=c(c({},t),s))}return t}var j={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Ot(e,t){for(var r="",n=0;n<e.length;n++){var a=e.charAt(n);if(a==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===a;)i++,n++;var o=1+(i&1),s=i<2?1:3+(i>>1),h="a",u=Rt(t);for((u=="H"||u=="k")&&(s=0);s-- >0;)r+=h;for(;o-- >0;)r=u+r}else a==="J"?r+="H":r+=a}return r}function Rt(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var a=j[n||""]||j[r||""]||j["".concat(r,"-001")]||j["001"];return a[0]}var z,Lt=new RegExp("^".concat(tt.source,"*")),Mt=new RegExp("".concat(tt.source,"*$"));function v(e,t){return{start:e,end:t}}var Ct=!!String.prototype.startsWith&&"_a".startsWith("a",1),Dt=!!String.fromCodePoint,Ft=!!Object.fromEntries,Gt=!!String.prototype.codePointAt,Ut=!!String.prototype.trimStart,jt=!!String.prototype.trimEnd,Vt=!!Number.isSafeInteger,Xt=Vt?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},K=!0;try{var kt=ot("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");K=((z=kt.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{K=!1}var me=Ct?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},ee=Dt?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",a=t.length,i=0,o;a>i;){if(o=t[i++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},pe=Ft?Object.fromEntries:function(t){for(var r={},n=0,a=t;n<a.length;n++){var i=a[n],o=i[0],s=i[1];r[o]=s}return r},it=Gt?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var a=t.charCodeAt(r),i;return a<55296||a>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},Zt=Ut?function(t){return t.trimStart()}:function(t){return t.replace(Lt,"")},Wt=jt?function(t){return t.trimEnd()}:function(t){return t.replace(Mt,"")};function ot(e,t){return new RegExp(e,t)}var te;if(K){var ge=ot("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");te=function(t,r){var n;ge.lastIndex=r;var a=ge.exec(t);return(n=a[1])!==null&&n!==void 0?n:""}}else te=function(t,r){for(var n=[];;){var a=it(t,r);if(a===void 0||st(a)||Qt(a))break;n.push(a),r+=a>=65536?2:1}return ee.apply(void 0,n)};var zt=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var o=this.parseArgument(t,n);if(o.err)return o;a.push(o.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),a.push({type:x.pound,location:v(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(g.UNMATCHED_CLOSING_TAG,v(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&re(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;a.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;a.push(o.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:"<".concat(a,"/>"),location:v(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!re(this.char()))return this.error(g.INVALID_TAG,v(s,this.clonePosition()));var h=this.clonePosition(),u=this.parseTagName();return a!==u?this.error(g.UNMATCHED_CLOSING_TAG,v(h,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:x.tag,value:a,children:o,location:v(n,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,v(s,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,v(n,this.clonePosition()))}else return this.error(g.INVALID_TAG,v(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&qt(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),a="";;){var i=this.tryParseQuote(r);if(i){a+=i;continue}var o=this.tryParseUnquoted(t,r);if(o){a+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){a+=s;continue}break}var h=v(n,this.clonePosition());return{val:{type:x.literal,value:a,location:h},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Jt(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return ee.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),ee(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,v(n,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(g.MALFORMED_ARGUMENT,v(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:a,location:v(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition())):this.parseArgumentOptions(t,r,a,n);default:return this.error(g.MALFORMED_ARGUMENT,v(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=te(this.message,r),a=r+n.length;this.bumpTo(a);var i=this.clonePosition(),o=v(t,i);return{value:n,location:o}},e.prototype.parseArgumentOptions=function(t,r,n,a){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(s){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,v(o,h));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var m=Wt(f.val);if(m.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,v(this.clonePosition(),this.clonePosition()));var p=v(l,this.clonePosition());u={style:m,styleLocation:p}}var d=this.tryParseArgumentClose(a);if(d.err)return d;var b=v(a,this.clonePosition());if(u&&me(u==null?void 0:u.style,"::",0)){var E=Zt(u.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(E,u.styleLocation);return f.err?f:{val:{type:x.number,value:n,location:b,style:f.val},err:null}}else{if(E.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,b);var y=E;this.locale&&(y=Ot(E,this.locale));var m={type:D.dateTime,pattern:y,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Ht(y):{}},N=s==="date"?x.date:x.time;return{val:{type:N,value:n,location:b,style:m},err:null}}}return{val:{type:s==="number"?x.number:s==="date"?x.date:x.time,value:n,location:b,style:(i=u==null?void 0:u.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,v(T,c({},T)));this.bumpSpace();var F=this.parseIdentifierIfPossible(),O=0;if(s!=="select"&&F.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),F=this.parseIdentifierIfPossible(),O=f.val}var U=this.tryParsePluralOrSelectOptions(t,s,r,F);if(U.err)return U;var d=this.tryParseArgumentClose(a);if(d.err)return d;var ue=v(a,this.clonePosition());return s==="select"?{val:{type:x.select,value:n,options:pe(U.val),location:ue},err:null}:{val:{type:x.plural,value:n,options:pe(U.val),offset:O,pluralType:s==="plural"?"cardinal":"ordinal",location:ue},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,v(o,h))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,v(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,v(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=At(t)}catch{return this.error(g.INVALID_NUMBER_SKELETON,r)}return{val:{type:D.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?wt(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,a){for(var i,o=!1,s=[],h=new Set,u=a.value,l=a.location;;){if(u.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;l=v(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(h.has(u))return this.error(r==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);u==="other"&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,v(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,r,n);if(d.err)return d;var b=this.tryParseArgumentClose(p);if(b.err)return b;s.push([u,{value:d.val,location:v(p,this.clonePosition())}]),h.add(u),this.bumpSpace(),i=this.parseIdentifierIfPossible(),u=i.value,l=i.location}return s.length===0?this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,v(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(g.MISSING_OTHER_CLAUSE,v(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,o=o*10+(s-48),this.bump();else break}var h=v(a,this.clonePosition());return i?(o*=n,Xt(o)?{val:o,err:null}:this.error(r,h)):this.error(t,h)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=it(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(me(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&st(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e})();function re(e){return e>=97&&e<=122||e>=65&&e<=90}function Jt(e){return re(e)||e===47}function qt(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function st(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Qt(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ne(e){e.forEach(function(t){if(delete t.location,Ye(t)||$e(t))for(var r in t.options)delete t.options[r].location,ne(t.options[r].value);else Je(t)&&et(t.style)||(qe(t)||Qe(t))&&$(t.style)?delete t.style.location:Ke(t)&&ne(t.children)})}function Yt(e,t){t===void 0&&(t={}),t=c({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new zt(e,t).parse();if(r.err){var n=SyntaxError(g[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||ne(r.val),r.val}var B;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(B||(B={}));var w=(function(e){A(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ve=(function(e){A(t,e);function t(r,n,a,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(a).join('", "'),'"'),B.INVALID_VALUE,i)||this}return t})(w),$t=(function(e){A(t,e);function t(r,n,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),B.INVALID_VALUE,a)||this}return t})(w),Kt=(function(e){A(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),B.MISSING_VALUE,n)||this}return t})(w),_;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(_||(_={}));function er(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==_.literal||r.type!==_.literal?t.push(r):n.value+=r.value,t},[])}function tr(e){return typeof e=="function"}function X(e,t,r,n,a,i,o){if(e.length===1&&he(e[0]))return[{type:_.literal,value:e[0].value}];for(var s=[],h=0,u=e;h<u.length;h++){var l=u[h];if(he(l)){s.push({type:_.literal,value:l.value});continue}if(St(l)){typeof i=="number"&&s.push({type:_.literal,value:r.getNumberFormat(t).format(i)});continue}var f=l.value;if(!(a&&f in a))throw new Kt(f,o);var m=a[f];if(Tt(l)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),s.push({type:typeof m=="string"?_.literal:_.object,value:m});continue}if(qe(l)){var p=typeof l.style=="string"?n.date[l.style]:$(l.style)?l.style.parsedOptions:void 0;s.push({type:_.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(Qe(l)){var p=typeof l.style=="string"?n.time[l.style]:$(l.style)?l.style.parsedOptions:n.time.medium;s.push({type:_.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(Je(l)){var p=typeof l.style=="string"?n.number[l.style]:et(l.style)?l.style.parsedOptions:void 0;p&&p.scale&&(m=m*(p.scale||1)),s.push({type:_.literal,value:r.getNumberFormat(t,p).format(m)});continue}if(Ke(l)){var d=l.children,b=l.value,E=a[b];if(!tr(E))throw new $t(b,"function",o);var y=X(d,t,r,n,a,i),N=E(y.map(function(O){return O.value}));Array.isArray(N)||(N=[N]),s.push.apply(s,N.map(function(O){return{type:typeof O=="string"?_.literal:_.object,value:O}}))}if(Ye(l)){var T=l.options[m]||l.options.other;if(!T)throw new ve(l.value,m,Object.keys(l.options),o);s.push.apply(s,X(T.value,t,r,n,a));continue}if($e(l)){var T=l.options["=".concat(m)];if(!T){if(!Intl.PluralRules)throw new w(`Intl.PluralRules is not available in this environment.
2
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3
+ `,B.MISSING_INTL_API,o);var F=r.getPluralRules(t,{type:l.pluralType}).select(m-(l.offset||0));T=l.options[F]||l.options.other}if(!T)throw new ve(l.value,m,Object.keys(l.options),o);s.push.apply(s,X(T.value,t,r,n,a,m-(l.offset||0)));continue}}return er(s)}function rr(e,t){return t?c(c(c({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=c(c({},e[n]),t[n]||{}),r},{})):e}function nr(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=rr(e[n],t[n]),r},c({},e)):e}function J(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function ar(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:H(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,S([void 0],r,!1)))},{cache:J(e.number),strategy:I.variadic}),getDateTimeFormat:H(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,S([void 0],r,!1)))},{cache:J(e.dateTime),strategy:I.variadic}),getPluralRules:H(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,S([void 0],r,!1)))},{cache:J(e.pluralRules),strategy:I.variadic})}}var ut=(function(){function e(t,r,n,a){r===void 0&&(r=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(h){var u=i.formatToParts(h);if(u.length===1)return u[0].value;var l=u.reduce(function(f,m){return!f.length||m.type!==_.literal||typeof f[f.length-1]!="string"?f.push(m.value):f[f.length-1]+=m.value,f},[]);return l.length<=1?l[0]||"":l},this.formatToParts=function(h){return X(i.ast,i.locales,i.formatters,i.formats,h,void 0,i.message)},this.resolvedOptions=function(){var h;return{locale:((h=i.resolvedLocale)===null||h===void 0?void 0:h.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=a||{};o.formatters;var s=ae(o,["formatters"]);this.ast=e.__parse(t,c(c({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=nr(e.formats,n),this.formatters=a&&a.formatters||ar(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Yt,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),L;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(L||(L={}));var G=(function(e){A(t,e);function t(r,n,a){var i=this,o=a?a instanceof Error?a:new Error(String(a)):void 0;return i=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
4
+ `).concat(o?`
5
+ `.concat(o.message,`
6
+ `).concat(o.stack):""))||this,i.code=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t})(Error),ir=(function(e){A(t,e);function t(r,n){return e.call(this,L.UNSUPPORTED_FORMATTER,r,n)||this}return t})(G),or=(function(e){A(t,e);function t(r,n){return e.call(this,L.INVALID_CONFIG,r,n)||this}return t})(G),be=(function(e){A(t,e);function t(r,n){return e.call(this,L.MISSING_DATA,r,n)||this}return t})(G),P=(function(e){A(t,e);function t(r,n,a){var i=e.call(this,L.FORMAT_ERROR,"".concat(r,`
7
+ Locale: `).concat(n,`
8
+ `),a)||this;return i.locale=n,i}return t})(G),q=(function(e){A(t,e);function t(r,n,a,i){var o=e.call(this,"".concat(r,`
9
+ MessageID: `).concat(a==null?void 0:a.id,`
10
+ Default Message: `).concat(a==null?void 0:a.defaultMessage,`
11
+ Description: `).concat(a==null?void 0:a.description,`
12
+ `),n,i)||this;return o.descriptor=a,o.locale=n,o}return t})(P),sr=(function(e){A(t,e);function t(r,n){var a=e.call(this,L.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(i){var o;return(o=i.value)!==null&&o!==void 0?o:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return a.descriptor=r,a}return t})(G);function M(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,a){return a in e?n[a]=e[a]:a in r&&(n[a]=r[a]),n},{})}var ur=function(e){},hr=function(e){},lr={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:ur,onWarn:hr};function fr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function R(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function cr(e){e===void 0&&(e=fr());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,a=H(function(){for(var s,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((s=Intl.DateTimeFormat).bind.apply(s,S([void 0],h,!1)))},{cache:R(e.dateTime),strategy:I.variadic}),i=H(function(){for(var s,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((s=Intl.NumberFormat).bind.apply(s,S([void 0],h,!1)))},{cache:R(e.number),strategy:I.variadic}),o=H(function(){for(var s,h=[],u=0;u<arguments.length;u++)h[u]=arguments[u];return new((s=Intl.PluralRules).bind.apply(s,S([void 0],h,!1)))},{cache:R(e.pluralRules),strategy:I.variadic});return{getDateTimeFormat:a,getNumberFormat:i,getMessageFormat:H(function(s,h,u,l){return new ut(s,h,u,c({formatters:{getNumberFormat:i,getDateTimeFormat:a,getPluralRules:o}},l||{}))},{cache:R(e.message),strategy:I.variadic}),getRelativeTimeFormat:H(function(){for(var s=[],h=0;h<arguments.length;h++)s[h]=arguments[h];return new(t.bind.apply(t,S([void 0],s,!1)))},{cache:R(e.relativeTime),strategy:I.variadic}),getPluralRules:o,getListFormat:H(function(){for(var s=[],h=0;h<arguments.length;h++)s[h]=arguments[h];return new(r.bind.apply(r,S([void 0],s,!1)))},{cache:R(e.list),strategy:I.variadic}),getDisplayNames:H(function(){for(var s=[],h=0;h<arguments.length;h++)s[h]=arguments[h];return new(n.bind.apply(n,S([void 0],s,!1)))},{cache:R(e.displayNames),strategy:I.variadic})}}function se(e,t,r,n){var a=e&&e[t],i;if(a&&(i=a[r]),i)return i;n(new ir("No ".concat(t," format named: ").concat(r)))}function V(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=c({timeZone:t},e[n]),r},{})}function de(e,t){var r=Object.keys(c(c({},e),t));return r.reduce(function(n,a){return n[a]=c(c({},e[a]||{}),t[a]||{}),n},{})}function ye(e,t){if(!t)return e;var r=ut.formats;return c(c(c({},r),e),{date:de(V(r.date,t),V(e.date||{},t)),time:de(V(r.time,t),V(e.time||{},t))})}var Ee=function(e,t,r,n,a){var i=e.locale,o=e.formats,s=e.messages,h=e.defaultLocale,u=e.defaultFormats,l=e.fallbackOnEmptyString,f=e.onError,m=e.timeZone,p=e.defaultRichTextElements;r===void 0&&(r={id:""});var d=r.id,b=r.defaultMessage;xt(!!d,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var E=String(d),y=s&&Object.prototype.hasOwnProperty.call(s,E)&&s[E];if(Array.isArray(y)&&y.length===1&&y[0].type===x.literal)return y[0].value;if(!n&&y&&typeof y=="string"&&!p)return y.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=c(c({},p),n||{}),o=ye(o,m),u=ye(u,m),!y){if(l===!1&&y==="")return y;if((!b||i&&i.toLowerCase()!==h.toLowerCase())&&f(new sr(r,i)),b)try{var N=t.getMessageFormat(b,h,u,a);return N.format(n)}catch(T){return f(new q('Error formatting default message for: "'.concat(E,'", rendering default message verbatim'),i,r,T)),typeof b=="string"?b:E}return E}try{var N=t.getMessageFormat(y,i,o,c({formatters:t},a||{}));return N.format(n)}catch(T){f(new q('Error formatting message: "'.concat(E,'", using ').concat(b?"default message":"id"," as fallback."),i,r,T))}if(b)try{var N=t.getMessageFormat(b,h,u,a);return N.format(n)}catch(T){f(new q('Error formatting the default message for: "'.concat(E,'", rendering message verbatim'),i,r,T))}return typeof y=="string"?y:typeof b=="string"?b:E},ht=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function W(e,t,r,n){var a=e.locale,i=e.formats,o=e.onError,s=e.timeZone;n===void 0&&(n={});var h=n.format,u=c(c({},s&&{timeZone:s}),h&&se(i,t,h,o)),l=M(n,ht,u);return t==="time"&&!l.hour&&!l.minute&&!l.second&&!l.timeStyle&&!l.dateStyle&&(l=c(c({},l),{hour:"numeric",minute:"numeric"})),r(a,l)}function mr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r[0],i=r[1],o=i===void 0?{}:i,s=typeof a=="string"?new Date(a||0):a;try{return W(e,"date",t,o).format(s)}catch(h){e.onError(new P("Error formatting date.",e.locale,h))}return String(s)}function pr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r[0],i=r[1],o=i===void 0?{}:i,s=typeof a=="string"?new Date(a||0):a;try{return W(e,"time",t,o).format(s)}catch(h){e.onError(new P("Error formatting time.",e.locale,h))}return String(s)}function gr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r[0],i=r[1],o=r[2],s=o===void 0?{}:o,h=e.timeZone,u=e.locale,l=e.onError,f=M(s,ht,h?{timeZone:h}:{});try{return t(u,f).formatRange(a,i)}catch(m){l(new P("Error formatting date time range.",e.locale,m))}return String(a)}function vr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r[0],i=r[1],o=i===void 0?{}:i,s=typeof a=="string"?new Date(a||0):a;try{return W(e,"date",t,o).formatToParts(s)}catch(h){e.onError(new P("Error formatting date.",e.locale,h))}return[]}function br(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var a=r[0],i=r[1],o=i===void 0?{}:i,s=typeof a=="string"?new Date(a||0):a;try{return W(e,"time",t,o).formatToParts(s)}catch(h){e.onError(new P("Error formatting time.",e.locale,h))}return[]}var dr=["style","type","fallback","languageDisplay"];function yr(e,t,r,n){var a=e.locale,i=e.onError,o=Intl.DisplayNames;o||i(new w(`Intl.DisplayNames is not available in this environment.
13
+ Try polyfilling it using "@formatjs/intl-displaynames"
14
+ `,B.MISSING_INTL_API));var s=M(n,dr);try{return t(a,s).of(r)}catch(h){i(new P("Error formatting display name.",a,h))}}var Er=["type","style"],xe=Date.now();function xr(e){return"".concat(xe,"_").concat(e,"_").concat(xe)}function Tr(e,t,r,n){n===void 0&&(n={});var a=lt(e,t,r,n).reduce(function(i,o){var s=o.value;return typeof s!="string"?i.push(s):typeof i[i.length-1]=="string"?i[i.length-1]+=s:i.push(s),i},[]);return a.length===1?a[0]:a.length===0?"":a}function lt(e,t,r,n){var a=e.locale,i=e.onError;n===void 0&&(n={});var o=Intl.ListFormat;o||i(new w(`Intl.ListFormat is not available in this environment.
15
+ Try polyfilling it using "@formatjs/intl-listformat"
16
+ `,B.MISSING_INTL_API));var s=M(n,Er);try{var h={},u=r.map(function(l,f){if(typeof l=="object"){var m=xr(f);return h[m]=l,m}return String(l)});return t(a,s).formatToParts(u).map(function(l){return l.type==="literal"?l:c(c({},l),{value:h[l.value]||l.value})})}catch(l){i(new P("Error formatting list.",a,l))}return r}var Sr=["type"];function _r(e,t,r,n){var a=e.locale,i=e.onError;n===void 0&&(n={}),Intl.PluralRules||i(new w(`Intl.PluralRules is not available in this environment.
17
+ Try polyfilling it using "@formatjs/intl-pluralrules"
18
+ `,B.MISSING_INTL_API));var o=M(n,Sr);try{return t(a,o).select(r)}catch(s){i(new P("Error formatting plural.",a,s))}return"other"}var Hr=["numeric","style"];function Ir(e,t,r){var n=e.locale,a=e.formats,i=e.onError;r===void 0&&(r={});var o=r.format,s=!!o&&se(a,"relative",o,i)||{},h=M(r,Hr,s);return t(n,h)}function Ar(e,t,r,n,a){a===void 0&&(a={}),n||(n="second");var i=Intl.RelativeTimeFormat;i||e.onError(new w(`Intl.RelativeTimeFormat is not available in this environment.
19
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
20
+ `,B.MISSING_INTL_API));try{return Ir(e,t,a).format(r,n)}catch(o){e.onError(new P("Error formatting relative time.",e.locale,o))}return String(r)}var Nr=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function ft(e,t,r){var n=e.locale,a=e.formats,i=e.onError;r===void 0&&(r={});var o=r.format,s=o&&se(a,"number",o,i)||{},h=M(r,Nr,s);return t(n,h)}function Pr(e,t,r,n){n===void 0&&(n={});try{return ft(e,t,n).format(r)}catch(a){e.onError(new P("Error formatting number.",e.locale,a))}return String(r)}function Br(e,t,r,n){n===void 0&&(n={});try{return ft(e,t,n).formatToParts(r)}catch(a){e.onError(new P("Error formatting number.",e.locale,a))}return[]}function wr(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function Or(e){e.onWarn&&e.defaultRichTextElements&&wr(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
21
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
22
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Lr(e,t){var r=cr(t),n=c(c({},lr),e),a=n.locale,i=n.defaultLocale,o=n.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&o?o(new be('Missing locale data for locale: "'.concat(a,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&o&&o(new be('Missing locale data for locale: "'.concat(a,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(o&&o(new or('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),Or(n),c(c({},n),{formatters:r,formatNumber:Pr.bind(null,n,r.getNumberFormat),formatNumberToParts:Br.bind(null,n,r.getNumberFormat),formatRelativeTime:Ar.bind(null,n,r.getRelativeTimeFormat),formatDate:mr.bind(null,n,r.getDateTimeFormat),formatDateToParts:vr.bind(null,n,r.getDateTimeFormat),formatTime:pr.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:gr.bind(null,n,r.getDateTimeFormat),formatTimeToParts:br.bind(null,n,r.getDateTimeFormat),formatPlural:_r.bind(null,n,r.getPluralRules),formatMessage:Ee.bind(null,n,r),$t:Ee.bind(null,n,r),formatList:Tr.bind(null,n,r.getListFormat),formatListToParts:lt.bind(null,n,r.getListFormat),formatDisplayName:yr.bind(null,n,r.getDisplayNames)})}export{lr as D,c as _,ae as a,tr as b,Lr as c,S as d,fr as e,Ee as f,xt as i,Rr as t};
@@ -1 +1 @@
1
- import{av as f}from"./NetworkUtil-Yv-DdqEo.js";import{a$ as l,aN as p,bn as w,o as y,an as A,aH as g,h as m,g as F,ax as E,am as N,m as h,n as P,O as R,bo as I}from"./sendRawTransaction-rRmixG-d.js";function x(n){const{abi:r,data:e}=n,a=l(e,0,4),t=r.find(o=>o.type==="function"&&a===p(w(o)));if(!t)throw new y(a,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(e,4)):void 0}}const u="/docs/contract/encodeErrorResult";function b(n){const{abi:r,errorName:e,args:a}=n;let t=r[0];if(e){const c=g({abi:r,args:a,name:e});if(!c)throw new m(e,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=p(o);let i="0x";if(a&&a.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,a)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function H(n){const{abi:r,functionName:e,result:a}=n;let t=r[0];if(e){const s=g({abi:r,name:e});if(!s)throw new h(e,{docsPath:d});t=s}if(t.type!=="function")throw new h(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[a];if(Array.isArray(a))return a;throw new R(a)})();return E(t.outputs,o)}const q="x-batch-gateway:true";async function v(n){const{data:r,ccipRequest:e}=n,{args:[a]}=x({abi:f,data:r}),t=[],o=[];return await Promise.all(a.map(async(s,i)=>{try{o[i]=s.urls.includes(q)?await v({data:s.data,ccipRequest:e}):await e(s),t[i]=!1}catch(c){t[i]=!0,o[i]=G(c)}})),H({abi:f,functionName:"query",result:[t,o]})}function G(n){return n.name==="HttpRequestError"&&n.status?b({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):b({abi:[I],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,v as b,x as d,b as e,q as l};
1
+ import{av as f}from"./NetworkUtil-CLSFaUe_.js";import{a$ as l,aN as p,bn as w,o as y,an as A,aH as g,h as m,g as F,ax as E,am as N,m as h,n as P,O as R,bo as I}from"./sendRawTransaction-B5C16ilB.js";function x(n){const{abi:r,data:e}=n,a=l(e,0,4),t=r.find(o=>o.type==="function"&&a===p(w(o)));if(!t)throw new y(a,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(e,4)):void 0}}const u="/docs/contract/encodeErrorResult";function b(n){const{abi:r,errorName:e,args:a}=n;let t=r[0];if(e){const c=g({abi:r,args:a,name:e});if(!c)throw new m(e,{docsPath:u});t=c}if(t.type!=="error")throw new m(void 0,{docsPath:u});const o=w(t),s=p(o);let i="0x";if(a&&a.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=E(t.inputs,a)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function H(n){const{abi:r,functionName:e,result:a}=n;let t=r[0];if(e){const s=g({abi:r,name:e});if(!s)throw new h(e,{docsPath:d});t=s}if(t.type!=="function")throw new h(void 0,{docsPath:d});if(!t.outputs)throw new P(t.name,{docsPath:d});const o=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[a];if(Array.isArray(a))return a;throw new R(a)})();return E(t.outputs,o)}const q="x-batch-gateway:true";async function v(n){const{data:r,ccipRequest:e}=n,{args:[a]}=x({abi:f,data:r}),t=[],o=[];return await Promise.all(a.map(async(s,i)=>{try{o[i]=s.urls.includes(q)?await v({data:s.data,ccipRequest:e}):await e(s),t[i]=!1}catch(c){t[i]=!0,o[i]=G(c)}})),H({abi:f,functionName:"query",result:[t,o]})}function G(n){return n.name==="HttpRequestError"&&n.status?b({abi:f,errorName:"HttpError",args:[n.status,n.shortMessage]}):b({abi:[I],errorName:"Error",args:["shortMessage"in n?n.shortMessage:n.message]})}export{H as a,v as b,x as d,b as e,q as l};
@@ -1 +1 @@
1
- import{h as u}from"./index-CYWpV70P.js";import{g as f,C as h}from"./index-Ct5KJb97.js";import{J as S,C as d}from"./ethers-DArfy-QF.js";const m=10n**17n,p=9e4;async function N(n=u.chainId){const r=f(h.OffChainMarketplaceV2,n),t=new S(u.rpcUrl),o=await new d(r.address,["function manaUsdAggregator() view returns (address)"],t).manaUsdAggregator(),a=new d(o,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],t),l=await a.decimals(),i=await a.latestRoundData(),c=BigInt(i[1].toString());if(c<=0n)throw new Error("mana rate unavailable");if(BigInt(i[4].toString())<BigInt(i[0].toString()))throw new Error("mana rate incomplete");const s=Number(i[3].toString()),w=Math.floor(Date.now()/1e3)-s;if(!Number.isFinite(s)||s<=0||w>p)throw new Error("mana rate stale");return{rate:c,decimals:Number(l)}}function g(n,{rate:r,decimals:t}){return BigInt(n)*r/10n**BigInt(t)}function W(n,r){let t;try{t=g(n,r)}catch{return null}const e=t/m,o=t%m>0n?e+1n:e,a=Number(o);return a<1?1:a}function U(n,r){let t;try{t=g(n,r)}catch{return 0}const e=10n**16n,o=t/e,a=t%e>0n?o+1n:o;return Number(a)}export{U as a,W as m,N as r};
1
+ import{h as u}from"./index-CNSWvtL0.js";import{g as f,C as h}from"./index-HN6Rk25C.js";import{J as S,C as d}from"./ethers-w2AslR0v.js";const m=10n**17n,p=9e4;async function N(n=u.chainId){const r=f(h.OffChainMarketplaceV2,n),t=new S(u.rpcUrl),o=await new d(r.address,["function manaUsdAggregator() view returns (address)"],t).manaUsdAggregator(),a=new d(o,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],t),l=await a.decimals(),i=await a.latestRoundData(),c=BigInt(i[1].toString());if(c<=0n)throw new Error("mana rate unavailable");if(BigInt(i[4].toString())<BigInt(i[0].toString()))throw new Error("mana rate incomplete");const s=Number(i[3].toString()),w=Math.floor(Date.now()/1e3)-s;if(!Number.isFinite(s)||s<=0||w>p)throw new Error("mana rate stale");return{rate:c,decimals:Number(l)}}function g(n,{rate:r,decimals:t}){return BigInt(n)*r/10n**BigInt(t)}function W(n,r){let t;try{t=g(n,r)}catch{return null}const e=t/m,o=t%m>0n?e+1n:e,a=Number(o);return a<1?1:a}function U(n,r){let t;try{t=g(n,r)}catch{return 0}const e=10n**16n,o=t/e,a=t%e>0n?o+1n:o;return Number(a)}export{U as a,W as m,N as r};
@@ -1 +1 @@
1
- import{g as e}from"./ethers-DArfy-QF.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const o=t(),r=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:o},Symbol.toStringTag,{value:"Module"}));export{r as n};
1
+ import{g as e}from"./sentry-BPJvc5GU.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const o=t(),r=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:o},Symbol.toStringTag,{value:"Module"}));export{r as n};
@@ -0,0 +1 @@
1
+ import{aw as C}from"./NetworkUtil-CLSFaUe_.js";import{a as z,b as M,c as E,d as q,e as B,f as D,g as L,h as P,i as A,j as U,k as V,l as I,m as O,n as R,o as G,p as H,q as Z,r as K,s as X,t as Y,u as J,v as F,w as W,x as Q,y as _,z as $,A as aa,B as sa,C as ea,D as ta,E as na,F as ia,G as oa,H as ra,I as la,J as ca,K as ha,L as pa,M as da,N as ma,O as Ta,P as ua,Q as ba,R as ka,S as fa,T as ga,U as ya,V as ja,W as va,X as Sa,Y as xa,Z as wa,_ as Ca,$ as Na,a0 as za,a1 as Ma,a2 as Ea,a3 as qa,a4 as Ba,a5 as Da,a6 as La,a7 as Pa,a8 as Aa,a9 as Ua,aa as Va,ab as Ia,ac as Oa,ad as Ra,ae as Ga,af as Ha,ag as Za,ah as Ka,ai as Xa,aj as Ya,ak as Ja,al as Fa,am as Wa,an as Qa,ao as _a,ap as $a,aq as as,ar as ss,as as es,at as ts,au as ns,av as is,aw as os,ax as rs,ay as ls,az as cs,aA as hs,aB as ps,aC as ds,aD as ms,aE as Ts,aF as us,aG as bs,aH as ks,aI as fs,aJ as gs,aK as ys,aL as js,aM as vs,aN as Ss,aO as xs,aP as ws,aQ as Cs,aR as Ns,aS as zs,aT as Ms,aU as Es,aV as qs,aW as Bs,aX as Ds,aY as Ls,aZ as Ps,a_ as As,a$ as Us,b0 as Vs,b1 as Is,b2 as Os,b3 as Rs,b4 as Gs,b5 as Hs,b6 as Zs,b7 as Ks,b8 as Xs,b9 as Ys,ba as Js,bb as Fs,bc as Ws,bd as Qs,be as _s,bf as $s,bg as ae,bh as se,bi as ee,bj as te,bk as ne,bl as ie,bm as oe,bn as re,bo as le,bp as ce,bq as he,br as pe,bs as de,bt as me,bu as Te,bv as ue,bw as be,bx as ke,by as fe,bz as ge,bA as ye,bB as je,bC as ve,bD as Se,bE as xe,bF as we,bG as Ce,bH as Ne,bI as ze,bJ as Me,bK as Ee,bL as qe,bM as Be,bN as De,bO as Le,bP as Pe,bQ as Ae,bR as Ue,bS as Ve,bT as Ie,bU as Oe,bV as Re,bW as Ge,bX as He,bY as Ze,bZ as Ke,b_ as Xe,b$ as Ye,c0 as Je,c1 as Fe,c2 as We,c3 as Qe,c4 as _e,c5 as $e,c6 as at,c7 as st,c8 as et,c9 as tt,ca as nt,cb as it,cc as ot,cd as rt,ce as lt,cf as ct,cg as ht,ch as pt,ci as dt,cj as mt,ck as Tt,cl as ut,cm as bt,cn as kt,co as ft,cp as gt,cq as yt,cr as jt,cs as vt,ct as St,cu as xt,cv as wt,cw as Ct,cx as Nt,cy as zt,cz as Mt,cA as Et,cB as qt,cC as Bt,cD as Dt,cE as Lt,cF as Pt,cG as At,cH as Ut,cI as Vt,cJ as It,cK as Ot,cL as Rt,cM as Gt,cN as Ht,cO as Zt,cP as Kt,cQ as Xt,cR as Yt,cS as Jt,cT as Ft,cU as Wt,cV as Qt,cW as _t,cX as $t,cY as an,cZ as sn,c_ as en,c$ as tn,d0 as nn,d1 as on,d2 as rn,d3 as ln,d4 as cn,d5 as hn,d6 as pn,d7 as dn,d8 as mn,d9 as Tn,da as un,db as bn,dc as kn,dd as fn,de as gn,df as yn,dg as jn,dh as vn,di as Sn,dj as xn,dk as wn,dl as Cn,dm as Nn,dn as zn,dp as Mn,dq as En,dr as qn,ds as Bn,dt as Dn,du as Ln,dv as Pn,dw as An,dx as Un,dy as Vn,dy as In,dz as On,dA as Rn,dB as Gn,dC as Hn,dD as Zn,dE as Kn,dF as Xn,dG as Yn,dH as Jn,dI as Fn,dJ as Wn,dK as Qn,dL as _n,dM as $n,dN as ai,dO as si,dP as ei,dQ as ti,dR as ni,dS as ii,dT as oi,dU as ri,dV as li,dW as ci,dX as hi,dY as pi,dZ as di,d_ as mi,d$ as Ti,e0 as ui,e1 as bi,e2 as ki,e3 as fi,e4 as gi,e5 as yi,e6 as ji,e7 as vi,e8 as Si,e9 as xi,ea as wi,eb as Ci,ec as Ni,ed as zi,ee as Mi,ef as Ei,eg as qi,eh as Bi,ei as Di,ej as Li,ek as Pi,el as Ai,em as Ui,en as Vi,eo as Ii,ep as Oi,eq as Ri,er as Gi,es as Hi,et as Zi,eu as Ki,ev as Xi,ew as Yi,ex as Ji,ey as Fi,ez as Wi,eA as Qi,eB as _i,eC as $i,eD as ao,eE as so,eF as eo,eG as to,eH as no,eI as io,eJ as oo,eK as ro,eL as lo,eM as co,eN as ho,eO as po,eP as mo,eQ as To,eR as uo,eS as bo,eT as ko,eU as fo,eV as go,eW as yo,eX as jo,eY as vo,eZ as So,e_ as xo,e$ as wo,f0 as Co,f1 as No,f2 as zo,f3 as Mo,f4 as Eo,f5 as qo,f6 as Bo,f7 as Do,f8 as Lo,f9 as Po,fa as Ao,fb as Uo,fc as Vo,fd as Io,fe as Oo,ff as Ro,fg as Go,fh as Ho,fi as Zo,fj as Ko,fk as Xo,fl as Yo,fm as Jo,fn as Fo,fo as Wo,fp as Qo,fq as _o,fr as $o,fs as ar,ft as sr,fu as er,fv as tr,fw as nr,fx as ir,fy as or,fz as rr,fA as lr,fB as cr,fC as hr,fD as pr,fE as dr,fF as mr,fG as Tr,fH as ur,fI as br,fJ as kr,fK as fr,fL as gr,fM as yr,fN as jr,fO as vr,fP as Sr,fQ as xr,fR as wr,fS as Cr,fT as Nr,fU as zr,fV as Mr,fW as Er,fX as qr,fY as Br,fZ as Dr,f_ as Lr,f$ as Pr,g0 as Ar,g1 as Ur,g2 as Vr,g3 as Ir,g4 as Or,g5 as Rr,g6 as Gr,g7 as Hr,g8 as Zr,g9 as Kr,ga as Xr,gb as Yr,gc as Jr,gd as Fr,ge as Wr,gf as Qr,gg as _r,gh as $r,gi as al,gj as sl,gk as el,gl as tl,gm as nl,gn as il,go as ol,gp as rl,gq as ll,gr as cl,gs as hl,gt as pl,gu as dl,gv as ml,gw as Tl,gx as ul,gy as bl,gz as kl,gA as fl,gB as gl,gC as yl,gD as jl,gE as vl,gF as Sl,gG as xl,gH as wl,gI as Cl,gJ as Nl,gK as zl,gL as Ml,gM as El,gN as ql,gO as Bl,gP as Dl,gQ as Ll,gR as Pl,gS as Al,gT as Ul,gU as Vl,gV as Il,gW as Ol,gX as Rl,gY as Gl,gZ as Hl,g_ as Zl,g$ as Kl,h0 as Xl,h1 as Yl,h2 as Jl,h3 as Fl,h4 as Wl,h5 as Ql,h6 as _l,h7 as $l,h8 as ac,h9 as sc,ha as ec,hb as tc,hc as nc,hd as ic,he as oc,hf as rc,hg as lc,hh as cc,hi as hc,hj as pc,hk as dc,hl as mc,hm as Tc,hn as uc,ho as bc,hp as kc,hq as fc,hr as gc,hs as yc,ht as jc,hu as vc,hv as Sc,hw as xc,hx as wc,hy as Cc,hz as Nc,hA as zc,hB as Mc,hC as Ec,hD as qc,hE as Bc,hF as Dc,hG as Lc,hH as Pc,hI as Ac,hJ as Uc,hK as Vc,hL as Ic,hM as Oc,hN as Rc,hO as Gc,hP as Hc,hQ as Zc,hR as Kc,hS as Xc,hT as Yc,hU as Jc,hV as Fc,hW as Wc,hX as Qc,hY as _c,hZ as $c,h_ as ah,h$ as sh,i0 as eh,i1 as th,i2 as nh,i3 as ih,i4 as oh,i5 as rh,i6 as lh,i7 as ch,i8 as hh,i9 as ph,ia as dh,ib as mh,ib as Th,ic as uh,id as bh,ie as kh,ig as fh,ih as gh,ii as yh,ij as jh,ik as vh,il as Sh,im as xh,io as wh,ip as Ch,iq as Nh,ir as zh,is as Mh,it as Eh,iu as qh,iv as Bh,iw as Dh,ix as Lh,iy as Ph,iz as Ah,iA as Uh,iB as Vh,iC as Ih,iD as Oh,iE as Rh,iF as Gh,iG as Hh,iH as Zh,iI as Kh,iJ as Xh,iK as Yh,iL as Jh,iM as Fh,iN as Wh,iO as Qh,iM as _h,iP as $h,iP as ap,iQ as sp,iR as ep,iS as tp,iT as np,iU as ip,iV as op,iW as rp,iX as lp,iY as cp,iZ as hp,i_ as pp,i$ as dp,j0 as mp,j1 as Tp,j2 as up,j3 as bp,j4 as kp,j5 as fp,j6 as gp,j7 as yp,j8 as jp,j9 as vp,ja as Sp,jb as xp,jc as wp,jd as Cp,je as Np,jf as zp,jg as Mp,jh as Ep,ji as qp,jj as Bp,jk as Dp,jl as Lp,jm as Pp,jn as Ap,jo as Up,jp as Vp,jq as Ip,jr as Op,js as Rp,jt as Gp,ju as Hp,jv as Zp,jw as Kp,jx as Xp,jy as Yp,jz as Jp,jA as Fp,jB as Wp,jC as Qp,jD as _p,jC as $p,jE as ad,jF as sd,jG as ed,jH as td,jI as nd,jJ as id,jK as od,jL as rd,jM as ld,jN as cd,jO as hd,jP as pd,jQ as dd,jR as md,jS as Td,jT as ud,jU as bd,jV as kd,jW as fd,jX as gd,jY as yd,jZ as jd,j_ as vd,j$ as Sd,k0 as xd,k1 as wd,k2 as Cd,k3 as Nd,k4 as zd,k5 as Md,k6 as Ed,k7 as qd,k8 as Bd,k9 as Dd,ka as Ld,kb as Pd,kc as Ad,kd as Ud,ke as Vd,kf as Id,kg as Od,kb as Rd,kc as Gd,kh as Hd,ki as Zd,kj as Kd,kd as Xd,ke as Yd,kk as Jd,kl as Fd,km as Wd}from"./zoraTestnet-B1VFNgcm.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./verifyHash-DpeDDe0l.js";import"./sendRawTransaction-B5C16ilB.js";import"./index-CNSWvtL0.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./secp256k1-B6MVDYDd.js";import"./serializeTransaction-COuCzUc4.js";import"./writeContract-ChFbWN7V.js";function a(s){return{formatters:void 0,fees:void 0,serializers:void 0,...s}}const m=a({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),T=a({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"}),u=a({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}),b=a({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}}),k=a({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),f=a({id:"00000008819873e925422c1ff0f99f7c",caipNetworkId:"bip122:00000008819873e925422c1ff0f99f7c",chainNamespace:"bip122",name:"Bitcoin Signet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0}),g=a({id:"-239",name:"TON",network:"ton-mainnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://tonscan.org"}},testnet:!1,chainNamespace:"ton",caipNetworkId:"ton:-239"}),y=a({id:"-3",name:"TON Testnet",network:"ton-testnet",nativeCurrency:{name:"TON",symbol:"TON",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Tonscan",url:"https://testnet.tonscan.org"}},testnet:!0,chainNamespace:"ton",caipNetworkId:"ton:-3"}),j=a({id:"0x2b6653dc",name:"TRON",network:"tron-mainnet",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org"}},testnet:!1,chainNamespace:"tron",caipNetworkId:"tron:0x2b6653dc"}),v=a({id:"0x94a9059e",name:"TRON Shasta",network:"tron-shasta",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://api.shasta.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0x94a9059e"}),S=a({id:"0xcd8690dc",name:"TRON Nile",network:"tron-nile",nativeCurrency:{name:"TRX",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]},chainDefault:{http:["https://nile.trongrid.io"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0,chainNamespace:"tron",caipNetworkId:"tron:0xcd8690dc"});export{C as AVAILABLE_NAMESPACES,z as abey,M as abstract,E as abstractTestnet,q as acala,B as acria,D as adf,L as adi,P as agungTestnet,A as aioz,U as alephZero,V as alephZeroTestnet,I as alienx,O as alienxHalTestnet,R as alpenTestnet,G as ancient8,H as ancient8Sepolia,Z as anvil,K as apeChain,X as apexTestnet,Y as apollo,J as arbitrum,F as arbitrumGoerli,W as arbitrumNova,Q as arbitrumSepolia,_ as arc,$ as arcTestnet,aa as arenaz,sa as areonNetwork,ea as areonNetworkTestnet,ta as areum,na as artelaTestnet,ia as arthera,oa as artheraTestnet,ra as assetChain,la as assetChainTestnet,ca as astar,ha as astarZkEVM,pa as astarZkyoto,da as atletaOlympia,ma as aurora,Ta as auroraTestnet,ua as auroria,ba as autheoTestnet,ka as avalanche,fa as avalancheFuji,ga as b3,ya as b3Sepolia,ja as bahamut,va as base,Sa as baseGoerli,xa as basePreconf,wa as baseSepolia,Ca as baseSepoliaPreconf,Na as basecampTestnet,za as battlechain,Ma as battlechainTestnet,Ea as beam,qa as beamTestnet,Ba as bearNetworkChainMainnet,Da as bearNetworkChainTestnet,La as berachain,Pa as berachainBepolia,Aa as berachainTestnet,Ua as berachainTestnetbArtio,Va as bevmMainnet,Ia as bifrost,Oa as birdlayer,Ra as bitTorrent,Ga as bitTorrentTestnet,b as bitcoin,f as bitcoinSignet,k as bitcoinTestnet,Ha as bitgert,Za as bitkub,Ka as bitkubTestnet,Xa as bitlayer,Ya as bitlayerTestnet,Ja as bitrock,Fa as blast,Wa as blastSepolia,Qa as bob,_a as bobSepolia,$a as boba,as as bobaSepolia,ss as boolBetaMainnet,es as botanix,ts as botanixTestnet,ns as bounceBit,is as bounceBitTestnet,os as bronos,rs as bronosTestnet,ls as bsc,cs as bscGreenfield,hs as bscTestnet,ps as bsquared,ds as bsquaredTestnet,ms as btr,Ts as btrTestnet,us as bxn,bs as bxnTestnet,ks as cannon,fs as canto,gs as celo,ys as celoAlfajores,js as celoSepolia,vs as chang,Ss as chiliz,xs as chips,ws as citrate,Cs as citrea,Ns as citreaTestnet,zs as classic,Ms as codex,Es as codexTestnet,qs as coinbit,Bs as coinex,Ds as confluxESpace,Ls as confluxESpaceTestnet,Ps as coreDao,As as coreTestnet1,Us as coreTestnet2,Vs as corn,Is as cornTestnet,Os as cpchain,Rs as crab,Gs as creatorTestnet,Hs as creditCoin3Devnet,Zs as creditCoin3Mainnet,Ks as creditCoin3Testnet,Xs as cronos,Ys as cronosTestnet,Js as cronoszkEVM,Fs as cronoszkEVMTestnet,Ws as crossbell,Qs as crossfi,_s as curtis,$s as cyber,ae as cyberTestnet,se as dailyNetwork,ee as dailyNetworkTestnet,te as darwinia,ne as datahavenTestnet,ie as dbkchain,oe as dchain,re as dchainTestnet,le as defichainEvm,ce as defichainEvmTestnet,a as defineChain,he as degen,pe as dfk,de as diode,me as disChain,Te as dodochainTestnet,ue as dogechain,be as domaTestnet,ke as donatuz,fe as dosChain,ge as dosChainTestnet,ye as dreyerxMainnet,je as dreyerxTestnet,ve as dustboyIoT,Se as dymension,xe as eden,we as edexa,Ce as edexaTestnet,Ne as edgeless,ze as edgelessTestnet,Me as edgeware,Ee as edgewareTestnet,qe as eduChain,Be as eduChainTestnet,De as elastos,Le as elastosTestnet,Pe as electroneum,Ae as electroneumTestnet,Ue as elysiumTestnet,Ve as energy,Ie as eni,Oe as eniTestnet,Re as enuls,Ge as eon,He as eos,Ze as eosTestnet,Ke as eteria,Xe as etherlink,Ye as etherlinkShadownetTestnet,Je as etherlinkTestnet,Fe as ethernity,We as etp,Qe as evmos,_e as evmosTestnet,$e as excelonMainnet,at as expanse,st as exsat,et as exsatTestnet,tt as fantom,nt as fantomSonicTestnet,it as fantomTestnet,ot as fibo,rt as filecoin,lt as filecoinCalibration,ct as filecoinHyperspace,ht as fireChain,pt as flame,dt as flare,mt as flareTestnet,Tt as flowMainnet,ut as flowPreviewnet,bt as flowTestnet,kt as fluence,ft as fluenceStage,gt as fluenceTestnet,yt as fluent,jt as fluentDevnet,vt as fluentTestnet,St as form,xt as formTestnet,wt as forma,Ct as formicarium,Nt as forta,zt as foundry,Mt as fraxtal,Et as fraxtalTestnet,qt as funkiMainnet,Bt as funkiSepolia,Dt as fuse,Lt as fuseSparknet,Pt as fusion,At as fusionTestnet,Ut as garnet,Vt as gatechain,It as geist,Ot as genesys,Rt as gensyn,Gt as giwaSepolia,Ht as giwaSepoliaPreconf,Zt as glideL1Protocol,Kt as glideL2Protocol,Xt as gnosis,Yt as gnosisChiado,Jt as goChain,Ft as goat,Wt as gobi,Qt as godwoken,_t as goerli,$t as graphite,an as graphiteTestnet,sn as grav,en as gravity,tn as gunz,nn as guruNetwork,on as guruTestnet,rn as ham,ln as happychainTestnet,cn as haqqMainnet,hn as haqqTestedge2,pn as hardhat,dn as harmonyOne,mn as hashkey,Tn as hashkeyTestnet,un as haustTestnet,bn as hedera,kn as hederaPreviewnet,fn as hederaTestnet,gn as hela,yn as heliosTestnet,jn as hemi,vn as hemiSepolia,Sn as henesys,xn as holesky,wn as hoodi,Cn as horizenTestnet,Nn as hpb,zn as hpp,Mn as hppSepolia,En as huddle01Mainnet,qn as huddle01Testnet,Bn as humanity,Dn as humanityTestnet,Ln as humanode,Pn as humanodeTestnet5,An as hychain,Un as hychainTestnet,Vn as hyperEvm,In as hyperliquid,On as hyperliquidEvmTestnet,Rn as iSunCoin,Gn as icbNetwork,Hn as idchain,Zn as igra,Kn as immutableZkEvm,Xn as immutableZkEvmTestnet,Yn as inEVM,Jn as initVerse,Fn as initVerseGenesis,Wn as injective,Qn as injectiveTestnet,_n as ink,$n as inkSepolia,ai as iota,si as iotaTestnet,ei as iotex,ti as iotexTestnet,ni as jasmyChain,ii as jasmyChainTestnet,oi as jbc,ri as jbcTestnet,li as jocMainnet,ci as jocTestnet,hi as jovay,pi as jovaySepolia,di as juneo,mi as juneoBCH1Chain,Ti as juneoDAI1Chain,ui as juneoDOGE1Chain,bi as juneoEUR1Chain,ki as juneoGLD1Chain,fi as juneoLINK1Chain,gi as juneoLTC1Chain,yi as juneoSGD1Chain,ji as juneoSocotraTestnet,vi as juneoUSD1Chain,Si as juneoUSDT1Chain,xi as juneomBTC1Chain,wi as kaia,Ci as kairos,Ni as kakarotSepolia,zi as kakarotStarknetSepolia,Mi as kardiaChain,Ei as karura,qi as katana,Bi as kava,Di as kavaTestnet,Li as kcc,Pi as kii,Ai as kiiTestnetOro,Ui as kinto,Vi as klaytn,Ii as klaytnBaobab,Oi as koi,Ri as kroma,Gi as kromaSepolia,Hi as krown,Zi as l3x,Ki as l3xTestnet,Xi as ladyChain,Yi as lavita,Ji as lens,Fi as lensTestnet,Wi as lestnet,Qi as lightlinkPegasus,_i as lightlinkPhoenix,$i as linea,ao as lineaGoerli,so as lineaSepolia,eo as lineaTestnet,to as lisk,no as liskSepolia,io as loadAlphanet,oo as localhost,ro as loop,lo as lukso,co as luksoTestnet,ho as lumiaMainnet,po as lumiaTestnet,mo as lumoz,To as lumozTestnet,uo as luxeports,bo as lycan,ko as lyra,fo as mainnet,go as mandala,yo as manta,jo as mantaSepoliaTestnet,vo as mantaTestnet,So as mantle,xo as mantleSepoliaTestnet,wo as mantleTestnet,Co as mantraDuKongEVMTestnet,No as mantraEVM,zo as mapProtocol,Mo as marooTestnet,Eo as matchain,qo as matchainTestnet,Bo as mchVerse,Do as megaeth,Lo as megaethTestnet,Po as mekong,Ao as meld,Uo as memecore,Vo as merlin,Io as merlinErigonTestnet,Oo as metachain,Ro as metachainIstanbul,Go as metadium,Ho as metalL2,Zo as meter,Ko as meterTestnet,Xo as metis,Yo as metisGoerli,Jo as metisSepolia,Fo as mev,Wo as mevTestnet,Qo as mezo,_o as mezoTestnet,$o as mint,ar as mintSepoliaTestnet,sr as mitosisTestnet,er as mizuhikiTestnetAwaji,tr as mode,nr as modeTestnet,ir as monad,or as monadTestnet,rr as moonbaseAlpha,lr as moonbeam,cr as moonbeamDev,hr as moonriver,pr as morph,dr as morphHolesky,mr as morphSepolia,Tr as nahmii,ur as nautilus,br as near,kr as nearTestnet,fr as neonDevnet,gr as neonMainnet,yr as neoxMainnet,jr as neoxT4,vr as newton,Sr as nexi,xr as nexilix,wr as nibiru,Cr as nitrographTestnet,Nr as nomina,zr as oasisTestnet,Mr as oasys,Er as odysseyTestnet,qr as okc,Br as omax,Dr as omni,Lr as omniOmega,Pr as oneWorld,Ar as oortMainnetDev,Ur as opBNB,Vr as opBNBTestnet,Ir as openledger,Or as optimism,Rr as optimismGoerli,Gr as optimismSepolia,Hr as optopia,Zr as optopiaTestnet,Kr as orderly,Xr as orderlySepolia,Yr as otimDevnet,Jr as palm,Fr as palmTestnet,Wr as paseoPassetHub,Qr as peaq,_r as pgn,$r as pgnTestnet,al as phoenix,sl as planq,el as plasma,tl as plasmaDevnet,nl as plasmaTestnet,il as playfiAlbireo,ol as plinga,rl as plume,ll as plumeDevnet,cl as plumeMainnet,hl as plumeSepolia,pl as plumeTestnet,dl as polterTestnet,ml as polygon,Tl as polygonAmoy,ul as polygonMumbai,bl as polygonZkEvm,kl as polygonZkEvmCardona,fl as polygonZkEvmTestnet,gl as polynomial,yl as polynomialSepolia,jl as potos,vl as potosTestnet,Sl as premiumBlockTestnet,xl as pulsechain,wl as pulsechainV4,Cl as pumpfiTestnet,Nl as pyrope,zl as qMainnet,Ml as qTestnet,El as ql1,ql as quai,Bl as quaiTestnet,Dl as radius,Ll as radiusTestnet,Pl as reactiveTestnet,Al as real,Ul as redbellyMainnet,Vl as redbellyTestnet,Il as reddio,Ol as reddioSepolia,Rl as redstone,Gl as rei,Hl as reyaNetwork,Zl as rise,Kl as riseTestnet,Xl as rivalz,Yl as rollux,Jl as rolluxTestnet,Fl as ronin,Wl as root,Ql as rootPorcini,_l as rootstock,$l as rootstockTestnet,ac as rss3,sc as rss3Sepolia,ec as saakuru,tc as saga,nc as saigon,ic as sanko,oc as sapphire,rc as sapphireTestnet,lc as satoshiVM,cc as satoshiVMTestnet,hc as scroll,pc as scrollSepolia,dc as sei,mc as seiTestnet,Tc as seismicDevnet,uc as sentrix,bc as sentrixTestnet,kc as sepolia,fc as shape,gc as shapeSepolia,yc as shardeum,jc as shardeumSphinx,vc as shibarium,Sc as shibariumTestnet,xc as shiden,wc as shimmer,Cc as shimmerTestnet,Nc as sidraChain,zc as silentData,Mc as silicon,Ec as siliconSepolia,qc as sixProtocol,Bc as skaleBase,Dc as skaleBaseSepoliaTestnet,Lc as skaleBlockBrawlers,Pc as skaleCalypso,Ac as skaleCalypsoTestnet,Uc as skaleCryptoBlades,Vc as skaleCryptoColosseum,Ic as skaleEuropa,Oc as skaleEuropaTestnet,Rc as skaleExorde,Gc as skaleHumanProtocol,Hc as skaleNebula,Zc as skaleNebulaTestnet,Kc as skaleRazor,Xc as skaleTitan,Yc as skaleTitanTestnet,Jc as sketchpad,Fc as snax,Wc as snaxTestnet,m as solana,T as solanaDevnet,u as solanaTestnet,Qc as somnia,_c as somniaTestnet,$c as soneium,ah as soneiumMinato,sh as songbird,eh as songbirdTestnet,th as sonic,nh as sonicBlazeTestnet,ih as sonicTestnet,oh as sophon,rh as sophonTestnet,lh as sova,ch as sovaSepolia,hh as spicy,ph as stable,dh as stableTestnet,mh as statusNetworkSepolia,Th as statusSepolia,uh as step,bh as story,kh as storyAeneid,fh as storyOdyssey,gh as storyTestnet,yh as stratis,jh as subtensorEvm,vh as superlumio,Sh as superposition,xh as superseed,wh as superseedSepolia,Ch as surgeTestnet,Nh as swan,zh as swanProximaTestnet,Mh as swanSaturnTestnet,Eh as swellchain,qh as swellchainTestnet,Bh as swissdlt,Dh as syscoin,Lh as syscoinTestnet,Ph as tac,Ah as tacSPB,Uh as taiko,Vh as taikoHekla,Ih as taikoHoodi,Oh as taikoJolnir,Rh as taikoKatla,Gh as taikoTestnetSepolia,Hh as taraxa,Zh as taraxaTestnet,Kh as teaSepolia,Xh as telcoinTestnet,Yh as telos,Jh as telosTestnet,Fh as tempo,Wh as tempoDevnet,Qh as tempoLocalnet,_h as tempoMainnet,$h as tempoModerato,ap as tempoTestnet,sp as tenet,ep as ternoa,tp as thaiChain,np as that,ip as theta,op as thetaTestnet,rp as thunderCore,lp as thunderTestnet,cp as tiktrixTestnet,hp as tomb,g as ton,y as tonTestnet,pp as treasure,dp as treasureTopaz,mp as tron,j as tronMainnet,Tp as tronNile,S as tronNileTestnet,up as tronShasta,v as tronShastaTestnet,bp as ubiq,kp as ultra,fp as ultraTestnet,gp as ultron,yp as ultronTestnet,jp as unichain,vp as unichainSepolia,Sp as unique,xp as uniqueOpal,wp as uniqueQuartz,Cp as unreal,Np as valygoNft,zp as valygoSmartchain,Mp as vana,Ep as vanaMoksha,qp as vanar,Bp as vechain,Dp as velas,Lp as viction,Pp as victionTestnet,Ap as vision,Up as visionTestnet,Vp as wanchain,Ip as wanchainTestnet,Op as weaveVMAlphanet,Rp as wemix,Gp as wemixTestnet,Hp as westendAssetHub,Zp as whitechain,Kp as whitechainSepolia,Xp as whitechainTestnet,Yp as wmcTestnet,Jp as worldLand,Fp as worldchain,Wp as worldchainSepolia,Qp as x1Testnet,_p as xLayer,$p as xLayerTestnet,ad as xai,sd as xaiTestnet,ed as xdc,td as xdcTestnet,nd as xgr,id as xoneMainnet,od as xoneTestnet,rd as xphereMainnet,ld as xphereTestnet,cd as xpla,hd as xrOne,pd as xrSepolia,dd as xrplevm,md as xrplevmDevnet,Td as xrplevmTestnet,ud as yooldoVerse,bd as yooldoVerseTestnet,kd as zenchainTestnet,fd as zeniq,gd as zeroG,yd as zeroGGalileoTestnet,jd as zeroGMainnet,vd as zeroGTestnet,Sd as zeroNetwork,xd as zetachain,wd as zetachainAthensTestnet,Cd as zhejiang,Nd as zilliqa,zd as zilliqaTestnet,Md as zircuit,Ed as zircuitGarfieldTestnet,qd as zkFair,Bd as zkFairTestnet,Dd as zkLinkNova,Ld as zkLinkNovaSepoliaTestnet,Pd as zkSync,Ad as zkSyncInMemoryNode,Ud as zkSyncLocalNode,Vd as zkSyncSepoliaTestnet,Id as zkXPLA,Od as zkXPLATestnet,Rd as zksync,Gd as zksyncInMemoryNode,Hd as zksyncLocalCustomHyperchain,Zd as zksyncLocalHyperchain,Kd as zksyncLocalHyperchainL1,Xd as zksyncLocalNode,Yd as zksyncSepoliaTestnet,Jd as zora,Fd as zoraSepolia,Wd as zoraTestnet};
@@ -1,4 +1,4 @@
1
- import{i as b,b as u}from"./lit-element-B3y9oplH.js";import{o as m,r as l,n as p}from"./class-map-CxwNmq0D.js";import{d as O,O as c}from"./index-C-uQhIOu.js";import{c as g}from"./index-pOWOYTZf.js";import"./index-7a1mhp_I.js";import{O as T}from"./index-BvJT7BsV.js";import{L as C,O as j,M as $,C as I,q as E,R as L,b as B,E as z,l as V,W as M,k as K,T as q,S as W}from"./W3MFrameProviderSingleton-KZXDtdeN.js";import"./index-CRWbHzp3.js";import"./index-Dy65iyWb.js";import"./index-Bwj5NrhW.js";import"./index-B4HZUf7-.js";import"./index-DhmytMhG.js";import"./index-0YKOyKsz.js";import"./index-C-GvP7Ri.js";import"./index-CGf6vfVT.js";import"./index-CYWpV70P.js";import"./react-yytiy0wi.js";import"./ethers-DArfy-QF.js";import"./index-BUYyFeCt.js";import"./events-DQ172AOg.js";import"./index-CSy-_M5R.js";import"./index-C6Uar8kN.js";import"./index-nibyPLVP.js";import"./index-BQzrms9Y.js";import"./index.es-CiB5ifZN.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-Yv-DdqEo.js";import"./ref-BsAZ42-h.js";import"./async-directive-BRxn_Py3.js";const F=O`
1
+ import{i as b,b as u}from"./lit-element-B3y9oplH.js";import{o as m,r as l,n as p}from"./class-map-CxwNmq0D.js";import{d as O,O as c}from"./index-B29hZWU0.js";import{c as g}from"./index-l4HYDe7V.js";import"./index-BdSETUQy.js";import{O as T}from"./index-kSkl-zIU.js";import{L as C,O as j,M as $,C as I,q as E,R as L,b as B,E as z,l as V,W as M,k as K,T as q,S as W}from"./W3MFrameProviderSingleton-igVJGnIP.js";import"./index-BFflIlJl.js";import"./index-BToZY4wT.js";import"./index-HDuUFApJ.js";import"./index-D4gUO6YF.js";import"./index-C_M9XsGM.js";import"./index-BvkmByTC.js";import"./index-DxzGOm1i.js";import"./index-Clrgbbm8.js";import"./index-CNSWvtL0.js";import"./react-yytiy0wi.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./index-DAGAMRoL.js";import"./events-DQ172AOg.js";import"./index-BLfwzasm.js";import"./index-Dbqfw_1n.js";import"./index-nibyPLVP.js";import"./index-C4TyPwon.js";import"./index.es-DtmgeITt.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-CLSFaUe_.js";import"./ref-BsAZ42-h.js";import"./async-directive-BRxn_Py3.js";const F=O`
2
2
  :host > wui-grid {
3
3
  max-height: 360px;
4
4
  overflow: auto;
@@ -0,0 +1 @@
1
+ import{j as p,o as y,b as c,r as w}from"./signing-DW4tyFl0.js";import"./utils-CsEYBURh.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./index-CNSWvtL0.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";async function u({account:e,serializableTransaction:a,transaction:n,gasless:s}){const t=c({address:s.relayerForwarderAddress,chain:n.chain,client:n.client}),r=await w({contract:t,method:"function getNonce(address) view returns (uint256)",params:[e.address]}),[o,m]=await(async()=>{if(!a.to)throw new Error("OpenZeppelin transactions must have a 'to' address");if(!a.gas)throw new Error("OpenZeppelin transactions must have a 'gas' value");if(!a.data)throw new Error("OpenZeppelin transactions must have a 'data' value");if(s.experimentalChainlessSupport){const i={chainid:BigInt(n.chain.id),data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:t.address,version:"0.0.1"},message:i,primaryType:"ForwardRequest",types:{ForwardRequest:h}}),i]}const d={data:a.data,from:e.address,gas:a.gas,nonce:r,to:a.to,value:0n};return[await e.signTypedData({domain:{chainId:n.chain.id,name:s.domainName??"GSNv2 Forwarder",verifyingContract:t.address,version:s.domainVersion??"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),d]})();return{message:m,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],h=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function x(e){const{message:a,messageType:n,signature:s}=await u(e),t=await fetch(e.gasless.relayerUrl,{body:p({forwarderAddress:e.gasless.relayerForwarderAddress,request:a,signature:s,type:n}),method:"POST"});if(!t.ok)throw new Error(`Failed to send transaction: ${await t.text()}`);const r=await t.json();if(!r.result)throw new Error(`Relay transaction failed: ${r.message}`);const o=JSON.parse(r.result).txHash;if(y(o))return{chain:e.transaction.chain,client:e.transaction.client,transactionHash:o};throw new Error(`Failed to send transaction: ${p(r)}`)}export{u as prepareOpenZeppelinTransaction,x as relayOpenZeppelinTransaction};
@@ -0,0 +1 @@
1
+ import{d as o,e as c,r as d}from"./signing-DW4tyFl0.js";import{d as a}from"./detectExtension-DPopT1Kb.js";import"./utils-CsEYBURh.js";import"./sentry-BPJvc5GU.js";import"./react-yytiy0wi.js";import"./index-CNSWvtL0.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";const t="0x6352211e",r=[{name:"tokenId",type:"uint256"}],n=[{type:"address"}];function N(e){return a({availableSelectors:e,method:[t,r,n]})}function i(e){return c(r,[e.tokenId])}function S(e){return t+i(e).slice(2)}function T(e){return o(n,e)[0]}async function h(e){return d({contract:e.contract,method:[t,r,n],params:[e.tokenId]})}export{t as FN_SELECTOR,T as decodeOwnerOfResult,S as encodeOwnerOf,i as encodeOwnerOfParams,N as isOwnerOfSupported,h as ownerOf};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/getNFT-BlFsKfLP.js","assets/index-CNSWvtL0.js","assets/react-yytiy0wi.js","assets/dcl-schemas-BICTSpB5.js","assets/sentry-BPJvc5GU.js","assets/ethers-w2AslR0v.js","assets/intl-CBcMB1D2.js","assets/index-jbcqNek9.css","assets/fetchTokenMetadata-r_xnkq91.js","assets/uint8-array-CjVHUazS.js","assets/signing-DW4tyFl0.js","assets/utils-CsEYBURh.js","assets/thirdweb-C69j7iTG.js","assets/wait-for-tx-receipt-D9A_u2fN.js","assets/transactionReceipt-CK-ZZNkd.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-B9zdAB24.js","assets/eth_getStorageAt-Bp0VdFG_.js","assets/eth_getTransactionCount-D3ux_Uy2.js","assets/decimals-CpjItqe-.js","assets/decimals-DhBB7VPD.js","assets/zora-sepolia-CKeXJ6uD.js","assets/send-batch-transaction-twz9plvu.js","assets/getNFT-CU0p112E.js","assets/totalSupply-BjrHK1ZH.js","assets/detectExtension-DPopT1Kb.js"])))=>i.map(i=>d[i]);
2
+ import{_ as m}from"./index-CNSWvtL0.js";import{a as I}from"./utils-CsEYBURh.js";import{i as h,b as E}from"./signing-DW4tyFl0.js";import"./react-yytiy0wi.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";function A(t,e){switch(e.type){case"ERC721":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};case"ERC1155":return{chainId:e.chainId,id:e.tokenId,metadata:t,owner:(e==null?void 0:e.owner)??null,supply:e.supply,tokenAddress:e.tokenAddress,tokenURI:e.tokenUri,type:e.type};default:throw new Error("Invalid NFT type")}}async function N(t){let e=t.uri;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[w="",l="",r=""]=e.split("/"),[a,i]=w.split(":"),[s,n]=l.split(":");if(!a||a.toLowerCase()!=="eip155")throw new Error(`Invalid EIP namespace, expected EIP155, got: "${a}"`);if(!i)throw new Error("Chain ID not found");if(!n||!h(n))throw new Error("Contract address not found");if(!r)throw new Error("Token ID not found");const u=I(Number(i)),o=E({address:n,chain:u,client:t.client});switch(s){case"erc721":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-BlFsKfLP.js");return{getNFT:d}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:c}=await m(async()=>{const{getNFT:d}=await import("./getNFT-CU0p112E.js");return{getNFT:d}},__vite__mapDeps([23,12,11,4,2,10,1,3,5,6,7,13,14,15,16,17,18,19,20,21,22,8,9,24,25]));return(await c({contract:o,tokenId:BigInt(r)})).metadata.image??null}default:throw new Error(`Invalid ERC namespace, expected ERC721 or ERC1155, got: "${s}"`)}}export{A as parseNFT,N as parseNftUri};