@dcl/blog-site 0.3.1-24533807769.commit-2e68981 → 0.3.1-24574465167.commit-1f456d2
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.
- package/assets/AuthorPage-Df6gn9_m.js +1 -0
- package/assets/BlogPage-B4pxSza8.js +1 -0
- package/assets/CategoryPage-CxeJ3QiI.js +1 -0
- package/assets/Media-BiHT3qBR.js +1 -0
- package/assets/PageLayout-Ciu0k-U_.js +1 -0
- package/assets/PostCard-Dd4F35zx.js +1 -0
- package/assets/PostPage-QHfmu2Vt.js +1 -0
- package/assets/PostPage.styled-D5lERqJA.js +2 -0
- package/assets/PreviewPage-J15Hru2y.js +1 -0
- package/assets/{QueryClientProvider-Dv18L3Bf.js → QueryClientProvider-OhEAiC0P.js} +1 -1
- package/assets/SEO-DW5vf2xx.js +5 -0
- package/assets/SearchPage-Aj2MbbZU.js +1 -0
- package/assets/SignInRedirect-qy6q_tZq.js +1 -0
- package/assets/{WalletStateProvider-Bb79ArZ-.js → WalletStateProvider-CdpYlS08.js} +1 -1
- package/assets/{Web3Inner-CgxSXeS_.js → Web3Inner-BJ-KSM84.js} +1 -1
- package/assets/{Web3SyncProvider-D6_GzSKM.js → Web3SyncProvider-CVoNw-Ck.js} +2 -2
- package/assets/X-DOiZv48t.js +15 -0
- package/assets/__federation_expose_App-8sv1g15i.js +1 -0
- package/assets/{__federation_fn_import-BxyPyKYw.js → __federation_fn_import-DNtjaGC4.js} +1 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-DkP-jRSY.js +2 -0
- package/assets/__federation_shared_@dcl/{core-web3-CKa_YLUg.js → core-web3-B8eHhcKW.js} +2 -2
- package/assets/__federation_shared_@dcl/{hooks-BUl9fwJ6.js → hooks-6RDCWtS0.js} +5 -5
- package/assets/__federation_shared_@dcl/schemas-Bx07hTGg.js +1 -0
- package/assets/__federation_shared_@emotion/react-TNrN6Qto.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-DWCD7TRI.js → styled-CGJjdZ7M.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-DhNprCzs.js → __federation_shared_decentraland-ui2-Bc45XQnG.js} +28 -31
- package/assets/__federation_shared_react-D4NpQaXx.js +1 -0
- package/assets/__federation_shared_react-dom-BnMp-IwM.js +1 -0
- package/assets/{__federation_shared_react-redux-BbbSoEti.js → __federation_shared_react-redux-C0CNQCVL.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-CghPW3T5.js → __federation_shared_react-router-dom-DwnKrWTP.js} +1 -1
- package/assets/{__federation_shared_viem-BSisS619.js → __federation_shared_viem-BnQWYaJC.js} +1 -1
- package/assets/{__federation_shared_wagmi-BNNJMvLV.js → __federation_shared_wagmi-gkTMllsk.js} +1 -1
- package/assets/{add-CdrtIhqC.js → add-CrlFk3Q3.js} +1 -1
- package/assets/{all-wallets-Cmla8eMe.js → all-wallets-Cn4vlXAg.js} +1 -1
- package/assets/{app-store-ma7uMa9T.js → app-store-Be5qHevD.js} +1 -1
- package/assets/{apple-bELCHYbt.js → apple-BLF9iOOU.js} +1 -1
- package/assets/{arrow-bottom-DloKu1fV.js → arrow-bottom-DkIzNCmM.js} +1 -1
- package/assets/{arrow-bottom-circle-DzXI01oZ.js → arrow-bottom-circle-DTIccLhb.js} +1 -1
- package/assets/{arrow-left-B55lkgKK.js → arrow-left-Dn2O6Yc9.js} +1 -1
- package/assets/{arrow-right-Bw7eQ4QH.js → arrow-right-BhwoZxOJ.js} +1 -1
- package/assets/{arrow-top-Dn6leB_M.js → arrow-top-CKR018aC.js} +1 -1
- package/assets/authRedirect-CDwN-vsd.js +1 -0
- package/assets/{auto-track-CkHj-ik-.js → auto-track-D5pJjTP0.js} +1 -1
- package/assets/{bank-DH1VVekh.js → bank-C7cxDWGw.js} +1 -1
- package/assets/{basic-CpaLk7Rk.js → basic-C9P9esct.js} +1 -1
- package/assets/{biconomy-C-Aa3WOy.js → biconomy-C3StBANE.js} +1 -1
- package/assets/{browser-Cy2ntZlE.js → browser-DJ7_iUnZ.js} +1 -1
- package/assets/{card-DeDlu8qm.js → card-JDGi0NHR.js} +1 -1
- package/assets/{ccip-O3XMTSRc.js → ccip-CIy6Np-r.js} +1 -1
- package/assets/{checkmark-DNVFeB3s.js → checkmark-CPuFFcJX.js} +1 -1
- package/assets/{checkmark-bold-DEcOisss.js → checkmark-bold-mWhrN4oP.js} +1 -1
- package/assets/{chevron-bottom-xDV_oQI6.js → chevron-bottom-BiS2oxh-.js} +1 -1
- package/assets/{chevron-left-BYtOhhqm.js → chevron-left-mgiwYveY.js} +1 -1
- package/assets/{chevron-right-CfsnvkD5.js → chevron-right-BBbwfFkV.js} +1 -1
- package/assets/{chevron-top-CONIZzEr.js → chevron-top-vRyln5TS.js} +1 -1
- package/assets/{chrome-store-D9VGMy-w.js → chrome-store-BMwl9GFC.js} +1 -1
- package/assets/{clock-DRArrlZN.js → clock-Cyo1NCoz.js} +1 -1
- package/assets/{close-BnL2HnLj.js → close-DpLs-6ut.js} +1 -1
- package/assets/{coinPlaceholder-DspCsB1d.js → coinPlaceholder-CMWbyfzw.js} +1 -1
- package/assets/{compass-CL9Ubv1C.js → compass-BZlWuYsQ.js} +1 -1
- package/assets/config-DzzapLE-.js +1 -0
- package/assets/contentful-5JGMFnCq.js +4 -0
- package/assets/{controller-BVrxdctz.js → controller-zrh0AA5v.js} +2 -2
- package/assets/{copy-DzcJW_6z.js → copy-C8XbJm81.js} +1 -1
- package/assets/{core-CNeX_97j.js → core-CmzgCi5e.js} +3 -3
- package/assets/{createBundlerClient-BPAMiN0_.js → createBundlerClient-CvVX10zF.js} +1 -1
- package/assets/{createClient-B3NJif4G.js → createClient-DuiD_-hg.js} +1 -1
- package/assets/{cursor-VEXLPp4L.js → cursor-DgKI5UfF.js} +1 -1
- package/assets/{cursor-transparent-eNYb23WQ.js → cursor-transparent-DYc-PvMS.js} +1 -1
- package/assets/{decimals-QcoDvy79.js → decimals-BprNBSsW.js} +1 -1
- package/assets/{decimals-Bcje5XLK.js → decimals-DC_X5ByZ.js} +1 -1
- package/assets/defaultTheme-0boCqa4G.js +1 -0
- package/assets/{desktop-B8dtxVkT.js → desktop-BXu5vjTJ.js} +1 -1
- package/assets/{detectExtension-CCed483c.js → detectExtension-B_qG6Uj3.js} +1 -1
- package/assets/{disconnect-5l_BrY-g.js → disconnect-BIjCZBSY.js} +1 -1
- package/assets/{discord-vPm7sSnB.js → discord-BHe20Bgu.js} +1 -1
- package/assets/emotion-element-f0de968e.browser.esm-DUNwabDo.js +8 -0
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-BLv21GTb.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-B88ZkZJW.js} +1 -1
- package/assets/{encode-D4fq-GtO.js → encode-w1S6O2Jy.js} +2 -2
- package/assets/{engine-C-meN4xY.js → engine-CjoYEL_B.js} +1 -1
- package/assets/{estimate-gas-DFiVp-Bb.js → estimate-gas-Clq1zGmM.js} +3 -3
- package/assets/{estimate-l1-fee-lAfdaqWJ.js → estimate-l1-fee-D_wtZw7B.js} +1 -1
- package/assets/{eth_getStorageAt-DFwf_hwV.js → eth_getStorageAt-BPq1D0T-.js} +1 -1
- package/assets/{etherscan-Ck2P6D17.js → etherscan-CG5vA-W6.js} +1 -1
- package/assets/events-DqOg3rR3.js +1 -0
- package/assets/{exclamation-triangle-DfbN77Lf.js → exclamation-triangle-GyJq4nAX.js} +1 -1
- package/assets/{extension-CtEMnFwe.js → extension-muflT2fN.js} +1 -1
- package/assets/{external-link-B0IDyBri.js → external-link-DH3pNf93.js} +1 -1
- package/assets/{extractIPFS-DIosWHkP.js → extractIPFS-CN8RjoYW.js} +1 -1
- package/assets/{facebook-C0UeZpYw.js → facebook-Dvt8S6HP.js} +1 -1
- package/assets/{farcaster-CYOZFCGP.js → farcaster-CExK9GF3.js} +1 -1
- package/assets/{fee-data-BpKOAsFJ.js → fee-data-ITl-GLgb.js} +1 -1
- package/assets/{fetchTokenMetadata-DqYbYFuX.js → fetchTokenMetadata-C8Ab2EFW.js} +2 -2
- package/assets/{filters-NBQeHIU7.js → filters-BjkvScGN.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-CDZa8BmK.js → get-ecosystem-wallet-info-BMnnm-zL.js} +1 -1
- package/assets/{getBalance-Bw5byYn3.js → getBalance-D97jBzkx.js} +1 -1
- package/assets/{getInstalledModules-By8IApsm.js → getInstalledModules-bM9ZiQVT.js} +1 -1
- package/assets/{getNFT-YU4EH9Wq.js → getNFT-DXArYl_b.js} +2 -2
- package/assets/{getNFT-DEyn-Dm_.js → getNFT-o2zOBSOX.js} +1 -1
- package/assets/{github-C4rc0OEq.js → github-DIcpmiTD.js} +1 -1
- package/assets/{google-kXTnc_BR.js → google-Ckbmg2Ga.js} +1 -1
- package/assets/{help-circle-Bwzt3B2p.js → help-circle-s_lVA58g.js} +1 -1
- package/assets/{id-zOIHpH1K.js → id-DeQgQo7H.js} +1 -1
- package/assets/{image-B1eT9feQ.js → image-DbZ9UUJ_.js} +1 -1
- package/assets/{in-app-wallet-calls-C61H1buU.js → in-app-wallet-calls-DzF9AO72.js} +1 -1
- package/assets/index-B584AmqK.js +1 -0
- package/assets/{index-Dy0yjznp__bundled.js → index-B584AmqK__bundled.js} +1 -1
- package/assets/index-BHSHxmEC.js +1 -0
- package/assets/{index-BqjaI3ay.js → index-BtR4l8xs.js} +1 -1
- package/assets/{index-AMqzEpe3.js → index-BxRTPul1.js} +1 -1
- package/assets/{index-DD6DIvwj.js → index-C0Hq4IJY.js} +1 -1
- package/assets/index-C1_ZJ2Fz.js +2 -0
- package/assets/{index-CQa-TpsF.js → index-C2PA63OZ.js} +2 -2
- package/assets/{index-CUrF8sCH.js → index-C7wwE81D.js} +3 -3
- package/assets/index-C9JLZTTc.js +1 -0
- package/assets/{index-C3DFzjjm.js → index-CA0YZX5c.js} +1 -1
- package/assets/index-CDytriL0.js +3 -0
- package/assets/{index-BozJS3za.js → index-CFfzHT-l.js} +4 -4
- package/assets/{index-B5C7HYRN.js → index-Cl9Sxyic.js} +1 -1
- package/assets/index-CsRwhq7r.js +1 -0
- package/assets/{index-DFwD9Y6T.js → index-CyHd0GjE.js} +1 -1
- package/assets/index-DmRwGcGJ.js +2 -0
- package/assets/index-DyjOKhts.js +2 -0
- package/assets/index-_YWtfAHj.js +1 -0
- package/assets/{index-BjzJcZq6__bundled.js → index-_YWtfAHj__bundled.js} +1 -1
- package/assets/{index-C1_xRJU5.js → index-eLC4bAt3.js} +1 -1
- package/assets/{index-BOPorWEt.js → index-yCW6eWvL.js} +1 -1
- package/assets/index.es-BRoT1QUU.js +2 -0
- package/assets/{index.es-D3pP9hN4.js → index.es-Bjzmmtjk.js} +1 -1
- package/assets/{index.es-CX6b-_J8.js → index.es-DDZKss3Y.js} +1 -1
- package/assets/{index.es-Co6Vfgvo.js → index.es-t7HDtKGz.js} +3 -3
- package/assets/index.modern-zayAXp-r.js +5 -0
- package/assets/index.umd-ddl_WOWs.js +1 -0
- package/assets/{info-fCoUT5OA.js → info-B83FYyYF.js} +1 -1
- package/assets/{info-circle-BSc3Qu0H.js → info-circle-BIW8YsHS.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30.js → jsx-runtime-BWEVYhay.js} +1 -1
- package/assets/{jsx-runtime-DncYoG30__bundled.js → jsx-runtime-BWEVYhay__bundled.js} +1 -1
- package/assets/{lightbulb-CtEeQpR-.js → lightbulb-D3FjAVfy.js} +1 -1
- package/assets/{mail-CyEGKrO1.js → mail-B-gu_WkI.js} +1 -1
- package/assets/{mobile-va3MMBf-.js → mobile-COjPZ1X2.js} +1 -1
- package/assets/{more-CNKLmFKq.js → more-Ra8fJn--.js} +1 -1
- package/assets/{network-placeholder-COaPFv9Z.js → network-placeholder-DWM9do2v.js} +1 -1
- package/assets/{nftPlaceholder-CwqKeCBT.js → nftPlaceholder-BkuiJ1Fi.js} +1 -1
- package/assets/{off-BXJei5ZC.js → off-KeVYYonx.js} +1 -1
- package/assets/{openzeppelin-5tViGSfu.js → openzeppelin-65KMFHrE.js} +1 -1
- package/assets/{ownerOf-B0jDYVPj.js → ownerOf-B5EfXA60.js} +1 -1
- package/assets/{parseNft-C9UVkjKp.js → parseNft-CtU7M4OG.js} +2 -2
- package/assets/{play-store-DPqFtu_u.js → play-store-Dvga_7y6.js} +1 -1
- package/assets/{plus-BRStu8oq.js → plus-1d7HZSRm.js} +1 -1
- package/assets/{preload-helper-DtiUdDj_.js → preload-helper-5SOR_wM4.js} +1 -1
- package/assets/{qr-code-zVq-PsFR.js → qr-code-DHi3Cbzt.js} +1 -1
- package/assets/{qr-overlay-CzG9L326.js → qr-overlay-wjVP52h3.js} +1 -1
- package/assets/{recycle-horizontal-BUcJt7KV.js → recycle-horizontal-f80ctvB9.js} +1 -1
- package/assets/{refresh-DoJwoFWZ.js → refresh-DCOqM3zJ.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-VGJ4-w32.js → reown-logo-Bh1MMtyx.js} +1 -1
- package/assets/{resolveImplementation-CDZMD3pd.js → resolveImplementation-eBjFZj8j.js} +1 -1
- package/assets/rich-text-react-renderer.es5-DX5s0zF9.js +2 -0
- package/assets/{search-qfys2xfh.js → search-CZQy06by.js} +1 -1
- package/assets/{send-BNIku3tf.js → send-D-TwjhV1.js} +1 -1
- package/assets/{send-batch-transaction-DJsVdrRi.js → send-batch-transaction-Ugc9XCfc.js} +1 -1
- package/assets/{send-eip712-transaction-zZlwlA8h.js → send-eip712-transaction-CsbokYJ3.js} +2 -2
- package/assets/{send-gasless-transaction-0zsgzkl7.js → send-gasless-transaction-XWm5OsJP.js} +2 -2
- package/assets/{serializeAuthorizationList-B224vId9.js → serializeAuthorizationList-sXgqtd3N.js} +1 -1
- package/assets/{session-proposal-DQKIaN0P.js → session-proposal-BZkE3xXx.js} +1 -1
- package/assets/{session-request-DO6jaRLL.js → session-request-BS122IY1.js} +2 -2
- package/assets/{signing-D7Amo-_J.js → signing-DLkAwP5Y.js} +3 -3
- package/assets/{slice-D08eqHRd.js → slice-D5Jq-FmM.js} +1 -1
- package/assets/{slice-DH_M4Fq9.js → slice-DpowZ_6S.js} +1 -1
- package/assets/{swapHorizontal-D4EMXwCW.js → swapHorizontal-DH1W1UoG.js} +1 -1
- package/assets/{swapHorizontalBold-DPzDpA5S.js → swapHorizontalBold-D8QA6zjc.js} +1 -1
- package/assets/{swapHorizontalMedium-BO1_vkWp.js → swapHorizontalMedium-D6iiMSB9.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-D5f2zm5T.js → swapHorizontalRoundedBold-CG0CSrfy.js} +1 -1
- package/assets/{swapVertical-Cl2TRZgu.js → swapVertical-BVkEaika.js} +1 -1
- package/assets/{telegram-COuwS3-1.js → telegram-BRL2ke_g.js} +1 -1
- package/assets/{thirdweb-ChZTN2O0.js → thirdweb-B-Xe4N-j.js} +3 -3
- package/assets/{three-dots-DaJ9Yk_z.js → three-dots-Ce3AHErA.js} +1 -1
- package/assets/{totalSupply-CeZQpDgj.js → totalSupply-BycaSCJm.js} +1 -1
- package/assets/{twitch-ChHlcjtL.js → twitch-BOhm2e6I.js} +1 -1
- package/assets/{twitterIcon-BHaGUsBd.js → twitterIcon-Bi32kZ_p.js} +1 -1
- package/assets/{uid-BE5dre25.js → uid-Cob2hcqP.js} +3 -3
- package/assets/useInfiniteBlogPosts-CA3uk6ie.js +1 -0
- package/assets/{verify-BJHlq4Cl.js → verify-XBYDp8cg.js} +1 -1
- package/assets/{verify-filled-CUQ_cX7L.js → verify-filled-DIs-cByX.js} +1 -1
- package/assets/{w3m-modal-BQt7iWW0.js → w3m-modal-CkzQCU-p.js} +1 -1
- package/assets/{wait-for-tx-receipt-mEy_aAXI.js → wait-for-tx-receipt-BmfZs18K.js} +1 -1
- package/assets/{wallet-Bqa5aoUK.js → wallet-DhGCzxG1.js} +1 -1
- package/assets/{wallet-placeholder-ZqWJAmHm.js → wallet-placeholder-CbhoKZ6M.js} +1 -1
- package/assets/{walletconnect-DgD3JeRt.js → walletconnect-Bo6cSb7c.js} +1 -1
- package/assets/{wallets-DBEqpf9_.js → wallets-DpmOypgu.js} +5 -5
- package/assets/{warning-circle-C-GR2K3_.js → warning-circle-DXO4TTWk.js} +1 -1
- package/assets/{web-connector-DbEpPXWA.js → web-connector-D9njQB_l.js} +3 -3
- package/assets/{webSocket-D9rKCHPk.js → webSocket-i6CHiIgb.js} +1 -1
- package/assets/{x-dxs8B49F.js → x-5st4UAZO.js} +1 -1
- package/index.html +29 -16
- package/package.json +3 -3
- package/assets/SignInRedirect-CXE_9i3I.js +0 -9
- package/assets/X-Bfq5REIM.js +0 -15
- package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +0 -1
- package/assets/__federation_expose_App-c8Vsr-t8.js +0 -1
- package/assets/__federation_shared_@dcl/core-web3/lazy-CB9aN5En.js +0 -2
- package/assets/__federation_shared_@dcl/schemas-DMXTEmDf.js +0 -1
- package/assets/__federation_shared_@emotion/react-Dqhl2Mup.js +0 -1
- package/assets/__federation_shared_react-B3tlNTLg.js +0 -1
- package/assets/__federation_shared_react-dom-CCS4dT_K.js +0 -1
- package/assets/_commonjsHelpers-C4iS2aBk.js +0 -1
- package/assets/emotion-react.browser.esm-C-lDaXQ7.js +0 -8
- package/assets/events-B5inrCVE.js +0 -1
- package/assets/index-BjA_RJ3F.js +0 -2
- package/assets/index-BjzJcZq6.js +0 -1
- package/assets/index-C1IoT2if.js +0 -3
- package/assets/index-CgX6dKUG.js +0 -2
- package/assets/index-DU4RVPgw.js +0 -1
- package/assets/index-Dy0yjznp.js +0 -1
- package/assets/index-IYkCvEK_.js +0 -1
- package/assets/index-Tsk25L8E.js +0 -1
- package/assets/index.es-D5YKsq2-.js +0 -2
- package/assets/index.umd-DK712HHb.js +0 -1
- package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/index-
|
|
2
|
-
import{c as ie}from"../
|
|
1
|
+
const __vite__fileDeps=["assets/index-C1_ZJ2Fz.js","assets/preload-helper-5SOR_wM4.js","assets/tslib.es6-DbvBTznf.js","assets/contentful-5JGMFnCq.js","assets/inherits_browser-BlmhoU4v.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{c as ie,m as $w}from"../contentful-5JGMFnCq.js";import{a as eT,d as tT,b as nT}from"../index-CA0YZX5c.js";import{_ as rT}from"../preload-helper-5SOR_wM4.js";import{importShared as kn}from"../__federation_fn_import-DNtjaGC4.js";import{j as m_}from"../jsx-runtime-BWEVYhay.js";import{b as Fe,d as pr,e as iT,c as Hr}from"../tslib.es6-DbvBTznf.js";var g_={},ep={};Object.defineProperty(ep,"__esModule",{value:!0});var y_={},Gu={},qu={},__={},Jd={exports:{}};/*! eth-connect {
|
|
3
3
|
"date": "2024-01-01T15:10:57.542Z",
|
|
4
4
|
"commit": "b2fa64415d297ccce86d2a5d59d8705388f77db9",
|
|
5
5
|
"ref": "refs/tags/6.2.4"
|
|
@@ -10,7 +10,7 @@ import{c as ie}from"../_commonjsHelpers-C4iS2aBk.js";import{a as $w,d as eT,b as
|
|
|
10
10
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
11
11
|
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
12
12
|
* @license MIT
|
|
13
|
-
*/(function(d){(function(){var h="input is invalid type",y=typeof window=="object",w=y?window:{};w.JS_SHA3_NO_WINDOW&&(y=!1);var O=!y&&typeof self=="object";!w.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?w=ie:O&&(w=self);var P=!w.JS_SHA3_NO_COMMON_JS&&d.exports,Q=!w.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ye="0123456789abcdef".split(""),Pe=[4,1024,262144,67108864],Le=[0,8,16,24],_n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ut=[224,256,384,512],be=[128,256],sn=["hex","buffer","arrayBuffer","array","digest"],Ot={128:168,256:136};!w.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),!Q||!w.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(p){return typeof p=="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});for(var Rt=function(p,E,I){return function(S){return new yt(p,E,p).update(S)[I]()}},dn=function(p,E,I){return function(S,R){return new yt(p,E,R).update(S)[I]()}},Lr=function(p,E,I){return function(S,R,N,M){return on["cshake"+p].update(S,R,N,M)[I]()}},yr=function(p,E,I){return function(S,R,N,M){return on["kmac"+p].update(S,R,N,M)[I]()}},fn=function(p,E,I,S){for(var R=0;R<sn.length;++R){var N=sn[R];p[N]=E(I,S,N)}return p},_r=function(p,E){var I=Rt(p,E,"hex");return I.create=function(){return new yt(p,E,p)},I.update=function(S){return I.create().update(S)},fn(I,Rt,p,E)},ai=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ut,createMethod:_r},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ut,createMethod:_r},{name:"shake",padding:[31,7936,2031616,520093696],bits:be,createMethod:function(p,E){var I=dn(p,E,"hex");return I.create=function(S){return new yt(p,E,S)},I.update=function(S,R){return I.create(R).update(S)},fn(I,dn,p,E)}},{name:"cshake",padding:Pe,bits:be,createMethod:function(p,E){var I=Ot[p],S=Lr(p,0,"hex");return S.create=function(R,N,M){return N||M?new yt(p,E,R).bytepad([N,M],I):on["shake"+p].create(R)},S.update=function(R,N,M,x){return S.create(N,M,x).update(R)},fn(S,Lr,p,E)}},{name:"kmac",padding:Pe,bits:be,createMethod:function(p,E){var I=Ot[p],S=yr(p,0,"hex");return S.create=function(R,N,M){return new Dn(p,E,N).bytepad(["KMAC",M],I).bytepad([R],I)},S.update=function(R,N,M,x){return S.create(R,M,x).update(N)},fn(S,yr,p,E)}}],on={},Dr=[],pn=0;pn<ai.length;++pn)for(var br=ai[pn],de=br.bits,Br=0;Br<de.length;++Br){var ha=br.name+"_"+de[Br];if(Dr.push(ha),on[ha]=br.createMethod(de[Br],br.padding),br.name!=="sha3"){var ma=br.name+de[Br];Dr.push(ma),on[ma]=on[ha]}}function yt(p,E,I){this.blocks=[],this.s=[],this.padding=E,this.outputBits=I,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(p<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=I>>5,this.extraBytes=(31&I)>>3;for(var S=0;S<50;++S)this.s[S]=0}function Dn(p,E,I){yt.call(this,p,E,I)}yt.prototype.update=function(p){if(this.finalized)throw new Error("finalize already called");var E,I=typeof p;if(I!=="string"){if(I!=="object")throw new Error(h);if(p===null)throw new Error(h);if(Q&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!(Array.isArray(p)||Q&&ArrayBuffer.isView(p)))throw new Error(h);E=!0}for(var S,R,N=this.blocks,M=this.byteCount,x=p.length,q=this.blockCount,V=0,he=this.s;V<x;){if(this.reset)for(this.reset=!1,N[0]=this.block,S=1;S<q+1;++S)N[S]=0;if(E)for(S=this.start;V<x&&S<M;++V)N[S>>2]|=p[V]<<Le[3&S++];else for(S=this.start;V<x&&S<M;++V)(R=p.charCodeAt(V))<128?N[S>>2]|=R<<Le[3&S++]:R<2048?(N[S>>2]|=(192|R>>6)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]):R<55296||R>=57344?(N[S>>2]|=(224|R>>12)<<Le[3&S++],N[S>>2]|=(128|R>>6&63)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]):(R=65536+((1023&R)<<10|1023&p.charCodeAt(++V)),N[S>>2]|=(240|R>>18)<<Le[3&S++],N[S>>2]|=(128|R>>12&63)<<Le[3&S++],N[S>>2]|=(128|R>>6&63)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]);if(this.lastByteIndex=S,S>=M){for(this.start=S-M,this.block=N[q],S=0;S<q;++S)he[S]^=N[S];v(he),this.reset=!0}else this.start=S}return this},yt.prototype.encode=function(p,E){var I=255&p,S=1,R=[I];for(I=255&(p>>=8);I>0;)R.unshift(I),I=255&(p>>=8),++S;return E?R.push(S):R.unshift(S),this.update(R),R.length},yt.prototype.encodeString=function(p){var E,I=typeof p;if(I!=="string"){if(I!=="object")throw new Error(h);if(p===null)throw new Error(h);if(Q&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!(Array.isArray(p)||Q&&ArrayBuffer.isView(p)))throw new Error(h);E=!0}var S=0,R=p.length;if(E)S=R;else for(var N=0;N<p.length;++N){var M=p.charCodeAt(N);M<128?S+=1:M<2048?S+=2:M<55296||M>=57344?S+=3:(M=65536+((1023&M)<<10|1023&p.charCodeAt(++N)),S+=4)}return S+=this.encode(8*S),this.update(p),S},yt.prototype.bytepad=function(p,E){for(var I=this.encode(E),S=0;S<p.length;++S)I+=this.encodeString(p[S]);var R=E-I%E,N=[];return N.length=R,this.update(N),this},yt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var p=this.blocks,E=this.lastByteIndex,I=this.blockCount,S=this.s;if(p[E>>2]|=this.padding[3&E],this.lastByteIndex===this.byteCount)for(p[0]=p[I],E=1;E<I+1;++E)p[E]=0;for(p[I-1]|=2147483648,E=0;E<I;++E)S[E]^=p[E];v(S)}},yt.prototype.toString=yt.prototype.hex=function(){this.finalize();for(var p,E=this.blockCount,I=this.s,S=this.outputBlocks,R=this.extraBytes,N=0,M=0,x="";M<S;){for(N=0;N<E&&M<S;++N,++M)p=I[N],x+=ye[p>>4&15]+ye[15&p]+ye[p>>12&15]+ye[p>>8&15]+ye[p>>20&15]+ye[p>>16&15]+ye[p>>28&15]+ye[p>>24&15];M%E==0&&(v(I),N=0)}return R&&(p=I[N],x+=ye[p>>4&15]+ye[15&p],R>1&&(x+=ye[p>>12&15]+ye[p>>8&15]),R>2&&(x+=ye[p>>20&15]+ye[p>>16&15])),x},yt.prototype.arrayBuffer=function(){this.finalize();var p,E=this.blockCount,I=this.s,S=this.outputBlocks,R=this.extraBytes,N=0,M=0,x=this.outputBits>>3;p=R?new ArrayBuffer(S+1<<2):new ArrayBuffer(x);for(var q=new Uint32Array(p);M<S;){for(N=0;N<E&&M<S;++N,++M)q[M]=I[N];M%E==0&&v(I)}return R&&(q[N]=I[N],p=p.slice(0,x)),p},yt.prototype.buffer=yt.prototype.arrayBuffer,yt.prototype.digest=yt.prototype.array=function(){this.finalize();for(var p,E,I=this.blockCount,S=this.s,R=this.outputBlocks,N=this.extraBytes,M=0,x=0,q=[];x<R;){for(M=0;M<I&&x<R;++M,++x)p=x<<2,E=S[M],q[p]=255&E,q[p+1]=E>>8&255,q[p+2]=E>>16&255,q[p+3]=E>>24&255;x%I==0&&v(S)}return N&&(p=x<<2,E=S[M],q[p]=255&E,N>1&&(q[p+1]=E>>8&255),N>2&&(q[p+2]=E>>16&255)),q},Dn.prototype=new yt,Dn.prototype.finalize=function(){return this.encode(this.outputBits,!0),yt.prototype.finalize.call(this)};var v=function(p){var E,I,S,R,N,M,x,q,V,he,ke,Ue,dt,Ct,Bt,ct,_t,zt,Fr,si,oi,bn,Er,cn,Xt,wt,Po,ko,Lo,Do,Bo,Fo,xo,Ho,Uo,jo,Vo,Go,qo,Wo,zo,Yo,Ko,Xo,Jo,Zo,Qo,$o,ec,tc,nc,rc,ic,ac,sc,oc,cc,uc,lc,dc,fc,pc,hc;for(S=0;S<48;S+=2)R=p[0]^p[10]^p[20]^p[30]^p[40],N=p[1]^p[11]^p[21]^p[31]^p[41],M=p[2]^p[12]^p[22]^p[32]^p[42],x=p[3]^p[13]^p[23]^p[33]^p[43],q=p[4]^p[14]^p[24]^p[34]^p[44],V=p[5]^p[15]^p[25]^p[35]^p[45],he=p[6]^p[16]^p[26]^p[36]^p[46],ke=p[7]^p[17]^p[27]^p[37]^p[47],E=(Ue=p[8]^p[18]^p[28]^p[38]^p[48])^(M<<1|x>>>31),I=(dt=p[9]^p[19]^p[29]^p[39]^p[49])^(x<<1|M>>>31),p[0]^=E,p[1]^=I,p[10]^=E,p[11]^=I,p[20]^=E,p[21]^=I,p[30]^=E,p[31]^=I,p[40]^=E,p[41]^=I,E=R^(q<<1|V>>>31),I=N^(V<<1|q>>>31),p[2]^=E,p[3]^=I,p[12]^=E,p[13]^=I,p[22]^=E,p[23]^=I,p[32]^=E,p[33]^=I,p[42]^=E,p[43]^=I,E=M^(he<<1|ke>>>31),I=x^(ke<<1|he>>>31),p[4]^=E,p[5]^=I,p[14]^=E,p[15]^=I,p[24]^=E,p[25]^=I,p[34]^=E,p[35]^=I,p[44]^=E,p[45]^=I,E=q^(Ue<<1|dt>>>31),I=V^(dt<<1|Ue>>>31),p[6]^=E,p[7]^=I,p[16]^=E,p[17]^=I,p[26]^=E,p[27]^=I,p[36]^=E,p[37]^=I,p[46]^=E,p[47]^=I,E=he^(R<<1|N>>>31),I=ke^(N<<1|R>>>31),p[8]^=E,p[9]^=I,p[18]^=E,p[19]^=I,p[28]^=E,p[29]^=I,p[38]^=E,p[39]^=I,p[48]^=E,p[49]^=I,Ct=p[0],Bt=p[1],Zo=p[11]<<4|p[10]>>>28,Qo=p[10]<<4|p[11]>>>28,ko=p[20]<<3|p[21]>>>29,Lo=p[21]<<3|p[20]>>>29,dc=p[31]<<9|p[30]>>>23,fc=p[30]<<9|p[31]>>>23,Yo=p[40]<<18|p[41]>>>14,Ko=p[41]<<18|p[40]>>>14,Ho=p[2]<<1|p[3]>>>31,Uo=p[3]<<1|p[2]>>>31,ct=p[13]<<12|p[12]>>>20,_t=p[12]<<12|p[13]>>>20,$o=p[22]<<10|p[23]>>>22,ec=p[23]<<10|p[22]>>>22,Do=p[33]<<13|p[32]>>>19,Bo=p[32]<<13|p[33]>>>19,pc=p[42]<<2|p[43]>>>30,hc=p[43]<<2|p[42]>>>30,ac=p[5]<<30|p[4]>>>2,sc=p[4]<<30|p[5]>>>2,jo=p[14]<<6|p[15]>>>26,Vo=p[15]<<6|p[14]>>>26,zt=p[25]<<11|p[24]>>>21,Fr=p[24]<<11|p[25]>>>21,tc=p[34]<<15|p[35]>>>17,nc=p[35]<<15|p[34]>>>17,Fo=p[45]<<29|p[44]>>>3,xo=p[44]<<29|p[45]>>>3,cn=p[6]<<28|p[7]>>>4,Xt=p[7]<<28|p[6]>>>4,oc=p[17]<<23|p[16]>>>9,cc=p[16]<<23|p[17]>>>9,Go=p[26]<<25|p[27]>>>7,qo=p[27]<<25|p[26]>>>7,si=p[36]<<21|p[37]>>>11,oi=p[37]<<21|p[36]>>>11,rc=p[47]<<24|p[46]>>>8,ic=p[46]<<24|p[47]>>>8,Xo=p[8]<<27|p[9]>>>5,Jo=p[9]<<27|p[8]>>>5,wt=p[18]<<20|p[19]>>>12,Po=p[19]<<20|p[18]>>>12,uc=p[29]<<7|p[28]>>>25,lc=p[28]<<7|p[29]>>>25,Wo=p[38]<<8|p[39]>>>24,zo=p[39]<<8|p[38]>>>24,bn=p[48]<<14|p[49]>>>18,Er=p[49]<<14|p[48]>>>18,p[0]=Ct^~ct&zt,p[1]=Bt^~_t&Fr,p[10]=cn^~wt&ko,p[11]=Xt^~Po&Lo,p[20]=Ho^~jo&Go,p[21]=Uo^~Vo&qo,p[30]=Xo^~Zo&$o,p[31]=Jo^~Qo&ec,p[40]=ac^~oc&uc,p[41]=sc^~cc&lc,p[2]=ct^~zt&si,p[3]=_t^~Fr&oi,p[12]=wt^~ko&Do,p[13]=Po^~Lo&Bo,p[22]=jo^~Go&Wo,p[23]=Vo^~qo&zo,p[32]=Zo^~$o&tc,p[33]=Qo^~ec&nc,p[42]=oc^~uc&dc,p[43]=cc^~lc&fc,p[4]=zt^~si&bn,p[5]=Fr^~oi&Er,p[14]=ko^~Do&Fo,p[15]=Lo^~Bo&xo,p[24]=Go^~Wo&Yo,p[25]=qo^~zo&Ko,p[34]=$o^~tc&rc,p[35]=ec^~nc&ic,p[44]=uc^~dc&pc,p[45]=lc^~fc&hc,p[6]=si^~bn&Ct,p[7]=oi^~Er&Bt,p[16]=Do^~Fo&cn,p[17]=Bo^~xo&Xt,p[26]=Wo^~Yo&Ho,p[27]=zo^~Ko&Uo,p[36]=tc^~rc&Xo,p[37]=nc^~ic&Jo,p[46]=dc^~pc&ac,p[47]=fc^~hc&sc,p[8]=bn^~Ct&ct,p[9]=Er^~Bt&_t,p[18]=Fo^~cn&wt,p[19]=xo^~Xt&Po,p[28]=Yo^~Ho&jo,p[29]=Ko^~Uo&Vo,p[38]=rc^~Xo&Zo,p[39]=ic^~Jo&Qo,p[48]=pc^~ac&oc,p[49]=hc^~sc&cc,p[0]^=_n[S],p[1]^=_n[S+1]};if(P)d.exports=on;else for(pn=0;pn<Dr.length;++pn)w[Dr[pn]]=on[Dr[pn]]})()})(o);var c=o.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,f=Math.ceil,l=Math.floor,m="[BigNumber Error] ",g=m+"Number primitive has more than 15 significant digits: ",_=1e14,T=14,B=9007199254740991,U=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],J=1e7,K=1e9;function H(d){var h=0|d;return d>0||d===h?h:h-1}function F(d){for(var h,y,w=1,O=d.length,P=d[0]+"";w<O;){for(h=d[w++]+"",y=T-h.length;y--;h="0"+h);P+=h}for(O=P.length;P.charCodeAt(--O)===48;);return P.slice(0,O+1||1)}function k(d,h){var y,w,O=d.c,P=h.c,Q=d.s,ye=h.s,Pe=d.e,Le=h.e;if(!Q||!ye)return null;if(y=O&&!O[0],w=P&&!P[0],y||w)return y?w?0:-ye:Q;if(Q!=ye)return Q;if(y=Q<0,w=Pe==Le,!O||!P)return w?0:!O^y?1:-1;if(!w)return Pe>Le^y?1:-1;for(ye=(Pe=O.length)<(Le=P.length)?Pe:Le,Q=0;Q<ye;Q++)if(O[Q]!=P[Q])return O[Q]>P[Q]^y?1:-1;return Pe==Le?0:Pe>Le^y?1:-1}function j(d,h,y,w){if(d<h||d>y||d!==l(d))throw Error(m+(w||"Argument")+(typeof d=="number"?d<h||d>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(d))}function te(d){var h=d.c.length-1;return H(d.e/T)==h&&d.c[h]%2!=0}function L(d,h){return(d.length>1?d.charAt(0)+"."+d.slice(1):d)+(h<0?"e":"e+")+h}function G(d,h,y){var w,O;if(h<0){for(O=y+".";++h;O+=y);d=O+d}else if(++h>(w=d.length)){for(O=y,h-=w;--h;O+=y);d+=O}else h<w&&(d=d.slice(0,h)+"."+d.slice(h));return d}var W=function d(h){var y,w,O,P,Q,ye,Pe,Le,_n,Ut,be=de.prototype={constructor:de,toString:null,valueOf:null},sn=new de(1),Ot=20,Rt=4,dn=-7,Lr=21,yr=-1e7,fn=1e7,_r=!1,ai=1,on=0,Dr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},pn="0123456789abcdefghijklmnopqrstuvwxyz",br=!0;function de(v,p){var E,I,S,R,N,M,x,q,V=this;if(!(V instanceof de))return new de(v,p);if(p==null){if(v&&v._isBigNumber===!0)return V.s=v.s,void(!v.c||v.e>fn?V.c=V.e=null:v.e<yr?V.c=[V.e=0]:(V.e=v.e,V.c=v.c.slice()));if((M=typeof v=="number")&&0*v==0){if(V.s=1/v<0?(v=-v,-1):1,v===~~v){for(R=0,N=v;N>=10;N/=10,R++);return void(R>fn?V.c=V.e=null:(V.e=R,V.c=[v]))}q=String(v)}else{if(!u.test(q=String(v)))return O(V,q,M);V.s=q.charCodeAt(0)==45?(q=q.slice(1),-1):1}(R=q.indexOf("."))>-1&&(q=q.replace(".","")),(N=q.search(/e/i))>0?(R<0&&(R=N),R+=+q.slice(N+1),q=q.substring(0,N)):R<0&&(R=q.length)}else{if(j(p,2,pn.length,"Base"),p==10&&br)return yt(V=new de(v),Ot+V.e+1,Rt);if(q=String(v),M=typeof v=="number"){if(0*v!=0)return O(V,q,M,p);if(V.s=1/v<0?(q=q.slice(1),-1):1,de.DEBUG&&q.replace(/^0\.0*|\./,"").length>15)throw Error(g+v)}else V.s=q.charCodeAt(0)===45?(q=q.slice(1),-1):1;for(E=pn.slice(0,p),R=N=0,x=q.length;N<x;N++)if(E.indexOf(I=q.charAt(N))<0){if(I=="."){if(N>R){R=x;continue}}else if(!S&&(q==q.toUpperCase()&&(q=q.toLowerCase())||q==q.toLowerCase()&&(q=q.toUpperCase()))){S=!0,N=-1,R=0;continue}return O(V,String(v),M,p)}M=!1,(R=(q=w(q,p,10,V.s)).indexOf("."))>-1?q=q.replace(".",""):R=q.length}for(N=0;q.charCodeAt(N)===48;N++);for(x=q.length;q.charCodeAt(--x)===48;);if(q=q.slice(N,++x)){if(x-=N,M&&de.DEBUG&&x>15&&(v>B||v!==l(v)))throw Error(g+V.s*v);if((R=R-N-1)>fn)V.c=V.e=null;else if(R<yr)V.c=[V.e=0];else{if(V.e=R,V.c=[],N=(R+1)%T,R<0&&(N+=T),N<x){for(N&&V.c.push(+q.slice(0,N)),x-=T;N<x;)V.c.push(+q.slice(N,N+=T));N=T-(q=q.slice(N)).length}else N-=x;for(;N--;q+="0");V.c.push(+q)}}else V.c=[V.e=0]}function Br(v,p,E,I){var S,R,N,M,x;if(E==null?E=Rt:j(E,0,8),!v.c)return v.toString();if(S=v.c[0],N=v.e,p==null)x=F(v.c),x=I==1||I==2&&(N<=dn||N>=Lr)?L(x,N):G(x,N,"0");else if(R=(v=yt(new de(v),p,E)).e,M=(x=F(v.c)).length,I==1||I==2&&(p<=R||R<=dn)){for(;M<p;x+="0",M++);x=L(x,R)}else if(p-=N,x=G(x,R,"0"),R+1>M){if(--p>0)for(x+=".";p--;x+="0");}else if((p+=R-M)>0)for(R+1==M&&(x+=".");p--;x+="0");return v.s<0&&S?"-"+x:x}function ha(v,p){for(var E,I=1,S=new de(v[0]);I<v.length;I++){if(!(E=new de(v[I])).s){S=E;break}p.call(S,E)&&(S=E)}return S}function ma(v,p,E){for(var I=1,S=p.length;!p[--S];p.pop());for(S=p[0];S>=10;S/=10,I++);return(E=I+E*T-1)>fn?v.c=v.e=null:E<yr?v.c=[v.e=0]:(v.e=E,v.c=p),v}function yt(v,p,E,I){var S,R,N,M,x,q,V,he=v.c,ke=U;if(he){e:{for(S=1,M=he[0];M>=10;M/=10,S++);if((R=p-S)<0)R+=T,N=p,V=(x=he[q=0])/ke[S-N-1]%10|0;else if((q=f((R+1)/T))>=he.length){if(!I)break e;for(;he.length<=q;he.push(0));x=V=0,S=1,N=(R%=T)-T+1}else{for(x=M=he[q],S=1;M>=10;M/=10,S++);V=(N=(R%=T)-T+S)<0?0:x/ke[S-N-1]%10|0}if(I=I||p<0||he[q+1]!=null||(N<0?x:x%ke[S-N-1]),I=E<4?(V||I)&&(E==0||E==(v.s<0?3:2)):V>5||V==5&&(E==4||I||E==6&&(R>0?N>0?x/ke[S-N]:0:he[q-1])%10&1||E==(v.s<0?8:7)),p<1||!he[0])return he.length=0,I?(p-=v.e+1,he[0]=ke[(T-p%T)%T],v.e=-p||0):he[0]=v.e=0,v;if(R==0?(he.length=q,M=1,q--):(he.length=q+1,M=ke[T-R],he[q]=N>0?l(x/ke[S-N]%ke[N])*M:0),I)for(;;){if(q==0){for(R=1,N=he[0];N>=10;N/=10,R++);for(N=he[0]+=M,M=1;N>=10;N/=10,M++);R!=M&&(v.e++,he[0]==_&&(he[0]=1));break}if(he[q]+=M,he[q]!=_)break;he[q--]=0,M=1}for(R=he.length;he[--R]===0;he.pop());}v.e>fn?v.c=v.e=null:v.e<yr&&(v.c=[v.e=0])}return v}function Dn(v){var p,E=v.e;return E===null?v.toString():(p=F(v.c),p=E<=dn||E>=Lr?L(p,E):G(p,E,"0"),v.s<0?"-"+p:p)}return de.clone=d,de.ROUND_UP=0,de.ROUND_DOWN=1,de.ROUND_CEIL=2,de.ROUND_FLOOR=3,de.ROUND_HALF_UP=4,de.ROUND_HALF_DOWN=5,de.ROUND_HALF_EVEN=6,de.ROUND_HALF_CEIL=7,de.ROUND_HALF_FLOOR=8,de.EUCLID=9,de.config=de.set=function(v){var p,E;if(v!=null){if(typeof v!="object")throw Error(m+"Object expected: "+v);if(v.hasOwnProperty(p="DECIMAL_PLACES")&&(j(E=v[p],0,K,p),Ot=E),v.hasOwnProperty(p="ROUNDING_MODE")&&(j(E=v[p],0,8,p),Rt=E),v.hasOwnProperty(p="EXPONENTIAL_AT")&&((E=v[p])&&E.pop?(j(E[0],-K,0,p),j(E[1],0,K,p),dn=E[0],Lr=E[1]):(j(E,-K,K,p),dn=-(Lr=E<0?-E:E))),v.hasOwnProperty(p="RANGE"))if((E=v[p])&&E.pop)j(E[0],-K,-1,p),j(E[1],1,K,p),yr=E[0],fn=E[1];else{if(j(E,-K,K,p),!E)throw Error(m+p+" cannot be zero: "+E);yr=-(fn=E<0?-E:E)}if(v.hasOwnProperty(p="CRYPTO")){if((E=v[p])!==!!E)throw Error(m+p+" not true or false: "+E);if(E){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw _r=!E,Error(m+"crypto unavailable");_r=E}else _r=E}if(v.hasOwnProperty(p="MODULO_MODE")&&(j(E=v[p],0,9,p),ai=E),v.hasOwnProperty(p="POW_PRECISION")&&(j(E=v[p],0,K,p),on=E),v.hasOwnProperty(p="FORMAT")){if(typeof(E=v[p])!="object")throw Error(m+p+" not an object: "+E);Dr=E}if(v.hasOwnProperty(p="ALPHABET")){if(typeof(E=v[p])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(E))throw Error(m+p+" invalid: "+E);br=E.slice(0,10)=="0123456789",pn=E}}return{DECIMAL_PLACES:Ot,ROUNDING_MODE:Rt,EXPONENTIAL_AT:[dn,Lr],RANGE:[yr,fn],CRYPTO:_r,MODULO_MODE:ai,POW_PRECISION:on,FORMAT:Dr,ALPHABET:pn}},de.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!de.DEBUG)return!0;var p,E,I=v.c,S=v.e,R=v.s;e:if({}.toString.call(I)=="[object Array]"){if((R===1||R===-1)&&S>=-K&&S<=K&&S===l(S)){if(I[0]===0){if(S===0&&I.length===1)return!0;break e}if((p=(S+1)%T)<1&&(p+=T),String(I[0]).length==p){for(p=0;p<I.length;p++)if((E=I[p])<0||E>=_||E!==l(E))break e;if(E!==0)return!0}}}else if(I===null&&S===null&&(R===null||R===1||R===-1))return!0;throw Error(m+"Invalid BigNumber: "+v)},de.maximum=de.max=function(){return ha(arguments,be.lt)},de.minimum=de.min=function(){return ha(arguments,be.gt)},de.random=(P=9007199254740992,Q=Math.random()*P&2097151?function(){return l(Math.random()*P)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var p,E,I,S,R,N=0,M=[],x=new de(sn);if(v==null?v=Ot:j(v,0,K),S=f(v/T),_r)if(crypto.getRandomValues){for(p=crypto.getRandomValues(new Uint32Array(S*=2));N<S;)(R=131072*p[N]+(p[N+1]>>>11))>=9e15?(E=crypto.getRandomValues(new Uint32Array(2)),p[N]=E[0],p[N+1]=E[1]):(M.push(R%1e14),N+=2);N=S/2}else{if(!crypto.randomBytes)throw _r=!1,Error(m+"crypto unavailable");for(p=crypto.randomBytes(S*=7);N<S;)(R=281474976710656*(31&p[N])+1099511627776*p[N+1]+4294967296*p[N+2]+16777216*p[N+3]+(p[N+4]<<16)+(p[N+5]<<8)+p[N+6])>=9e15?crypto.randomBytes(7).copy(p,N):(M.push(R%1e14),N+=7);N=S/7}if(!_r)for(;N<S;)(R=Q())<9e15&&(M[N++]=R%1e14);for(S=M[--N],v%=T,S&&v&&(R=U[T-v],M[N]=l(S/R)*R);M[N]===0;M.pop(),N--);if(N<0)M=[I=0];else{for(I=-1;M[0]===0;M.splice(0,1),I-=T);for(N=1,R=M[0];R>=10;R/=10,N++);N<T&&(I-=T-N)}return x.e=I,x.c=M,x}),de.sum=function(){for(var v=1,p=arguments,E=new de(p[0]);v<p.length;)E=E.plus(p[v++]);return E},w=function(){var v="0123456789";function p(E,I,S,R){for(var N,M,x=[0],q=0,V=E.length;q<V;){for(M=x.length;M--;x[M]*=I);for(x[0]+=R.indexOf(E.charAt(q++)),N=0;N<x.length;N++)x[N]>S-1&&(x[N+1]==null&&(x[N+1]=0),x[N+1]+=x[N]/S|0,x[N]%=S)}return x.reverse()}return function(E,I,S,R,N){var M,x,q,V,he,ke,Ue,dt,Ct=E.indexOf("."),Bt=Ot,ct=Rt;for(Ct>=0&&(V=on,on=0,E=E.replace(".",""),ke=(dt=new de(I)).pow(E.length-Ct),on=V,dt.c=p(G(F(ke.c),ke.e,"0"),10,S,v),dt.e=dt.c.length),q=V=(Ue=p(E,I,S,N?(M=pn,v):(M=v,pn))).length;Ue[--V]==0;Ue.pop());if(!Ue[0])return M.charAt(0);if(Ct<0?--q:(ke.c=Ue,ke.e=q,ke.s=R,Ue=(ke=y(ke,dt,Bt,ct,S)).c,he=ke.r,q=ke.e),Ct=Ue[x=q+Bt+1],V=S/2,he=he||x<0||Ue[x+1]!=null,he=ct<4?(Ct!=null||he)&&(ct==0||ct==(ke.s<0?3:2)):Ct>V||Ct==V&&(ct==4||he||ct==6&&1&Ue[x-1]||ct==(ke.s<0?8:7)),x<1||!Ue[0])E=he?G(M.charAt(1),-Bt,M.charAt(0)):M.charAt(0);else{if(Ue.length=x,he)for(--S;++Ue[--x]>S;)Ue[x]=0,x||(++q,Ue=[1].concat(Ue));for(V=Ue.length;!Ue[--V];);for(Ct=0,E="";Ct<=V;E+=M.charAt(Ue[Ct++]));E=G(E,q,M.charAt(0))}return E}}(),y=function(){function v(I,S,R){var N,M,x,q,V=0,he=I.length,ke=S%J,Ue=S/J|0;for(I=I.slice();he--;)V=((M=ke*(x=I[he]%J)+(N=Ue*x+(q=I[he]/J|0)*ke)%J*J+V)/R|0)+(N/J|0)+Ue*q,I[he]=M%R;return V&&(I=[V].concat(I)),I}function p(I,S,R,N){var M,x;if(R!=N)x=R>N?1:-1;else for(M=x=0;M<R;M++)if(I[M]!=S[M]){x=I[M]>S[M]?1:-1;break}return x}function E(I,S,R,N){for(var M=0;R--;)I[R]-=M,M=I[R]<S[R]?1:0,I[R]=M*N+I[R]-S[R];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,S,R,N,M){var x,q,V,he,ke,Ue,dt,Ct,Bt,ct,_t,zt,Fr,si,oi,bn,Er,cn=I.s==S.s?1:-1,Xt=I.c,wt=S.c;if(!(Xt&&Xt[0]&&wt&&wt[0]))return new de(I.s&&S.s&&(Xt?!wt||Xt[0]!=wt[0]:wt)?Xt&&Xt[0]==0||!wt?0*cn:cn/0:NaN);for(Bt=(Ct=new de(cn)).c=[],cn=R+(q=I.e-S.e)+1,M||(M=_,q=H(I.e/T)-H(S.e/T),cn=cn/T|0),V=0;wt[V]==(Xt[V]||0);V++);if(wt[V]>(Xt[V]||0)&&q--,cn<0)Bt.push(1),he=!0;else{for(si=Xt.length,bn=wt.length,V=0,cn+=2,(ke=l(M/(wt[0]+1)))>1&&(wt=v(wt,ke,M),Xt=v(Xt,ke,M),bn=wt.length,si=Xt.length),Fr=bn,_t=(ct=Xt.slice(0,bn)).length;_t<bn;ct[_t++]=0);Er=wt.slice(),Er=[0].concat(Er),oi=wt[0],wt[1]>=M/2&&oi++;do{if(ke=0,(x=p(wt,ct,bn,_t))<0){if(zt=ct[0],bn!=_t&&(zt=zt*M+(ct[1]||0)),(ke=l(zt/oi))>1)for(ke>=M&&(ke=M-1),dt=(Ue=v(wt,ke,M)).length,_t=ct.length;p(Ue,ct,dt,_t)==1;)ke--,E(Ue,bn<dt?Er:wt,dt,M),dt=Ue.length,x=1;else ke==0&&(x=ke=1),dt=(Ue=wt.slice()).length;if(dt<_t&&(Ue=[0].concat(Ue)),E(ct,Ue,_t,M),_t=ct.length,x==-1)for(;p(wt,ct,bn,_t)<1;)ke++,E(ct,bn<_t?Er:wt,_t,M),_t=ct.length}else x===0&&(ke++,ct=[0]);Bt[V++]=ke,ct[0]?ct[_t++]=Xt[Fr]||0:(ct=[Xt[Fr]],_t=1)}while((Fr++<si||ct[0]!=null)&&cn--);he=ct[0]!=null,Bt[0]||Bt.splice(0,1)}if(M==_){for(V=1,cn=Bt[0];cn>=10;cn/=10,V++);yt(Ct,R+(Ct.e=V+q*T-1)+1,N,he)}else Ct.e=q,Ct.r=+he;return Ct}}(),ye=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Pe=/^([^.]+)\.$/,Le=/^\.([^.]+)$/,_n=/^-?(Infinity|NaN)$/,Ut=/^\s*\+(?=[\w.])|^\s+|\s+$/g,O=function(v,p,E,I){var S,R=E?p:p.replace(Ut,"");if(_n.test(R))v.s=isNaN(R)?null:R<0?-1:1;else{if(!E&&(R=R.replace(ye,function(N,M,x){return S=(x=x.toLowerCase())=="x"?16:x=="b"?2:8,I&&I!=S?N:M}),I&&(S=I,R=R.replace(Pe,"$1").replace(Le,"0.$1")),p!=R))return new de(R,S);if(de.DEBUG)throw Error(m+"Not a"+(I?" base "+I:"")+" number: "+p);v.s=null}v.c=v.e=null},be.absoluteValue=be.abs=function(){var v=new de(this);return v.s<0&&(v.s=1),v},be.comparedTo=function(v,p){return k(this,new de(v,p))},be.decimalPlaces=be.dp=function(v,p){var E,I,S,R=this;if(v!=null)return j(v,0,K),p==null?p=Rt:j(p,0,8),yt(new de(R),v+R.e+1,p);if(!(E=R.c))return null;if(I=((S=E.length-1)-H(this.e/T))*T,S=E[S])for(;S%10==0;S/=10,I--);return I<0&&(I=0),I},be.dividedBy=be.div=function(v,p){return y(this,new de(v,p),Ot,Rt)},be.dividedToIntegerBy=be.idiv=function(v,p){return y(this,new de(v,p),0,1)},be.exponentiatedBy=be.pow=function(v,p){var E,I,S,R,N,M,x,q,V=this;if((v=new de(v)).c&&!v.isInteger())throw Error(m+"Exponent not an integer: "+Dn(v));if(p!=null&&(p=new de(p)),N=v.e>14,!V.c||!V.c[0]||V.c[0]==1&&!V.e&&V.c.length==1||!v.c||!v.c[0])return q=new de(Math.pow(+Dn(V),N?v.s*(2-te(v)):+Dn(v))),p?q.mod(p):q;if(M=v.s<0,p){if(p.c?!p.c[0]:!p.s)return new de(NaN);(I=!M&&V.isInteger()&&p.isInteger())&&(V=V.mod(p))}else{if(v.e>9&&(V.e>0||V.e<-1||(V.e==0?V.c[0]>1||N&&V.c[1]>=24e7:V.c[0]<8e13||N&&V.c[0]<=9999975e7)))return R=V.s<0&&te(v)?-0:0,V.e>-1&&(R=1/R),new de(M?1/R:R);on&&(R=f(on/T+2))}for(N?(E=new de(.5),M&&(v.s=1),x=te(v)):x=(S=Math.abs(+Dn(v)))%2,q=new de(sn);;){if(x){if(!(q=q.times(V)).c)break;R?q.c.length>R&&(q.c.length=R):I&&(q=q.mod(p))}if(S){if((S=l(S/2))===0)break;x=S%2}else if(yt(v=v.times(E),v.e+1,1),v.e>14)x=te(v);else{if((S=+Dn(v))==0)break;x=S%2}V=V.times(V),R?V.c&&V.c.length>R&&(V.c.length=R):I&&(V=V.mod(p))}return I?q:(M&&(q=sn.div(q)),p?q.mod(p):R?yt(q,on,Rt,void 0):q)},be.integerValue=function(v){var p=new de(this);return v==null?v=Rt:j(v,0,8),yt(p,p.e+1,v)},be.isEqualTo=be.eq=function(v,p){return k(this,new de(v,p))===0},be.isFinite=function(){return!!this.c},be.isGreaterThan=be.gt=function(v,p){return k(this,new de(v,p))>0},be.isGreaterThanOrEqualTo=be.gte=function(v,p){return(p=k(this,new de(v,p)))===1||p===0},be.isInteger=function(){return!!this.c&&H(this.e/T)>this.c.length-2},be.isLessThan=be.lt=function(v,p){return k(this,new de(v,p))<0},be.isLessThanOrEqualTo=be.lte=function(v,p){return(p=k(this,new de(v,p)))===-1||p===0},be.isNaN=function(){return!this.s},be.isNegative=function(){return this.s<0},be.isPositive=function(){return this.s>0},be.isZero=function(){return!!this.c&&this.c[0]==0},be.minus=function(v,p){var E,I,S,R,N=this,M=N.s;if(p=(v=new de(v,p)).s,!M||!p)return new de(NaN);if(M!=p)return v.s=-p,N.plus(v);var x=N.e/T,q=v.e/T,V=N.c,he=v.c;if(!x||!q){if(!V||!he)return V?(v.s=-p,v):new de(he?N:NaN);if(!V[0]||!he[0])return he[0]?(v.s=-p,v):new de(V[0]?N:Rt==3?-0:0)}if(x=H(x),q=H(q),V=V.slice(),M=x-q){for((R=M<0)?(M=-M,S=V):(q=x,S=he),S.reverse(),p=M;p--;S.push(0));S.reverse()}else for(I=(R=(M=V.length)<(p=he.length))?M:p,M=p=0;p<I;p++)if(V[p]!=he[p]){R=V[p]<he[p];break}if(R&&(S=V,V=he,he=S,v.s=-v.s),(p=(I=he.length)-(E=V.length))>0)for(;p--;V[E++]=0);for(p=_-1;I>M;){if(V[--I]<he[I]){for(E=I;E&&!V[--E];V[E]=p);--V[E],V[I]+=_}V[I]-=he[I]}for(;V[0]==0;V.splice(0,1),--q);return V[0]?ma(v,V,q):(v.s=Rt==3?-1:1,v.c=[v.e=0],v)},be.modulo=be.mod=function(v,p){var E,I,S=this;return v=new de(v,p),!S.c||!v.s||v.c&&!v.c[0]?new de(NaN):!v.c||S.c&&!S.c[0]?new de(S):(ai==9?(I=v.s,v.s=1,E=y(S,v,0,3),v.s=I,E.s*=I):E=y(S,v,0,ai),(v=S.minus(E.times(v))).c[0]||ai!=1||(v.s=S.s),v)},be.multipliedBy=be.times=function(v,p){var E,I,S,R,N,M,x,q,V,he,ke,Ue,dt,Ct,Bt,ct=this,_t=ct.c,zt=(v=new de(v,p)).c;if(!(_t&&zt&&_t[0]&&zt[0]))return!ct.s||!v.s||_t&&!_t[0]&&!zt||zt&&!zt[0]&&!_t?v.c=v.e=v.s=null:(v.s*=ct.s,_t&&zt?(v.c=[0],v.e=0):v.c=v.e=null),v;for(I=H(ct.e/T)+H(v.e/T),v.s*=ct.s,(x=_t.length)<(he=zt.length)&&(dt=_t,_t=zt,zt=dt,S=x,x=he,he=S),S=x+he,dt=[];S--;dt.push(0));for(Ct=_,Bt=J,S=he;--S>=0;){for(E=0,ke=zt[S]%Bt,Ue=zt[S]/Bt|0,R=S+(N=x);R>S;)E=((q=ke*(q=_t[--N]%Bt)+(M=Ue*q+(V=_t[N]/Bt|0)*ke)%Bt*Bt+dt[R]+E)/Ct|0)+(M/Bt|0)+Ue*V,dt[R--]=q%Ct;dt[R]=E}return E?++I:dt.splice(0,1),ma(v,dt,I)},be.negated=function(){var v=new de(this);return v.s=-v.s||null,v},be.plus=function(v,p){var E,I=this,S=I.s;if(p=(v=new de(v,p)).s,!S||!p)return new de(NaN);if(S!=p)return v.s=-p,I.minus(v);var R=I.e/T,N=v.e/T,M=I.c,x=v.c;if(!R||!N){if(!M||!x)return new de(S/0);if(!M[0]||!x[0])return x[0]?v:new de(M[0]?I:0*S)}if(R=H(R),N=H(N),M=M.slice(),S=R-N){for(S>0?(N=R,E=x):(S=-S,E=M),E.reverse();S--;E.push(0));E.reverse()}for((S=M.length)-(p=x.length)<0&&(E=x,x=M,M=E,p=S),S=0;p;)S=(M[--p]=M[p]+x[p]+S)/_|0,M[p]=_===M[p]?0:M[p]%_;return S&&(M=[S].concat(M),++N),ma(v,M,N)},be.precision=be.sd=function(v,p){var E,I,S,R=this;if(v!=null&&v!==!!v)return j(v,1,K),p==null?p=Rt:j(p,0,8),yt(new de(R),v,p);if(!(E=R.c))return null;if(I=(S=E.length-1)*T+1,S=E[S]){for(;S%10==0;S/=10,I--);for(S=E[0];S>=10;S/=10,I++);}return v&&R.e+1>I&&(I=R.e+1),I},be.shiftedBy=function(v){return j(v,-9007199254740991,B),this.times("1e"+v)},be.squareRoot=be.sqrt=function(){var v,p,E,I,S,R=this,N=R.c,M=R.s,x=R.e,q=Ot+4,V=new de("0.5");if(M!==1||!N||!N[0])return new de(!M||M<0&&(!N||N[0])?NaN:N?R:1/0);if((M=Math.sqrt(+Dn(R)))==0||M==1/0?(((p=F(N)).length+x)%2==0&&(p+="0"),M=Math.sqrt(+p),x=H((x+1)/2)-(x<0||x%2),E=new de(p=M==1/0?"5e"+x:(p=M.toExponential()).slice(0,p.indexOf("e")+1)+x)):E=new de(M+""),E.c[0]){for((M=(x=E.e)+q)<3&&(M=0);;)if(S=E,E=V.times(S.plus(y(R,S,q,1))),F(S.c).slice(0,M)===(p=F(E.c)).slice(0,M)){if(E.e<x&&--M,(p=p.slice(M-3,M+1))!="9999"&&(I||p!="4999")){+p&&(+p.slice(1)||p.charAt(0)!="5")||(yt(E,E.e+Ot+2,1),v=!E.times(E).eq(R));break}if(!I&&(yt(S,S.e+Ot+2,0),S.times(S).eq(R))){E=S;break}q+=4,M+=4,I=1}}return yt(E,E.e+Ot+1,Rt,v)},be.toExponential=function(v,p){return v!=null&&(j(v,0,K),v++),Br(this,v,p,1)},be.toFixed=function(v,p){return v!=null&&(j(v,0,K),v=v+this.e+1),Br(this,v,p)},be.toFormat=function(v,p,E){var I,S=this;if(E==null)v!=null&&p&&typeof p=="object"?(E=p,p=null):v&&typeof v=="object"?(E=v,v=p=null):E=Dr;else if(typeof E!="object")throw Error(m+"Argument not an object: "+E);if(I=S.toFixed(v,p),S.c){var R,N=I.split("."),M=+E.groupSize,x=+E.secondaryGroupSize,q=E.groupSeparator||"",V=N[0],he=N[1],ke=S.s<0,Ue=ke?V.slice(1):V,dt=Ue.length;if(x&&(R=M,M=x,x=R,dt-=R),M>0&&dt>0){for(R=dt%M||M,V=Ue.substr(0,R);R<dt;R+=M)V+=q+Ue.substr(R,M);x>0&&(V+=q+Ue.slice(R)),ke&&(V="-"+V)}I=he?V+(E.decimalSeparator||"")+((x=+E.fractionGroupSize)?he.replace(new RegExp("\\d{"+x+"}\\B","g"),"$&"+(E.fractionGroupSeparator||"")):he):V}return(E.prefix||"")+I+(E.suffix||"")},be.toFraction=function(v){var p,E,I,S,R,N,M,x,q,V,he,ke,Ue=this,dt=Ue.c;if(v!=null&&(!(M=new de(v)).isInteger()&&(M.c||M.s!==1)||M.lt(sn)))throw Error(m+"Argument "+(M.isInteger()?"out of range: ":"not an integer: ")+Dn(M));if(!dt)return new de(Ue);for(p=new de(sn),q=E=new de(sn),I=x=new de(sn),ke=F(dt),R=p.e=ke.length-Ue.e-1,p.c[0]=U[(N=R%T)<0?T+N:N],v=!v||M.comparedTo(p)>0?R>0?p:q:M,N=fn,fn=1/0,M=new de(ke),x.c[0]=0;V=y(M,p,0,1),(S=E.plus(V.times(I))).comparedTo(v)!=1;)E=I,I=S,q=x.plus(V.times(S=q)),x=S,p=M.minus(V.times(S=p)),M=S;return S=y(v.minus(E),I,0,1),x=x.plus(S.times(q)),E=E.plus(S.times(I)),x.s=q.s=Ue.s,he=y(q,I,R*=2,Rt).minus(Ue).abs().comparedTo(y(x,E,R,Rt).minus(Ue).abs())<1?[q,I]:[x,E],fn=N,he},be.toNumber=function(){return+Dn(this)},be.toPrecision=function(v,p){return v!=null&&j(v,1,K),Br(this,v,p,2)},be.toString=function(v){var p,E=this,I=E.s,S=E.e;return S===null?I?(p="Infinity",I<0&&(p="-"+p)):p="NaN":(v==null?p=S<=dn||S>=Lr?L(F(E.c),S):G(F(E.c),S,"0"):v===10&&br?p=G(F((E=yt(new de(E),Ot+S+1,Rt)).c),E.e,"0"):(j(v,2,pn.length,"Base"),p=w(G(F(E.c),S,"0"),10,v,I,!0)),I<0&&E.c[0]&&(p="-"+p)),p},be.valueOf=be.toJSON=function(){return Dn(this)},be._isBigNumber=!0,be[Symbol.toStringTag]="BigNumber",be[Symbol.for("nodejs.util.inspect.custom")]=be.valueOf,h!=null&&de.set(h),de}();const z={ROUNDING_MODE:W.ROUND_DOWN};function ae(d){return new TextEncoder().encode(d)}function Ee(d){return typeof d=="string"?Ee(ve(d)):new TextDecoder().decode(d)}W.config(z);const pe="UNKNOWN_ERROR",le="INVALID_ARGUMENT";function $(d,h=pe,y={}){const w=[];Object.keys(y).forEach(Q=>{try{w.push(Q+"="+JSON.stringify(y[Q]))}catch{w.push(Q+"="+JSON.stringify(y[Q].toString()))}});const O=d;w.length&&(d+=" ("+w.join(", ")+")");const P=new Error(d);return P.reason=O,P.code=h,Object.keys(y).forEach(function(Q){P[Q]=y[Q]}),P}function ve(d){if(typeof d!="string")throw new Error("hexToBytes only accept strings, got: "+typeof d);if(d.substr(0,2)==="0x")return ve(d.substr(2));const h=new Uint8Array(Math.ceil(d.length/2));let y=0;for(let w=0;w<d.length;w+=2){const O=parseInt(d.substr(w,2),16);if(isNaN(O))throw new Error("Cannot read hex string:"+JSON.stringify(d));h[y]=O,y++}return h}function ge(d){return Array.from(d).map(h=>h.toString(16).padStart(2,"0")).join("")}function fe(d,h){if(typeof d=="string"){if(h&&h.encoding==="hex"&&typeof d=="string"){let y=d;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const w=ve(y);return c.keccak256(w)}return c.keccak256(ae(d))}return c.keccak256(d)}const Se={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Xe(d,h,y){return new Array(h-d.length+1).join(y||"0")+d}function ce(d){let h="",y=0;const w=d.length;for(d.substring(0,2)==="0x"&&(y=2);y<w;y+=2){const O=parseInt(d.substr(y,2),16);h+=String.fromCharCode(O)}return h}function He(d){return qn(d)&&d.name&&d.name.indexOf("(")!==-1?d.name:d.name+"("+vt(!1,d.inputs||[]).join(",")+")"}function Et(...d){const h=d.reduce((O,P)=>O+P.length,0),y=new Uint8Array(h);let w=0;for(const O of d)y.set(O,w),w+=O.length;return y}function vt(d,h){const y=[];return h.forEach(function(w){if(typeof w.components=="object"){if(w.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let O="";const P=w.type.indexOf("[");P>=0&&(O=w.type.substring(P));const Q=vt(d,w.components);y.push("("+Q.join(",")+")"+O)}else y.push(w.type)}),y}function tn(d){const h=d.indexOf("("),y=d.indexOf(")");return h!==-1&&y!==-1?d.substr(0,h):d}function nn(d){const h=d.indexOf("("),y=d.indexOf(")");return h!==-1&&y!==-1?d.substr(h+1,y-h-1).replace(" ",""):""}function Gn(d){return d==null?d:Lt(d).toNumber()}function Ne(d){return Lt(d).toNumber()}function pt(d){return Nr(d)?d.toString(10):""+d}function gt(d){return typeof d=="string"&&!d.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d)?"0x"+d:Je(d)}function Wt(d){if(typeof d=="string")return d.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d)?Je(d):"0x"+ge(ae(d));if(d instanceof Uint8Array)return"0x"+ge(d);throw new Error(`toStringData: Error trying to convert ${d} (${typeof d}) to a hex string.`)}function nt(d){return typeof d=="boolean"?d:Lt(d).toNumber()!==0}function rt(d){const h=Lt(d),y=h.toString(16);return h.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Je(d){if(Mr(d))return rt(+d);if(Nr(d))return rt(d);if(la(d)){const h=d;if(h.indexOf("-0x")===0)return rt(h);if(h.indexOf("0x")===0)return h;if(!isFinite(h))return ge(ae(h))}if(d instanceof Uint8Array)return"0x"+ge(d);if($n(d)||qn(d))throw new Error("toHex can only be called with scalar values, not objects or arrays");return rt(d)}function yn(d){const h=d?d.toLowerCase():"ether",y=Se[h];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(Se,null,2));return new W(y,10)}function Lt(d){let h=d||0;return Nr(h)?h:(typeof h=="string"&&(h=h.trim()),typeof h!="string"||h.indexOf("0x")!==0&&h.indexOf("-0x")!==0?h instanceof Uint8Array?new W(ge(h),16):new W(h,10):new W(h.replace("0x","").toLowerCase(),16))}function ti(d){return new W(new Array(d).fill("1").join(""),2)}function Qe(d,h=256){const y=Lt(d).integerValue();return y.isLessThan(0)?ti(h).plus(y).plus(1):y}function rn(d,h){return Xe(d.toString(2),h,"0")[0]==="1"}function et(d){if(typeof d!="string")throw $("invalid address",le,{arg:"address",value:d});if(d.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return d.trim().substring(0,2)!=="0x"&&(d="0x"+d),bs(d);throw $("invalid address",le,{arg:"address",value:d})}function Dt(d,h=256){if(rn(d,h)){const y=ti(h);return d.minus(y).minus(1)}return d}function ot(d){return/^0x[0-9a-f]{40}$/i.test(d)}function Ln(d){return!!/^(0x)?[0-9a-f]{40}$/i.test(d)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(d)&&!/^(0x)?[0-9A-F]{40}$/.test(d))||_s(d))}function _s(d){const h=d.replace("0x",""),y=fe(h.toLowerCase());for(let w=0;w<40;w++)if(parseInt(y[w],16)>7&&h[w].toUpperCase()!==h[w]||parseInt(y[w],16)<=7&&h[w].toLowerCase()!==h[w])return!1;return!0}function bs(d){if(d===void 0)return"";const h=d.toLowerCase().replace("0x",""),y=fe(h);let w="0x";for(let O=0;O<h.length;O++)parseInt(y[O],16)>7?w+=h[O].toUpperCase():w+=h[O];return w}function An(d){if(!Array.isArray(d))throw new Error(`Value was not an array: ${JSON.stringify(d)}`);return d}function Pi(d){return ot(d)?d:/^[0-9a-f]{40}$/.test(d)?"0x"+d:"0x"+Xe(Je(d).substr(2),40)}function Nr(d){return d instanceof W}function la(d){return typeof d=="string"||d&&d.constructor&&d.constructor.name==="String"}function qn(d){return d!==null&&!Array.isArray(d)&&typeof d=="object"}function Mr(d){return typeof d=="boolean"}function $n(d){return Array.isArray(d)}var da,ni;function Es(d,h){if(!d)throw new Error("jsonrpc method should be specified!");if(typeof d!="string")throw new Error(`jsonrpc must be a string, got ${typeof d}!`);return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:d,params:h||[]}}function vs(d){return Array.isArray(d)?d.every(h):h(d);function h(y){return!!y&&(y.error===void 0||y.error===null)&&y.jsonrpc==="2.0"&&y.id!==null&&"result"in y&&y.result!==void 0}}n.TransactionStatus=void 0,(da=n.TransactionStatus||(n.TransactionStatus={})).pending="pending",da.confirmed="confirmed",da.failed="failed",n.TransactionType=void 0,(ni=n.TransactionType||(n.TransactionType={})).queued="queued",ni.dropped="dropped",ni.replaced="replaced",ni.pending="pending",ni.reverted="reverted",ni.confirmed="confirmed",n.messageId=0;function fa(d){return Lt(d)}function Ss(d){return d==="latest"||d==="pending"||d==="earliest"}function gr(d){return d===void 0?"latest":bt(d)}function bt(d){return d==null?null:Ss(d)?d:Je(d)}function Wn(d){return d.from&&(d.from=ee(d.from)),d.to&&(d.to=ee(d.to)),d.gasPrice!==void 0&&(d.gasPrice=rt(d.gasPrice)),d.gas!==void 0&&(d.gas=rt(d.gas)),d.value!==void 0&&(d.value=rt(d.value)),d.nonce!==void 0&&(d.nonce=rt(d.nonce)),d.data&&!d.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d.data)&&(d.data="0x"+d.data),d}function er(d){if(typeof d!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(d));if(d.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(d));if(d.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(d));return d}function C(d){if(typeof d!="object")throw new Error("Did not provide transaction options");if(!d.from)throw new Error('Missing "from" in transaction options');return d.from=ee(d.from),d.to&&(d.to=ee(d.to)),d.gasPrice!==void 0&&(d.gasPrice=rt(d.gasPrice)),d.gas!==void 0&&(d.gas=rt(d.gas)),d.value!==void 0&&(d.value=rt(d.value)),d.nonce!==void 0&&(d.nonce=rt(d.nonce)),d.data&&!d.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d.data)&&(d.data="0x"+d.data),d}function b(d){return d?(d.blockNumber!==null&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex!==null&&(d.transactionIndex=Ne(d.transactionIndex)),d.nonce=Ne(d.nonce),d.gas=Ne(d.gas),d.gasPrice=Lt(d.gasPrice),d.value=Lt(d.value),d):null}function A(d){return d?(d.blockNumber!==null&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex!==null&&(d.transactionIndex=Ne(d.transactionIndex)),d.cumulativeGasUsed=Ne(d.cumulativeGasUsed),d.gasUsed=Ne(d.gasUsed),d.logs&&$n(d.logs)&&(d.logs=d.logs.map(function(h){return Y(h)})),d.status=Ne(d.status||""),d):null}function D(d){return d?(d.gasLimit=Ne(d.gasLimit),d.gasUsed=Ne(d.gasUsed),d.size=Ne(d.size),d.timestamp=Ne(d.timestamp),d.number!==null&&(d.number=Ne(d.number)),d.difficulty=Lt(d.difficulty),d.totalDifficulty=Lt(d.totalDifficulty),$n(d.transactions)&&d.transactions.forEach(function(h,y){la(h)||(d.transactions[y]=b(h)||d.transactions[y])}),d):null}function Y(d){return d&&(d.blockNumber&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex&&(d.transactionIndex=Ne(d.transactionIndex)),d.logIndex&&(d.logIndex=Ne(d.logIndex)),d)}function ee(d){if(ot(d))return d;if(Ln(d))return"0x"+d;throw new Error(`Invalid address: ${JSON.stringify(d)}`)}function me(d){return d}function _e(d){return d&&(d.startingBlock=Ne(d.startingBlock),d.currentBlock=Ne(d.currentBlock),d.highestBlock=Ne(d.highestBlock),d.knownStates&&(d.knownStates=Ne(d.knownStates),d.pulledStates=Ne(d.pulledStates)),d)}function De(d){if(d===null)throw $("cannot convert null value to array",le,{arg:"value",value:d});if(d instanceof Uint8Array)return new Uint8Array(d);if(typeof d=="string"){const h=d.match(/^(0x)?[0-9a-fA-F]*$/);if(!h)throw $("invalid hexidecimal string",le,{arg:"value",value:d});if(h[1]!=="0x")throw $("hex string must have 0x prefix",le,{arg:"value",value:d});(d=d.substring(2)).length%2&&(d="0"+d);const y=[];for(let w=0;w<d.length;w+=2)y.push(parseInt(d.substr(w,2),16));return new Uint8Array(y)}if(function(h){if(!h||parseInt(String(h.length))!==h.length||typeof h=="string")return!1;for(let y=0;y<h.length;y++){const w=h[y];if(w<0||w>=256||parseInt(String(w))!==w)return!1}return!0}(d))return new Uint8Array(d);throw $("invalid arrayify value",void 0,{arg:"value",value:d,type:typeof d})}function Me(d,h,y){Object.defineProperty(d,h,{enumerable:!0,value:y,writable:!1})}const ze=new W(-1),ut=new W(0),lt=new W(1),Vt=new W("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ht(d){return function(h,y){function w(Q){return new Error('unexpected character "'+h[Q]+'" at position '+Q+' in "'+h+'"')}const O={type:"",name:"",state:{allowType:!0}};let P=O;for(let Q=0;Q<h.length;Q++){const ye=h[Q];switch(ye){case"(":if(!P.state.allowParams)throw w(Q);P.state.allowType=!1,P.type=an(P.type),P.components=[{type:"",name:"",parent:P,state:{allowType:!0}}],P=P.components[0];break;case")":delete P.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),P.type=an(P.type);const Pe=P;if(P=P.parent,!P)throw w(Q);delete Pe.parent,P.state.allowParams=!1,P.state.allowName=!0,P.state.allowArray=!0;break;case",":delete P.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),P.type=an(P.type);const Le={type:"",name:"",parent:P.parent,state:{allowType:!0}};P.parent.components.push(Le),delete P.parent,P=Le;break;case" ":P.state.allowType&&P.type!==""&&(P.type=an(P.type),delete P.state.allowType,P.state.allowName=!0,P.state.allowParams=!0),P.state.allowName&&P.name!==""&&(P.name==="indexed"?(P.indexed=!0,P.name=""):P.state.allowName=!1);break;case"[":if(!P.state.allowArray)throw w(Q);P.type+=ye,P.state.allowArray=!1,P.state.allowName=!1,P.state.readArray=!0;break;case"]":if(!P.state.readArray)throw w(Q);P.type+=ye,P.state.readArray=!1,P.state.allowArray=!0,P.state.allowName=!0;break;default:if(P.state.allowType)P.type+=ye,P.state.allowParams=!0,P.state.allowArray=!0;else if(P.state.allowName)P.name+=ye,delete P.state.allowArray;else{if(!P.state.readArray)throw w(Q);P.type+=ye}}}if(P.parent)throw new Error("unexpected eof");return delete O.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),O.type=an(O.type),O}(d)}function an(d){return d.match(/^uint($|[^1-9])/)?d="uint256"+d.substring(4):d.match(/^int($|[^1-9])/)&&(d="int256"+d.substring(3)),d}const ri=new RegExp(/^bytes([0-9]*)$/),Pr=new RegExp(/^(u?int)([0-9]*)$/),ii=new RegExp(/^(.*)\[([0-9]*)\]$/),pa=function(d,h){const y=d.match(Pr);return y&&parseInt(y[2])<=48?h.toNumber():h};class On{constructor(h,y,w,O="",P){this.coerceFunc=h,this.name=y,this.type=w,this.localName=O,this.dynamic=P}}class ki extends On{constructor(h){super(h.coerceFunc,h.name,h.type,void 0,h.dynamic),Me(this,"coder",h)}encode(h){return this.coder.encode(h)}decode(h,y){return this.coder.decode(h,y)}}class Fh extends On{constructor(h,y){super(h,"null","",y,!1)}encode(h){return De([])}decode(h,y){if(y>h.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Co(d,h){return new W(d.toString(2).substr(-h),2)}class xh extends On{constructor(h,y,w,O){const P=(w?"int":"uint")+8*y;super(h,P,P,O,!1),this.size=y,this.signed=w}encode(h){try{let y=Lt(h);if(this.signed){let O=Co(Vt,8*this.size-1);if(y.gt(O))throw new Error("out-of-bounds");if(O=O.plus(lt).multipliedBy(ze),y.lt(O))throw new Error("out-of-bounds")}else if(y.lt(ut)||y.gt(Co(Vt,8*this.size)))throw new Error("out-of-bounds");y=Co(Qe(y,8*this.size),8*this.size),this.signed&&(y=Qe(Dt(y,8*this.size),256));const w=Xe(Qe(y).toString(16),64);if(w.indexOf("NaN")!==-1)throw $("invalid number value, NaN",le,{arg:this.localName,coderType:this.name,value:h,v:y,twosComplement:Qe(y),twosComplement16:Qe(y).toString(16),pad:Xe(Qe(y).toString(16),64),size:this.size});return ve(w)}catch(y){throw $("invalid number value",le,{arg:this.localName,coderType:this.name,value:h,message:y.toString()})}}decode(h,y){if(h.length<y+32)throw $("insufficient data for "+this.name+" type",le,{arg:this.localName,coderType:this.name,value:Je(h.slice(y,y+32))});const w=32-this.size;let O=new W(ge(h.slice(y+w,y+32)),16);return O=this.signed?Dt(O,8*this.size):Co(O,8*this.size),{consumed:32,value:this.coerceFunc(this.name,O)}}}const kr=new xh(function(d,h){return h},32,!1,"none");class Hh extends On{constructor(h,y,w){const O="bytes"+y;super(h,O,O,w,!1),this.length=y}encode(h){const y=new Uint8Array(32);try{if(typeof h=="string"&&h.length%2!=0)throw new Error("hex string cannot be odd-length");const w=De(h);if(w.length>this.length)throw new Error("incorrect data length");y.set(w)}catch(w){throw $("invalid "+this.name+" value. Use hex strings or Uint8Array",le,{arg:this.localName,coderType:this.name,value:w.value||h,details:w.message})}return y}decode(h,y){if(h.length<y+32)throw $("insufficient data for "+this.name+" type",le,{arg:this.localName,coderType:this.name,value:Je(h.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,h.slice(y,y+this.length))}}}function Uh(d){const h=32*Math.ceil(d.length/32),y=new Uint8Array(h-d.length);return Et(kr.encode(d.length),d,y)}function jh(d,h,y){if(d.length<h+32)throw $("insufficient data for dynamicBytes length",le,{arg:y,coderType:"dynamicBytes",value:Je(d.slice(h,h+32))});let w=kr.decode(d,h).value;try{w=w.toNumber()}catch(O){throw O("dynamic bytes count too large",le,{arg:y,coderType:"dynamicBytes",value:w.toString()})}if(d.length<h+32+w)throw $("insufficient data for dynamicBytes type",le,{arg:y,coderType:"dynamicBytes",value:Je(d.slice(h,h+32+w))});return{consumed:32+32*Math.ceil(w/32),value:d.slice(h+32,h+32+w)}}function No(d){return 32*Math.ceil(d/32)}function Vh(d,h){if(!Array.isArray(h)){if(!h||typeof h!="object")throw $("invalid tuple value",le,{coderType:"tuple",value:h});{const Pe=[];d.forEach(function(Le){Pe.push(h[Le.localName])}),h=Pe}}if(d.length!==h.length)throw $("types/value length mismatch",le,{coderType:"tuple",value:h});const y=[];d.forEach(function(Pe,Le){y.push({dynamic:Pe.dynamic,value:Pe.encode(h[Le])})});let w=0,O=0;y.forEach(function(Pe){Pe.dynamic?(w+=32,O+=No(Pe.value.length)):w+=No(Pe.value.length)});let P=0,Q=w;const ye=new Uint8Array(w+O);return y.forEach(function(Pe){Pe.dynamic?(ye.set(kr.encode(Q),P),P+=32,ye.set(Pe.value,Q),Q+=No(Pe.value.length)):(ye.set(Pe.value,P),P+=No(Pe.value.length))}),ye}class Xw extends Array{}class Jw extends On{constructor(h,y,w,O){super(h,"array",y.type+"["+(w>=0?w:"")+"]",O,w===-1||y.dynamic),this.coder=y,this.length=w}encode(h){if(!Array.isArray(h))throw $("expected array value",le,{arg:this.localName,coderType:"array",value:h});let y=this.length,w=new Uint8Array(0);y===-1&&(y=h.length,w=kr.encode(y)),function(P,Q,ye){if(ye||(ye=""),P<Q)throw $("missing argument"+ye,"MISSING_ARGUMENT",{count:P,expectedCount:Q});if(P>Q)throw $("too many arguments"+ye,"UNEXPECTED_ARGUMENT",{count:P,expectedCount:Q})}(y,h.length,"in coder array"+(this.localName?" "+this.localName:""));const O=[];for(let P=0;P<h.length;P++)O.push(this.coder);return Et(w,Vh(O,h))}decode(h,y){let w=0,O=this.length;if(O===-1){let ye;try{ye=kr.decode(h,y)}catch(Pe){throw $("insufficient data for dynamic array length",le,{arg:this.localName,coderType:"array",value:Pe.value})}try{O=ye.value.toNumber()}catch{throw $("array count too large",le,{arg:this.localName,coderType:"array",value:ye.value.toString()})}w+=ye.consumed,y+=ye.consumed}const P=[];for(let ye=0;ye<O;ye++)P.push(new ki(this.coder));const Q=function(ye,Pe,Le){const _n=Le;let Ut=0;const be=[];return ye.forEach(function(sn){let Ot;if(sn.dynamic){const Rt=kr.decode(Pe,Le);Ot=sn.decode(Pe,_n+Rt.value.toNumber()),Ot.consumed=Rt.consumed}else Ot=sn.decode(Pe,Le);Ot.value!==void 0&&be.push(Ot.value),Le+=Ot.consumed,Ut+=Ot.consumed}),{value:be,consumed:Ut}}(P,h,y);return Q.consumed+=w,Q.value=this.coerceFunc(this.type,Q.value),Q}}class Dl extends On{constructor(h,y,w){let O=!1;const P=[];y.forEach(function(Q){Q.dynamic&&(O=!0),P.push(Q.type)}),super(h,"tuple","tuple("+P.join(",")+")",w,O),this.coders=y}encode(h){return Vh(this.coders,h)}decode(h,y){const w=function(O,P,Q){const ye=Q;let Pe=0;const Le=new Xw;return O.forEach(function(_n){let Ut;if(_n.dynamic){const be=kr.decode(P,Q);Ut=_n.decode(P,ye+be.value.toNumber()),Ut.consumed=be.consumed}else Ut=_n.decode(P,Q);Ut.value!==void 0&&Le.push(Ut.value),Q+=Ut.consumed,Pe+=Ut.consumed}),O.forEach(function(_n,Ut){let be=_n.localName;be&&(be==="length"&&(be="_length"),Le[be]!==null&&Le[be]!==void 0||(Le[be]=Le[Ut]))}),{value:Le,consumed:Pe}}(this.coders,h,y);return w.value=this.coerceFunc(this.type,w.value),w}}const Zw={address:class extends On{constructor(d,h){super(d,"address","address",h,!1)}encode(d){const h=new Uint8Array(32),y=d.trim();if(!Ln(y))throw $("invalid address format",le,{arg:this.localName,coderType:"address",value:d});try{h.set(ve(ee(y)),12)}catch(w){throw $(`invalid address (${w.message})`,le,{arg:this.localName,coderType:"address",value:d})}return h}decode(d,h){if(d.length<h+32)throw $("insufficuent data for address type",le,{arg:this.localName,coderType:"address",value:Je(d.slice(h,h+32)),missingBytes:h+32-d.length});return{consumed:32,value:this.coerceFunc("address",et(Je(d.slice(h+12,h+32))))}}},bool:class extends On{constructor(d,h){super(d,"bool","bool",h,!1)}encode(d){return kr.encode(d?1:0)}decode(d,h){try{const y=kr.decode(d,h);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?$("insufficient data for boolean type",le,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends On{constructor(d,h){super(d,"string","string",h,!0)}encode(d){if(typeof d!="string")throw $("invalid string value",le,{arg:this.localName,coderType:"string",value:d});return Uh(ae(d))}decode(d,h){const y=jh(d,h,this.localName);return y.value=this.coerceFunc("string",Ee(y.value)),y}},bytes:class extends On{constructor(d,h){super(d,"bytes","bytes",h,!0)}encode(d){try{return Uh(De(d))}catch(h){throw h("invalid bytes value",le,{arg:this.localName,coderType:"bytes",value:h.value})}}decode(d,h){const y=jh(d,h,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends Hh{constructor(d,h){super(d,24,h)}}};function Mo(d,h){const y=Zw[h.type];if(y)return new y(d,h.name);let w=h.type.match(Pr);if(w){const O=parseInt(w[2]||"256");if(O===0||O>256||O%8!=0)throw $("invalid "+w[1]+" bit length",le,{arg:"param",value:h});return new xh(d,O/8,w[1]==="int",h.name)}if(w=h.type.match(ri),w){const O=parseInt(w[1]);if(O===0||O>32)throw $("invalid bytes length",le,{arg:"param",value:h});return new Hh(d,O,h.name)}if(w=h.type.match(ii),w){const O=Object.assign({},h),P=parseInt(w[2]||"-1");return O.type=w[1],new Jw(d,Mo(d,O),P,h.name)}if(h.type.substring(0,5)==="tuple")return function(O,P,Q){P||(P=[]);const ye=P.map(Pe=>Mo(O,Pe));return new Dl(O,ye,Q)}(d,h.components,h.name);if(h.type==="")return new Fh(d,h.name);throw $("invalid type",le,{arg:"type",value:h.type,fullType:h})}class Bl{constructor(h){(function(y,w){if(!(y instanceof w))throw $("missing new","MISSING_NEW",{name:w.name})})(this,Bl),h||(h=pa),Me(this,"coerceFunc",h)}encode(h,y){if(h.length!==y.length)throw $("types/values length mismatch",le,{count:{types:h.length,values:y.length},value:{types:h,values:y}});const w=h.map(O=>typeof O=="string"?Ht(O):O).map(O=>Mo(this.coerceFunc,O));return new Dl(this.coerceFunc,w,"_").encode(y)}decode(h,y){const w=h.map(O=>typeof O=="string"?Ht(O):O).map(O=>Mo(this.coerceFunc,O));return new Dl(this.coerceFunc,w,"_").decode(y,0).value}}const Gh=new Bl;var qh,Ie;function Ae(d,h,y,w){var O,P=arguments.length,Q=P<3?h:w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(d,h,y,w);else for(var ye=d.length-1;ye>=0;ye--)(O=d[ye])&&(Q=(P<3?O(Q):P>3?O(h,y,Q):O(h,y))||Q);return P>3&&Q&&Object.defineProperty(h,y,Q),Q}function Oe(d,h){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(d,h)}n.coder=void 0,(qh=n.coder||(n.coder={})).encodeParams=function(d,h){return ge(Gh.encode(d,h))},qh.decodeParams=function(d,h){if(d.length>0&&(!h||h==="0x"||h==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Gh.decode(d,ve("0x"+h.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Be{constructor(h){this.callName=h.callName,this.params=h.params||0,this.inputFormatter=h.inputFormatter||null,this.outputFormatter=h.outputFormatter}validateArgs(h){if(h.length!==this.params)throw y=this.callName,w=h.length,O=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${w}, expected: ${O}`);var y,w,O}formatInput(h){return this.inputFormatter?this.inputFormatter.map(function(y,w){return y?y(h[w]):h[w]}):h}formatOutput(h){return h!==null?this.outputFormatter(h):null}toPayload(h){const y=this.formatInput(h);return this.validateArgs(y),{method:this.callName,params:y}}async execute(h,...y){const w=this.toPayload(y);if(!h)throw new Error("Missing RequestManager in method#exec");const O=await h.sendAsync(w);return this.formatOutput(O)}}class Rn{constructor(h){this.getter=h.getter,this.outputFormatter=h.outputFormatter}formatOutput(h){return this.outputFormatter(h)}async execute(h,...y){const w=await h.sendAsync({method:this.getter,params:[]});return this.formatOutput(w)}}function Wh(d){return new Promise(h=>setTimeout(h,d))}n.eth=void 0,(Ie=n.eth||(n.eth={})).eth_getBalance=new Be({callName:"eth_getBalance",params:2,inputFormatter:[ee,gr],outputFormatter:fa}),Ie.eth_getStorageAt=new Be({callName:"eth_getStorageAt",params:3,inputFormatter:[ee,Je,gr],outputFormatter:gt}),Ie.eth_getCode=new Be({callName:"eth_getCode",params:2,inputFormatter:[ee,gr],outputFormatter:gt}),Ie.eth_getBlockByHash=new Be({callName:"eth_getBlockByHash",params:2,inputFormatter:[bt,function(d){return!!d}],outputFormatter:D}),Ie.eth_getBlockByNumber=new Be({callName:"eth_getBlockByNumber",params:2,inputFormatter:[bt,function(d){return!!d}],outputFormatter:D}),Ie.eth_getUncleByBlockHashAndIndex=new Be({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:D}),Ie.eth_getUncleByBlockNumberAndIndex=new Be({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:D}),Ie.eth_getBlockTransactionCountByHash=new Be({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getBlockTransactionCountByNumber=new Be({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getUncleCountByBlockHash=new Be({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getUncleCountByBlockNumber=new Be({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getTransactionByHash=new Be({callName:"eth_getTransactionByHash",params:1,inputFormatter:[er],outputFormatter:b}),Ie.eth_getTransactionByBlockHashAndIndex=new Be({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:b}),Ie.eth_getTransactionByBlockNumberAndIndex=new Be({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:b}),Ie.eth_getTransactionReceipt=new Be({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[er],outputFormatter:A}),Ie.eth_getTransactionCount=new Be({callName:"eth_getTransactionCount",params:2,inputFormatter:[ee,gr],outputFormatter:Ne}),Ie.eth_sendRawTransaction=new Be({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.web3_sha3=new Be({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.eth_sendTransaction=new Be({callName:"eth_sendTransaction",params:1,inputFormatter:[C],outputFormatter:gt}),Ie.eth_sign=new Be({callName:"eth_sign",params:2,inputFormatter:[ee,null],outputFormatter:gt}),Ie.eth_call=new Be({callName:"eth_call",params:2,inputFormatter:[Wn,gr],outputFormatter:gt}),Ie.eth_estimateGas=new Be({callName:"eth_estimateGas",params:1,inputFormatter:[Wn],outputFormatter:Ne}),Ie.eth_submitWork=new Be({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:nt}),Ie.eth_getWork=new Be({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:An}),Ie.eth_coinbase=new Rn({getter:"eth_coinbase",outputFormatter:Pi}),Ie.eth_mining=new Rn({getter:"eth_mining",outputFormatter:nt}),Ie.eth_hashrate=new Rn({getter:"eth_hashrate",outputFormatter:Ne}),Ie.eth_syncing=new Rn({getter:"eth_syncing",outputFormatter:_e}),Ie.eth_gasPrice=new Rn({getter:"eth_gasPrice",outputFormatter:fa}),Ie.eth_accounts=new Rn({getter:"eth_accounts",outputFormatter:An}),Ie.eth_blockNumber=new Rn({getter:"eth_blockNumber",outputFormatter:Ne}),Ie.eth_protocolVersion=new Rn({getter:"eth_protocolVersion",outputFormatter:Ne}),Ie.web3_clientVersion=new Rn({getter:"web3_clientVersion",outputFormatter:pt}),Ie.net_version=new Rn({getter:"net_version",outputFormatter:pt}),Ie.shh_version=new Be({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ne}),Ie.shh_post=new Be({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.personal_newAccount=new Be({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Pi}),Ie.personal_importRawKey=new Be({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Pi}),Ie.personal_sign=new Be({callName:"personal_sign",params:3,inputFormatter:[Wt,ee,null],outputFormatter:gt}),Ie.personal_ecRecover=new Be({callName:"personal_ecRecover",params:2,inputFormatter:[Wt,null],outputFormatter:Pi}),Ie.personal_unlockAccount=new Be({callName:"personal_unlockAccount",params:3,inputFormatter:[ee,null,Gn],outputFormatter:nt}),Ie.personal_sendTransaction=new Be({callName:"personal_sendTransaction",params:2,inputFormatter:[C,null],outputFormatter:gt}),Ie.personal_lockAccount=new Be({callName:"personal_lockAccount",params:1,inputFormatter:[ee],outputFormatter:nt}),Ie.personal_listAccounts=new Rn({getter:"personal_listAccounts",outputFormatter:An}),Ie.net_listening=new Rn({getter:"net_listening",outputFormatter:nt}),Ie.net_peerCount=new Rn({getter:"net_peerCount",outputFormatter:Ne}),Ie.eth_newFilter=new Be({callName:"eth_newFilter",params:1,inputFormatter:[me],outputFormatter:Je}),Ie.eth_getLogs=new Be({callName:"eth_getLogs",params:1,inputFormatter:[An],outputFormatter:An}),Ie.eth_newBlockFilter=new Be({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Je}),Ie.eth_newPendingTransactionFilter=new Be({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Je}),Ie.eth_uninstallFilter=new Be({callName:"eth_uninstallFilter",params:1,inputFormatter:[Je],outputFormatter:nt}),Ie.eth_getFilterLogs=new Be({callName:"eth_getFilterLogs",params:1,inputFormatter:[Je],outputFormatter:An}),Ie.eth_getFilterChanges=new Be({callName:"eth_getFilterChanges",params:1,inputFormatter:[Je],outputFormatter:An}),Ie.eth_submitHashrate=new Be({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:nt}),Ie.shh_newIdentity=new Be({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_hasIdentity=new Be({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newGroup=new Be({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_addToGroup=new Be({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newFilter=new Be({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Je}),Ie.shh_uninstallFilter=new Be({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_getLogs=new Be({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getFilterMessages=new Be({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getFilterChanges=new Be({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getMessages=new Be({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:An});function Re(d,h){const y=n.eth[h];if(!y)throw new Error(`Could not find the method/property named ${h.toString()}`);Object.defineProperty(d,h,{value:function(...w){return y.execute(this,...w)}})}class Te{constructor(h){this.provider=h,this.requests=new Map}async sendAsync(h){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const w=Es(h.method,h.params),O=s();return this.requests.set(w.id,O),y.sendAsync(w,(P,Q)=>{this.requests.delete(w.id),P?O.reject(P):vs(Q)?O.resolve(Q.result):O.reject(function(ye){const Pe=ye&&ye.error&&ye.error.message?ye.error.message:"Invalid JSON RPC response: "+JSON.stringify(ye);return new Error(Pe)}(Q))}),O}setProvider(h){this.provider=h}async getConfirmedTransaction(h){const y=await this.waitForCompletion(h);if(this.isFailure(y))throw new Error(`Transaction "${h}" failed`);return y}async waitForCompletion(h,y){const w=er(h);if(await this.isTxDropped(w,y)){const O=await this.getTransactionAndReceipt(w);return Object.assign(Object.assign({},O),{status:n.TransactionStatus.failed})}for(;;){const O=await this.getTransactionAndReceipt(w);if(!this.isPending(O)&&O.receipt)return Object.assign(Object.assign({},O),{status:this.isFailure(O)?n.TransactionStatus.failed:n.TransactionStatus.confirmed});await Wh(2e3)}}async getTransaction(h){let y,w=null;const O=er(h);try{const Q=(await this.eth_accounts())[0];Q&&(w=await this.eth_getTransactionCount(Q,"latest"))}catch{w=null}try{if(y=await this.eth_getTransactionByHash(O),y===null)return null}catch{return null}if(y.blockNumber===null){if(w!==null){if(y.nonce<w)return{hash:O,type:n.TransactionType.replaced,nonce:y.nonce};if(y.nonce>w)return{hash:O,type:n.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:n.TransactionType.pending},y)}let P;try{if(P=await this.eth_getTransactionReceipt(O),P===null||P.status===0)return Object.assign({type:n.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:n.TransactionType.confirmed},y),{receipt:P})}async isTxDropped(h,y=15){let w=y;for(;w>0;){if(await this.getTransactionAndReceipt(h)!==null)return!1;w-=1,await Wh(2e3)}return!0}async getTransactionAndReceipt(h){h=er(h);const[y,w]=await Promise.all([this.eth_getTransactionByHash(h),this.eth_getTransactionReceipt(h)]);return Object.assign(Object.assign({},y),{receipt:w})}isPending(h){return h&&h.blockNumber===null}isFailure(h){return h&&(!h.receipt||h.receipt.status===0)}}Ae([Re,Oe("design:type",Function)],Te.prototype,"web3_clientVersion",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"web3_sha3",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_version",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_peerCount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_listening",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_protocolVersion",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_syncing",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_coinbase",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_mining",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_hashrate",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_gasPrice",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_accounts",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_blockNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBalance",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getStorageAt",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionCount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getCode",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sign",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sendTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sendRawTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_call",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_estimateGas",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockByNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionReceipt",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newBlockFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newPendingTransactionFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_uninstallFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getFilterChanges",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getFilterLogs",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getLogs",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getWork",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_submitWork",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_submitHashrate",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_post",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_version",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newIdentity",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_hasIdentity",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newGroup",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_addToGroup",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_uninstallFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_getFilterChanges",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_getMessages",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_unlockAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_newAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_listAccounts",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_lockAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_importRawKey",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_sendTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_sign",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_ecRecover",void 0);class zh{constructor(h){this.json=h,this._inputTypes=h.inputs||[],this._outputTypes=h.outputs||[],this._constant=!!h.constant,this._payable=!!h.payable||h.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in h&&!h.constant||h.stateMutability==="nonpayable",this._name=He(h)}extractDefaultBlock(h){return h.length>this._inputTypes.length&&!qn(h[h.length-1])&&gr(h.pop())||"latest"}validateArgs(h){if(h.some(P=>P===void 0))throw new Error("Invalid call, some arguments are undefined");const y=h.filter(function(P){return!(qn(P)===!0&&$n(P)===!1&&Nr(P)===!1&&!(P instanceof Uint8Array))});if(y.length!==this._inputTypes.length)throw w=y.length,O=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${w}, expected: ${O}`);var w,O}toPayload(h){let y={to:void 0,data:void 0,value:void 0,from:void 0};h.length>this._inputTypes.length&&qn(h[h.length-1])&&(y=h.pop()),this.validateArgs(h);const w=this.signature();let O=n.coder.encodeParams(this._inputTypes,h);return O.indexOf("0x")===0&&(O=O.substr(2)),y.data="0x"+w+O,y}signature(){return fe(this._name).slice(0,8)}unpackOutput(h){if(!h)return;const y=h.length>=2?h.slice(2):h,w=n.coder.decodeParams(this._outputTypes,y);return w.length===1?w[0]:w}async execute(h,y,...w){if(!h)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const O=this.toPayload(w);if(O.to=y,O.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!O.from)throw new Error('Missing "from" in transaction options');return await h.eth_sendTransaction(O)}{const O=this.extractDefaultBlock(w),P=this.toPayload(w);P.to=y;const Q=await h.eth_call(P,O);return this.unpackOutput(Q)}}estimateGas(h,y,...w){if(!(h instanceof Te))throw new Error("estimateGas needs to receive a RequestManager as first argument");const O=this.toPayload(w);return O.to=y,h.eth_estimateGas(O)}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}attachToContract(h){const y=this.displayName(),w=Object.assign((...O)=>this.execute(h.requestManager,h.address,...O),{estimateGas:this.estimateGas.bind(this,h.requestManager,h.address),toPayload:(...O)=>this.toPayload(O),toRPCMessage:(...O)=>{const P=this.extractDefaultBlock(O),Q=this.toPayload(O);return Q.to=h.address,{method:"eth_call",params:[Q,P]}},unpackOutput:O=>this.unpackOutput(O)});h[y]||(h[y]=w),h[y][this.typeName()]=w}}function Yh(d){if(d==null)return null;const h=String(d).toString();return h.indexOf("0x")===0?h:ge(ae(h))}class Fl{constructor(h){this.requestManager=h,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(h){if(this.isDisposed)throw new Error("The filter was disposed");h&&(this.callbacks.push(h),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const h=await this.getNewFilter();if(!h)throw new Error("Could not create a filter, response: "+JSON.stringify(h));this.filterId.resolve(h)}catch(h){throw h}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const h=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${h}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach(w=>{this.formatter?y.forEach(O=>{w(this.formatter(O))}):y.forEach(O=>w(O))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((h=()=>this.poll(),function(){h().catch(y=>console.error(y))}),500))}else this.stopSemaphore.resolve(1);var h}}class ws extends Fl{constructor(h,y,w=O=>O){super(h),this.requestManager=h,this.options=y,this.formatter=w,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(O){return Yh(O)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?bt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?bt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const h=await this.filterId;return this.requestManager.eth_getFilterLogs(h)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const h=await this.filterId;return this.requestManager.eth_getFilterChanges(h)}async uninstall(){const h=await this.filterId;return this.requestManager.eth_uninstallFilter(h)}}class xl{constructor(h,y,w){this.requestManager=h,this.address=w,this._anonymous=!1,this._params=y.inputs||[],this._name=He(y),this._anonymous=y.anonymous||!1}types(h){return this._params.filter(function(y){return y.indexed===h})}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}signature(){return fe(this._name)}encode(h={},y={}){const w={topics:[],address:this.address};y.fromBlock!==void 0&&(w.fromBlock=bt(y.fromBlock)||void 0),y.toBlock!==void 0&&(w.toBlock=bt(y.toBlock)||void 0),w.topics=w.topics||[],this._anonymous||w.topics.push("0x"+this.signature());const O=this._params.filter(function(P){return P.indexed===!0}).map(function(P){const Q=h[P.name];return Q==null?null:$n(Q)?Q.map(function(ye){return"0x"+n.coder.encodeParams([P],[ye])}):"0x"+n.coder.encodeParams([P],[Q])});return w.topics=w.topics.concat(O),w}decode(h){h.data=h.data||"",h.topics=h.topics||[];const y=(this._anonymous?h.topics:h.topics.slice(1)).map(function(ye){return ye.slice(2)}).join(""),w=n.coder.decodeParams(this.types(!0),y),O=h.data.slice(2),P=n.coder.decodeParams(this.types(!1),O),Q=this._params.reduce(function(ye,Pe){return ye[Pe.name]=Pe.indexed?w.shift():P.shift(),ye},{});return Object.assign(Object.assign({},Y(h)),{event:this.displayName(),address:h.address,args:Q})}async execute(h,y){const w=this.encode(h,y),O=this.decode.bind(this);return new ws(this.requestManager,w,O)}attachToContract(h){const y=this.execute.bind(this),w=this.displayName();h.events[w]||(h.events[w]=y),h.events[w][this.typeName()]=this.execute.bind(this,h)}}class Qw{constructor(h,y,w){this._requestManager=h,this._json=y,this._address=w}encode(h={}){const y={address:this._address};return h.fromBlock!==void 0&&(y.fromBlock=bt(h.fromBlock)||void 0),h.toBlock!==void 0&&(y.toBlock=bt(h.toBlock)||void 0),y}decode(h){h.data=h.data||"";const y=$n(h.topics)&&la(h.topics[0])?h.topics[0].slice(2):"",w=this._json.filter(function(O){return y===fe(He(O))})[0];return w?new xl(this._requestManager,w,this._address).decode(h):Y(h)}async execute(h){const y=this.encode(h),w=this.decode.bind(this);return new ws(this._requestManager,y,w)}getAllEventsFunction(){return this.execute.bind(this)}}class Kh{constructor(h,y,w){var O;this.requestManager=h,this.abi=y,this.address=w,this.events={},this.transactionHash=null,this.address=w,this.abi=y,(O=this).abi.filter(function(P){return P.type==="function"}).map(function(P){return new zh(P)}).forEach(function(P){P.attachToContract(O)}),this.allEvents=function(P){const Q=P.abi.filter(function(Pe){return Pe.type==="event"}),ye=new Qw(P.requestManager,Q,P.address);return Q.map(function(Pe){return new xl(P.requestManager,Pe,P.address)}).forEach(function(Pe){Pe.attachToContract(P)}),ye.getAllEventsFunction()}(this)}}n.AbstractFilter=Fl,n.BigNumber=W,n.Contract=Kh,n.ContractFactory=class{constructor(d,h){this.requestManager=d,this.abi=h}async deploy(...d){let h;const y=d[d.length-1];if(qn(y)&&!$n(y)&&(h=d.pop()),!h)throw new Error("Missing options object");if(!h.data||typeof h.data!="string")throw new Error("Invalid options.data");if(Ne(h.value)>0&&!(this.abi.filter(function(Le){return Le.type==="constructor"&&Le.inputs.length===d.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const w=(O=this.abi,P=d,O.filter(function(Le){return Le.type==="constructor"&&Le.inputs&&Le.inputs.length===P.length}).map(function(Le){return Le.inputs||[]}).map(function(Le){return n.coder.encodeParams(Le,P)})[0]||"");var O,P;h.data+=w,h.gas||(h.gas=await this.requestManager.eth_estimateGas(h));const Q=await this.requestManager.eth_sendTransaction(h);if(!Q)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ye=await async function(Le,_n){const Ut=s();let be=0;const sn=()=>{be++,be>50?Ut.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Le.eth_getTransactionReceipt(_n).then(dn=>{dn&&dn.blockHash?Ut.resolve(dn):setTimeout(sn,1e3)},dn=>Ut.reject(dn))};sn();const Ot=await Ut,Rt=await Le.eth_getCode(Ot.contractAddress,"latest");if(Rt&&Rt.length>3)return Ot.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Rt,receipt:Ot})}(this.requestManager,Q),Pe=await this.at(ye);return Pe.transactionHash=Q,Pe}async at(d){if(!Ln(d))throw new TypeError(`Invalid address ${JSON.stringify(d)}`);return new Kh(this.requestManager,this.abi,d)}},n.EthBlockFilter=class extends ws{constructor(d){super(d,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},n.EthFilter=ws,n.EthPendingTransactionFilter=class extends ws{constructor(d){super(d,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},n.HTTPProvider=class{constructor(d,h={}){this.host=d,this.options=h,this.debug=!1,this.host=d||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(d,h){try{let y=null;y=d instanceof Array?d.map(P=>r(P)):r(d);const w=this.options.fetch||globalThis.fetch;if(w===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const O={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+O.body),w(this.host,O).then(async P=>{if(P.ok){const Q=await P.json();this.debug&&console.log("RECV << "+JSON.stringify(Q)),Q.error?h(Object.assign(new Error(Q.error.json||Q.error),Q.error)):h(null,Q)}else this.debug&&console.log("ERR << "+JSON.stringify(P)),h(new Error("External error. response code: "+P.status))},P=>{this.debug&&console.log("ERR << "+JSON.stringify(P)),h(P)})}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),h(y)}}},n.Method=Be,n.Property=Rn,n.RequestManager=Te,n.SHHFilter=class extends Fl{constructor(d,h){super(d),this.requestManager=d,this.options=h,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(y){return Yh(y)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const d=await this.filterId;return this.requestManager.shh_getMessages(d)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const d=await this.filterId;return this.requestManager.shh_getFilterChanges(d)}async uninstall(){const d=await this.filterId;return this.requestManager.shh_uninstallFilter(d)}},n.SolidityEvent=xl,n.SolidityFunction=zh,n.WebSocketProvider=class{constructor(d,h={}){this.url=d,this.options=h,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const d=this.connection;this.timeout(new Error("Provider disposed.")),d.then(h=>h.close()).catch(h=>{this.debug&&console.error(h)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(d,h){const y=[];let w;if(d instanceof Array)w=Promise.all(d.map(O=>{const P=s();try{const Q=r(O);y.push(Q),this.responseCallbacks.set(Q.id,P)}catch(Q){P.reject(Q)}return P}));else{const O=s();try{const P=r(d);y.push(P),this.responseCallbacks.set(P.id,O)}catch(P){O.reject(P)}w=O}w.then(O=>h(null,O),O=>h(O)),this.connection.then(O=>{y.forEach(P=>{const Q=JSON.stringify(P);this.debug&&console.log("SEND >> "+Q),O.send(Q)})},O=>{h(O)})}parseResponse(d){const h=[];return d.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(y=>{let w=y;this.lastChunk&&(w=this.lastChunk+w);let O=null;try{O=JSON.parse(w)}catch{return this.lastChunk=w,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",O&&h.push(O)}),h}processMessage(d){if("id"in d){const h=d.id,y=this.responseCallbacks.get(h);if(!y)return void console.error("Error: Received a response for an unknown request",d);this.responseCallbacks.delete(h),d.error!==void 0&&d.error!==null?y.reject(Object.assign(new Error(d.error.message||d.error),d.error)):"result"in d&&y.resolve(d)}else this.notificationCallbacks.forEach(h=>h(null,d))}timeout(d){this.connection&&this.connection.isPending||(this.connection=s());const h=d||new Error("Connection timeout");this.responseCallbacks.forEach(y=>y.reject(h)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(y=>y.close()).catch(y=>{this.debug&&console.error(y)}),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const d=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!d)throw new Error("Please provide a WebSocketConstructor");const h=new d(this.url,this.options.protocol);h.onopen=()=>{this.connection.resolve(h)},h.onerror=y=>{const w=new Error("Error in web socket");w.data=y,this.timeout(w)},h.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},h.onmessage=y=>{const w=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(w).forEach(O=>{O instanceof Array?O.forEach(P=>this.processMessage(P)):this.processMessage(O)})}}},n.bytesToHex=ge,n.bytesToUtf8String=Ee,n.concatBytes=Et,n.default=Te,n.extractDisplayName=tn,n.extractTypeName=nn,n.fromAscii=function(d,h=0){let y="";for(let w=0;w<d.length;w++){const O=d.charCodeAt(w).toString(16);y+=O.length<2?"0"+O:O}return"0x"+y.padEnd(h,"0")},n.fromDecimal=rt,n.fromTwosComplement=Dt,n.fromWei=function(d,h){const y=Lt(d).dividedBy(yn(h));return Nr(d)?y:y.toString(10)},n.getAddress=et,n.getValueOfUnit=yn,n.hexToBytes=ve,n.inputAddressFormatter=ee,n.inputBlockNumberFormatter=bt,n.inputCallFormatter=Wn,n.inputDefaultBlockNumberFormatter=gr,n.inputFilterOptions=me,n.inputPostFormatter=function(d){return d?(d.ttl=rt(d.ttl),d.workToProve=rt(d.workToProve),d.priority=rt(d.priority),$n(d.topics)||(d.topics=d.topics?[d.topics]:[]),d.topics=d.topics.map(function(h){return h.indexOf("0x")===0?h:"0x"+ge(ae(h))}),d):null},n.inputTransactionFormatter=C,n.inputTransactionId=er,n.isAddress=Ln,n.isArray=$n,n.isBigNumber=Nr,n.isBloom=function(d){return!!/^(0x)?[0-9a-f]{512}$/i.test(d)&&!!/^(0x)?[0-9a-f]{512}$/i.test(d)},n.isBoolean=Mr,n.isChecksumAddress=_s,n.isFunction=function(d){return typeof d=="function"},n.isHex=function(d){return typeof d=="string"&&/^0x[0-9a-fA-F]+$/.test(d)},n.isJson=function(d){try{return!!JSON.parse(d)}catch{return!1}},n.isObject=qn,n.isPredefinedBlockNumber=Ss,n.isStrictAddress=ot,n.isString=la,n.isTopic=function(d){return!!/^(0x)?[0-9a-f]{64}$/i.test(d)&&!!/^(0x)?[0-9a-f]{64}$/i.test(d)},n.isValidResponse=vs,n.outputBigNumberFormatter=fa,n.outputBlockFormatter=D,n.outputLogFormatter=Y,n.outputPostFormatter=function(d){return d?(d.expiry=Ne(d.expiry),d.sent=Ne(d.sent),d.ttl=Ne(d.ttl),d.workProved=Ne(d.workProved),d.topics||(d.topics=[]),d.topics=d.topics.map(function(h){return ce(h)}),d):null},n.outputSyncingFormatter=_e,n.outputTransactionFormatter=b,n.outputTransactionReceiptFormatter=A,n.padLeft=Xe,n.padRight=function(d,h,y){return d+new Array(h-d.length+1).join(y||"0")},n.sha3=fe,n.signedIsNegative=rn,n.stringToUtf8Bytes=ae,n.toAddress=Pi,n.toArray=An,n.toAscii=ce,n.toBatchPayload=function(d){return d.map(function(h){return Es(h.method,h.params)})},n.toBigNumber=Lt,n.toBoolean=nt,n.toChecksumAddress=bs,n.toData=gt,n.toDecimal=Ne,n.toHex=Je,n.toJsonRpcRequest=Es,n.toNullDecimal=Gn,n.toString=pt,n.toStringData=Wt,n.toTwosComplement=Qe,n.toWei=function(d,h){const y=Lt(d).times(yn(h));return Nr(d)?y:y.toString(10)},n.transformToFullName=He,Object.defineProperty(n,"__esModule",{value:!0})})})(Jd,Jd.exports);var Wu=Jd.exports,zu={};Object.defineProperty(zu,"__esModule",{value:!0});zu.SignatureValidator=void 0;const aT=Wu;async function sT(e,t){const n=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new aT.ContractFactory(e,n).at(t)}zu.SignatureValidator=sT;var b_={},E_={},v_={},S_={},w_={},ue={},tp=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});ue.validateType=ue.generateLazyValidator=ue.Ajv=void 0;const T_=tp($w);ue.Ajv=T_.default;const oT=tp(eT),cT=tp(tT);function uT(e,t){let n=null;const r=(i,a)=>{if(!n){const s=new T_.default({$data:!0,allErrors:!0});(0,oT.default)(s),(0,cT.default)(s,{singleError:!0}),t?.forEach(o=>s.addKeyword(o)),n=s.compile(e),Object.defineProperty(r,"errors",{get(){return n?.errors}})}return n(i,a)};return r}ue.generateLazyValidator=uT;function lT(e,t){return e.validate(t)}ue.validateType=lT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=ue;e.SCENE_UPDATE="SCENE_UPDATE",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SceneUpdate||(e.SceneUpdate={}))})(w_);var I_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=ue;e.UPDATE="update",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Update||(e.Update={}))})(I_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(w_,e),n(I_,e)})(S_);var A_={},O_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=ue;(function(n){n.SCENE="scene",n.SMART_ITEM="smart-item",n.PORTABLE_EXPERIENCE="portable-experience",n.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProjectType||(e.ProjectType={}))})(O_);var R_={},eo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=ue;(function(n){n.UNIQUE="unique",n.MYTHIC="mythic",n.EXOTIC="exotic",n.LEGENDARY="legendary",n.EPIC="epic",n.RARE="rare",n.UNCOMMON="uncommon",n.COMMON="common"})(e.Rarity||(e.Rarity={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema);const r={[n.UNIQUE]:1,[n.MYTHIC]:10,[n.EXOTIC]:50,[n.LEGENDARY]:100,[n.EPIC]:1e3,[n.RARE]:5e3,[n.UNCOMMON]:1e4,[n.COMMON]:1e5},i={[n.UNIQUE]:"#FFE617",[n.MYTHIC]:"#FB7DE3",[n.EXOTIC]:"#E4FFB8",[n.LEGENDARY]:"#A657ED",[n.EPIC]:"#6397F2",[n.RARE]:"#3AD682",[n.UNCOMMON]:"#FF8563",[n.COMMON]:"#D4E0E0"},a={[n.UNIQUE]:"#FFB626",[n.MYTHIC]:"#FF63E1",[n.EXOTIC]:"#CAFF73",[n.LEGENDARY]:"#842DDA",[n.EPIC]:"#3D85E6",[n.RARE]:"#36CF75",[n.UNCOMMON]:"#ED6D4F",[n.COMMON]:"#ABC1C1"};function s(f){return r[f]}n.getMaxSupply=s;function o(f){return a[f]}n.getColor=o;function c(){return[n.UNIQUE,n.MYTHIC,n.EXOTIC,n.LEGENDARY,n.EPIC,n.RARE,n.UNCOMMON,n.COMMON]}n.getRarities=c;function u(f){return[i[f],a[f]]}n.getGradient=u}(e.Rarity||(e.Rarity={}))})(eo);var Ti={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=ue;(function(n){n.EYEBROWS="eyebrows",n.EYES="eyes",n.FACIAL_HAIR="facial_hair",n.HAIR="hair",n.BODY_SHAPE="body_shape",n.MOUTH="mouth",n.UPPER_BODY="upper_body",n.LOWER_BODY="lower_body",n.FEET="feet",n.EARRING="earring",n.EYEWEAR="eyewear",n.HAT="hat",n.HELMET="helmet",n.MASK="mask",n.TIARA="tiara",n.TOP_HEAD="top_head",n.SKIN="skin",n.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableCategory||(e.WearableCategory={}))})(Ti);var Yu={},Ku={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=ue;(function(n){n.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",n.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyShape||(e.BodyShape={}))})(Ku);var Xu={},np={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=ue;(function(n){n.HEAD="head",n.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyPartCategory||(e.BodyPartCategory={}))})(np);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Ti,n=ue,r=np;(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},r.BodyPartCategory.schema)]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Xu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=ue,n=Ku,r=Xu;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:r.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:r.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Yu);var Ju={},C_={},rp={},Ii={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=ue;(function(n){n.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const r=(0,t.generateLazyValidator)(n.schema);n.validate=i=>r(i)})(e.Color3||(e.Color3={})),function(n){n.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.EthAddress||(e.EthAddress={})),function(n){n.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv2||(e.IPFSv2={})),function(n){n.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv1||(e.IPFSv1={}))})(Ii);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=Ti,n=Ii,r=ue;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:n.IPFSv2.schema,body:n.IPFSv2.schema}},c.validate=(0,r.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const u=new RegExp(c.schema.pattern,"i");c.validate=f=>u.test(f)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},n.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:n.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)}(e.Avatar||(e.Avatar={}))})(rp);var N_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=ue,n=rp;(function(r){r.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:n.Avatar.schema}},additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Profile||(e.Profile={}))})(N_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(rp,e),n(N_,e)})(C_);var M_={},ip={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=ue;e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],function(n){n.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.FeatureToggles||(e.FeatureToggles={}))})(ip);var ap={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(ap);var sp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=ue;(function(n){n.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},n.schemaValidator=(0,t.generateLazyValidator)(n.schema),n.validate=r=>n.schemaValidator(r)&&r.parcels.includes(r.base)})(e.SceneParcels||(e.SceneParcels={}))})(sp);var P_={},os={};Object.defineProperty(os,"__esModule",{value:!0});os.displayableProperties=void 0;os.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var op={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Source||(e.Source={}))})(op);var cp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(cp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=ue,n=os,r=ip,i=sp,a=op,s=cp,o=ap;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=e.RequiredPermission||(e.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},n.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},r.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,t.generateLazyValidator)(u.schema)}(e.Scene||(e.Scene={}))})(P_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=ip;Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var n=ap;Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return n.WorldConfiguration}});var r=sp;Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return r.SceneParcels}});var i=P_;Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=op;Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=cp;Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(M_);var Hl={},up={},lp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=ue;(function(n){n.EN="en",n.ES="es"})(e.Locale||(e.Locale={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Locale||(e.Locale={}))})(lp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=ue,n=lp;(function(r){r.schema={type:"object",properties:{code:n.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.I18N||(e.I18N={}))})(up);var dp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Metrics||(e.Metrics={}))})(dp);var Zu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=eo,n=ue;e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const r={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,n.generateLazyValidator)(r);function a(s){return i(s)}e.isStandard=a})(Zu);var Qu={},fp={},k_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MerkleProof||(e.MerkleProof={}))})(k_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(k_,e)})(fp);var $u={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=ue;var n;(function(l){l.SINGLE="single",l.ANY="any",l.MULTIPLE="multiple",l.RANGE="range"})(n=e.MappingType||(e.MappingType={}));var r;(function(l){l.MAINNET="mainnet",l.BASE_MAINNET="base_mainnet",l.BASE_SEPOLIA="base_sepolia",l.MONAD_MAINNET="monad_mainnet",l.MONAD_TESTNET="monad_testnet",l.APE_MAINNET="ape_mainnet",l.APE_CALDERA="ape_caldera",l.MATIC="matic",l.SEPOLIA="sepolia",l.AMOY="amoy"})(r=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.ANY}},required:["type"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(l){l._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(g,_){if(!_||!_.from||!_.to)return!1;let{to:T,from:B}=_;return(typeof B!="bigint"||typeof T!="bigint")&&(B=BigInt(B),T=BigInt(T)),B<=T},errors:!1},l.schema={type:"object",properties:{type:{type:"string",const:n.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},l.validate=(0,t.generateLazyValidator)(l.schema,[l._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var c;(function(l){l.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},l.validate=(0,t.generateLazyValidator)(l.schema,[s._fromLessThanOrEqualTo])})(c=e.Mapping||(e.Mapping={})),function(l){l._isMappingsValid={keyword:"_isMappingsValid",validate:function(g,_){try{f(_)}catch{return!1}return!0},errors:!1},l.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:c.schema}},minProperties:1,required:[],additionalProperties:!1};const m=Object.values(r).reduce((g,_)=>(g[_]=l.innerSchema,g),{});l.schema={type:"object",properties:m,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},l.validate=(0,t.generateLazyValidator)(l.schema,[s._fromLessThanOrEqualTo,l._isMappingsValid])}(e.Mappings||(e.Mappings={}));class u extends Error{constructor(m,g,_){super(m),this.existingMapping=g,this.conflictingMapping=_}}e.AddMappingError=u;function f(l={}){const m={};for(const[F,k]of Object.entries(l)){m[F]={};for(const[j,te]of Object.entries(k))for(const L of te)K(F,j,L)}function g(){return JSON.parse(JSON.stringify(m))}function _(F,k,j){const te=BigInt(F);return te>=BigInt(k)&&te<=BigInt(j)}function T(F,k){switch(k.type){case n.SINGLE:return F.id===k.id;case n.MULTIPLE:return k.ids.includes(F.id);case n.RANGE:return _(F.id,k.from,k.to);default:return!1}}function B(F,k){switch(k.type){case n.SINGLE:return F.ids.includes(k.id);case n.MULTIPLE:return F.ids.some(j=>k.ids.includes(j));case n.RANGE:return F.ids.some(j=>_(j,k.from,k.to));default:return!1}}function U(F,k){switch(k.type){case n.SINGLE:return _(k.id,F.from,F.to);case n.MULTIPLE:return k.ids.some(j=>_(j,F.from,F.to));case n.RANGE:return BigInt(F.from)<=BigInt(k.to)&&BigInt(F.to)>=BigInt(k.from)}}function J(F,k){if(F.type===n.ANY||k.type===n.ANY)return!0;switch(F.type){case n.SINGLE:return T(F,k);case n.MULTIPLE:return B(F,k);case n.RANGE:return U(F,k)}}function K(F,k,j){var te,L;const G=k.toLowerCase();m[F]=(te=m[F])!==null&&te!==void 0?te:{},m[F][G]=(L=m[F][G])!==null&&L!==void 0?L:[];for(const W of m[F][G])if(J(W,j))throw new u(`Cannot add mapping to contract ${G} on network ${F} because it overlaps with existing mapping`,W,j);m[F][G].push(j)}function H(F,k,j){var te;return!((te=m[F])===null||te===void 0)&&te[k]?m[F][k].some(L=>{switch(L.type){case n.SINGLE:return L.id===j;case n.ANY:return!0;case n.MULTIPLE:return L.ids.includes(j);case n.RANGE:return BigInt(j)>=BigInt(L.from)&&BigInt(j)<=BigInt(L.to)}}):!1}return{addMapping:K,getMappings:g,includesNft:H}}e.createMappingsHelper=f})($u);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=ue,n=fp,r=$u;e.schema={type:"object",properties:{merkleProof:n.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},r.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,c){var u;const f=c;return!((u=f?.merkleProof)===null||u===void 0)&&u.hashingKeys?f.merkleProof.hashingKeys.every(l=>f.hasOwnProperty(l)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,r.RangeMapping._fromLessThanOrEqualTo,r.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(Qu);var L_={},D_={},ar={};Object.defineProperty(ar,"__esModule",{value:!0});ar.isBaseEmote=ar.isBaseAvatar=ar.requiredBaseItemProps=ar.baseItemProperties=void 0;const dT=up,fT=dp,pT=os;ar.baseItemProperties=Object.assign(Object.assign({},pT.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:dT.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},fT.Metrics.schema),{nullable:!0})});ar.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function hT(e){if(!e||!e.id)return!1;const t=e.id.split(":"),n=t[1]==="decentraland",r=t[3]==="base-avatars";return t.length===5&&n&&r}ar.isBaseAvatar=hT;function mT(e){if(!e||!e.id)return!1;const t=e.id.split(":");return t.length===5&&t[1]==="decentraland"&&t[3]==="base-emotes"}ar.isBaseEmote=mT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=ue,n=Ti,r=Yu,i=ar,a=Zu,s=Qu,o=Xu,c=$u;(function(u){u.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const f={keyword:"_isThirdParty",validate:(m,g)=>!m||(0,s.isThirdParty)(g),errors:!1},l={keyword:"_isBaseAvatar",validate:(m,g)=>!m||(0,i.isBaseAvatar)(g),errors:!1};u.validate=(0,t.generateLazyValidator)(u.schema,[f,l,c.RangeMapping._fromLessThanOrEqualTo,c.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(D_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Yu;Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var n=D_;Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return n.Wearable}});var r=Ti;Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return r.WearableCategory}});var i=np;Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Xu;Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(L_);var Ul={},jl={},pp={},hp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=ue;(function(n){n.DANCE="dance",n.STUNT="stunt",n.GREETINGS="greetings",n.FUN="fun",n.POSES="poses",n.REACTIONS="reactions",n.HORROR="horror",n.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteCategory||(e.EmoteCategory={}))})(hp);var mp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=ue,n=Ku;(function(r){r.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(mp);var gp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=ue;var n;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(n=e.ArmatureId||(e.ArmatureId={})),function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)}(n=e.ArmatureId||(e.ArmatureId={}));var r;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.EmoteClip||(e.EmoteClip={})),function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[n.Armature]:Object.assign(Object.assign({},r.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[n.Armature_Prop]:Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",n.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[n.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.StartAnimation||(e.StartAnimation={})),function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(n).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.OutcomeGroup||(e.OutcomeGroup={}))})(gp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=hp,n=ue,r=mp,i=gp;(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(pp);var Xh;function gT(){return Xh||(Xh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=x_(),n=ue,r=ar,i=Zu,a=Qu,s=pp;(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},r.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...r.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(f,l)=>!f||(0,t.isThirdParty)(l),errors:!1},u={keyword:"_isBaseEmote",validate:(f,l)=>!f||(0,r.isBaseEmote)(l),errors:!1};o.validate=(0,n.generateLazyValidator)(o.schema,[c,u,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))}(jl)),jl}var B_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=ue;(function(n){n.SIMPLE="simple",n.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmotePlayMode||(e.EmotePlayMode={}))})(B_);var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=ue;(function(n){n.SIMPLE_OUTCOME="so",n.MULTIPLE_OUTCOME="mo",n.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(F_);var Jh;function yT(){return Jh||(Jh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=gT();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var n=mp;Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return n.EmoteRepresentationADR74}});var r=pp;Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return r.EmoteDataADR74}});var i=gp;Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=hp;Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=B_;Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=F_;Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})}(Ul)),Ul}var Zh;function x_(){return Zh||(Zh=1,function(e){var t=ie&&ie.__createBinding||(Object.create?function(u,f,l,m){m===void 0&&(m=l);var g=Object.getOwnPropertyDescriptor(f,l);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[l]}}),Object.defineProperty(u,m,g)}:function(u,f,l,m){m===void 0&&(m=l),u[m]=f[l]}),n=ie&&ie.__exportStar||function(u,f){for(var l in u)l!=="default"&&!Object.prototype.hasOwnProperty.call(f,l)&&t(f,u,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var r=up;Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return r.I18N}});var i=lp;Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=dp;Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Ku;Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Zu;Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var c=Qu;Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),n($u,e),n(L_,e),n(yT(),e)}(Hl)),Hl}var H_={},cs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=ue;var n;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(n=e.AuthLinkType||(e.AuthLinkType={}));var r;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:n.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.AuthLink||(e.AuthLink={})),function(i){i.schema={type:"array",items:r.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.AuthChain||(e.AuthChain={}))})(cs);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ii,n=cs,r=ue;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(H_);var yp={},_p={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Ii,n=ue;(function(r){r.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.ContentMapping||(e.ContentMapping={}))})(_p);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ii,n=_p,r=ue;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:n.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.Entity||(e.Entity={}))})(yp);var U_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=cs,n=ue;(function(r){r.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(U_);var j_={},V_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=Ti,n=Ii,r=ue;var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)}(e.Outfits||(e.Outfits={}))})(V_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(V_,e)})(j_);var G_={},bp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"}(e.NotificationType||(e.NotificationType={})),function(t){t.COMMUNITY="community"}(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(bp);var q_={},Ep={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=ue,n=bp,r={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(n.NotificationType).reduce((a,s)=>(a[s]=r,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(n.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Ep);var vp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const n=new RegExp(t.schema.pattern);t.validate=r=>n.test(r)}(e.Email||(e.Email={}))})(vp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=ue,n=Ep,r=Ii,i=vp;(function(a){a.schema={type:"object",required:["address","details"],properties:{address:r.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:n.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(q_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(bp,e),n(q_,e),n(Ep,e)})(G_);var W_={},mn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,function(t){(function(n){n.BLOCKCHAIN="blockchain",n.CATALYST_DEPLOYMENT="catalyst-deployment",n.WORLD="world",n.CLIENT="client",n.WEB="web",n.MARKETPLACE="marketplace",n.REWARDS="rewards",n.BADGE="badge",n.ASSET_BUNDLE="asset-bundle",n.SOCIAL_SERVICE="social-service",n.CREDITS_SERVICE="credits-service",n.STREAMING="streaming",n.COMMS="comms",n.REFERRAL="referral",n.COMMUNITY="community",n.CAMERA="camera",n.EVENT="event",n.GOVERNANCE="governance",n.MODERATION="moderation"})(t.Type||(t.Type={})),function(n){(function(r){r.BID_ACCEPTED="bid-accepted",r.ITEM_SOLD="item-sold",r.RENTAL_ENDED="land-rental-ended",r.RENTAL_STARTED="land-rental-started",r.ROYALTIES_EARNED="royalties-earned",r.COLLECTION_CREATED="collection-created",r.ITEM_PUBLISHED="item-published",r.TRANSFER_RECEIVED="transfer-received",r.TIP_RECEIVED="tip-received"})(n.Blockchain||(n.Blockchain={})),function(r){r.BID_RECEIVED="bid-received"}(n.Marketplace||(n.Marketplace={})),function(r){r.SCENE="scene",r.PROFILE="profile",r.WEARABLE="wearable",r.STORE="store",r.EMOTE="emote",r.OUTFITS="outfits"}(n.CatalystDeployment||(n.CatalystDeployment={})),function(r){r.DEPLOYMENT="deployment",r.WORLD_SETTINGS_CHANGED="world_settings_changed",r.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",r.WORLD_UNDEPLOYMENT="world_undeployment",r.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",r.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",r.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",r.WORLDS_ACCESS_RESTORED="worlds_access_restored",r.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",r.WORLDS_MISSING_RESOURCES="worlds_missing_resources"}(n.Worlds||(n.Worlds={})),function(r){r.LOGGED_IN="logged-in",r.LOGGED_IN_CACHED="logged-in-cached",r.MOVE_TO_PARCEL="move-to-parcel",r.USED_EMOTE="used-emote",r.PASSPORT_OPENED="passport-opened",r.WALKED_DISTANCE="walked-distance",r.VERTICAL_HEIGHT_REACHED="vertical-height-reached"}(n.Client||(n.Client={})),function(r){r.AUTH_IDENTIFY="auth-identify"}(n.Web||(n.Web={})),function(r){r.REWARD_IN_PROGRESS="reward-in-progress",r.REWARD_ASSIGNED="reward-assigned",r.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",r.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",r.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",r.REWARD_DELAYED="reward-delayed"}(n.Rewards||(n.Rewards={})),function(r){r.GRANTED="badge-granted"}(n.Badge||(n.Badge={})),function(r){r.CONVERTED="converted",r.MANUALLY_QUEUED="manually-queued"}(n.AssetBundle||(n.AssetBundle={})),function(r){r.FRIENDSHIP_REQUEST="friendship-request",r.FRIENDSHIP_ACCEPTED="friendship-accepted"}(n.SocialService||(n.SocialService={})),function(r){r.CREDITS_GOAL_COMPLETED="credits-goal-completed",r.COMPLETE_GOALS_REMINDER="complete-goals-reminder",r.CLAIM_CREDITS_REMINDER="claim-credits-reminder",r.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",r.USAGE_REMINDER="usage-reminder",r.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",r.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",r.NEW_SEASON_REMINDER="new-season-reminder"}(n.CreditsService||(n.CreditsService={})),function(r){r.STREAMING_KEY_RESET="streaming-key-reset",r.STREAMING_KEY_REVOKE="streaming-key-revoke",r.STREAMING_KEY_EXPIRED="streaming-key-expired",r.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",r.STREAMING_PLACE_UPDATED="streaming-place-updated",r.COMMUNITY_STREAMING_ENDED="community-streaming-ended"}(n.Streaming||(n.Streaming={})),function(r){r.USER_JOINED_ROOM="user-joined-room",r.USER_LEFT_ROOM="user-left-room",r.USER_BANNED_FROM_SCENE="user-banned-from-scene",r.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"}(n.Comms||(n.Comms={})),function(r){r.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",r.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"}(n.Referral||(n.Referral={})),function(r){r.DELETED="community-deleted",r.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",r.RENAMED="community-renamed",r.MEMBER_BANNED="community-member-banned",r.MEMBER_LEFT="community-member-left",r.MEMBER_REMOVED="community-member-removed",r.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",r.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",r.INVITE_RECEIVED="community-invite-received",r.OWNERSHIP_TRANSFERRED="community-ownership-transferred",r.POST_ADDED="community-post-added",r.VOICE_CHAT_STARTED="community-voice-chat-started"}(n.Community||(n.Community={})),function(r){r.PHOTO_TAKEN="photo-taken",r.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"}(n.Camera||(n.Camera={})),function(r){r.EVENT_CREATED="event-created",r.EVENT_STARTS_SOON="event-starts-soon",r.EVENT_STARTED="event-started",r.EVENT_ENDED="event-ended"}(n.Event||(n.Event={})),function(r){r.PROPOSAL_ENACTED="governance_proposal_enacted",r.COAUTHOR_REQUESTED="governance_coauthor_requested",r.PITCH_PASSED="governance_pitch_passed",r.TENDER_PASSED="governance_tender_passed",r.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",r.VOTING_ENDED_VOTER="governance_voting_ended_voter",r.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",r.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",r.WHALE_VOTE="governance_whale_vote",r.VOTED_ON_BEHALF="governance_voted_on_behalf",r.CLIFF_ENDED="governance_cliff_ended"}(n.Governance||(n.Governance={})),function(r){r.USER_BAN_CREATED="user-ban-created",r.USER_BAN_LIFTED="user-ban-lifted",r.USER_WARNING_CREATED="user-warning-created"}(n.Moderation||(n.Moderation={}))}(t.SubType||(t.SubType={}))}(e.Events||(e.Events={}))})(mn);var z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.ItemSoldEvent||(e.ItemSoldEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RentalEndedEvent||(e.RentalEndedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RentalStartedEvent||(e.RentalStartedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(z_);var Y_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=cs,n=ue,r=yp,i=mn;(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:r.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Y_);var K_={};Object.defineProperty(K_,"__esModule",{value:!0});var X_={};Object.defineProperty(X_,"__esModule",{value:!0});var J_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MARKETPLACE},subType:{type:"string",const:n.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(J_);var Z_={},ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.createEventSchema=void 0;function _T(e,t,n){return{type:"object",properties:{type:{type:"string",const:e},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}ea.createEventSchema=_T;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Z_);var Q_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BADGE},subType:{type:"string",const:n.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:n.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:n.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:n.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:n.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Q_);var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})($_);var eb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=ue,n=mn;var r;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(r=e.RoomType||(e.RoomType={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(r)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(r)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(eb);var tb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(tb);var nb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(nb);var rb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CAMERA},subType:{type:"string",const:n.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CAMERA},subType:{type:"string",const:n.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(rb);var ib={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventCreatedEvent||(e.EventCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventEndedEvent||(e.EventEndedEvent={}))})(ib);var ab={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(ab);var sb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=cs,n=ue,r=mn;(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(sb);var ob={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(ob);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(mn,e),n(z_,e),n(Y_,e),n(K_,e),n(X_,e),n(J_,e),n(Z_,e),n(Q_,e),n($_,e),n(eb,e),n(tb,e),n(nb,e),n(rb,e),n(ib,e),n(ab,e),n(sb,e),n(ob,e)})(W_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(C_,e),n(M_,e),n(x_(),e),n(os,e),n(fp,e),n(H_,e),n(yp,e),n(U_,e),n(j_,e),n(G_,e),n(W_,e)})(Ju);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=eo,n=Ti,r=Yu,i=ue,a=Ju;(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:n.WearableCategory.schema},hides:{type:"array",items:n.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(R_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(O_,e),n(R_,e)})(A_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(S_,e),n(A_,e)})(v_);var cb={},ub={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=ue;(function(n){n.MOST_SALES="most_sales",n.MOST_PURCHASES="most_purchases",n.MOST_SPENT="most_spent",n.MOST_EARNED="most_earned",n.MOST_ROYALTIES="most_royalties",n.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),function(n){n.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Account||(e.Account={}))})(ub);var Vl={},Gl={},Qh;function lb(){return Qh||(Qh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=ue,n=hr();var r;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(r=e.ChainName||(e.ChainName={}));function i(a){switch(a){case r.ETHEREUM_MAINNET:return n.ChainId.ETHEREUM_MAINNET;case r.ETHEREUM_ROPSTEN:return n.ChainId.ETHEREUM_ROPSTEN;case r.ETHEREUM_RINKEBY:return n.ChainId.ETHEREUM_RINKEBY;case r.ETHEREUM_GOERLI:return n.ChainId.ETHEREUM_GOERLI;case r.ETHEREUM_KOVAN:return n.ChainId.ETHEREUM_KOVAN;case r.ETHEREUM_SEPOLIA:return n.ChainId.ETHEREUM_SEPOLIA;case r.MATIC_MAINNET:return n.ChainId.MATIC_MAINNET;case r.MATIC_MUMBAI:return n.ChainId.MATIC_MUMBAI;case r.MATIC_AMOY:return n.ChainId.MATIC_AMOY;case r.AVALANCHE_MAINNET:return n.ChainId.AVALANCHE_MAINNET;case r.BINANCE_MAINNET:return n.ChainId.BSC_MAINNET;case r.ARBITRUM_MAINNET:return n.ChainId.ARBITRUM_MAINNET;case r.OPTIMISM_MAINNET:return n.ChainId.OPTIMISM_MAINNET;case r.FANTOM_MAINNET:return n.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)}(r=e.ChainName||(e.ChainName={}))}(Gl)),Gl}var Jn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=ue;(function(n){n.ETHEREUM="ETHEREUM",n.MATIC="MATIC",n.AVALANCHE="AVALANCHE",n.BSC="BINANCE SMART CHAIN",n.OPTIMISM="OPTIMISM",n.ARBITRUM="ARBITRUM",n.FANTOM="FANTOM"})(e.Network||(e.Network={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Network||(e.Network={}))})(Jn);var $h;function hr(){return $h||($h=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=ue,n=lb(),r=Jn;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI",u[u.MATIC_AMOY=80002]="MATIC_AMOY",u[u.BSC_MAINNET=56]="BSC_MAINNET",u[u.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",u[u.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",u[u.FANTOM_MAINNET=250]="FANTOM_MAINNET",u[u.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(u){switch(u){case i.ETHEREUM_MAINNET:return n.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return n.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return n.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return n.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return n.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return n.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return n.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return n.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return n.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return n.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return n.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return n.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return n.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return n.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(u){const f={[r.Network.BSC]:i.BSC_MAINNET,[r.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[r.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[r.Network.FANTOM]:i.FANTOM_MAINNET,[r.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(u){case i.ETHEREUM_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f);case i.ETHEREUM_ROPSTEN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_RINKEBY:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_GOERLI:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_KOVAN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_SEPOLIA:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[r.Network.MATIC]:i.MATIC_AMOY},f);case i.MATIC_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f);case i.MATIC_MUMBAI:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MUMBAI,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.MATIC_AMOY:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_AMOY,[r.Network.MATIC]:i.MATIC_AMOY},f);default:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f)}}e.getNetworkMapping=o;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return r.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return r.Network.MATIC;case i.BSC_MAINNET:return r.Network.BSC;case i.OPTIMISM_MAINNET:return r.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return r.Network.ARBITRUM;case i.FANTOM_MAINNET:return r.Network.FANTOM;case i.AVALANCHE_MAINNET:return r.Network.AVALANCHE}}e.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,t.generateLazyValidator)(u.schema)}(i=e.ChainId||(e.ChainId={}))}(Vl)),Vl}var db={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=ue,n=hr(),r=Jn;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Collection||(e.Collection={}))})(db);var fb={},to={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=ue;(function(n){n.PARCEL="parcel",n.ESTATE="estate",n.WEARABLE="wearable",n.ENS="ens",n.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.NFTCategory||(e.NFTCategory={}))})(to);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=ue,n=hr(),r=Jn,i=to;(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:r.Network.schema,chainId:n.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Contract||(e.Contract={}))})(fb);var pb={},Sp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=ue,n=hr(),r=Ju,i=Jn,a=to,s=eo,o=Ti;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:r.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:n.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,t.generateLazyValidator)(c.schema)}(e.NFT||(e.NFT={}))})(Sp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=ue,n=hr(),r=Jn,i=Sp,a=to;(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:r.Network.schema,chainId:n.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)}(e.Item||(e.Item={}))})(pb);var el={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=ue;(function(n){n.OPEN="open",n.SOLD="sold",n.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ListingStatus||(e.ListingStatus={}))})(el);var hb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(hb);var mb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=ue,n=hr(),r=Jn;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Mint||(e.Mint={}))})(mb);var gb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"}(e.CatalogSortBy||(e.CatalogSortBy={})),function(t){t.ASC="asc",t.DESC="desc"}(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(gb);var yb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=ue,n=hr(),r=el,i=Jn;(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:r.ListingStatus.schema,network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Order||(e.Order={}))})(yb);var _b={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=ue;(function(n){n.INJECTED="injected",n.MAGIC="magic",n.MAGIC_TEST="magic_test",n.FORTMATIC="formatic",n.NETWORK="network",n.WALLET_CONNECT="wallet_connect",n.WALLET_CONNECT_V2="wallet_connect_v2",n.WALLET_LINK="wallet_link",n.METAMASK_MOBILE="metamask_mobile",n.AUTH_SERVER="auth_server",n.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProviderType||(e.ProviderType={}))})(_b);var wp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=ue;(function(n){n.ORDER="order",n.BID="bid",n.MINT="mint"})(e.SaleType||(e.SaleType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SaleType||(e.SaleType={}))})(wp);var bb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=ue,n=hr(),r=wp,i=Jn;(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},type:r.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:n.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Sale||(e.Sale={}))})(bb);var Eb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=ue,n=hr(),r=Jn;(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),function(a){a.ASC="asc",a.DESC="desc"}(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),function(a){a.PARCEL="parcel",a.ESTATE="estate"}(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"}(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),function(a){a.schema={type:"object",properties:{network:r.Network.schema,chainId:n.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.RentalListingCreation||(e.RentalListingCreation={}))})(Eb);var vb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,function(t){t.DATE="date",t.MOST_SALES="most_sales"}(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(vb);var Sb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Store||(e.Store={}))})(Sb);var wb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=ue;(function(n){n.MALE="male",n.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),function(n){n.MALE="male",n.FEMALE="female",n.UNISEX="unisex"}(e.GenderFilterOption||(e.GenderFilterOption={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableGender||(e.WearableGender={}))})(wb);var Tb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=ue;function n(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=n;function r(i,a){const s=n().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=r,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.World||(e.World={}))})(Tb);var Ib={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=ue,n=hr(),r=el,i=Jn;(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:r.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Bid||(e.Bid={}))})(Ib);var Ab={};Object.defineProperty(Ab,"__esModule",{value:!0});var Ob={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"}(e.TradeType||(e.TradeType={})),function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"}(e.TradeAssetType||(e.TradeAssetType={})),function(t){t.SENT="sent",t.RECEIVED="received"}(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ob);var Rb={},Cb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=ue;(function(n){n.STATIC="static",n.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewCamera||(e.PreviewCamera={}))})(Cb);var Nb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"}(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Nb);var Mb={};Object.defineProperty(Mb,"__esModule",{value:!0});var Pb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=ue;(function(n){n.ANIMATION_PLAY="animation_play",n.ANIMATION_PAUSE="animation_pause",n.ANIMATION_LOOP="animation_loop",n.ANIMATION_END="animation_end",n.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Pb);var kb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=ue;(function(n){n.IDLE="idle",n.WALK="walk",n.RUN="run",n.JUMP="jump",n.CLAP="clap",n.DAB="dab",n.DANCE="dance",n.FASHION="fashion",n.FASHION_2="fashion-2",n.FASHION_3="fashion-3",n.FASHION_4="fashion-4",n.LOVE="love",n.MONEY="money",n.FIST_PUMP="fist-pump",n.HEAD_EXPLODE="head-explode",n.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmote||(e.PreviewEmote={}))})(kb);var Lb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=ue;(function(r){r.READY="ready",r.LOAD="load",r.ERROR="error",r.UPDATE="update",r.CONTROLLER_REQUEST="controller_request",r.CONTROLLER_RESPONSE="controller_response",r.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),function(r){r.BABYLON="babylon",r.UNITY="unity"}(e.PreviewRenderer||(e.PreviewRenderer={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PreviewMessageType||(e.PreviewMessageType={}));const n=(r,i,a,s="*")=>{const o={type:i,payload:a};r.postMessage(o,s)};e.sendMessage=n})(Lb);var Db={};Object.defineProperty(Db,"__esModule",{value:!0});var Bb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=ue;(function(n){n.ORTHOGRAPHIC="orthographic",n.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewProjection||(e.PreviewProjection={}))})(Bb);var Fb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=ue;(function(n){n.TEXTURE="texture",n.WEARABLE="wearable",n.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewType||(e.PreviewType={}))})(Fb);var xb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:5},gravityPower:{type:"number",minimum:0,maximum:10},gravityDir:{type:"array",items:[{type:"number"},{type:"number"},{type:"number"}],minItems:3,maxItems:3},dragForce:{type:"number",minimum:0,maximum:1},center:{type:"integer",minimum:0,nullable:!0}},required:["stiffness","gravityPower","gravityDir","dragForce"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})(xb);var Hb={};Object.defineProperty(Hb,"__esModule",{value:!0});var Ub={};Object.defineProperty(Ub,"__esModule",{value:!0});var jb={};Object.defineProperty(jb,"__esModule",{value:!0});var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0});var Gb={};Object.defineProperty(Gb,"__esModule",{value:!0});var qb={};Object.defineProperty(qb,"__esModule",{value:!0});var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0});var zb={};Object.defineProperty(zb,"__esModule",{value:!0});(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Cb,e),n(Nb,e),n(Mb,e),n(Pb,e),n(kb,e),n(Lb,e),n(Db,e),n(Bb,e),n(Fb,e),n(xb,e),n(Hb,e),n(Ub,e),n(jb,e),n(Vb,e),n(Gb,e),n(qb,e),n(Wb,e),n(zb,e)})(Rb);var Yb={},tl={};Object.defineProperty(tl,"__esModule",{value:!0});tl.isSysLink=void 0;const bT=e=>e!==null&&typeof e=="object"&&"sys"in e&&"id"in e.sys;tl.isSysLink=bT;var nl={};Object.defineProperty(nl,"__esModule",{value:!0});nl.ContentfulLocale=void 0;var Zd;(function(e){e.enUS="en-US",e.es="es",e.zh="zh"})(Zd||(Zd={}));nl.ContentfulLocale=Zd;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0});(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(tl,e),n(nl,e),n(Kb,e)})(Yb);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(G,W,z,ae){ae===void 0&&(ae=z);var Ee=Object.getOwnPropertyDescriptor(W,z);(!Ee||("get"in Ee?!W.__esModule:Ee.writable||Ee.configurable))&&(Ee={enumerable:!0,get:function(){return W[z]}}),Object.defineProperty(G,ae,Ee)}:function(G,W,z,ae){ae===void 0&&(ae=z),G[ae]=W[z]}),n=ie&&ie.__exportStar||function(G,W){for(var z in G)z!=="default"&&!Object.prototype.hasOwnProperty.call(W,z)&&t(W,G,z)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var r=ub;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return r.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return r.AccountSortBy}});var i=hr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=lb();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=db;Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=fb;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var c=pb;Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return c.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return c.ItemSortBy}});var u=el;Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return u.ListingStatus}});var f=hb;Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return f.MetaTransaction}});var l=mb;Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return l.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return l.MintSortBy}});var m=Jn;Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var g=to;Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return g.NFTCategory}});var _=Sp;Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var T=gb;Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return T.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return T.CatalogSortDirection}});var B=yb;Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return B.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return B.OrderSortBy}});var U=_b;Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return U.ProviderType}});var J=eo;Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return J.Rarity}});var K=wp;Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return K.SaleType}});var H=bb;Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return H.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return H.SaleSortBy}});var F=Eb;Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return F.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return F.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return F.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return F.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return F.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return F.PeriodCreation}});var k=vb;Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return k.AnalyticsDayDataSortBy}});var j=Sb;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return j.Store}});var te=wb;Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return te.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return te.GenderFilterOption}});var L=Tb;Object.defineProperty(e,"World",{enumerable:!0,get:function(){return L.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return L.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return L.isInsideWorldLimits}}),n(Ib,e),n(Ab,e),n(Ob,e),n(Rb,e),n(Yb,e)})(cb);var Xb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Xb);var Jb={},Zb={},no={};Object.defineProperty(no,"__esModule",{value:!0});no.isInExceptionBlock=void 0;function ET(e,t){return e>=62&&e<=150&&t>=151&&t<=158}function vT(e,t){return e>=151&&e<=162&&t>=144&&t<=158}function ST(e,t){return e>=151&&e<=163&&t>=59&&t<=143}function wT(e,t){return ET(e,t)||vT(e,t)||ST(e,t)}no.isInExceptionBlock=wT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=ue,n=no;e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},function(r){r._isInLimits={keyword:"_isInLimits",validate:function(g,_){return!_||typeof _.x!="number"||typeof _.y!="number"?!1:o(_)||(0,n.isInExceptionBlock)(_.x,_.y)},errors:!1},r.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema,[r._isInLimits]);function i({x:m,y:g}){return`${m},${g}`}r.parcelToString=i;function a(m){const g=m.match(/^(-?\d+),(-?\d+)$/);if(!g)return null;const[,_,T]=g,B=parseInt(_,10),U=parseInt(T,10);return{x:B,y:U}}r.stringToParcel=a;function s(m){const g=a(m);return g?r.validate(g):!1}r.isParcelStringValid=s;function o(m){const{x:g,y:_}=m;return g>=e.PARCEL_LIMITS.minX&&g<=e.PARCEL_LIMITS.maxX&&_>=e.PARCEL_LIMITS.minY&&_<=e.PARCEL_LIMITS.maxY}r.isInStandardBounds=o;function c(m){return(0,n.isInExceptionBlock)(m.x,m.y)}r.isExceptionParcel=c;function u(m){return o(m)||c(m)}r.isInBounds=u;function f(m){return r.validate(m)}r.isValid=f;function l(m){const g=a(m);return g?r.validate(g):!1}r.isValidString=l}(e.Parcel||(e.Parcel={}))})(Zb);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.validateUrlInstance=Fa.validateUrl=void 0;const TT={allowLocalhost:!1,allowedPorts:[]};function Qb(e,t=2){let n=e;for(let r=0;r<t;r++)try{n=decodeURIComponent(n)}catch{break}return n.normalize("NFKC")}function Fs(e){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(e)}function IT(e){return!!(e.username||e.password)}function Ca(e){return/\\/.test(e)}const AT=["80","443"];function OT(e,t){return!!e.port&&!t.includes(e.port)}function RT(e){const t=e.toLowerCase();return!!(t==="localhost"||t.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(t)||t==="::1"||t==="[::1]"||t.startsWith("fe80:")||t.startsWith("fc00:"))}function CT(e){if(e.startsWith("//"))return null;try{return{url:new URL(e),wasRelative:!1}}catch{try{return{url:new URL(e,"https://example.com"),wasRelative:!0}}catch{return null}}}function em(e){const t=Qb(String(e).toLowerCase());return!(Fs(t)||Ca(t))}function NT(e){return!(!e||e.includes("..")||e.includes("//")||Fs(e)||Ca(e))}function $b(e,t={}){const n=Object.assign(Object.assign({},TT),t),r=[...AT,...n.allowedPorts];if(!e||e.length===0||e.length>4096||Fs(e)||Ca(e))return!1;const i=Qb(e);if(Fs(i)||Ca(i)||e.startsWith("//"))return!1;const a=CT(e);if(!a)return!1;const{url:s,wasRelative:o}=a;if(s.protocol!=="http:"&&s.protocol!=="https:"&&s.protocol!==""||IT(s)||Ca(e)||Ca(s.href)||!o&&(OT(s,r)||!n.allowLocalhost&&s.hostname&&RT(s.hostname))||!NT(s.pathname)||s.pathname.length>2048)return!1;const c=Array.from(s.searchParams.entries());if(c.length>50||(s.search?s.search.startsWith("?")?s.search.length-1:s.search.length:0)>2048)return!1;for(const[f,l]of c)if(f.length===0||!em(f)||!em(l)||f.length>128||l.length>1024)return!1;return!(s.hash&&Fs(s.hash))}Fa.validateUrl=$b;function MT(e,t={}){return $b(e.toString(),t)}Fa.validateUrlInstance=MT;(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Zb,e),n(no,e),n(Fa,e)})(Jb);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(s,o,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(o,c);(!f||("get"in f?!o.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(s,u,f)}:function(s,o,c,u){u===void 0&&(u=c),s[u]=o[c]}),n=ie&&ie.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),r=ie&&ie.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var c in s)c!=="default"&&Object.prototype.hasOwnProperty.call(s,c)&&t(o,s,c);return n(o,s),o},i=ie&&ie.__exportStar||function(s,o){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&t(o,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=r(v_);e.sdk=a,i(ue,e),i(cb,e),i(Ju,e),i(Ii,e),i(Xb,e),i(cs,e),i(_p,e),i(vp,e),i(Jb,e)})(E_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=E_;Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}})})(b_);var rl={};Object.defineProperty(rl,"__esModule",{value:!0});rl.moveMinutes=void 0;function PT(e){const t=new Date;return t.setMinutes(t.getMinutes()+e),t}rl.moveMinutes=PT;var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0});const Ts=Wu;class kT{constructor(t,n=!0){this.requestManager=t,this.checkedBlocks={},this.saveBlocks=n,n&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const t=await this.getBlockWrapper("latest"),n=await this.getBlockWrapper(1);this.blockTime=(t.timestamp-n.timestamp)/Number(t.number)-1,this.firstTimestamp=n.timestamp}async getDate(t,n=!0){const r=t/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),r<this.firstTimestamp)return{block:1,timestamp:r};if(r>=i||r>this.savedBlocks.latest.timestamp)return{block:(0,Ts.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];const a=await this.getBlockWrapper(Math.ceil((r-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(r,a,n),timestamp:r}}async findBetter(t,n,r,i=this.blockTime){if(await this.isBetterBlock(t,n,r))return n.number;const a=t-n.timestamp;let s=Math.ceil(a/i);s===0&&(s=a<0?-1:1);const o=await this.getBlockWrapper(this.getNextBlock(t,n.number,s));return i=Math.abs((n.timestamp-o.timestamp)/(n.number-o.number)),this.findBetter(t,o,r,i)}async isBetterBlock(t,n,r){const i=n.timestamp;if(r){if(i<t)return!1;const a=await this.getBlockWrapper(n.number-1);if(i>=t&&a.timestamp<t)return!0}else{if(i>=t)return!1;const a=await this.getBlockWrapper(n.number+1);if(i<t&&a.timestamp>=t)return!0}return!1}getNextBlock(t,n,r){const i=n+r;return this.checkedBlocks[t].includes(i)?this.getNextBlock(t,n,r<0?++r:--r):(this.checkedBlocks[t].push(i),i)}async getBlockWrapper(t){if(!this.saveBlocks){const r=await this.requestManager.eth_getBlockByNumber(t,!1);return{number:(0,Ts.toBigNumber)(r.number).toNumber(),timestamp:(0,Ts.toBigNumber)(r.timestamp).toNumber()}}if(this.savedBlocks[t.toString()])return this.savedBlocks[t];if(typeof t=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=t)return this.savedBlocks.latest;const{timestamp:n}=await this.requestManager.eth_getBlockByNumber(t,!1);return this.savedBlocks[t.toString()]={number:(0,Ts.toBigNumber)(t==="latest"?await this.requestManager.eth_blockNumber():t).toNumber(),timestamp:(0,Ts.toBigNumber)(n).toNumber()},this.requests++,this.savedBlocks[t.toString()]}}Tp.default=kT;var hn={},Ip={},eE={},ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.output=ln.exists=ln.hash=ln.bytes=ln.bool=ln.number=void 0;function lu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ln.number=lu;function tE(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ln.bool=tE;function Ap(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}ln.bytes=Ap;function nE(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");lu(e.outputLen),lu(e.blockLen)}ln.hash=nE;function rE(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ln.exists=rE;function iE(e,t){Ap(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}ln.output=iE;const LT={number:lu,bool:tE,bytes:Ap,hash:nE,exists:rE,output:iE};ln.default=LT;var xa={},il={};Object.defineProperty(il,"__esModule",{value:!0});il.crypto=void 0;il.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const t=il,n=H=>new Uint8Array(H.buffer,H.byteOffset,H.byteLength);e.u8=n;const r=H=>new Uint32Array(H.buffer,H.byteOffset,Math.floor(H.byteLength/4));e.u32=r;const i=H=>new DataView(H.buffer,H.byteOffset,H.byteLength);e.createView=i;const a=(H,F)=>H<<32-F|H>>>F;if(e.rotr=a,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},(H,F)=>F.toString(16).padStart(2,"0"));function o(H){if(!(H instanceof Uint8Array))throw new Error("Uint8Array expected");let F="";for(let k=0;k<H.length;k++)F+=s[H[k]];return F}e.bytesToHex=o;function c(H){if(typeof H!="string")throw new TypeError("hexToBytes: expected string, got "+typeof H);if(H.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const F=new Uint8Array(H.length/2);for(let k=0;k<F.length;k++){const j=k*2,te=H.slice(j,j+2),L=Number.parseInt(te,16);if(Number.isNaN(L)||L<0)throw new Error("Invalid byte sequence");F[k]=L}return F}e.hexToBytes=c;const u=async()=>{};e.nextTick=u;async function f(H,F,k){let j=Date.now();for(let te=0;te<H;te++){k(te);const L=Date.now()-j;L>=0&&L<F||(await(0,e.nextTick)(),j+=L)}}e.asyncLoop=f;function l(H){if(typeof H!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof H}`);return new TextEncoder().encode(H)}e.utf8ToBytes=l;function m(H){if(typeof H=="string"&&(H=l(H)),!(H instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof H})`);return H}e.toBytes=m;function g(...H){if(!H.every(j=>j instanceof Uint8Array))throw new Error("Uint8Array list expected");if(H.length===1)return H[0];const F=H.reduce((j,te)=>j+te.length,0),k=new Uint8Array(F);for(let j=0,te=0;j<H.length;j++){const L=H[j];k.set(L,te),te+=L.length}return k}e.concatBytes=g;class _{clone(){return this._cloneInto()}}e.Hash=_;const T=H=>Object.prototype.toString.call(H)==="[object Object]"&&H.constructor===Object;function B(H,F){if(F!==void 0&&(typeof F!="object"||!T(F)))throw new TypeError("Options should be object or undefined");return Object.assign(H,F)}e.checkOpts=B;function U(H){const F=j=>H().update(m(j)).digest(),k=H();return F.outputLen=k.outputLen,F.blockLen=k.blockLen,F.create=()=>H(),F}e.wrapConstructor=U;function J(H){const F=(j,te)=>H(te).update(m(j)).digest(),k=H({});return F.outputLen=k.outputLen,F.blockLen=k.blockLen,F.create=j=>H(j),F}e.wrapConstructorWithOpts=J;function K(H=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(H));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(H).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=K})(xa);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=ln,n=xa;class r extends n.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,t.default.hash(s);const c=(0,n.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,f=new Uint8Array(u);f.set(c.length>u?s.create().update(c).digest():c);for(let l=0;l<f.length;l++)f[l]^=54;this.iHash.update(f),this.oHash=s.create();for(let l=0;l<f.length;l++)f[l]^=106;this.oHash.update(f),f.fill(0)}update(s){return t.default.exists(this),this.iHash.update(s),this}digestInto(s){t.default.exists(this),t.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:c,finished:u,destroyed:f,blockLen:l,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=f,s.blockLen=l,s.outputLen=m,s.oHash=o._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(a,s,o)=>new r(a,s).update(o).digest();e.hmac=i,e.hmac.create=(a,s)=>new r(a,s)})(eE);var Yi={},al={};Object.defineProperty(al,"__esModule",{value:!0});al.SHA2=void 0;const ql=ln,Is=xa;function DT(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}class BT extends Is.Hash{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,Is.createView)(this.buffer)}update(t){ql.default.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=(0,Is.toBytes)(t);const a=t.length;for(let s=0;s<a;){const o=Math.min(i-this.pos,a-s);if(o===i){const c=(0,Is.createView)(t);for(;i<=a-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ql.default.exists(this),ql.default.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:a}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let l=s;l<i;l++)n[l]=0;DT(r,i-8,BigInt(this.length*8),a),this.process(r,0);const o=(0,Is.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)o.setUint32(4*l,f[l],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:a,destroyed:s,pos:o}=this;return t.length=i,t.pos=o,t.finished=a,t.destroyed=s,i%n&&t.buffer.set(r),t}}al.SHA2=BT;Object.defineProperty(Yi,"__esModule",{value:!0});Yi.sha224=Yi.sha256=void 0;const FT=al,zn=xa,xT=(e,t,n)=>e&t^~e&n,HT=(e,t,n)=>e&t^e&n^t&n,UT=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ci=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ui=new Uint32Array(64);class aE extends FT.SHA2{constructor(){super(64,32,8,!1),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0}get(){const{A:t,B:n,C:r,D:i,E:a,F:s,G:o,H:c}=this;return[t,n,r,i,a,s,o,c]}set(t,n,r,i,a,s,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=a|0,this.F=s|0,this.G=o|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)ui[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const m=ui[l-15],g=ui[l-2],_=(0,zn.rotr)(m,7)^(0,zn.rotr)(m,18)^m>>>3,T=(0,zn.rotr)(g,17)^(0,zn.rotr)(g,19)^g>>>10;ui[l]=T+ui[l-7]+_+ui[l-16]|0}let{A:r,B:i,C:a,D:s,E:o,F:c,G:u,H:f}=this;for(let l=0;l<64;l++){const m=(0,zn.rotr)(o,6)^(0,zn.rotr)(o,11)^(0,zn.rotr)(o,25),g=f+m+xT(o,c,u)+UT[l]+ui[l]|0,T=((0,zn.rotr)(r,2)^(0,zn.rotr)(r,13)^(0,zn.rotr)(r,22))+HT(r,i,a)|0;f=u,u=c,c=o,o=s+g|0,s=a,a=i,i=r,r=g+T|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,i,a,s,o,c,u,f)}roundClean(){ui.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class jT extends aE{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Yi.sha256=(0,zn.wrapConstructor)(()=>new aE);Yi.sha224=(0,zn.wrapConstructor)(()=>new jT);var Qd={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=nT,n=BigInt(0),r=BigInt(1),i=BigInt(2),a=BigInt(3),s=BigInt(8),o=Object.freeze({a:n,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=o;const c=(C,b)=>(C+b/i)/b,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(C){const{n:b}=o,A=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),D=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Y=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ee=A,me=BigInt("0x100000000000000000000000000000000"),_e=c(ee*C,b),De=c(-D*C,b);let Me=ce(C-_e*A-De*Y,b),ze=ce(-_e*D-De*ee,b);const ut=Me>me,lt=ze>me;if(ut&&(Me=b-Me),lt&&(ze=b-ze),Me>me||ze>me)throw new Error("splitScalarEndo: Endomorphism failed, k="+C);return{k1neg:ut,k1:Me,k2neg:lt,k2:ze}}},f=32,l=32,m=32,g=f+1,_=2*f+1;function T(C){const{a:b,b:A}=o,D=ce(C*C),Y=ce(D*C);return ce(Y+b*C+A)}const B=o.a===n;class U extends Error{constructor(b){super(b)}}function J(C){if(!(C instanceof K))throw new TypeError("JacobianPoint expected")}class K{constructor(b,A,D){this.x=b,this.y=A,this.z=D}static fromAffine(b){if(!(b instanceof k))throw new TypeError("JacobianPoint#fromAffine: expected Point");return b.equals(k.ZERO)?K.ZERO:new K(b.x,b.y,r)}static toAffineBatch(b){const A=tn(b.map(D=>D.z));return b.map((D,Y)=>D.toAffine(A[Y]))}static normalizeZ(b){return K.toAffineBatch(b).map(K.fromAffine)}equals(b){J(b);const{x:A,y:D,z:Y}=this,{x:ee,y:me,z:_e}=b,De=ce(Y*Y),Me=ce(_e*_e),ze=ce(A*Me),ut=ce(ee*De),lt=ce(ce(D*_e)*Me),Vt=ce(ce(me*Y)*De);return ze===ut&<===Vt}negate(){return new K(this.x,ce(-this.y),this.z)}double(){const{x:b,y:A,z:D}=this,Y=ce(b*b),ee=ce(A*A),me=ce(ee*ee),_e=b+ee,De=ce(i*(ce(_e*_e)-Y-me)),Me=ce(a*Y),ze=ce(Me*Me),ut=ce(ze-i*De),lt=ce(Me*(De-ut)-s*me),Vt=ce(i*A*D);return new K(ut,lt,Vt)}add(b){J(b);const{x:A,y:D,z:Y}=this,{x:ee,y:me,z:_e}=b;if(ee===n||me===n)return this;if(A===n||D===n)return b;const De=ce(Y*Y),Me=ce(_e*_e),ze=ce(A*Me),ut=ce(ee*De),lt=ce(ce(D*_e)*Me),Vt=ce(ce(me*Y)*De),Ht=ce(ut-ze),an=ce(Vt-lt);if(Ht===n)return an===n?this.double():K.ZERO;const ri=ce(Ht*Ht),Pr=ce(Ht*ri),ii=ce(ze*ri),pa=ce(an*an-Pr-i*ii),On=ce(an*(ii-pa)-lt*Pr),ki=ce(Y*_e*Ht);return new K(pa,On,ki)}subtract(b){return this.add(b.negate())}multiplyUnsafe(b){const A=K.ZERO;if(typeof b=="bigint"&&b===n)return A;let D=Xe(b);if(D===r)return this;if(!B){let ut=A,lt=this;for(;D>n;)D&r&&(ut=ut.add(lt)),lt=lt.double(),D>>=r;return ut}let{k1neg:Y,k1:ee,k2neg:me,k2:_e}=u.splitScalar(D),De=A,Me=A,ze=this;for(;ee>n||_e>n;)ee&r&&(De=De.add(ze)),_e&r&&(Me=Me.add(ze)),ze=ze.double(),ee>>=r,_e>>=r;return Y&&(De=De.negate()),me&&(Me=Me.negate()),Me=new K(ce(Me.x*u.beta),Me.y,Me.z),De.add(Me)}precomputeWindow(b){const A=B?128/b+1:256/b+1,D=[];let Y=this,ee=Y;for(let me=0;me<A;me++){ee=Y,D.push(ee);for(let _e=1;_e<2**(b-1);_e++)ee=ee.add(Y),D.push(ee);Y=ee.double()}return D}wNAF(b,A){!A&&this.equals(K.BASE)&&(A=k.BASE);const D=A&&A._WINDOW_SIZE||1;if(256%D)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Y=A&&F.get(A);Y||(Y=this.precomputeWindow(D),A&&D!==1&&(Y=K.normalizeZ(Y),F.set(A,Y)));let ee=K.ZERO,me=K.BASE;const _e=1+(B?128/D:256/D),De=2**(D-1),Me=BigInt(2**D-1),ze=2**D,ut=BigInt(D);for(let lt=0;lt<_e;lt++){const Vt=lt*De;let Ht=Number(b&Me);b>>=ut,Ht>De&&(Ht-=ze,b+=r);const an=Vt,ri=Vt+Math.abs(Ht)-1,Pr=lt%2!==0,ii=Ht<0;Ht===0?me=me.add(H(Pr,Y[an])):ee=ee.add(H(ii,Y[ri]))}return{p:ee,f:me}}multiply(b,A){let D=Xe(b),Y,ee;if(B){const{k1neg:me,k1:_e,k2neg:De,k2:Me}=u.splitScalar(D);let{p:ze,f:ut}=this.wNAF(_e,A),{p:lt,f:Vt}=this.wNAF(Me,A);ze=H(me,ze),lt=H(De,lt),lt=new K(ce(lt.x*u.beta),lt.y,lt.z),Y=ze.add(lt),ee=ut.add(Vt)}else{const{p:me,f:_e}=this.wNAF(D,A);Y=me,ee=_e}return K.normalizeZ([Y,ee])[0]}toAffine(b){const{x:A,y:D,z:Y}=this,ee=this.equals(K.ZERO);b==null&&(b=ee?s:vt(Y));const me=b,_e=ce(me*me),De=ce(_e*me),Me=ce(A*_e),ze=ce(D*De),ut=ce(Y*me);if(ee)return k.ZERO;if(ut!==r)throw new Error("invZ was invalid");return new k(Me,ze)}}K.BASE=new K(o.Gx,o.Gy,r),K.ZERO=new K(n,r,n);function H(C,b){const A=b.negate();return C?A:b}const F=new WeakMap;class k{constructor(b,A){this.x=b,this.y=A}_setWindowSize(b){this._WINDOW_SIZE=b,F.delete(this)}hasEvenY(){return this.y%i===n}static fromCompressedHex(b){const A=b.length===32,D=fe(A?b:b.subarray(1));if(!nt(D))throw new Error("Point is not on curve");const Y=T(D);let ee=Et(Y);const me=(ee&r)===r;A?me&&(ee=ce(-ee)):(b[0]&1)===1!==me&&(ee=ce(-ee));const _e=new k(D,ee);return _e.assertValidity(),_e}static fromUncompressedHex(b){const A=fe(b.subarray(1,f+1)),D=fe(b.subarray(f+1,f*2+1)),Y=new k(A,D);return Y.assertValidity(),Y}static fromHex(b){const A=Se(b),D=A.length,Y=A[0];if(D===f)return this.fromCompressedHex(A);if(D===g&&(Y===2||Y===3))return this.fromCompressedHex(A);if(D===_&&Y===4)return this.fromUncompressedHex(A);throw new Error(`Point.fromHex: received invalid point. Expected 32-${g} compressed bytes or ${_} uncompressed bytes, not ${D}`)}static fromPrivateKey(b){return k.BASE.multiply(Je(b))}static fromSignature(b,A,D){const{r:Y,s:ee}=Lt(A);if(![0,1,2,3].includes(D))throw new Error("Cannot recover: invalid recovery bit");const me=Gn(Se(b)),{n:_e}=o,De=D===2||D===3?Y+_e:Y,Me=vt(De,_e),ze=ce(-me*Me,_e),ut=ce(ee*Me,_e),lt=D&1?"03":"02",Vt=k.fromHex(lt+pe(De)),Ht=k.BASE.multiplyAndAddUnsafe(Vt,ze,ut);if(!Ht)throw new Error("Cannot recover signature: point at infinify");return Ht.assertValidity(),Ht}toRawBytes(b=!1){return ge(this.toHex(b))}toHex(b=!1){const A=pe(this.x);return b?`${this.hasEvenY()?"02":"03"}${A}`:`04${A}${pe(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const b="Point is not on elliptic curve",{x:A,y:D}=this;if(!nt(A)||!nt(D))throw new Error(b);const Y=ce(D*D),ee=T(A);if(ce(Y-ee)!==n)throw new Error(b)}equals(b){return this.x===b.x&&this.y===b.y}negate(){return new k(this.x,ce(-this.y))}double(){return K.fromAffine(this).double().toAffine()}add(b){return K.fromAffine(this).add(K.fromAffine(b)).toAffine()}subtract(b){return this.add(b.negate())}multiply(b){return K.fromAffine(this).multiply(b,this).toAffine()}multiplyAndAddUnsafe(b,A,D){const Y=K.fromAffine(this),ee=A===n||A===r||this!==k.BASE?Y.multiplyUnsafe(A):Y.multiply(A),me=K.fromAffine(b).multiplyUnsafe(D),_e=ee.add(me);return _e.equals(K.ZERO)?void 0:_e.toAffine()}}e.Point=k,k.BASE=new k(o.Gx,o.Gy),k.ZERO=new k(n,n);function j(C){return Number.parseInt(C[0],16)>=8?"00"+C:C}function te(C){if(C.length<2||C[0]!==2)throw new Error(`Invalid signature integer tag: ${ae(C)}`);const b=C[1],A=C.subarray(2,b+2);if(!b||A.length!==b)throw new Error("Invalid signature integer: wrong length");if(A[0]===0&&A[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:fe(A),left:C.subarray(b+2)}}function L(C){if(C.length<2||C[0]!=48)throw new Error(`Invalid signature tag: ${ae(C)}`);if(C[1]!==C.length-2)throw new Error("Invalid signature: incorrect length");const{data:b,left:A}=te(C.subarray(2)),{data:D,left:Y}=te(A);if(Y.length)throw new Error(`Invalid signature: left bytes after parsing: ${ae(Y)}`);return{r:b,s:D}}class G{constructor(b,A){this.r=b,this.s=A,this.assertValidity()}static fromCompact(b){const A=b instanceof Uint8Array,D="Signature.fromCompact";if(typeof b!="string"&&!A)throw new TypeError(`${D}: Expected string or Uint8Array`);const Y=A?ae(b):b;if(Y.length!==128)throw new Error(`${D}: Expected 64-byte hex`);return new G(ve(Y.slice(0,64)),ve(Y.slice(64,128)))}static fromDER(b){const A=b instanceof Uint8Array;if(typeof b!="string"&&!A)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:D,s:Y}=L(A?b:ge(b));return new G(D,Y)}static fromHex(b){return this.fromDER(b)}assertValidity(){const{r:b,s:A}=this;if(!Wt(b))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Wt(A))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const b=o.n>>r;return this.s>b}normalizeS(){return this.hasHighS()?new G(this.r,ce(-this.s,o.n)):this}toDERRawBytes(){return ge(this.toDERHex())}toDERHex(){const b=j($(this.s)),A=j($(this.r)),D=b.length/2,Y=A.length/2,ee=$(D),me=$(Y);return`30${$(Y+D+4)}02${me}${A}02${ee}${b}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ge(this.toCompactHex())}toCompactHex(){return pe(this.r)+pe(this.s)}}e.Signature=G;function W(...C){if(!C.every(D=>D instanceof Uint8Array))throw new Error("Uint8Array list expected");if(C.length===1)return C[0];const b=C.reduce((D,Y)=>D+Y.length,0),A=new Uint8Array(b);for(let D=0,Y=0;D<C.length;D++){const ee=C[D];A.set(ee,Y),Y+=ee.length}return A}const z=Array.from({length:256},(C,b)=>b.toString(16).padStart(2,"0"));function ae(C){if(!(C instanceof Uint8Array))throw new Error("Expected Uint8Array");let b="";for(let A=0;A<C.length;A++)b+=z[C[A]];return b}const Ee=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function pe(C){if(typeof C!="bigint")throw new Error("Expected bigint");if(!(n<=C&&C<Ee))throw new Error("Expected number 0 <= n < 2^256");return C.toString(16).padStart(64,"0")}function le(C){const b=ge(pe(C));if(b.length!==32)throw new Error("Error: expected 32 bytes");return b}function $(C){const b=C.toString(16);return b.length&1?`0${b}`:b}function ve(C){if(typeof C!="string")throw new TypeError("hexToNumber: expected string, got "+typeof C);return BigInt(`0x${C}`)}function ge(C){if(typeof C!="string")throw new TypeError("hexToBytes: expected string, got "+typeof C);if(C.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+C.length);const b=new Uint8Array(C.length/2);for(let A=0;A<b.length;A++){const D=A*2,Y=C.slice(D,D+2),ee=Number.parseInt(Y,16);if(Number.isNaN(ee)||ee<0)throw new Error("Invalid byte sequence");b[A]=ee}return b}function fe(C){return ve(ae(C))}function Se(C){return C instanceof Uint8Array?Uint8Array.from(C):ge(C)}function Xe(C){if(typeof C=="number"&&Number.isSafeInteger(C)&&C>0)return BigInt(C);if(typeof C=="bigint"&&Wt(C))return C;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function ce(C,b=o.P){const A=C%b;return A>=n?A:b+A}function He(C,b){const{P:A}=o;let D=C;for(;b-- >n;)D*=D,D%=A;return D}function Et(C){const{P:b}=o,A=BigInt(6),D=BigInt(11),Y=BigInt(22),ee=BigInt(23),me=BigInt(44),_e=BigInt(88),De=C*C*C%b,Me=De*De*C%b,ze=He(Me,a)*Me%b,ut=He(ze,a)*Me%b,lt=He(ut,i)*De%b,Vt=He(lt,D)*lt%b,Ht=He(Vt,Y)*Vt%b,an=He(Ht,me)*Ht%b,ri=He(an,_e)*an%b,Pr=He(ri,me)*Ht%b,ii=He(Pr,a)*Me%b,pa=He(ii,ee)*Vt%b,On=He(pa,A)*De%b,ki=He(On,i);if(ki*ki%b!==C)throw new Error("Cannot find square root");return ki}function vt(C,b=o.P){if(C===n||b<=n)throw new Error(`invert: expected positive integers, got n=${C} mod=${b}`);let A=ce(C,b),D=b,Y=n,ee=r;for(;A!==n;){const _e=D/A,De=D%A,Me=Y-ee*_e;D=A,A=De,Y=ee,ee=Me}if(D!==r)throw new Error("invert: does not exist");return ce(Y,b)}function tn(C,b=o.P){const A=new Array(C.length),D=C.reduce((ee,me,_e)=>me===n?ee:(A[_e]=ee,ce(ee*me,b)),r),Y=vt(D,b);return C.reduceRight((ee,me,_e)=>me===n?ee:(A[_e]=ce(ee*A[_e],b),ce(ee*me,b)),Y),A}function nn(C){const b=C.length*8-l*8,A=fe(C);return b>0?A>>BigInt(b):A}function Gn(C,b=!1){const A=nn(C);if(b)return A;const{n:D}=o;return A>=D?A-D:A}let Ne,pt;class gt{constructor(b,A){if(this.hashLen=b,this.qByteLen=A,typeof b!="number"||b<2)throw new Error("hashLen must be a number");if(typeof A!="number"||A<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(b).fill(1),this.k=new Uint8Array(b).fill(0),this.counter=0}hmac(...b){return e.utils.hmacSha256(this.k,...b)}hmacSync(...b){return pt(this.k,...b)}checkSync(){if(typeof pt!="function")throw new U("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(b=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),b),this.v=await this.hmac(this.v),b.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),b),this.v=await this.hmac(this.v))}reseedSync(b=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),b),this.v=this.hmacSync(this.v),b.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),b),this.v=this.hmacSync(this.v))}async generate(){this.incr();let b=0;const A=[];for(;b<this.qByteLen;){this.v=await this.hmac(this.v);const D=this.v.slice();A.push(D),b+=this.v.length}return W(...A)}generateSync(){this.checkSync(),this.incr();let b=0;const A=[];for(;b<this.qByteLen;){this.v=this.hmacSync(this.v);const D=this.v.slice();A.push(D),b+=this.v.length}return W(...A)}}function Wt(C){return n<C&&C<o.n}function nt(C){return n<C&&C<o.P}function rt(C,b,A,D=!0){const{n:Y}=o,ee=Gn(C,!0);if(!Wt(ee))return;const me=vt(ee,Y),_e=k.BASE.multiply(ee),De=ce(_e.x,Y);if(De===n)return;const Me=ce(me*ce(b+A*De,Y),Y);if(Me===n)return;let ze=new G(De,Me),ut=(_e.x===ze.r?0:2)|Number(_e.y&r);return D&&ze.hasHighS()&&(ze=ze.normalizeS(),ut^=1),{sig:ze,recovery:ut}}function Je(C){let b;if(typeof C=="bigint")b=C;else if(typeof C=="number"&&Number.isSafeInteger(C)&&C>0)b=BigInt(C);else if(typeof C=="string"){if(C.length!==2*l)throw new Error("Expected 32 bytes of private key");b=ve(C)}else if(C instanceof Uint8Array){if(C.length!==l)throw new Error("Expected 32 bytes of private key");b=fe(C)}else throw new TypeError("Expected valid private key");if(!Wt(b))throw new Error("Expected private key: 0 < key < n");return b}function yn(C){return C instanceof k?(C.assertValidity(),C):k.fromHex(C)}function Lt(C){if(C instanceof G)return C.assertValidity(),C;try{return G.fromDER(C)}catch{return G.fromCompact(C)}}function ti(C,b=!1){return k.fromPrivateKey(C).toRawBytes(b)}e.getPublicKey=ti;function Qe(C,b,A,D=!1){return k.fromSignature(C,b,A).toRawBytes(D)}e.recoverPublicKey=Qe;function rn(C){const b=C instanceof Uint8Array,A=typeof C=="string",D=(b||A)&&C.length;return b?D===g||D===_:A?D===g*2||D===_*2:C instanceof k}function et(C,b,A=!1){if(rn(C))throw new TypeError("getSharedSecret: first arg must be private key");if(!rn(b))throw new TypeError("getSharedSecret: second arg must be public key");const D=yn(b);return D.assertValidity(),D.multiply(Je(C)).toRawBytes(A)}e.getSharedSecret=et;function Dt(C){const b=C.length>f?C.slice(0,f):C;return fe(b)}function ot(C){const b=Dt(C),A=ce(b,o.n);return Ln(A<n?b:A)}function Ln(C){return le(C)}function _s(C,b,A){if(C==null)throw new Error(`sign: expected valid message hash, not "${C}"`);const D=Se(C),Y=Je(b),ee=[Ln(Y),ot(D)];if(A!=null){A===!0&&(A=e.utils.randomBytes(f));const De=Se(A);if(De.length!==f)throw new Error(`sign: Expected ${f} bytes of extra data`);ee.push(De)}const me=W(...ee),_e=Dt(D);return{seed:me,m:_e,d:Y}}function bs(C,b){const{sig:A,recovery:D}=C,{der:Y,recovered:ee}=Object.assign({canonical:!0,der:!0},b),me=Y?A.toDERRawBytes():A.toCompactRawBytes();return ee?[me,D]:me}async function An(C,b,A={}){const{seed:D,m:Y,d:ee}=_s(C,b,A.extraEntropy),me=new gt(m,l);await me.reseed(D);let _e;for(;!(_e=rt(await me.generate(),Y,ee,A.canonical));)await me.reseed();return bs(_e,A)}e.sign=An;function Pi(C,b,A={}){const{seed:D,m:Y,d:ee}=_s(C,b,A.extraEntropy),me=new gt(m,l);me.reseedSync(D);let _e;for(;!(_e=rt(me.generateSync(),Y,ee,A.canonical));)me.reseedSync();return bs(_e,A)}e.signSync=Pi;const Nr={strict:!0};function la(C,b,A,D=Nr){let Y;try{Y=Lt(C),b=Se(b)}catch{return!1}const{r:ee,s:me}=Y;if(D.strict&&Y.hasHighS())return!1;const _e=Gn(b);let De;try{De=yn(A)}catch{return!1}const{n:Me}=o,ze=vt(me,Me),ut=ce(_e*ze,Me),lt=ce(ee*ze,Me),Vt=k.BASE.multiplyAndAddUnsafe(De,ut,lt);return Vt?ce(Vt.x,Me)===ee:!1}e.verify=la;function qn(C){return ce(fe(C),o.n)}class Mr{constructor(b,A){this.r=b,this.s=A,this.assertValidity()}static fromHex(b){const A=Se(b);if(A.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${A.length}`);const D=fe(A.subarray(0,32)),Y=fe(A.subarray(32,64));return new Mr(D,Y)}assertValidity(){const{r:b,s:A}=this;if(!nt(b)||!Wt(A))throw new Error("Invalid signature")}toHex(){return pe(this.r)+pe(this.s)}toRawBytes(){return ge(this.toHex())}}function $n(C){return k.fromPrivateKey(C).toRawX()}class da{constructor(b,A,D=e.utils.randomBytes()){if(b==null)throw new TypeError(`sign: Expected valid message, not "${b}"`);this.m=Se(b);const{x:Y,scalar:ee}=this.getScalar(Je(A));if(this.px=Y,this.d=ee,this.rand=Se(D),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(b){const A=k.fromPrivateKey(b),D=A.hasEvenY()?b:o.n-b;return{point:A,scalar:D,x:A.toRawX()}}initNonce(b,A){return le(b^fe(A))}finalizeNonce(b){const A=ce(fe(b),o.n);if(A===n)throw new Error("sign: Creation of signature failed. k is zero");const{point:D,x:Y,scalar:ee}=this.getScalar(A);return{R:D,rx:Y,k:ee}}finalizeSig(b,A,D,Y){return new Mr(b.x,ce(A+D*Y,o.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:b,d:A,px:D,rand:Y}=this,ee=e.utils.taggedHash,me=this.initNonce(A,await ee(Wn.aux,Y)),{R:_e,rx:De,k:Me}=this.finalizeNonce(await ee(Wn.nonce,me,D,b)),ze=qn(await ee(Wn.challenge,De,D,b)),ut=this.finalizeSig(_e,Me,ze,A);return await Ss(ut,b,D)||this.error(),ut}calcSync(){const{m:b,d:A,px:D,rand:Y}=this,ee=e.utils.taggedHashSync,me=this.initNonce(A,ee(Wn.aux,Y)),{R:_e,rx:De,k:Me}=this.finalizeNonce(ee(Wn.nonce,me,D,b)),ze=qn(ee(Wn.challenge,De,D,b)),ut=this.finalizeSig(_e,Me,ze,A);return gr(ut,b,D)||this.error(),ut}}async function ni(C,b,A){return new da(C,b,A).calc()}function Es(C,b,A){return new da(C,b,A).calcSync()}function vs(C,b,A){const D=C instanceof Mr,Y=D?C:Mr.fromHex(C);return D&&Y.assertValidity(),{...Y,m:Se(b),P:yn(A)}}function fa(C,b,A,D){const Y=k.BASE.multiplyAndAddUnsafe(b,Je(A),ce(-D,o.n));return!(!Y||!Y.hasEvenY()||Y.x!==C)}async function Ss(C,b,A){try{const{r:D,s:Y,m:ee,P:me}=vs(C,b,A),_e=qn(await e.utils.taggedHash(Wn.challenge,le(D),me.toRawX(),ee));return fa(D,me,Y,_e)}catch{return!1}}function gr(C,b,A){try{const{r:D,s:Y,m:ee,P:me}=vs(C,b,A),_e=qn(e.utils.taggedHashSync(Wn.challenge,le(D),me.toRawX(),ee));return fa(D,me,Y,_e)}catch(D){if(D instanceof U)throw D;return!1}}e.schnorr={Signature:Mr,getPublicKey:$n,sign:ni,verify:Ss,signSync:Es,verifySync:gr},k.BASE._setWindowSize(8);const bt={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Wn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},er={};e.utils={bytesToHex:ae,hexToBytes:ge,concatBytes:W,mod:ce,invert:vt,isValidPrivateKey(C){try{return Je(C),!0}catch{return!1}},_bigintTo32Bytes:le,_normalizePrivateKey:Je,hashToPrivateKey:C=>{C=Se(C);const b=l+8;if(C.length<b||C.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const A=ce(fe(C),o.n-r)+r;return le(A)},randomBytes:(C=32)=>{if(bt.web)return bt.web.getRandomValues(new Uint8Array(C));if(bt.node){const{randomBytes:b}=bt.node;return Uint8Array.from(b(C))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(l+8)),precompute(C=8,b=k.BASE){const A=b===k.BASE?b:new k(b.x,b.y);return A._setWindowSize(C),A.multiply(a),A},sha256:async(...C)=>{if(bt.web){const b=await bt.web.subtle.digest("SHA-256",W(...C));return new Uint8Array(b)}else if(bt.node){const{createHash:b}=bt.node,A=b("sha256");return C.forEach(D=>A.update(D)),Uint8Array.from(A.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(C,...b)=>{if(bt.web){const A=await bt.web.subtle.importKey("raw",C,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),D=W(...b),Y=await bt.web.subtle.sign("HMAC",A,D);return new Uint8Array(Y)}else if(bt.node){const{createHmac:A}=bt.node,D=A("sha256",C);return b.forEach(Y=>D.update(Y)),Uint8Array.from(D.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(C,...b)=>{let A=er[C];if(A===void 0){const D=await e.utils.sha256(Uint8Array.from(C,Y=>Y.charCodeAt(0)));A=W(D,D),er[C]=A}return e.utils.sha256(A,...b)},taggedHashSync:(C,...b)=>{if(typeof Ne!="function")throw new U("sha256Sync is undefined, you need to set it");let A=er[C];if(A===void 0){const D=Ne(Uint8Array.from(C,Y=>Y.charCodeAt(0)));A=W(D,D),er[C]=A}return Ne(A,...b)},_JacobianPoint:K},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Ne},set(C){Ne||(Ne=C)}},hmacSha256Sync:{configurable:!1,get(){return pt},set(C){pt||(pt=C)}}})})(Qd);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const t=eE,n=Yi,r=Qd;var i=Qd;Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),r.utils.hmacSha256Sync=(a,...s)=>{const o=t.hmac.create(n.sha256,a);return s.forEach(c=>o.update(c)),o.digest()}})(Ip);var Ke={};function tm(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var du={exports:{}};du.exports;(function(e,t){var n=ie&&ie.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const r=n(ln),i=xa,a=r.default.bool;t.assertBool=a;const s=r.default.bytes;t.assertBytes=s;var o=xa;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return o.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return o.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return o.utf8ToBytes}});function c(m){if(!(m instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof m}`);return new TextDecoder().decode(m)}t.bytesToUtf8=c;function u(m){const g=m.startsWith("0x")?m.substring(2):m;return(0,i.hexToBytes)(g)}t.hexToBytes=u;function f(m,g){if(m.length!==g.length)return!1;for(let _=0;_<m.length;_++)if(m[_]!==g[_])return!1;return!0}t.equalsBytes=f;function l(m){return g=>(r.default.bytes(g),m(g))}t.wrapHash=l,t.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,g=typeof tm=="function"&&tm.bind(e);return{node:g&&!m?g("crypto"):void 0,web:m}})()})(du,du.exports);var VT=du.exports,GT=ie&&ie.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),qT=ie&&ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),WT=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&>(t,e,n);return qT(t,e),t};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.contextRandomize=Ke.ecdh=Ke.signatureNormalize=Ke.signatureImport=Ke.signatureExport=Ke.privateKeyTweakMul=Ke.publicKeyTweakMul=Ke.publicKeyTweakAdd=Ke.publicKeyCombine=Ke.publicKeyNegate=Ke.privateKeyNegate=Ke.privateKeyTweakAdd=Ke.ecdsaVerify=Ke.ecdsaRecover=Ke.ecdsaSign=Ke.publicKeyConvert=Ke.publicKeyVerify=Ke.publicKeyCreate=Ke.privateKeyVerify=Ke.createPrivateKey=Ke.createPrivateKeySync=void 0;const zT=Yi,Ft=WT(Ip),We=VT;function YT(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const bi=e=>YT((0,We.toHex)(e)),sl=e=>e.toString(16).padStart(64,"0"),$d=e=>(0,We.hexToBytes)(sl(e)),{mod:sE}=Ft.utils,or=Ft.CURVE.n;function Kn(e=r=>new Uint8Array(r),t,n){return typeof e=="function"&&(e=e(t)),(0,We.assertBytes)(e,t),n&&e.set(n),e}function qs(e){return(0,We.assertBytes)(e,64),Ft.Signature.fromCompact(e)}function oE(){return Ft.utils.randomPrivateKey()}Ke.createPrivateKeySync=oE;async function KT(){return oE()}Ke.createPrivateKey=KT;function XT(e){return(0,We.assertBytes)(e,32),Ft.utils.isValidPrivateKey(e)}Ke.privateKeyVerify=XT;function JT(e,t=!0,n){(0,We.assertBytes)(e,32),(0,We.assertBool)(t);const r=Ft.getPublicKey(e,t);return Kn(n,t?33:65,r)}Ke.publicKeyCreate=JT;function ZT(e){(0,We.assertBytes)(e,33,65);try{return Ft.Point.fromHex(e),!0}catch{return!1}}Ke.publicKeyVerify=ZT;function QT(e,t=!0,n){(0,We.assertBytes)(e,33,65),(0,We.assertBool)(t);const r=Ft.Point.fromHex(e).toRawBytes(t);return Kn(n,t?33:65,r)}Ke.publicKeyConvert=QT;function $T(e,t,n={noncefn:void 0,data:void 0},r){if((0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(n&&(n.noncefn!==void 0||n.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,a]=Ft.signSync(e,t,{recovered:!0,der:!1});return{signature:Kn(r,64,i),recid:a}}Ke.ecdsaSign=$T;function eI(e,t,n,r=!0,i){(0,We.assertBytes)(n,32),(0,We.assertBool)(r);const a=qs(e).toHex(),s=Ft.Point.fromSignature(n,a,t);return Kn(i,r?33:65,s.toRawBytes(r))}Ke.ecdsaRecover=eI;function tI(e,t,n){(0,We.assertBytes)(e,64),(0,We.assertBytes)(t,32),(0,We.assertBytes)(n,33,65),(0,We.assertBytes)(e,64);const r=bi(e.slice(0,32)),i=bi(e.slice(32,64));if(r>=or||i>=or)throw new Error("Cannot parse signature");const a=Ft.Point.fromHex(n);let s;try{s=qs(e)}catch{return!1}return Ft.verify(s,t,a)}Ke.ecdsaVerify=tI;function nI(e,t){(0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32);let n=bi(t);if(n===0n)throw new Error("Tweak must not be zero");if(n>=or)throw new Error("Tweak bigger than curve order");if(n+=bi(e),n>=or&&(n-=or),n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,We.hexToBytes)(sl(n))),e}Ke.privateKeyTweakAdd=nI;function rI(e){(0,We.assertBytes)(e,32);const t=sE(-bi(e),or);return e.set((0,We.hexToBytes)(sl(t))),e}Ke.privateKeyNegate=rI;function iI(e,t=!0,n){(0,We.assertBytes)(e,33,65),(0,We.assertBool)(t);const r=Ft.Point.fromHex(e).negate();return Kn(n,t?33:65,r.toRawBytes(t))}Ke.publicKeyNegate=iI;function aI(e,t=!0,n){if(!Array.isArray(e)||!e.length)throw new TypeError(`Expected array with one or more items, not ${e}`);for(const i of e)(0,We.assertBytes)(i,33,65);(0,We.assertBool)(t);const r=e.map(i=>Ft.Point.fromHex(i)).reduce((i,a)=>i.add(a),Ft.Point.ZERO);if(r.equals(Ft.Point.ZERO))throw new Error("Combined result must not be zero");return Kn(n,t?33:65,r.toRawBytes(t))}Ke.publicKeyCombine=aI;function sI(e,t,n=!0,r){(0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),(0,We.assertBool)(n);const i=Ft.Point.fromHex(e),a=Ft.Point.fromPrivateKey(t),s=i.add(a);if(a.equals(Ft.Point.ZERO)||s.equals(Ft.Point.ZERO))throw new Error("Tweak must not be zero");return Kn(r,n?33:65,s.toRawBytes(n))}Ke.publicKeyTweakAdd=sI;function oI(e,t,n=!0,r){(0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),(0,We.assertBool)(n);const i=bi(t);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=or)throw new Error("Tweak is zero or bigger than curve order");const a=Ft.Point.fromHex(e).multiply(i);return Kn(r,n?33:65,a.toRawBytes(n))}Ke.publicKeyTweakMul=oI;function cI(e,t){(0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32);const n=bi(t);if(n<=1||n>=or)throw new Error("Tweak is zero or bigger than curve order");const r=sE(n*bi(e),or);if(r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,We.hexToBytes)(sl(r))),e}Ke.privateKeyTweakMul=cI;function uI(e,t){const n=qs(e).toRawBytes();return Kn(t,72,qs(e).toRawBytes()).slice(0,n.length)}Ke.signatureExport=uI;function lI(e,t){(0,We.assertBytes)(e);const n=Ft.Signature.fromDER(e);return Kn(t,64,(0,We.hexToBytes)(n.toCompactHex()))}Ke.signatureImport=lI;function dI(e){const t=qs(e);return t.s>or/2n&&e.set($d(or-t.s),32),e}Ke.signatureNormalize=dI;function fI(e,t,n={},r){if((0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdh: options should be object");n.data!==void 0&&(0,We.assertBytes)(n.data);const i=Ft.Point.fromHex(Ft.getSharedSecret(t,e));if(n.hashfn===void 0)return Kn(r,32,(0,zT.sha256)(i.toRawBytes(!0)));if(typeof n.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");n.xbuf!==void 0&&(0,We.assertBytes)(n.xbuf,32),n.ybuf!==void 0&&(0,We.assertBytes)(n.ybuf,32),(0,We.assertBytes)(r,32);const a=n.xbuf||new Uint8Array(32);a.set($d(i.x));const s=n.ybuf||new Uint8Array(32);s.set($d(i.y));const o=n.hashfn(a,s,n.data);if(!(o instanceof Uint8Array)||o.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return Kn(r,32,o)}Ke.ecdh=fI;function pI(e){e!==null&&(0,We.assertBytes)(e,32)}Ke.contextRandomize=pI;Object.defineProperty(hn,"__esModule",{value:!0});hn.createUnsafeIdentity=hn.computeAddress=hn.ethSign=hn.createEthereumMessageHash=hn.sign=hn.recoverAddressFromEthSignature=hn.recoverPublicKey=void 0;const xn=Wu,nm=Ip,cE=Ke;function uE(e,t){if(e.length!==65)throw new Error("Invalid signature length"+e.length);const n=e.slice(0,e.length-1),r=e[64]===28?1:0;return(0,cE.ecdsaRecover)(n,r,t,!1).slice(1)}hn.recoverPublicKey=uE;function hI(e){if(e.length!==65)throw new Error("Invalid ethereum signature");const t=e[64];if(t===0||t===1){const n=new Uint8Array(e);return n[64]=t+27,n}return e}function lE(e,t){if(typeof e=="string"){if((0,xn.isHex)(e))return lE((0,xn.hexToBytes)(e),t);throw new Error("String signatures must be encoded in hex")}return Rp(uE(hI(e),Op(t)))}hn.recoverAddressFromEthSignature=lE;function dE(e,t){const n=(0,cE.ecdsaSign)(t,e),r=n.recid===1?"1c":"1b";return(0,xn.toHex)(n.signature)+r}hn.sign=dE;function Op(e){const t=typeof e=="string"?(0,xn.stringToUtf8Bytes)(e):e,n=(0,xn.concatBytes)((0,xn.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
13
|
+
*/(function(d){(function(){var h="input is invalid type",y=typeof window=="object",w=y?window:{};w.JS_SHA3_NO_WINDOW&&(y=!1);var O=!y&&typeof self=="object";!w.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?w=ie:O&&(w=self);var P=!w.JS_SHA3_NO_COMMON_JS&&d.exports,Q=!w.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ye="0123456789abcdef".split(""),Pe=[4,1024,262144,67108864],Le=[0,8,16,24],_n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ut=[224,256,384,512],be=[128,256],sn=["hex","buffer","arrayBuffer","array","digest"],Ot={128:168,256:136};!w.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),!Q||!w.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(p){return typeof p=="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});for(var Rt=function(p,E,I){return function(S){return new yt(p,E,p).update(S)[I]()}},dn=function(p,E,I){return function(S,R){return new yt(p,E,R).update(S)[I]()}},Lr=function(p,E,I){return function(S,R,N,M){return on["cshake"+p].update(S,R,N,M)[I]()}},yr=function(p,E,I){return function(S,R,N,M){return on["kmac"+p].update(S,R,N,M)[I]()}},fn=function(p,E,I,S){for(var R=0;R<sn.length;++R){var N=sn[R];p[N]=E(I,S,N)}return p},_r=function(p,E){var I=Rt(p,E,"hex");return I.create=function(){return new yt(p,E,p)},I.update=function(S){return I.create().update(S)},fn(I,Rt,p,E)},ai=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ut,createMethod:_r},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ut,createMethod:_r},{name:"shake",padding:[31,7936,2031616,520093696],bits:be,createMethod:function(p,E){var I=dn(p,E,"hex");return I.create=function(S){return new yt(p,E,S)},I.update=function(S,R){return I.create(R).update(S)},fn(I,dn,p,E)}},{name:"cshake",padding:Pe,bits:be,createMethod:function(p,E){var I=Ot[p],S=Lr(p,0,"hex");return S.create=function(R,N,M){return N||M?new yt(p,E,R).bytepad([N,M],I):on["shake"+p].create(R)},S.update=function(R,N,M,x){return S.create(N,M,x).update(R)},fn(S,Lr,p,E)}},{name:"kmac",padding:Pe,bits:be,createMethod:function(p,E){var I=Ot[p],S=yr(p,0,"hex");return S.create=function(R,N,M){return new Dn(p,E,N).bytepad(["KMAC",M],I).bytepad([R],I)},S.update=function(R,N,M,x){return S.create(R,M,x).update(N)},fn(S,yr,p,E)}}],on={},Dr=[],pn=0;pn<ai.length;++pn)for(var br=ai[pn],de=br.bits,Br=0;Br<de.length;++Br){var ha=br.name+"_"+de[Br];if(Dr.push(ha),on[ha]=br.createMethod(de[Br],br.padding),br.name!=="sha3"){var ma=br.name+de[Br];Dr.push(ma),on[ma]=on[ha]}}function yt(p,E,I){this.blocks=[],this.s=[],this.padding=E,this.outputBits=I,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(p<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=I>>5,this.extraBytes=(31&I)>>3;for(var S=0;S<50;++S)this.s[S]=0}function Dn(p,E,I){yt.call(this,p,E,I)}yt.prototype.update=function(p){if(this.finalized)throw new Error("finalize already called");var E,I=typeof p;if(I!=="string"){if(I!=="object")throw new Error(h);if(p===null)throw new Error(h);if(Q&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!(Array.isArray(p)||Q&&ArrayBuffer.isView(p)))throw new Error(h);E=!0}for(var S,R,N=this.blocks,M=this.byteCount,x=p.length,q=this.blockCount,V=0,he=this.s;V<x;){if(this.reset)for(this.reset=!1,N[0]=this.block,S=1;S<q+1;++S)N[S]=0;if(E)for(S=this.start;V<x&&S<M;++V)N[S>>2]|=p[V]<<Le[3&S++];else for(S=this.start;V<x&&S<M;++V)(R=p.charCodeAt(V))<128?N[S>>2]|=R<<Le[3&S++]:R<2048?(N[S>>2]|=(192|R>>6)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]):R<55296||R>=57344?(N[S>>2]|=(224|R>>12)<<Le[3&S++],N[S>>2]|=(128|R>>6&63)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]):(R=65536+((1023&R)<<10|1023&p.charCodeAt(++V)),N[S>>2]|=(240|R>>18)<<Le[3&S++],N[S>>2]|=(128|R>>12&63)<<Le[3&S++],N[S>>2]|=(128|R>>6&63)<<Le[3&S++],N[S>>2]|=(128|63&R)<<Le[3&S++]);if(this.lastByteIndex=S,S>=M){for(this.start=S-M,this.block=N[q],S=0;S<q;++S)he[S]^=N[S];v(he),this.reset=!0}else this.start=S}return this},yt.prototype.encode=function(p,E){var I=255&p,S=1,R=[I];for(I=255&(p>>=8);I>0;)R.unshift(I),I=255&(p>>=8),++S;return E?R.push(S):R.unshift(S),this.update(R),R.length},yt.prototype.encodeString=function(p){var E,I=typeof p;if(I!=="string"){if(I!=="object")throw new Error(h);if(p===null)throw new Error(h);if(Q&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!(Array.isArray(p)||Q&&ArrayBuffer.isView(p)))throw new Error(h);E=!0}var S=0,R=p.length;if(E)S=R;else for(var N=0;N<p.length;++N){var M=p.charCodeAt(N);M<128?S+=1:M<2048?S+=2:M<55296||M>=57344?S+=3:(M=65536+((1023&M)<<10|1023&p.charCodeAt(++N)),S+=4)}return S+=this.encode(8*S),this.update(p),S},yt.prototype.bytepad=function(p,E){for(var I=this.encode(E),S=0;S<p.length;++S)I+=this.encodeString(p[S]);var R=E-I%E,N=[];return N.length=R,this.update(N),this},yt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var p=this.blocks,E=this.lastByteIndex,I=this.blockCount,S=this.s;if(p[E>>2]|=this.padding[3&E],this.lastByteIndex===this.byteCount)for(p[0]=p[I],E=1;E<I+1;++E)p[E]=0;for(p[I-1]|=2147483648,E=0;E<I;++E)S[E]^=p[E];v(S)}},yt.prototype.toString=yt.prototype.hex=function(){this.finalize();for(var p,E=this.blockCount,I=this.s,S=this.outputBlocks,R=this.extraBytes,N=0,M=0,x="";M<S;){for(N=0;N<E&&M<S;++N,++M)p=I[N],x+=ye[p>>4&15]+ye[15&p]+ye[p>>12&15]+ye[p>>8&15]+ye[p>>20&15]+ye[p>>16&15]+ye[p>>28&15]+ye[p>>24&15];M%E==0&&(v(I),N=0)}return R&&(p=I[N],x+=ye[p>>4&15]+ye[15&p],R>1&&(x+=ye[p>>12&15]+ye[p>>8&15]),R>2&&(x+=ye[p>>20&15]+ye[p>>16&15])),x},yt.prototype.arrayBuffer=function(){this.finalize();var p,E=this.blockCount,I=this.s,S=this.outputBlocks,R=this.extraBytes,N=0,M=0,x=this.outputBits>>3;p=R?new ArrayBuffer(S+1<<2):new ArrayBuffer(x);for(var q=new Uint32Array(p);M<S;){for(N=0;N<E&&M<S;++N,++M)q[M]=I[N];M%E==0&&v(I)}return R&&(q[N]=I[N],p=p.slice(0,x)),p},yt.prototype.buffer=yt.prototype.arrayBuffer,yt.prototype.digest=yt.prototype.array=function(){this.finalize();for(var p,E,I=this.blockCount,S=this.s,R=this.outputBlocks,N=this.extraBytes,M=0,x=0,q=[];x<R;){for(M=0;M<I&&x<R;++M,++x)p=x<<2,E=S[M],q[p]=255&E,q[p+1]=E>>8&255,q[p+2]=E>>16&255,q[p+3]=E>>24&255;x%I==0&&v(S)}return N&&(p=x<<2,E=S[M],q[p]=255&E,N>1&&(q[p+1]=E>>8&255),N>2&&(q[p+2]=E>>16&255)),q},Dn.prototype=new yt,Dn.prototype.finalize=function(){return this.encode(this.outputBits,!0),yt.prototype.finalize.call(this)};var v=function(p){var E,I,S,R,N,M,x,q,V,he,ke,Ue,dt,Ct,Bt,ct,_t,zt,Fr,si,oi,bn,Er,cn,Xt,wt,Po,ko,Lo,Do,Bo,Fo,xo,Ho,Uo,jo,Vo,Go,qo,Wo,zo,Yo,Ko,Xo,Jo,Zo,Qo,$o,ec,tc,nc,rc,ic,ac,sc,oc,cc,uc,lc,dc,fc,pc,hc;for(S=0;S<48;S+=2)R=p[0]^p[10]^p[20]^p[30]^p[40],N=p[1]^p[11]^p[21]^p[31]^p[41],M=p[2]^p[12]^p[22]^p[32]^p[42],x=p[3]^p[13]^p[23]^p[33]^p[43],q=p[4]^p[14]^p[24]^p[34]^p[44],V=p[5]^p[15]^p[25]^p[35]^p[45],he=p[6]^p[16]^p[26]^p[36]^p[46],ke=p[7]^p[17]^p[27]^p[37]^p[47],E=(Ue=p[8]^p[18]^p[28]^p[38]^p[48])^(M<<1|x>>>31),I=(dt=p[9]^p[19]^p[29]^p[39]^p[49])^(x<<1|M>>>31),p[0]^=E,p[1]^=I,p[10]^=E,p[11]^=I,p[20]^=E,p[21]^=I,p[30]^=E,p[31]^=I,p[40]^=E,p[41]^=I,E=R^(q<<1|V>>>31),I=N^(V<<1|q>>>31),p[2]^=E,p[3]^=I,p[12]^=E,p[13]^=I,p[22]^=E,p[23]^=I,p[32]^=E,p[33]^=I,p[42]^=E,p[43]^=I,E=M^(he<<1|ke>>>31),I=x^(ke<<1|he>>>31),p[4]^=E,p[5]^=I,p[14]^=E,p[15]^=I,p[24]^=E,p[25]^=I,p[34]^=E,p[35]^=I,p[44]^=E,p[45]^=I,E=q^(Ue<<1|dt>>>31),I=V^(dt<<1|Ue>>>31),p[6]^=E,p[7]^=I,p[16]^=E,p[17]^=I,p[26]^=E,p[27]^=I,p[36]^=E,p[37]^=I,p[46]^=E,p[47]^=I,E=he^(R<<1|N>>>31),I=ke^(N<<1|R>>>31),p[8]^=E,p[9]^=I,p[18]^=E,p[19]^=I,p[28]^=E,p[29]^=I,p[38]^=E,p[39]^=I,p[48]^=E,p[49]^=I,Ct=p[0],Bt=p[1],Zo=p[11]<<4|p[10]>>>28,Qo=p[10]<<4|p[11]>>>28,ko=p[20]<<3|p[21]>>>29,Lo=p[21]<<3|p[20]>>>29,dc=p[31]<<9|p[30]>>>23,fc=p[30]<<9|p[31]>>>23,Yo=p[40]<<18|p[41]>>>14,Ko=p[41]<<18|p[40]>>>14,Ho=p[2]<<1|p[3]>>>31,Uo=p[3]<<1|p[2]>>>31,ct=p[13]<<12|p[12]>>>20,_t=p[12]<<12|p[13]>>>20,$o=p[22]<<10|p[23]>>>22,ec=p[23]<<10|p[22]>>>22,Do=p[33]<<13|p[32]>>>19,Bo=p[32]<<13|p[33]>>>19,pc=p[42]<<2|p[43]>>>30,hc=p[43]<<2|p[42]>>>30,ac=p[5]<<30|p[4]>>>2,sc=p[4]<<30|p[5]>>>2,jo=p[14]<<6|p[15]>>>26,Vo=p[15]<<6|p[14]>>>26,zt=p[25]<<11|p[24]>>>21,Fr=p[24]<<11|p[25]>>>21,tc=p[34]<<15|p[35]>>>17,nc=p[35]<<15|p[34]>>>17,Fo=p[45]<<29|p[44]>>>3,xo=p[44]<<29|p[45]>>>3,cn=p[6]<<28|p[7]>>>4,Xt=p[7]<<28|p[6]>>>4,oc=p[17]<<23|p[16]>>>9,cc=p[16]<<23|p[17]>>>9,Go=p[26]<<25|p[27]>>>7,qo=p[27]<<25|p[26]>>>7,si=p[36]<<21|p[37]>>>11,oi=p[37]<<21|p[36]>>>11,rc=p[47]<<24|p[46]>>>8,ic=p[46]<<24|p[47]>>>8,Xo=p[8]<<27|p[9]>>>5,Jo=p[9]<<27|p[8]>>>5,wt=p[18]<<20|p[19]>>>12,Po=p[19]<<20|p[18]>>>12,uc=p[29]<<7|p[28]>>>25,lc=p[28]<<7|p[29]>>>25,Wo=p[38]<<8|p[39]>>>24,zo=p[39]<<8|p[38]>>>24,bn=p[48]<<14|p[49]>>>18,Er=p[49]<<14|p[48]>>>18,p[0]=Ct^~ct&zt,p[1]=Bt^~_t&Fr,p[10]=cn^~wt&ko,p[11]=Xt^~Po&Lo,p[20]=Ho^~jo&Go,p[21]=Uo^~Vo&qo,p[30]=Xo^~Zo&$o,p[31]=Jo^~Qo&ec,p[40]=ac^~oc&uc,p[41]=sc^~cc&lc,p[2]=ct^~zt&si,p[3]=_t^~Fr&oi,p[12]=wt^~ko&Do,p[13]=Po^~Lo&Bo,p[22]=jo^~Go&Wo,p[23]=Vo^~qo&zo,p[32]=Zo^~$o&tc,p[33]=Qo^~ec&nc,p[42]=oc^~uc&dc,p[43]=cc^~lc&fc,p[4]=zt^~si&bn,p[5]=Fr^~oi&Er,p[14]=ko^~Do&Fo,p[15]=Lo^~Bo&xo,p[24]=Go^~Wo&Yo,p[25]=qo^~zo&Ko,p[34]=$o^~tc&rc,p[35]=ec^~nc&ic,p[44]=uc^~dc&pc,p[45]=lc^~fc&hc,p[6]=si^~bn&Ct,p[7]=oi^~Er&Bt,p[16]=Do^~Fo&cn,p[17]=Bo^~xo&Xt,p[26]=Wo^~Yo&Ho,p[27]=zo^~Ko&Uo,p[36]=tc^~rc&Xo,p[37]=nc^~ic&Jo,p[46]=dc^~pc&ac,p[47]=fc^~hc&sc,p[8]=bn^~Ct&ct,p[9]=Er^~Bt&_t,p[18]=Fo^~cn&wt,p[19]=xo^~Xt&Po,p[28]=Yo^~Ho&jo,p[29]=Ko^~Uo&Vo,p[38]=rc^~Xo&Zo,p[39]=ic^~Jo&Qo,p[48]=pc^~ac&oc,p[49]=hc^~sc&cc,p[0]^=_n[S],p[1]^=_n[S+1]};if(P)d.exports=on;else for(pn=0;pn<Dr.length;++pn)w[Dr[pn]]=on[Dr[pn]]})()})(o);var c=o.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,f=Math.ceil,l=Math.floor,m="[BigNumber Error] ",g=m+"Number primitive has more than 15 significant digits: ",_=1e14,T=14,B=9007199254740991,U=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],J=1e7,K=1e9;function H(d){var h=0|d;return d>0||d===h?h:h-1}function F(d){for(var h,y,w=1,O=d.length,P=d[0]+"";w<O;){for(h=d[w++]+"",y=T-h.length;y--;h="0"+h);P+=h}for(O=P.length;P.charCodeAt(--O)===48;);return P.slice(0,O+1||1)}function k(d,h){var y,w,O=d.c,P=h.c,Q=d.s,ye=h.s,Pe=d.e,Le=h.e;if(!Q||!ye)return null;if(y=O&&!O[0],w=P&&!P[0],y||w)return y?w?0:-ye:Q;if(Q!=ye)return Q;if(y=Q<0,w=Pe==Le,!O||!P)return w?0:!O^y?1:-1;if(!w)return Pe>Le^y?1:-1;for(ye=(Pe=O.length)<(Le=P.length)?Pe:Le,Q=0;Q<ye;Q++)if(O[Q]!=P[Q])return O[Q]>P[Q]^y?1:-1;return Pe==Le?0:Pe>Le^y?1:-1}function j(d,h,y,w){if(d<h||d>y||d!==l(d))throw Error(m+(w||"Argument")+(typeof d=="number"?d<h||d>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(d))}function te(d){var h=d.c.length-1;return H(d.e/T)==h&&d.c[h]%2!=0}function L(d,h){return(d.length>1?d.charAt(0)+"."+d.slice(1):d)+(h<0?"e":"e+")+h}function G(d,h,y){var w,O;if(h<0){for(O=y+".";++h;O+=y);d=O+d}else if(++h>(w=d.length)){for(O=y,h-=w;--h;O+=y);d+=O}else h<w&&(d=d.slice(0,h)+"."+d.slice(h));return d}var W=function d(h){var y,w,O,P,Q,ye,Pe,Le,_n,Ut,be=de.prototype={constructor:de,toString:null,valueOf:null},sn=new de(1),Ot=20,Rt=4,dn=-7,Lr=21,yr=-1e7,fn=1e7,_r=!1,ai=1,on=0,Dr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},pn="0123456789abcdefghijklmnopqrstuvwxyz",br=!0;function de(v,p){var E,I,S,R,N,M,x,q,V=this;if(!(V instanceof de))return new de(v,p);if(p==null){if(v&&v._isBigNumber===!0)return V.s=v.s,void(!v.c||v.e>fn?V.c=V.e=null:v.e<yr?V.c=[V.e=0]:(V.e=v.e,V.c=v.c.slice()));if((M=typeof v=="number")&&0*v==0){if(V.s=1/v<0?(v=-v,-1):1,v===~~v){for(R=0,N=v;N>=10;N/=10,R++);return void(R>fn?V.c=V.e=null:(V.e=R,V.c=[v]))}q=String(v)}else{if(!u.test(q=String(v)))return O(V,q,M);V.s=q.charCodeAt(0)==45?(q=q.slice(1),-1):1}(R=q.indexOf("."))>-1&&(q=q.replace(".","")),(N=q.search(/e/i))>0?(R<0&&(R=N),R+=+q.slice(N+1),q=q.substring(0,N)):R<0&&(R=q.length)}else{if(j(p,2,pn.length,"Base"),p==10&&br)return yt(V=new de(v),Ot+V.e+1,Rt);if(q=String(v),M=typeof v=="number"){if(0*v!=0)return O(V,q,M,p);if(V.s=1/v<0?(q=q.slice(1),-1):1,de.DEBUG&&q.replace(/^0\.0*|\./,"").length>15)throw Error(g+v)}else V.s=q.charCodeAt(0)===45?(q=q.slice(1),-1):1;for(E=pn.slice(0,p),R=N=0,x=q.length;N<x;N++)if(E.indexOf(I=q.charAt(N))<0){if(I=="."){if(N>R){R=x;continue}}else if(!S&&(q==q.toUpperCase()&&(q=q.toLowerCase())||q==q.toLowerCase()&&(q=q.toUpperCase()))){S=!0,N=-1,R=0;continue}return O(V,String(v),M,p)}M=!1,(R=(q=w(q,p,10,V.s)).indexOf("."))>-1?q=q.replace(".",""):R=q.length}for(N=0;q.charCodeAt(N)===48;N++);for(x=q.length;q.charCodeAt(--x)===48;);if(q=q.slice(N,++x)){if(x-=N,M&&de.DEBUG&&x>15&&(v>B||v!==l(v)))throw Error(g+V.s*v);if((R=R-N-1)>fn)V.c=V.e=null;else if(R<yr)V.c=[V.e=0];else{if(V.e=R,V.c=[],N=(R+1)%T,R<0&&(N+=T),N<x){for(N&&V.c.push(+q.slice(0,N)),x-=T;N<x;)V.c.push(+q.slice(N,N+=T));N=T-(q=q.slice(N)).length}else N-=x;for(;N--;q+="0");V.c.push(+q)}}else V.c=[V.e=0]}function Br(v,p,E,I){var S,R,N,M,x;if(E==null?E=Rt:j(E,0,8),!v.c)return v.toString();if(S=v.c[0],N=v.e,p==null)x=F(v.c),x=I==1||I==2&&(N<=dn||N>=Lr)?L(x,N):G(x,N,"0");else if(R=(v=yt(new de(v),p,E)).e,M=(x=F(v.c)).length,I==1||I==2&&(p<=R||R<=dn)){for(;M<p;x+="0",M++);x=L(x,R)}else if(p-=N,x=G(x,R,"0"),R+1>M){if(--p>0)for(x+=".";p--;x+="0");}else if((p+=R-M)>0)for(R+1==M&&(x+=".");p--;x+="0");return v.s<0&&S?"-"+x:x}function ha(v,p){for(var E,I=1,S=new de(v[0]);I<v.length;I++){if(!(E=new de(v[I])).s){S=E;break}p.call(S,E)&&(S=E)}return S}function ma(v,p,E){for(var I=1,S=p.length;!p[--S];p.pop());for(S=p[0];S>=10;S/=10,I++);return(E=I+E*T-1)>fn?v.c=v.e=null:E<yr?v.c=[v.e=0]:(v.e=E,v.c=p),v}function yt(v,p,E,I){var S,R,N,M,x,q,V,he=v.c,ke=U;if(he){e:{for(S=1,M=he[0];M>=10;M/=10,S++);if((R=p-S)<0)R+=T,N=p,V=(x=he[q=0])/ke[S-N-1]%10|0;else if((q=f((R+1)/T))>=he.length){if(!I)break e;for(;he.length<=q;he.push(0));x=V=0,S=1,N=(R%=T)-T+1}else{for(x=M=he[q],S=1;M>=10;M/=10,S++);V=(N=(R%=T)-T+S)<0?0:x/ke[S-N-1]%10|0}if(I=I||p<0||he[q+1]!=null||(N<0?x:x%ke[S-N-1]),I=E<4?(V||I)&&(E==0||E==(v.s<0?3:2)):V>5||V==5&&(E==4||I||E==6&&(R>0?N>0?x/ke[S-N]:0:he[q-1])%10&1||E==(v.s<0?8:7)),p<1||!he[0])return he.length=0,I?(p-=v.e+1,he[0]=ke[(T-p%T)%T],v.e=-p||0):he[0]=v.e=0,v;if(R==0?(he.length=q,M=1,q--):(he.length=q+1,M=ke[T-R],he[q]=N>0?l(x/ke[S-N]%ke[N])*M:0),I)for(;;){if(q==0){for(R=1,N=he[0];N>=10;N/=10,R++);for(N=he[0]+=M,M=1;N>=10;N/=10,M++);R!=M&&(v.e++,he[0]==_&&(he[0]=1));break}if(he[q]+=M,he[q]!=_)break;he[q--]=0,M=1}for(R=he.length;he[--R]===0;he.pop());}v.e>fn?v.c=v.e=null:v.e<yr&&(v.c=[v.e=0])}return v}function Dn(v){var p,E=v.e;return E===null?v.toString():(p=F(v.c),p=E<=dn||E>=Lr?L(p,E):G(p,E,"0"),v.s<0?"-"+p:p)}return de.clone=d,de.ROUND_UP=0,de.ROUND_DOWN=1,de.ROUND_CEIL=2,de.ROUND_FLOOR=3,de.ROUND_HALF_UP=4,de.ROUND_HALF_DOWN=5,de.ROUND_HALF_EVEN=6,de.ROUND_HALF_CEIL=7,de.ROUND_HALF_FLOOR=8,de.EUCLID=9,de.config=de.set=function(v){var p,E;if(v!=null){if(typeof v!="object")throw Error(m+"Object expected: "+v);if(v.hasOwnProperty(p="DECIMAL_PLACES")&&(j(E=v[p],0,K,p),Ot=E),v.hasOwnProperty(p="ROUNDING_MODE")&&(j(E=v[p],0,8,p),Rt=E),v.hasOwnProperty(p="EXPONENTIAL_AT")&&((E=v[p])&&E.pop?(j(E[0],-K,0,p),j(E[1],0,K,p),dn=E[0],Lr=E[1]):(j(E,-K,K,p),dn=-(Lr=E<0?-E:E))),v.hasOwnProperty(p="RANGE"))if((E=v[p])&&E.pop)j(E[0],-K,-1,p),j(E[1],1,K,p),yr=E[0],fn=E[1];else{if(j(E,-K,K,p),!E)throw Error(m+p+" cannot be zero: "+E);yr=-(fn=E<0?-E:E)}if(v.hasOwnProperty(p="CRYPTO")){if((E=v[p])!==!!E)throw Error(m+p+" not true or false: "+E);if(E){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw _r=!E,Error(m+"crypto unavailable");_r=E}else _r=E}if(v.hasOwnProperty(p="MODULO_MODE")&&(j(E=v[p],0,9,p),ai=E),v.hasOwnProperty(p="POW_PRECISION")&&(j(E=v[p],0,K,p),on=E),v.hasOwnProperty(p="FORMAT")){if(typeof(E=v[p])!="object")throw Error(m+p+" not an object: "+E);Dr=E}if(v.hasOwnProperty(p="ALPHABET")){if(typeof(E=v[p])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(E))throw Error(m+p+" invalid: "+E);br=E.slice(0,10)=="0123456789",pn=E}}return{DECIMAL_PLACES:Ot,ROUNDING_MODE:Rt,EXPONENTIAL_AT:[dn,Lr],RANGE:[yr,fn],CRYPTO:_r,MODULO_MODE:ai,POW_PRECISION:on,FORMAT:Dr,ALPHABET:pn}},de.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!de.DEBUG)return!0;var p,E,I=v.c,S=v.e,R=v.s;e:if({}.toString.call(I)=="[object Array]"){if((R===1||R===-1)&&S>=-K&&S<=K&&S===l(S)){if(I[0]===0){if(S===0&&I.length===1)return!0;break e}if((p=(S+1)%T)<1&&(p+=T),String(I[0]).length==p){for(p=0;p<I.length;p++)if((E=I[p])<0||E>=_||E!==l(E))break e;if(E!==0)return!0}}}else if(I===null&&S===null&&(R===null||R===1||R===-1))return!0;throw Error(m+"Invalid BigNumber: "+v)},de.maximum=de.max=function(){return ha(arguments,be.lt)},de.minimum=de.min=function(){return ha(arguments,be.gt)},de.random=(P=9007199254740992,Q=Math.random()*P&2097151?function(){return l(Math.random()*P)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var p,E,I,S,R,N=0,M=[],x=new de(sn);if(v==null?v=Ot:j(v,0,K),S=f(v/T),_r)if(crypto.getRandomValues){for(p=crypto.getRandomValues(new Uint32Array(S*=2));N<S;)(R=131072*p[N]+(p[N+1]>>>11))>=9e15?(E=crypto.getRandomValues(new Uint32Array(2)),p[N]=E[0],p[N+1]=E[1]):(M.push(R%1e14),N+=2);N=S/2}else{if(!crypto.randomBytes)throw _r=!1,Error(m+"crypto unavailable");for(p=crypto.randomBytes(S*=7);N<S;)(R=281474976710656*(31&p[N])+1099511627776*p[N+1]+4294967296*p[N+2]+16777216*p[N+3]+(p[N+4]<<16)+(p[N+5]<<8)+p[N+6])>=9e15?crypto.randomBytes(7).copy(p,N):(M.push(R%1e14),N+=7);N=S/7}if(!_r)for(;N<S;)(R=Q())<9e15&&(M[N++]=R%1e14);for(S=M[--N],v%=T,S&&v&&(R=U[T-v],M[N]=l(S/R)*R);M[N]===0;M.pop(),N--);if(N<0)M=[I=0];else{for(I=-1;M[0]===0;M.splice(0,1),I-=T);for(N=1,R=M[0];R>=10;R/=10,N++);N<T&&(I-=T-N)}return x.e=I,x.c=M,x}),de.sum=function(){for(var v=1,p=arguments,E=new de(p[0]);v<p.length;)E=E.plus(p[v++]);return E},w=function(){var v="0123456789";function p(E,I,S,R){for(var N,M,x=[0],q=0,V=E.length;q<V;){for(M=x.length;M--;x[M]*=I);for(x[0]+=R.indexOf(E.charAt(q++)),N=0;N<x.length;N++)x[N]>S-1&&(x[N+1]==null&&(x[N+1]=0),x[N+1]+=x[N]/S|0,x[N]%=S)}return x.reverse()}return function(E,I,S,R,N){var M,x,q,V,he,ke,Ue,dt,Ct=E.indexOf("."),Bt=Ot,ct=Rt;for(Ct>=0&&(V=on,on=0,E=E.replace(".",""),ke=(dt=new de(I)).pow(E.length-Ct),on=V,dt.c=p(G(F(ke.c),ke.e,"0"),10,S,v),dt.e=dt.c.length),q=V=(Ue=p(E,I,S,N?(M=pn,v):(M=v,pn))).length;Ue[--V]==0;Ue.pop());if(!Ue[0])return M.charAt(0);if(Ct<0?--q:(ke.c=Ue,ke.e=q,ke.s=R,Ue=(ke=y(ke,dt,Bt,ct,S)).c,he=ke.r,q=ke.e),Ct=Ue[x=q+Bt+1],V=S/2,he=he||x<0||Ue[x+1]!=null,he=ct<4?(Ct!=null||he)&&(ct==0||ct==(ke.s<0?3:2)):Ct>V||Ct==V&&(ct==4||he||ct==6&&1&Ue[x-1]||ct==(ke.s<0?8:7)),x<1||!Ue[0])E=he?G(M.charAt(1),-Bt,M.charAt(0)):M.charAt(0);else{if(Ue.length=x,he)for(--S;++Ue[--x]>S;)Ue[x]=0,x||(++q,Ue=[1].concat(Ue));for(V=Ue.length;!Ue[--V];);for(Ct=0,E="";Ct<=V;E+=M.charAt(Ue[Ct++]));E=G(E,q,M.charAt(0))}return E}}(),y=function(){function v(I,S,R){var N,M,x,q,V=0,he=I.length,ke=S%J,Ue=S/J|0;for(I=I.slice();he--;)V=((M=ke*(x=I[he]%J)+(N=Ue*x+(q=I[he]/J|0)*ke)%J*J+V)/R|0)+(N/J|0)+Ue*q,I[he]=M%R;return V&&(I=[V].concat(I)),I}function p(I,S,R,N){var M,x;if(R!=N)x=R>N?1:-1;else for(M=x=0;M<R;M++)if(I[M]!=S[M]){x=I[M]>S[M]?1:-1;break}return x}function E(I,S,R,N){for(var M=0;R--;)I[R]-=M,M=I[R]<S[R]?1:0,I[R]=M*N+I[R]-S[R];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,S,R,N,M){var x,q,V,he,ke,Ue,dt,Ct,Bt,ct,_t,zt,Fr,si,oi,bn,Er,cn=I.s==S.s?1:-1,Xt=I.c,wt=S.c;if(!(Xt&&Xt[0]&&wt&&wt[0]))return new de(I.s&&S.s&&(Xt?!wt||Xt[0]!=wt[0]:wt)?Xt&&Xt[0]==0||!wt?0*cn:cn/0:NaN);for(Bt=(Ct=new de(cn)).c=[],cn=R+(q=I.e-S.e)+1,M||(M=_,q=H(I.e/T)-H(S.e/T),cn=cn/T|0),V=0;wt[V]==(Xt[V]||0);V++);if(wt[V]>(Xt[V]||0)&&q--,cn<0)Bt.push(1),he=!0;else{for(si=Xt.length,bn=wt.length,V=0,cn+=2,(ke=l(M/(wt[0]+1)))>1&&(wt=v(wt,ke,M),Xt=v(Xt,ke,M),bn=wt.length,si=Xt.length),Fr=bn,_t=(ct=Xt.slice(0,bn)).length;_t<bn;ct[_t++]=0);Er=wt.slice(),Er=[0].concat(Er),oi=wt[0],wt[1]>=M/2&&oi++;do{if(ke=0,(x=p(wt,ct,bn,_t))<0){if(zt=ct[0],bn!=_t&&(zt=zt*M+(ct[1]||0)),(ke=l(zt/oi))>1)for(ke>=M&&(ke=M-1),dt=(Ue=v(wt,ke,M)).length,_t=ct.length;p(Ue,ct,dt,_t)==1;)ke--,E(Ue,bn<dt?Er:wt,dt,M),dt=Ue.length,x=1;else ke==0&&(x=ke=1),dt=(Ue=wt.slice()).length;if(dt<_t&&(Ue=[0].concat(Ue)),E(ct,Ue,_t,M),_t=ct.length,x==-1)for(;p(wt,ct,bn,_t)<1;)ke++,E(ct,bn<_t?Er:wt,_t,M),_t=ct.length}else x===0&&(ke++,ct=[0]);Bt[V++]=ke,ct[0]?ct[_t++]=Xt[Fr]||0:(ct=[Xt[Fr]],_t=1)}while((Fr++<si||ct[0]!=null)&&cn--);he=ct[0]!=null,Bt[0]||Bt.splice(0,1)}if(M==_){for(V=1,cn=Bt[0];cn>=10;cn/=10,V++);yt(Ct,R+(Ct.e=V+q*T-1)+1,N,he)}else Ct.e=q,Ct.r=+he;return Ct}}(),ye=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Pe=/^([^.]+)\.$/,Le=/^\.([^.]+)$/,_n=/^-?(Infinity|NaN)$/,Ut=/^\s*\+(?=[\w.])|^\s+|\s+$/g,O=function(v,p,E,I){var S,R=E?p:p.replace(Ut,"");if(_n.test(R))v.s=isNaN(R)?null:R<0?-1:1;else{if(!E&&(R=R.replace(ye,function(N,M,x){return S=(x=x.toLowerCase())=="x"?16:x=="b"?2:8,I&&I!=S?N:M}),I&&(S=I,R=R.replace(Pe,"$1").replace(Le,"0.$1")),p!=R))return new de(R,S);if(de.DEBUG)throw Error(m+"Not a"+(I?" base "+I:"")+" number: "+p);v.s=null}v.c=v.e=null},be.absoluteValue=be.abs=function(){var v=new de(this);return v.s<0&&(v.s=1),v},be.comparedTo=function(v,p){return k(this,new de(v,p))},be.decimalPlaces=be.dp=function(v,p){var E,I,S,R=this;if(v!=null)return j(v,0,K),p==null?p=Rt:j(p,0,8),yt(new de(R),v+R.e+1,p);if(!(E=R.c))return null;if(I=((S=E.length-1)-H(this.e/T))*T,S=E[S])for(;S%10==0;S/=10,I--);return I<0&&(I=0),I},be.dividedBy=be.div=function(v,p){return y(this,new de(v,p),Ot,Rt)},be.dividedToIntegerBy=be.idiv=function(v,p){return y(this,new de(v,p),0,1)},be.exponentiatedBy=be.pow=function(v,p){var E,I,S,R,N,M,x,q,V=this;if((v=new de(v)).c&&!v.isInteger())throw Error(m+"Exponent not an integer: "+Dn(v));if(p!=null&&(p=new de(p)),N=v.e>14,!V.c||!V.c[0]||V.c[0]==1&&!V.e&&V.c.length==1||!v.c||!v.c[0])return q=new de(Math.pow(+Dn(V),N?v.s*(2-te(v)):+Dn(v))),p?q.mod(p):q;if(M=v.s<0,p){if(p.c?!p.c[0]:!p.s)return new de(NaN);(I=!M&&V.isInteger()&&p.isInteger())&&(V=V.mod(p))}else{if(v.e>9&&(V.e>0||V.e<-1||(V.e==0?V.c[0]>1||N&&V.c[1]>=24e7:V.c[0]<8e13||N&&V.c[0]<=9999975e7)))return R=V.s<0&&te(v)?-0:0,V.e>-1&&(R=1/R),new de(M?1/R:R);on&&(R=f(on/T+2))}for(N?(E=new de(.5),M&&(v.s=1),x=te(v)):x=(S=Math.abs(+Dn(v)))%2,q=new de(sn);;){if(x){if(!(q=q.times(V)).c)break;R?q.c.length>R&&(q.c.length=R):I&&(q=q.mod(p))}if(S){if((S=l(S/2))===0)break;x=S%2}else if(yt(v=v.times(E),v.e+1,1),v.e>14)x=te(v);else{if((S=+Dn(v))==0)break;x=S%2}V=V.times(V),R?V.c&&V.c.length>R&&(V.c.length=R):I&&(V=V.mod(p))}return I?q:(M&&(q=sn.div(q)),p?q.mod(p):R?yt(q,on,Rt,void 0):q)},be.integerValue=function(v){var p=new de(this);return v==null?v=Rt:j(v,0,8),yt(p,p.e+1,v)},be.isEqualTo=be.eq=function(v,p){return k(this,new de(v,p))===0},be.isFinite=function(){return!!this.c},be.isGreaterThan=be.gt=function(v,p){return k(this,new de(v,p))>0},be.isGreaterThanOrEqualTo=be.gte=function(v,p){return(p=k(this,new de(v,p)))===1||p===0},be.isInteger=function(){return!!this.c&&H(this.e/T)>this.c.length-2},be.isLessThan=be.lt=function(v,p){return k(this,new de(v,p))<0},be.isLessThanOrEqualTo=be.lte=function(v,p){return(p=k(this,new de(v,p)))===-1||p===0},be.isNaN=function(){return!this.s},be.isNegative=function(){return this.s<0},be.isPositive=function(){return this.s>0},be.isZero=function(){return!!this.c&&this.c[0]==0},be.minus=function(v,p){var E,I,S,R,N=this,M=N.s;if(p=(v=new de(v,p)).s,!M||!p)return new de(NaN);if(M!=p)return v.s=-p,N.plus(v);var x=N.e/T,q=v.e/T,V=N.c,he=v.c;if(!x||!q){if(!V||!he)return V?(v.s=-p,v):new de(he?N:NaN);if(!V[0]||!he[0])return he[0]?(v.s=-p,v):new de(V[0]?N:Rt==3?-0:0)}if(x=H(x),q=H(q),V=V.slice(),M=x-q){for((R=M<0)?(M=-M,S=V):(q=x,S=he),S.reverse(),p=M;p--;S.push(0));S.reverse()}else for(I=(R=(M=V.length)<(p=he.length))?M:p,M=p=0;p<I;p++)if(V[p]!=he[p]){R=V[p]<he[p];break}if(R&&(S=V,V=he,he=S,v.s=-v.s),(p=(I=he.length)-(E=V.length))>0)for(;p--;V[E++]=0);for(p=_-1;I>M;){if(V[--I]<he[I]){for(E=I;E&&!V[--E];V[E]=p);--V[E],V[I]+=_}V[I]-=he[I]}for(;V[0]==0;V.splice(0,1),--q);return V[0]?ma(v,V,q):(v.s=Rt==3?-1:1,v.c=[v.e=0],v)},be.modulo=be.mod=function(v,p){var E,I,S=this;return v=new de(v,p),!S.c||!v.s||v.c&&!v.c[0]?new de(NaN):!v.c||S.c&&!S.c[0]?new de(S):(ai==9?(I=v.s,v.s=1,E=y(S,v,0,3),v.s=I,E.s*=I):E=y(S,v,0,ai),(v=S.minus(E.times(v))).c[0]||ai!=1||(v.s=S.s),v)},be.multipliedBy=be.times=function(v,p){var E,I,S,R,N,M,x,q,V,he,ke,Ue,dt,Ct,Bt,ct=this,_t=ct.c,zt=(v=new de(v,p)).c;if(!(_t&&zt&&_t[0]&&zt[0]))return!ct.s||!v.s||_t&&!_t[0]&&!zt||zt&&!zt[0]&&!_t?v.c=v.e=v.s=null:(v.s*=ct.s,_t&&zt?(v.c=[0],v.e=0):v.c=v.e=null),v;for(I=H(ct.e/T)+H(v.e/T),v.s*=ct.s,(x=_t.length)<(he=zt.length)&&(dt=_t,_t=zt,zt=dt,S=x,x=he,he=S),S=x+he,dt=[];S--;dt.push(0));for(Ct=_,Bt=J,S=he;--S>=0;){for(E=0,ke=zt[S]%Bt,Ue=zt[S]/Bt|0,R=S+(N=x);R>S;)E=((q=ke*(q=_t[--N]%Bt)+(M=Ue*q+(V=_t[N]/Bt|0)*ke)%Bt*Bt+dt[R]+E)/Ct|0)+(M/Bt|0)+Ue*V,dt[R--]=q%Ct;dt[R]=E}return E?++I:dt.splice(0,1),ma(v,dt,I)},be.negated=function(){var v=new de(this);return v.s=-v.s||null,v},be.plus=function(v,p){var E,I=this,S=I.s;if(p=(v=new de(v,p)).s,!S||!p)return new de(NaN);if(S!=p)return v.s=-p,I.minus(v);var R=I.e/T,N=v.e/T,M=I.c,x=v.c;if(!R||!N){if(!M||!x)return new de(S/0);if(!M[0]||!x[0])return x[0]?v:new de(M[0]?I:0*S)}if(R=H(R),N=H(N),M=M.slice(),S=R-N){for(S>0?(N=R,E=x):(S=-S,E=M),E.reverse();S--;E.push(0));E.reverse()}for((S=M.length)-(p=x.length)<0&&(E=x,x=M,M=E,p=S),S=0;p;)S=(M[--p]=M[p]+x[p]+S)/_|0,M[p]=_===M[p]?0:M[p]%_;return S&&(M=[S].concat(M),++N),ma(v,M,N)},be.precision=be.sd=function(v,p){var E,I,S,R=this;if(v!=null&&v!==!!v)return j(v,1,K),p==null?p=Rt:j(p,0,8),yt(new de(R),v,p);if(!(E=R.c))return null;if(I=(S=E.length-1)*T+1,S=E[S]){for(;S%10==0;S/=10,I--);for(S=E[0];S>=10;S/=10,I++);}return v&&R.e+1>I&&(I=R.e+1),I},be.shiftedBy=function(v){return j(v,-9007199254740991,B),this.times("1e"+v)},be.squareRoot=be.sqrt=function(){var v,p,E,I,S,R=this,N=R.c,M=R.s,x=R.e,q=Ot+4,V=new de("0.5");if(M!==1||!N||!N[0])return new de(!M||M<0&&(!N||N[0])?NaN:N?R:1/0);if((M=Math.sqrt(+Dn(R)))==0||M==1/0?(((p=F(N)).length+x)%2==0&&(p+="0"),M=Math.sqrt(+p),x=H((x+1)/2)-(x<0||x%2),E=new de(p=M==1/0?"5e"+x:(p=M.toExponential()).slice(0,p.indexOf("e")+1)+x)):E=new de(M+""),E.c[0]){for((M=(x=E.e)+q)<3&&(M=0);;)if(S=E,E=V.times(S.plus(y(R,S,q,1))),F(S.c).slice(0,M)===(p=F(E.c)).slice(0,M)){if(E.e<x&&--M,(p=p.slice(M-3,M+1))!="9999"&&(I||p!="4999")){+p&&(+p.slice(1)||p.charAt(0)!="5")||(yt(E,E.e+Ot+2,1),v=!E.times(E).eq(R));break}if(!I&&(yt(S,S.e+Ot+2,0),S.times(S).eq(R))){E=S;break}q+=4,M+=4,I=1}}return yt(E,E.e+Ot+1,Rt,v)},be.toExponential=function(v,p){return v!=null&&(j(v,0,K),v++),Br(this,v,p,1)},be.toFixed=function(v,p){return v!=null&&(j(v,0,K),v=v+this.e+1),Br(this,v,p)},be.toFormat=function(v,p,E){var I,S=this;if(E==null)v!=null&&p&&typeof p=="object"?(E=p,p=null):v&&typeof v=="object"?(E=v,v=p=null):E=Dr;else if(typeof E!="object")throw Error(m+"Argument not an object: "+E);if(I=S.toFixed(v,p),S.c){var R,N=I.split("."),M=+E.groupSize,x=+E.secondaryGroupSize,q=E.groupSeparator||"",V=N[0],he=N[1],ke=S.s<0,Ue=ke?V.slice(1):V,dt=Ue.length;if(x&&(R=M,M=x,x=R,dt-=R),M>0&&dt>0){for(R=dt%M||M,V=Ue.substr(0,R);R<dt;R+=M)V+=q+Ue.substr(R,M);x>0&&(V+=q+Ue.slice(R)),ke&&(V="-"+V)}I=he?V+(E.decimalSeparator||"")+((x=+E.fractionGroupSize)?he.replace(new RegExp("\\d{"+x+"}\\B","g"),"$&"+(E.fractionGroupSeparator||"")):he):V}return(E.prefix||"")+I+(E.suffix||"")},be.toFraction=function(v){var p,E,I,S,R,N,M,x,q,V,he,ke,Ue=this,dt=Ue.c;if(v!=null&&(!(M=new de(v)).isInteger()&&(M.c||M.s!==1)||M.lt(sn)))throw Error(m+"Argument "+(M.isInteger()?"out of range: ":"not an integer: ")+Dn(M));if(!dt)return new de(Ue);for(p=new de(sn),q=E=new de(sn),I=x=new de(sn),ke=F(dt),R=p.e=ke.length-Ue.e-1,p.c[0]=U[(N=R%T)<0?T+N:N],v=!v||M.comparedTo(p)>0?R>0?p:q:M,N=fn,fn=1/0,M=new de(ke),x.c[0]=0;V=y(M,p,0,1),(S=E.plus(V.times(I))).comparedTo(v)!=1;)E=I,I=S,q=x.plus(V.times(S=q)),x=S,p=M.minus(V.times(S=p)),M=S;return S=y(v.minus(E),I,0,1),x=x.plus(S.times(q)),E=E.plus(S.times(I)),x.s=q.s=Ue.s,he=y(q,I,R*=2,Rt).minus(Ue).abs().comparedTo(y(x,E,R,Rt).minus(Ue).abs())<1?[q,I]:[x,E],fn=N,he},be.toNumber=function(){return+Dn(this)},be.toPrecision=function(v,p){return v!=null&&j(v,1,K),Br(this,v,p,2)},be.toString=function(v){var p,E=this,I=E.s,S=E.e;return S===null?I?(p="Infinity",I<0&&(p="-"+p)):p="NaN":(v==null?p=S<=dn||S>=Lr?L(F(E.c),S):G(F(E.c),S,"0"):v===10&&br?p=G(F((E=yt(new de(E),Ot+S+1,Rt)).c),E.e,"0"):(j(v,2,pn.length,"Base"),p=w(G(F(E.c),S,"0"),10,v,I,!0)),I<0&&E.c[0]&&(p="-"+p)),p},be.valueOf=be.toJSON=function(){return Dn(this)},be._isBigNumber=!0,be[Symbol.toStringTag]="BigNumber",be[Symbol.for("nodejs.util.inspect.custom")]=be.valueOf,h!=null&&de.set(h),de}();const z={ROUNDING_MODE:W.ROUND_DOWN};function ae(d){return new TextEncoder().encode(d)}function Ee(d){return typeof d=="string"?Ee(ve(d)):new TextDecoder().decode(d)}W.config(z);const pe="UNKNOWN_ERROR",le="INVALID_ARGUMENT";function $(d,h=pe,y={}){const w=[];Object.keys(y).forEach(Q=>{try{w.push(Q+"="+JSON.stringify(y[Q]))}catch{w.push(Q+"="+JSON.stringify(y[Q].toString()))}});const O=d;w.length&&(d+=" ("+w.join(", ")+")");const P=new Error(d);return P.reason=O,P.code=h,Object.keys(y).forEach(function(Q){P[Q]=y[Q]}),P}function ve(d){if(typeof d!="string")throw new Error("hexToBytes only accept strings, got: "+typeof d);if(d.substr(0,2)==="0x")return ve(d.substr(2));const h=new Uint8Array(Math.ceil(d.length/2));let y=0;for(let w=0;w<d.length;w+=2){const O=parseInt(d.substr(w,2),16);if(isNaN(O))throw new Error("Cannot read hex string:"+JSON.stringify(d));h[y]=O,y++}return h}function ge(d){return Array.from(d).map(h=>h.toString(16).padStart(2,"0")).join("")}function fe(d,h){if(typeof d=="string"){if(h&&h.encoding==="hex"&&typeof d=="string"){let y=d;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const w=ve(y);return c.keccak256(w)}return c.keccak256(ae(d))}return c.keccak256(d)}const Se={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Xe(d,h,y){return new Array(h-d.length+1).join(y||"0")+d}function ce(d){let h="",y=0;const w=d.length;for(d.substring(0,2)==="0x"&&(y=2);y<w;y+=2){const O=parseInt(d.substr(y,2),16);h+=String.fromCharCode(O)}return h}function He(d){return qn(d)&&d.name&&d.name.indexOf("(")!==-1?d.name:d.name+"("+vt(!1,d.inputs||[]).join(",")+")"}function Et(...d){const h=d.reduce((O,P)=>O+P.length,0),y=new Uint8Array(h);let w=0;for(const O of d)y.set(O,w),w+=O.length;return y}function vt(d,h){const y=[];return h.forEach(function(w){if(typeof w.components=="object"){if(w.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let O="";const P=w.type.indexOf("[");P>=0&&(O=w.type.substring(P));const Q=vt(d,w.components);y.push("("+Q.join(",")+")"+O)}else y.push(w.type)}),y}function tn(d){const h=d.indexOf("("),y=d.indexOf(")");return h!==-1&&y!==-1?d.substr(0,h):d}function nn(d){const h=d.indexOf("("),y=d.indexOf(")");return h!==-1&&y!==-1?d.substr(h+1,y-h-1).replace(" ",""):""}function Gn(d){return d==null?d:Lt(d).toNumber()}function Ne(d){return Lt(d).toNumber()}function pt(d){return Nr(d)?d.toString(10):""+d}function gt(d){return typeof d=="string"&&!d.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d)?"0x"+d:Je(d)}function Wt(d){if(typeof d=="string")return d.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d)?Je(d):"0x"+ge(ae(d));if(d instanceof Uint8Array)return"0x"+ge(d);throw new Error(`toStringData: Error trying to convert ${d} (${typeof d}) to a hex string.`)}function nt(d){return typeof d=="boolean"?d:Lt(d).toNumber()!==0}function rt(d){const h=Lt(d),y=h.toString(16);return h.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Je(d){if(Mr(d))return rt(+d);if(Nr(d))return rt(d);if(la(d)){const h=d;if(h.indexOf("-0x")===0)return rt(h);if(h.indexOf("0x")===0)return h;if(!isFinite(h))return ge(ae(h))}if(d instanceof Uint8Array)return"0x"+ge(d);if($n(d)||qn(d))throw new Error("toHex can only be called with scalar values, not objects or arrays");return rt(d)}function yn(d){const h=d?d.toLowerCase():"ether",y=Se[h];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(Se,null,2));return new W(y,10)}function Lt(d){let h=d||0;return Nr(h)?h:(typeof h=="string"&&(h=h.trim()),typeof h!="string"||h.indexOf("0x")!==0&&h.indexOf("-0x")!==0?h instanceof Uint8Array?new W(ge(h),16):new W(h,10):new W(h.replace("0x","").toLowerCase(),16))}function ti(d){return new W(new Array(d).fill("1").join(""),2)}function Qe(d,h=256){const y=Lt(d).integerValue();return y.isLessThan(0)?ti(h).plus(y).plus(1):y}function rn(d,h){return Xe(d.toString(2),h,"0")[0]==="1"}function et(d){if(typeof d!="string")throw $("invalid address",le,{arg:"address",value:d});if(d.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return d.trim().substring(0,2)!=="0x"&&(d="0x"+d),bs(d);throw $("invalid address",le,{arg:"address",value:d})}function Dt(d,h=256){if(rn(d,h)){const y=ti(h);return d.minus(y).minus(1)}return d}function ot(d){return/^0x[0-9a-f]{40}$/i.test(d)}function Ln(d){return!!/^(0x)?[0-9a-f]{40}$/i.test(d)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(d)&&!/^(0x)?[0-9A-F]{40}$/.test(d))||_s(d))}function _s(d){const h=d.replace("0x",""),y=fe(h.toLowerCase());for(let w=0;w<40;w++)if(parseInt(y[w],16)>7&&h[w].toUpperCase()!==h[w]||parseInt(y[w],16)<=7&&h[w].toLowerCase()!==h[w])return!1;return!0}function bs(d){if(d===void 0)return"";const h=d.toLowerCase().replace("0x",""),y=fe(h);let w="0x";for(let O=0;O<h.length;O++)parseInt(y[O],16)>7?w+=h[O].toUpperCase():w+=h[O];return w}function An(d){if(!Array.isArray(d))throw new Error(`Value was not an array: ${JSON.stringify(d)}`);return d}function Pi(d){return ot(d)?d:/^[0-9a-f]{40}$/.test(d)?"0x"+d:"0x"+Xe(Je(d).substr(2),40)}function Nr(d){return d instanceof W}function la(d){return typeof d=="string"||d&&d.constructor&&d.constructor.name==="String"}function qn(d){return d!==null&&!Array.isArray(d)&&typeof d=="object"}function Mr(d){return typeof d=="boolean"}function $n(d){return Array.isArray(d)}var da,ni;function Es(d,h){if(!d)throw new Error("jsonrpc method should be specified!");if(typeof d!="string")throw new Error(`jsonrpc must be a string, got ${typeof d}!`);return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:d,params:h||[]}}function vs(d){return Array.isArray(d)?d.every(h):h(d);function h(y){return!!y&&(y.error===void 0||y.error===null)&&y.jsonrpc==="2.0"&&y.id!==null&&"result"in y&&y.result!==void 0}}n.TransactionStatus=void 0,(da=n.TransactionStatus||(n.TransactionStatus={})).pending="pending",da.confirmed="confirmed",da.failed="failed",n.TransactionType=void 0,(ni=n.TransactionType||(n.TransactionType={})).queued="queued",ni.dropped="dropped",ni.replaced="replaced",ni.pending="pending",ni.reverted="reverted",ni.confirmed="confirmed",n.messageId=0;function fa(d){return Lt(d)}function Ss(d){return d==="latest"||d==="pending"||d==="earliest"}function gr(d){return d===void 0?"latest":bt(d)}function bt(d){return d==null?null:Ss(d)?d:Je(d)}function Wn(d){return d.from&&(d.from=ee(d.from)),d.to&&(d.to=ee(d.to)),d.gasPrice!==void 0&&(d.gasPrice=rt(d.gasPrice)),d.gas!==void 0&&(d.gas=rt(d.gas)),d.value!==void 0&&(d.value=rt(d.value)),d.nonce!==void 0&&(d.nonce=rt(d.nonce)),d.data&&!d.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d.data)&&(d.data="0x"+d.data),d}function er(d){if(typeof d!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(d));if(d.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(d));if(d.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(d));return d}function C(d){if(typeof d!="object")throw new Error("Did not provide transaction options");if(!d.from)throw new Error('Missing "from" in transaction options');return d.from=ee(d.from),d.to&&(d.to=ee(d.to)),d.gasPrice!==void 0&&(d.gasPrice=rt(d.gasPrice)),d.gas!==void 0&&(d.gas=rt(d.gas)),d.value!==void 0&&(d.value=rt(d.value)),d.nonce!==void 0&&(d.nonce=rt(d.nonce)),d.data&&!d.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(d.data)&&(d.data="0x"+d.data),d}function b(d){return d?(d.blockNumber!==null&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex!==null&&(d.transactionIndex=Ne(d.transactionIndex)),d.nonce=Ne(d.nonce),d.gas=Ne(d.gas),d.gasPrice=Lt(d.gasPrice),d.value=Lt(d.value),d):null}function A(d){return d?(d.blockNumber!==null&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex!==null&&(d.transactionIndex=Ne(d.transactionIndex)),d.cumulativeGasUsed=Ne(d.cumulativeGasUsed),d.gasUsed=Ne(d.gasUsed),d.logs&&$n(d.logs)&&(d.logs=d.logs.map(function(h){return Y(h)})),d.status=Ne(d.status||""),d):null}function D(d){return d?(d.gasLimit=Ne(d.gasLimit),d.gasUsed=Ne(d.gasUsed),d.size=Ne(d.size),d.timestamp=Ne(d.timestamp),d.number!==null&&(d.number=Ne(d.number)),d.difficulty=Lt(d.difficulty),d.totalDifficulty=Lt(d.totalDifficulty),$n(d.transactions)&&d.transactions.forEach(function(h,y){la(h)||(d.transactions[y]=b(h)||d.transactions[y])}),d):null}function Y(d){return d&&(d.blockNumber&&(d.blockNumber=Ne(d.blockNumber)),d.transactionIndex&&(d.transactionIndex=Ne(d.transactionIndex)),d.logIndex&&(d.logIndex=Ne(d.logIndex)),d)}function ee(d){if(ot(d))return d;if(Ln(d))return"0x"+d;throw new Error(`Invalid address: ${JSON.stringify(d)}`)}function me(d){return d}function _e(d){return d&&(d.startingBlock=Ne(d.startingBlock),d.currentBlock=Ne(d.currentBlock),d.highestBlock=Ne(d.highestBlock),d.knownStates&&(d.knownStates=Ne(d.knownStates),d.pulledStates=Ne(d.pulledStates)),d)}function De(d){if(d===null)throw $("cannot convert null value to array",le,{arg:"value",value:d});if(d instanceof Uint8Array)return new Uint8Array(d);if(typeof d=="string"){const h=d.match(/^(0x)?[0-9a-fA-F]*$/);if(!h)throw $("invalid hexidecimal string",le,{arg:"value",value:d});if(h[1]!=="0x")throw $("hex string must have 0x prefix",le,{arg:"value",value:d});(d=d.substring(2)).length%2&&(d="0"+d);const y=[];for(let w=0;w<d.length;w+=2)y.push(parseInt(d.substr(w,2),16));return new Uint8Array(y)}if(function(h){if(!h||parseInt(String(h.length))!==h.length||typeof h=="string")return!1;for(let y=0;y<h.length;y++){const w=h[y];if(w<0||w>=256||parseInt(String(w))!==w)return!1}return!0}(d))return new Uint8Array(d);throw $("invalid arrayify value",void 0,{arg:"value",value:d,type:typeof d})}function Me(d,h,y){Object.defineProperty(d,h,{enumerable:!0,value:y,writable:!1})}const ze=new W(-1),ut=new W(0),lt=new W(1),Vt=new W("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ht(d){return function(h,y){function w(Q){return new Error('unexpected character "'+h[Q]+'" at position '+Q+' in "'+h+'"')}const O={type:"",name:"",state:{allowType:!0}};let P=O;for(let Q=0;Q<h.length;Q++){const ye=h[Q];switch(ye){case"(":if(!P.state.allowParams)throw w(Q);P.state.allowType=!1,P.type=an(P.type),P.components=[{type:"",name:"",parent:P,state:{allowType:!0}}],P=P.components[0];break;case")":delete P.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),P.type=an(P.type);const Pe=P;if(P=P.parent,!P)throw w(Q);delete Pe.parent,P.state.allowParams=!1,P.state.allowName=!0,P.state.allowArray=!0;break;case",":delete P.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),P.type=an(P.type);const Le={type:"",name:"",parent:P.parent,state:{allowType:!0}};P.parent.components.push(Le),delete P.parent,P=Le;break;case" ":P.state.allowType&&P.type!==""&&(P.type=an(P.type),delete P.state.allowType,P.state.allowName=!0,P.state.allowParams=!0),P.state.allowName&&P.name!==""&&(P.name==="indexed"?(P.indexed=!0,P.name=""):P.state.allowName=!1);break;case"[":if(!P.state.allowArray)throw w(Q);P.type+=ye,P.state.allowArray=!1,P.state.allowName=!1,P.state.readArray=!0;break;case"]":if(!P.state.readArray)throw w(Q);P.type+=ye,P.state.readArray=!1,P.state.allowArray=!0,P.state.allowName=!0;break;default:if(P.state.allowType)P.type+=ye,P.state.allowParams=!0,P.state.allowArray=!0;else if(P.state.allowName)P.name+=ye,delete P.state.allowArray;else{if(!P.state.readArray)throw w(Q);P.type+=ye}}}if(P.parent)throw new Error("unexpected eof");return delete O.state,P.name==="indexed"&&(P.indexed=!0,P.name=""),O.type=an(O.type),O}(d)}function an(d){return d.match(/^uint($|[^1-9])/)?d="uint256"+d.substring(4):d.match(/^int($|[^1-9])/)&&(d="int256"+d.substring(3)),d}const ri=new RegExp(/^bytes([0-9]*)$/),Pr=new RegExp(/^(u?int)([0-9]*)$/),ii=new RegExp(/^(.*)\[([0-9]*)\]$/),pa=function(d,h){const y=d.match(Pr);return y&&parseInt(y[2])<=48?h.toNumber():h};class On{constructor(h,y,w,O="",P){this.coerceFunc=h,this.name=y,this.type=w,this.localName=O,this.dynamic=P}}class ki extends On{constructor(h){super(h.coerceFunc,h.name,h.type,void 0,h.dynamic),Me(this,"coder",h)}encode(h){return this.coder.encode(h)}decode(h,y){return this.coder.decode(h,y)}}class Fh extends On{constructor(h,y){super(h,"null","",y,!1)}encode(h){return De([])}decode(h,y){if(y>h.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Co(d,h){return new W(d.toString(2).substr(-h),2)}class xh extends On{constructor(h,y,w,O){const P=(w?"int":"uint")+8*y;super(h,P,P,O,!1),this.size=y,this.signed=w}encode(h){try{let y=Lt(h);if(this.signed){let O=Co(Vt,8*this.size-1);if(y.gt(O))throw new Error("out-of-bounds");if(O=O.plus(lt).multipliedBy(ze),y.lt(O))throw new Error("out-of-bounds")}else if(y.lt(ut)||y.gt(Co(Vt,8*this.size)))throw new Error("out-of-bounds");y=Co(Qe(y,8*this.size),8*this.size),this.signed&&(y=Qe(Dt(y,8*this.size),256));const w=Xe(Qe(y).toString(16),64);if(w.indexOf("NaN")!==-1)throw $("invalid number value, NaN",le,{arg:this.localName,coderType:this.name,value:h,v:y,twosComplement:Qe(y),twosComplement16:Qe(y).toString(16),pad:Xe(Qe(y).toString(16),64),size:this.size});return ve(w)}catch(y){throw $("invalid number value",le,{arg:this.localName,coderType:this.name,value:h,message:y.toString()})}}decode(h,y){if(h.length<y+32)throw $("insufficient data for "+this.name+" type",le,{arg:this.localName,coderType:this.name,value:Je(h.slice(y,y+32))});const w=32-this.size;let O=new W(ge(h.slice(y+w,y+32)),16);return O=this.signed?Dt(O,8*this.size):Co(O,8*this.size),{consumed:32,value:this.coerceFunc(this.name,O)}}}const kr=new xh(function(d,h){return h},32,!1,"none");class Hh extends On{constructor(h,y,w){const O="bytes"+y;super(h,O,O,w,!1),this.length=y}encode(h){const y=new Uint8Array(32);try{if(typeof h=="string"&&h.length%2!=0)throw new Error("hex string cannot be odd-length");const w=De(h);if(w.length>this.length)throw new Error("incorrect data length");y.set(w)}catch(w){throw $("invalid "+this.name+" value. Use hex strings or Uint8Array",le,{arg:this.localName,coderType:this.name,value:w.value||h,details:w.message})}return y}decode(h,y){if(h.length<y+32)throw $("insufficient data for "+this.name+" type",le,{arg:this.localName,coderType:this.name,value:Je(h.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,h.slice(y,y+this.length))}}}function Uh(d){const h=32*Math.ceil(d.length/32),y=new Uint8Array(h-d.length);return Et(kr.encode(d.length),d,y)}function jh(d,h,y){if(d.length<h+32)throw $("insufficient data for dynamicBytes length",le,{arg:y,coderType:"dynamicBytes",value:Je(d.slice(h,h+32))});let w=kr.decode(d,h).value;try{w=w.toNumber()}catch(O){throw O("dynamic bytes count too large",le,{arg:y,coderType:"dynamicBytes",value:w.toString()})}if(d.length<h+32+w)throw $("insufficient data for dynamicBytes type",le,{arg:y,coderType:"dynamicBytes",value:Je(d.slice(h,h+32+w))});return{consumed:32+32*Math.ceil(w/32),value:d.slice(h+32,h+32+w)}}function No(d){return 32*Math.ceil(d/32)}function Vh(d,h){if(!Array.isArray(h)){if(!h||typeof h!="object")throw $("invalid tuple value",le,{coderType:"tuple",value:h});{const Pe=[];d.forEach(function(Le){Pe.push(h[Le.localName])}),h=Pe}}if(d.length!==h.length)throw $("types/value length mismatch",le,{coderType:"tuple",value:h});const y=[];d.forEach(function(Pe,Le){y.push({dynamic:Pe.dynamic,value:Pe.encode(h[Le])})});let w=0,O=0;y.forEach(function(Pe){Pe.dynamic?(w+=32,O+=No(Pe.value.length)):w+=No(Pe.value.length)});let P=0,Q=w;const ye=new Uint8Array(w+O);return y.forEach(function(Pe){Pe.dynamic?(ye.set(kr.encode(Q),P),P+=32,ye.set(Pe.value,Q),Q+=No(Pe.value.length)):(ye.set(Pe.value,P),P+=No(Pe.value.length))}),ye}class Xw extends Array{}class Jw extends On{constructor(h,y,w,O){super(h,"array",y.type+"["+(w>=0?w:"")+"]",O,w===-1||y.dynamic),this.coder=y,this.length=w}encode(h){if(!Array.isArray(h))throw $("expected array value",le,{arg:this.localName,coderType:"array",value:h});let y=this.length,w=new Uint8Array(0);y===-1&&(y=h.length,w=kr.encode(y)),function(P,Q,ye){if(ye||(ye=""),P<Q)throw $("missing argument"+ye,"MISSING_ARGUMENT",{count:P,expectedCount:Q});if(P>Q)throw $("too many arguments"+ye,"UNEXPECTED_ARGUMENT",{count:P,expectedCount:Q})}(y,h.length,"in coder array"+(this.localName?" "+this.localName:""));const O=[];for(let P=0;P<h.length;P++)O.push(this.coder);return Et(w,Vh(O,h))}decode(h,y){let w=0,O=this.length;if(O===-1){let ye;try{ye=kr.decode(h,y)}catch(Pe){throw $("insufficient data for dynamic array length",le,{arg:this.localName,coderType:"array",value:Pe.value})}try{O=ye.value.toNumber()}catch{throw $("array count too large",le,{arg:this.localName,coderType:"array",value:ye.value.toString()})}w+=ye.consumed,y+=ye.consumed}const P=[];for(let ye=0;ye<O;ye++)P.push(new ki(this.coder));const Q=function(ye,Pe,Le){const _n=Le;let Ut=0;const be=[];return ye.forEach(function(sn){let Ot;if(sn.dynamic){const Rt=kr.decode(Pe,Le);Ot=sn.decode(Pe,_n+Rt.value.toNumber()),Ot.consumed=Rt.consumed}else Ot=sn.decode(Pe,Le);Ot.value!==void 0&&be.push(Ot.value),Le+=Ot.consumed,Ut+=Ot.consumed}),{value:be,consumed:Ut}}(P,h,y);return Q.consumed+=w,Q.value=this.coerceFunc(this.type,Q.value),Q}}class Dl extends On{constructor(h,y,w){let O=!1;const P=[];y.forEach(function(Q){Q.dynamic&&(O=!0),P.push(Q.type)}),super(h,"tuple","tuple("+P.join(",")+")",w,O),this.coders=y}encode(h){return Vh(this.coders,h)}decode(h,y){const w=function(O,P,Q){const ye=Q;let Pe=0;const Le=new Xw;return O.forEach(function(_n){let Ut;if(_n.dynamic){const be=kr.decode(P,Q);Ut=_n.decode(P,ye+be.value.toNumber()),Ut.consumed=be.consumed}else Ut=_n.decode(P,Q);Ut.value!==void 0&&Le.push(Ut.value),Q+=Ut.consumed,Pe+=Ut.consumed}),O.forEach(function(_n,Ut){let be=_n.localName;be&&(be==="length"&&(be="_length"),Le[be]!==null&&Le[be]!==void 0||(Le[be]=Le[Ut]))}),{value:Le,consumed:Pe}}(this.coders,h,y);return w.value=this.coerceFunc(this.type,w.value),w}}const Zw={address:class extends On{constructor(d,h){super(d,"address","address",h,!1)}encode(d){const h=new Uint8Array(32),y=d.trim();if(!Ln(y))throw $("invalid address format",le,{arg:this.localName,coderType:"address",value:d});try{h.set(ve(ee(y)),12)}catch(w){throw $(`invalid address (${w.message})`,le,{arg:this.localName,coderType:"address",value:d})}return h}decode(d,h){if(d.length<h+32)throw $("insufficuent data for address type",le,{arg:this.localName,coderType:"address",value:Je(d.slice(h,h+32)),missingBytes:h+32-d.length});return{consumed:32,value:this.coerceFunc("address",et(Je(d.slice(h+12,h+32))))}}},bool:class extends On{constructor(d,h){super(d,"bool","bool",h,!1)}encode(d){return kr.encode(d?1:0)}decode(d,h){try{const y=kr.decode(d,h);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?$("insufficient data for boolean type",le,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends On{constructor(d,h){super(d,"string","string",h,!0)}encode(d){if(typeof d!="string")throw $("invalid string value",le,{arg:this.localName,coderType:"string",value:d});return Uh(ae(d))}decode(d,h){const y=jh(d,h,this.localName);return y.value=this.coerceFunc("string",Ee(y.value)),y}},bytes:class extends On{constructor(d,h){super(d,"bytes","bytes",h,!0)}encode(d){try{return Uh(De(d))}catch(h){throw h("invalid bytes value",le,{arg:this.localName,coderType:"bytes",value:h.value})}}decode(d,h){const y=jh(d,h,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends Hh{constructor(d,h){super(d,24,h)}}};function Mo(d,h){const y=Zw[h.type];if(y)return new y(d,h.name);let w=h.type.match(Pr);if(w){const O=parseInt(w[2]||"256");if(O===0||O>256||O%8!=0)throw $("invalid "+w[1]+" bit length",le,{arg:"param",value:h});return new xh(d,O/8,w[1]==="int",h.name)}if(w=h.type.match(ri),w){const O=parseInt(w[1]);if(O===0||O>32)throw $("invalid bytes length",le,{arg:"param",value:h});return new Hh(d,O,h.name)}if(w=h.type.match(ii),w){const O=Object.assign({},h),P=parseInt(w[2]||"-1");return O.type=w[1],new Jw(d,Mo(d,O),P,h.name)}if(h.type.substring(0,5)==="tuple")return function(O,P,Q){P||(P=[]);const ye=P.map(Pe=>Mo(O,Pe));return new Dl(O,ye,Q)}(d,h.components,h.name);if(h.type==="")return new Fh(d,h.name);throw $("invalid type",le,{arg:"type",value:h.type,fullType:h})}class Bl{constructor(h){(function(y,w){if(!(y instanceof w))throw $("missing new","MISSING_NEW",{name:w.name})})(this,Bl),h||(h=pa),Me(this,"coerceFunc",h)}encode(h,y){if(h.length!==y.length)throw $("types/values length mismatch",le,{count:{types:h.length,values:y.length},value:{types:h,values:y}});const w=h.map(O=>typeof O=="string"?Ht(O):O).map(O=>Mo(this.coerceFunc,O));return new Dl(this.coerceFunc,w,"_").encode(y)}decode(h,y){const w=h.map(O=>typeof O=="string"?Ht(O):O).map(O=>Mo(this.coerceFunc,O));return new Dl(this.coerceFunc,w,"_").decode(y,0).value}}const Gh=new Bl;var qh,Ie;function Ae(d,h,y,w){var O,P=arguments.length,Q=P<3?h:w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(d,h,y,w);else for(var ye=d.length-1;ye>=0;ye--)(O=d[ye])&&(Q=(P<3?O(Q):P>3?O(h,y,Q):O(h,y))||Q);return P>3&&Q&&Object.defineProperty(h,y,Q),Q}function Oe(d,h){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(d,h)}n.coder=void 0,(qh=n.coder||(n.coder={})).encodeParams=function(d,h){return ge(Gh.encode(d,h))},qh.decodeParams=function(d,h){if(d.length>0&&(!h||h==="0x"||h==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Gh.decode(d,ve("0x"+h.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Be{constructor(h){this.callName=h.callName,this.params=h.params||0,this.inputFormatter=h.inputFormatter||null,this.outputFormatter=h.outputFormatter}validateArgs(h){if(h.length!==this.params)throw y=this.callName,w=h.length,O=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${w}, expected: ${O}`);var y,w,O}formatInput(h){return this.inputFormatter?this.inputFormatter.map(function(y,w){return y?y(h[w]):h[w]}):h}formatOutput(h){return h!==null?this.outputFormatter(h):null}toPayload(h){const y=this.formatInput(h);return this.validateArgs(y),{method:this.callName,params:y}}async execute(h,...y){const w=this.toPayload(y);if(!h)throw new Error("Missing RequestManager in method#exec");const O=await h.sendAsync(w);return this.formatOutput(O)}}class Rn{constructor(h){this.getter=h.getter,this.outputFormatter=h.outputFormatter}formatOutput(h){return this.outputFormatter(h)}async execute(h,...y){const w=await h.sendAsync({method:this.getter,params:[]});return this.formatOutput(w)}}function Wh(d){return new Promise(h=>setTimeout(h,d))}n.eth=void 0,(Ie=n.eth||(n.eth={})).eth_getBalance=new Be({callName:"eth_getBalance",params:2,inputFormatter:[ee,gr],outputFormatter:fa}),Ie.eth_getStorageAt=new Be({callName:"eth_getStorageAt",params:3,inputFormatter:[ee,Je,gr],outputFormatter:gt}),Ie.eth_getCode=new Be({callName:"eth_getCode",params:2,inputFormatter:[ee,gr],outputFormatter:gt}),Ie.eth_getBlockByHash=new Be({callName:"eth_getBlockByHash",params:2,inputFormatter:[bt,function(d){return!!d}],outputFormatter:D}),Ie.eth_getBlockByNumber=new Be({callName:"eth_getBlockByNumber",params:2,inputFormatter:[bt,function(d){return!!d}],outputFormatter:D}),Ie.eth_getUncleByBlockHashAndIndex=new Be({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:D}),Ie.eth_getUncleByBlockNumberAndIndex=new Be({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:D}),Ie.eth_getBlockTransactionCountByHash=new Be({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getBlockTransactionCountByNumber=new Be({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getUncleCountByBlockHash=new Be({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getUncleCountByBlockNumber=new Be({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[bt],outputFormatter:Ne}),Ie.eth_getTransactionByHash=new Be({callName:"eth_getTransactionByHash",params:1,inputFormatter:[er],outputFormatter:b}),Ie.eth_getTransactionByBlockHashAndIndex=new Be({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:b}),Ie.eth_getTransactionByBlockNumberAndIndex=new Be({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[bt,Je],outputFormatter:b}),Ie.eth_getTransactionReceipt=new Be({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[er],outputFormatter:A}),Ie.eth_getTransactionCount=new Be({callName:"eth_getTransactionCount",params:2,inputFormatter:[ee,gr],outputFormatter:Ne}),Ie.eth_sendRawTransaction=new Be({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.web3_sha3=new Be({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.eth_sendTransaction=new Be({callName:"eth_sendTransaction",params:1,inputFormatter:[C],outputFormatter:gt}),Ie.eth_sign=new Be({callName:"eth_sign",params:2,inputFormatter:[ee,null],outputFormatter:gt}),Ie.eth_call=new Be({callName:"eth_call",params:2,inputFormatter:[Wn,gr],outputFormatter:gt}),Ie.eth_estimateGas=new Be({callName:"eth_estimateGas",params:1,inputFormatter:[Wn],outputFormatter:Ne}),Ie.eth_submitWork=new Be({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:nt}),Ie.eth_getWork=new Be({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:An}),Ie.eth_coinbase=new Rn({getter:"eth_coinbase",outputFormatter:Pi}),Ie.eth_mining=new Rn({getter:"eth_mining",outputFormatter:nt}),Ie.eth_hashrate=new Rn({getter:"eth_hashrate",outputFormatter:Ne}),Ie.eth_syncing=new Rn({getter:"eth_syncing",outputFormatter:_e}),Ie.eth_gasPrice=new Rn({getter:"eth_gasPrice",outputFormatter:fa}),Ie.eth_accounts=new Rn({getter:"eth_accounts",outputFormatter:An}),Ie.eth_blockNumber=new Rn({getter:"eth_blockNumber",outputFormatter:Ne}),Ie.eth_protocolVersion=new Rn({getter:"eth_protocolVersion",outputFormatter:Ne}),Ie.web3_clientVersion=new Rn({getter:"web3_clientVersion",outputFormatter:pt}),Ie.net_version=new Rn({getter:"net_version",outputFormatter:pt}),Ie.shh_version=new Be({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Ne}),Ie.shh_post=new Be({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.personal_newAccount=new Be({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Pi}),Ie.personal_importRawKey=new Be({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Pi}),Ie.personal_sign=new Be({callName:"personal_sign",params:3,inputFormatter:[Wt,ee,null],outputFormatter:gt}),Ie.personal_ecRecover=new Be({callName:"personal_ecRecover",params:2,inputFormatter:[Wt,null],outputFormatter:Pi}),Ie.personal_unlockAccount=new Be({callName:"personal_unlockAccount",params:3,inputFormatter:[ee,null,Gn],outputFormatter:nt}),Ie.personal_sendTransaction=new Be({callName:"personal_sendTransaction",params:2,inputFormatter:[C,null],outputFormatter:gt}),Ie.personal_lockAccount=new Be({callName:"personal_lockAccount",params:1,inputFormatter:[ee],outputFormatter:nt}),Ie.personal_listAccounts=new Rn({getter:"personal_listAccounts",outputFormatter:An}),Ie.net_listening=new Rn({getter:"net_listening",outputFormatter:nt}),Ie.net_peerCount=new Rn({getter:"net_peerCount",outputFormatter:Ne}),Ie.eth_newFilter=new Be({callName:"eth_newFilter",params:1,inputFormatter:[me],outputFormatter:Je}),Ie.eth_getLogs=new Be({callName:"eth_getLogs",params:1,inputFormatter:[An],outputFormatter:An}),Ie.eth_newBlockFilter=new Be({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Je}),Ie.eth_newPendingTransactionFilter=new Be({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Je}),Ie.eth_uninstallFilter=new Be({callName:"eth_uninstallFilter",params:1,inputFormatter:[Je],outputFormatter:nt}),Ie.eth_getFilterLogs=new Be({callName:"eth_getFilterLogs",params:1,inputFormatter:[Je],outputFormatter:An}),Ie.eth_getFilterChanges=new Be({callName:"eth_getFilterChanges",params:1,inputFormatter:[Je],outputFormatter:An}),Ie.eth_submitHashrate=new Be({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:nt}),Ie.shh_newIdentity=new Be({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_hasIdentity=new Be({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newGroup=new Be({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_addToGroup=new Be({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newFilter=new Be({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Je}),Ie.shh_uninstallFilter=new Be({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_getLogs=new Be({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getFilterMessages=new Be({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getFilterChanges=new Be({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:An}),Ie.shh_getMessages=new Be({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:An});function Re(d,h){const y=n.eth[h];if(!y)throw new Error(`Could not find the method/property named ${h.toString()}`);Object.defineProperty(d,h,{value:function(...w){return y.execute(this,...w)}})}class Te{constructor(h){this.provider=h,this.requests=new Map}async sendAsync(h){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const w=Es(h.method,h.params),O=s();return this.requests.set(w.id,O),y.sendAsync(w,(P,Q)=>{this.requests.delete(w.id),P?O.reject(P):vs(Q)?O.resolve(Q.result):O.reject(function(ye){const Pe=ye&&ye.error&&ye.error.message?ye.error.message:"Invalid JSON RPC response: "+JSON.stringify(ye);return new Error(Pe)}(Q))}),O}setProvider(h){this.provider=h}async getConfirmedTransaction(h){const y=await this.waitForCompletion(h);if(this.isFailure(y))throw new Error(`Transaction "${h}" failed`);return y}async waitForCompletion(h,y){const w=er(h);if(await this.isTxDropped(w,y)){const O=await this.getTransactionAndReceipt(w);return Object.assign(Object.assign({},O),{status:n.TransactionStatus.failed})}for(;;){const O=await this.getTransactionAndReceipt(w);if(!this.isPending(O)&&O.receipt)return Object.assign(Object.assign({},O),{status:this.isFailure(O)?n.TransactionStatus.failed:n.TransactionStatus.confirmed});await Wh(2e3)}}async getTransaction(h){let y,w=null;const O=er(h);try{const Q=(await this.eth_accounts())[0];Q&&(w=await this.eth_getTransactionCount(Q,"latest"))}catch{w=null}try{if(y=await this.eth_getTransactionByHash(O),y===null)return null}catch{return null}if(y.blockNumber===null){if(w!==null){if(y.nonce<w)return{hash:O,type:n.TransactionType.replaced,nonce:y.nonce};if(y.nonce>w)return{hash:O,type:n.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:n.TransactionType.pending},y)}let P;try{if(P=await this.eth_getTransactionReceipt(O),P===null||P.status===0)return Object.assign({type:n.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:n.TransactionType.confirmed},y),{receipt:P})}async isTxDropped(h,y=15){let w=y;for(;w>0;){if(await this.getTransactionAndReceipt(h)!==null)return!1;w-=1,await Wh(2e3)}return!0}async getTransactionAndReceipt(h){h=er(h);const[y,w]=await Promise.all([this.eth_getTransactionByHash(h),this.eth_getTransactionReceipt(h)]);return Object.assign(Object.assign({},y),{receipt:w})}isPending(h){return h&&h.blockNumber===null}isFailure(h){return h&&(!h.receipt||h.receipt.status===0)}}Ae([Re,Oe("design:type",Function)],Te.prototype,"web3_clientVersion",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"web3_sha3",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_version",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_peerCount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"net_listening",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_protocolVersion",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_syncing",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_coinbase",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_mining",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_hashrate",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_gasPrice",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_accounts",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_blockNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBalance",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getStorageAt",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionCount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getCode",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sign",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sendTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_sendRawTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_call",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_estimateGas",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getBlockByNumber",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByHash",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getTransactionReceipt",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newBlockFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_newPendingTransactionFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_uninstallFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getFilterChanges",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getFilterLogs",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getLogs",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_getWork",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_submitWork",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"eth_submitHashrate",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_post",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_version",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newIdentity",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_hasIdentity",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newGroup",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_addToGroup",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_newFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_uninstallFilter",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_getFilterChanges",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"shh_getMessages",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_unlockAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_newAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_listAccounts",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_lockAccount",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_importRawKey",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_sendTransaction",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_sign",void 0),Ae([Re,Oe("design:type",Function)],Te.prototype,"personal_ecRecover",void 0);class zh{constructor(h){this.json=h,this._inputTypes=h.inputs||[],this._outputTypes=h.outputs||[],this._constant=!!h.constant,this._payable=!!h.payable||h.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in h&&!h.constant||h.stateMutability==="nonpayable",this._name=He(h)}extractDefaultBlock(h){return h.length>this._inputTypes.length&&!qn(h[h.length-1])&&gr(h.pop())||"latest"}validateArgs(h){if(h.some(P=>P===void 0))throw new Error("Invalid call, some arguments are undefined");const y=h.filter(function(P){return!(qn(P)===!0&&$n(P)===!1&&Nr(P)===!1&&!(P instanceof Uint8Array))});if(y.length!==this._inputTypes.length)throw w=y.length,O=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${w}, expected: ${O}`);var w,O}toPayload(h){let y={to:void 0,data:void 0,value:void 0,from:void 0};h.length>this._inputTypes.length&&qn(h[h.length-1])&&(y=h.pop()),this.validateArgs(h);const w=this.signature();let O=n.coder.encodeParams(this._inputTypes,h);return O.indexOf("0x")===0&&(O=O.substr(2)),y.data="0x"+w+O,y}signature(){return fe(this._name).slice(0,8)}unpackOutput(h){if(!h)return;const y=h.length>=2?h.slice(2):h,w=n.coder.decodeParams(this._outputTypes,y);return w.length===1?w[0]:w}async execute(h,y,...w){if(!h)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const O=this.toPayload(w);if(O.to=y,O.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!O.from)throw new Error('Missing "from" in transaction options');return await h.eth_sendTransaction(O)}{const O=this.extractDefaultBlock(w),P=this.toPayload(w);P.to=y;const Q=await h.eth_call(P,O);return this.unpackOutput(Q)}}estimateGas(h,y,...w){if(!(h instanceof Te))throw new Error("estimateGas needs to receive a RequestManager as first argument");const O=this.toPayload(w);return O.to=y,h.eth_estimateGas(O)}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}attachToContract(h){const y=this.displayName(),w=Object.assign((...O)=>this.execute(h.requestManager,h.address,...O),{estimateGas:this.estimateGas.bind(this,h.requestManager,h.address),toPayload:(...O)=>this.toPayload(O),toRPCMessage:(...O)=>{const P=this.extractDefaultBlock(O),Q=this.toPayload(O);return Q.to=h.address,{method:"eth_call",params:[Q,P]}},unpackOutput:O=>this.unpackOutput(O)});h[y]||(h[y]=w),h[y][this.typeName()]=w}}function Yh(d){if(d==null)return null;const h=String(d).toString();return h.indexOf("0x")===0?h:ge(ae(h))}class Fl{constructor(h){this.requestManager=h,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(h){if(this.isDisposed)throw new Error("The filter was disposed");h&&(this.callbacks.push(h),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const h=await this.getNewFilter();if(!h)throw new Error("Could not create a filter, response: "+JSON.stringify(h));this.filterId.resolve(h)}catch(h){throw h}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const h=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${h}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach(w=>{this.formatter?y.forEach(O=>{w(this.formatter(O))}):y.forEach(O=>w(O))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((h=()=>this.poll(),function(){h().catch(y=>console.error(y))}),500))}else this.stopSemaphore.resolve(1);var h}}class ws extends Fl{constructor(h,y,w=O=>O){super(h),this.requestManager=h,this.options=y,this.formatter=w,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(O){return Yh(O)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?bt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?bt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const h=await this.filterId;return this.requestManager.eth_getFilterLogs(h)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const h=await this.filterId;return this.requestManager.eth_getFilterChanges(h)}async uninstall(){const h=await this.filterId;return this.requestManager.eth_uninstallFilter(h)}}class xl{constructor(h,y,w){this.requestManager=h,this.address=w,this._anonymous=!1,this._params=y.inputs||[],this._name=He(y),this._anonymous=y.anonymous||!1}types(h){return this._params.filter(function(y){return y.indexed===h})}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}signature(){return fe(this._name)}encode(h={},y={}){const w={topics:[],address:this.address};y.fromBlock!==void 0&&(w.fromBlock=bt(y.fromBlock)||void 0),y.toBlock!==void 0&&(w.toBlock=bt(y.toBlock)||void 0),w.topics=w.topics||[],this._anonymous||w.topics.push("0x"+this.signature());const O=this._params.filter(function(P){return P.indexed===!0}).map(function(P){const Q=h[P.name];return Q==null?null:$n(Q)?Q.map(function(ye){return"0x"+n.coder.encodeParams([P],[ye])}):"0x"+n.coder.encodeParams([P],[Q])});return w.topics=w.topics.concat(O),w}decode(h){h.data=h.data||"",h.topics=h.topics||[];const y=(this._anonymous?h.topics:h.topics.slice(1)).map(function(ye){return ye.slice(2)}).join(""),w=n.coder.decodeParams(this.types(!0),y),O=h.data.slice(2),P=n.coder.decodeParams(this.types(!1),O),Q=this._params.reduce(function(ye,Pe){return ye[Pe.name]=Pe.indexed?w.shift():P.shift(),ye},{});return Object.assign(Object.assign({},Y(h)),{event:this.displayName(),address:h.address,args:Q})}async execute(h,y){const w=this.encode(h,y),O=this.decode.bind(this);return new ws(this.requestManager,w,O)}attachToContract(h){const y=this.execute.bind(this),w=this.displayName();h.events[w]||(h.events[w]=y),h.events[w][this.typeName()]=this.execute.bind(this,h)}}class Qw{constructor(h,y,w){this._requestManager=h,this._json=y,this._address=w}encode(h={}){const y={address:this._address};return h.fromBlock!==void 0&&(y.fromBlock=bt(h.fromBlock)||void 0),h.toBlock!==void 0&&(y.toBlock=bt(h.toBlock)||void 0),y}decode(h){h.data=h.data||"";const y=$n(h.topics)&&la(h.topics[0])?h.topics[0].slice(2):"",w=this._json.filter(function(O){return y===fe(He(O))})[0];return w?new xl(this._requestManager,w,this._address).decode(h):Y(h)}async execute(h){const y=this.encode(h),w=this.decode.bind(this);return new ws(this._requestManager,y,w)}getAllEventsFunction(){return this.execute.bind(this)}}class Kh{constructor(h,y,w){var O;this.requestManager=h,this.abi=y,this.address=w,this.events={},this.transactionHash=null,this.address=w,this.abi=y,(O=this).abi.filter(function(P){return P.type==="function"}).map(function(P){return new zh(P)}).forEach(function(P){P.attachToContract(O)}),this.allEvents=function(P){const Q=P.abi.filter(function(Pe){return Pe.type==="event"}),ye=new Qw(P.requestManager,Q,P.address);return Q.map(function(Pe){return new xl(P.requestManager,Pe,P.address)}).forEach(function(Pe){Pe.attachToContract(P)}),ye.getAllEventsFunction()}(this)}}n.AbstractFilter=Fl,n.BigNumber=W,n.Contract=Kh,n.ContractFactory=class{constructor(d,h){this.requestManager=d,this.abi=h}async deploy(...d){let h;const y=d[d.length-1];if(qn(y)&&!$n(y)&&(h=d.pop()),!h)throw new Error("Missing options object");if(!h.data||typeof h.data!="string")throw new Error("Invalid options.data");if(Ne(h.value)>0&&!(this.abi.filter(function(Le){return Le.type==="constructor"&&Le.inputs.length===d.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const w=(O=this.abi,P=d,O.filter(function(Le){return Le.type==="constructor"&&Le.inputs&&Le.inputs.length===P.length}).map(function(Le){return Le.inputs||[]}).map(function(Le){return n.coder.encodeParams(Le,P)})[0]||"");var O,P;h.data+=w,h.gas||(h.gas=await this.requestManager.eth_estimateGas(h));const Q=await this.requestManager.eth_sendTransaction(h);if(!Q)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ye=await async function(Le,_n){const Ut=s();let be=0;const sn=()=>{be++,be>50?Ut.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Le.eth_getTransactionReceipt(_n).then(dn=>{dn&&dn.blockHash?Ut.resolve(dn):setTimeout(sn,1e3)},dn=>Ut.reject(dn))};sn();const Ot=await Ut,Rt=await Le.eth_getCode(Ot.contractAddress,"latest");if(Rt&&Rt.length>3)return Ot.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Rt,receipt:Ot})}(this.requestManager,Q),Pe=await this.at(ye);return Pe.transactionHash=Q,Pe}async at(d){if(!Ln(d))throw new TypeError(`Invalid address ${JSON.stringify(d)}`);return new Kh(this.requestManager,this.abi,d)}},n.EthBlockFilter=class extends ws{constructor(d){super(d,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},n.EthFilter=ws,n.EthPendingTransactionFilter=class extends ws{constructor(d){super(d,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},n.HTTPProvider=class{constructor(d,h={}){this.host=d,this.options=h,this.debug=!1,this.host=d||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(d,h){try{let y=null;y=d instanceof Array?d.map(P=>r(P)):r(d);const w=this.options.fetch||globalThis.fetch;if(w===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const O={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+O.body),w(this.host,O).then(async P=>{if(P.ok){const Q=await P.json();this.debug&&console.log("RECV << "+JSON.stringify(Q)),Q.error?h(Object.assign(new Error(Q.error.json||Q.error),Q.error)):h(null,Q)}else this.debug&&console.log("ERR << "+JSON.stringify(P)),h(new Error("External error. response code: "+P.status))},P=>{this.debug&&console.log("ERR << "+JSON.stringify(P)),h(P)})}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),h(y)}}},n.Method=Be,n.Property=Rn,n.RequestManager=Te,n.SHHFilter=class extends Fl{constructor(d,h){super(d),this.requestManager=d,this.options=h,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(y){return Yh(y)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const d=await this.filterId;return this.requestManager.shh_getMessages(d)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const d=await this.filterId;return this.requestManager.shh_getFilterChanges(d)}async uninstall(){const d=await this.filterId;return this.requestManager.shh_uninstallFilter(d)}},n.SolidityEvent=xl,n.SolidityFunction=zh,n.WebSocketProvider=class{constructor(d,h={}){this.url=d,this.options=h,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const d=this.connection;this.timeout(new Error("Provider disposed.")),d.then(h=>h.close()).catch(h=>{this.debug&&console.error(h)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(d,h){const y=[];let w;if(d instanceof Array)w=Promise.all(d.map(O=>{const P=s();try{const Q=r(O);y.push(Q),this.responseCallbacks.set(Q.id,P)}catch(Q){P.reject(Q)}return P}));else{const O=s();try{const P=r(d);y.push(P),this.responseCallbacks.set(P.id,O)}catch(P){O.reject(P)}w=O}w.then(O=>h(null,O),O=>h(O)),this.connection.then(O=>{y.forEach(P=>{const Q=JSON.stringify(P);this.debug&&console.log("SEND >> "+Q),O.send(Q)})},O=>{h(O)})}parseResponse(d){const h=[];return d.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(y=>{let w=y;this.lastChunk&&(w=this.lastChunk+w);let O=null;try{O=JSON.parse(w)}catch{return this.lastChunk=w,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",O&&h.push(O)}),h}processMessage(d){if("id"in d){const h=d.id,y=this.responseCallbacks.get(h);if(!y)return void console.error("Error: Received a response for an unknown request",d);this.responseCallbacks.delete(h),d.error!==void 0&&d.error!==null?y.reject(Object.assign(new Error(d.error.message||d.error),d.error)):"result"in d&&y.resolve(d)}else this.notificationCallbacks.forEach(h=>h(null,d))}timeout(d){this.connection&&this.connection.isPending||(this.connection=s());const h=d||new Error("Connection timeout");this.responseCallbacks.forEach(y=>y.reject(h)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(y=>y.close()).catch(y=>{this.debug&&console.error(y)}),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const d=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!d)throw new Error("Please provide a WebSocketConstructor");const h=new d(this.url,this.options.protocol);h.onopen=()=>{this.connection.resolve(h)},h.onerror=y=>{const w=new Error("Error in web socket");w.data=y,this.timeout(w)},h.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},h.onmessage=y=>{const w=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(w).forEach(O=>{O instanceof Array?O.forEach(P=>this.processMessage(P)):this.processMessage(O)})}}},n.bytesToHex=ge,n.bytesToUtf8String=Ee,n.concatBytes=Et,n.default=Te,n.extractDisplayName=tn,n.extractTypeName=nn,n.fromAscii=function(d,h=0){let y="";for(let w=0;w<d.length;w++){const O=d.charCodeAt(w).toString(16);y+=O.length<2?"0"+O:O}return"0x"+y.padEnd(h,"0")},n.fromDecimal=rt,n.fromTwosComplement=Dt,n.fromWei=function(d,h){const y=Lt(d).dividedBy(yn(h));return Nr(d)?y:y.toString(10)},n.getAddress=et,n.getValueOfUnit=yn,n.hexToBytes=ve,n.inputAddressFormatter=ee,n.inputBlockNumberFormatter=bt,n.inputCallFormatter=Wn,n.inputDefaultBlockNumberFormatter=gr,n.inputFilterOptions=me,n.inputPostFormatter=function(d){return d?(d.ttl=rt(d.ttl),d.workToProve=rt(d.workToProve),d.priority=rt(d.priority),$n(d.topics)||(d.topics=d.topics?[d.topics]:[]),d.topics=d.topics.map(function(h){return h.indexOf("0x")===0?h:"0x"+ge(ae(h))}),d):null},n.inputTransactionFormatter=C,n.inputTransactionId=er,n.isAddress=Ln,n.isArray=$n,n.isBigNumber=Nr,n.isBloom=function(d){return!!/^(0x)?[0-9a-f]{512}$/i.test(d)&&!!/^(0x)?[0-9a-f]{512}$/i.test(d)},n.isBoolean=Mr,n.isChecksumAddress=_s,n.isFunction=function(d){return typeof d=="function"},n.isHex=function(d){return typeof d=="string"&&/^0x[0-9a-fA-F]+$/.test(d)},n.isJson=function(d){try{return!!JSON.parse(d)}catch{return!1}},n.isObject=qn,n.isPredefinedBlockNumber=Ss,n.isStrictAddress=ot,n.isString=la,n.isTopic=function(d){return!!/^(0x)?[0-9a-f]{64}$/i.test(d)&&!!/^(0x)?[0-9a-f]{64}$/i.test(d)},n.isValidResponse=vs,n.outputBigNumberFormatter=fa,n.outputBlockFormatter=D,n.outputLogFormatter=Y,n.outputPostFormatter=function(d){return d?(d.expiry=Ne(d.expiry),d.sent=Ne(d.sent),d.ttl=Ne(d.ttl),d.workProved=Ne(d.workProved),d.topics||(d.topics=[]),d.topics=d.topics.map(function(h){return ce(h)}),d):null},n.outputSyncingFormatter=_e,n.outputTransactionFormatter=b,n.outputTransactionReceiptFormatter=A,n.padLeft=Xe,n.padRight=function(d,h,y){return d+new Array(h-d.length+1).join(y||"0")},n.sha3=fe,n.signedIsNegative=rn,n.stringToUtf8Bytes=ae,n.toAddress=Pi,n.toArray=An,n.toAscii=ce,n.toBatchPayload=function(d){return d.map(function(h){return Es(h.method,h.params)})},n.toBigNumber=Lt,n.toBoolean=nt,n.toChecksumAddress=bs,n.toData=gt,n.toDecimal=Ne,n.toHex=Je,n.toJsonRpcRequest=Es,n.toNullDecimal=Gn,n.toString=pt,n.toStringData=Wt,n.toTwosComplement=Qe,n.toWei=function(d,h){const y=Lt(d).times(yn(h));return Nr(d)?y:y.toString(10)},n.transformToFullName=He,Object.defineProperty(n,"__esModule",{value:!0})})})(Jd,Jd.exports);var Wu=Jd.exports,zu={};Object.defineProperty(zu,"__esModule",{value:!0});zu.SignatureValidator=void 0;const aT=Wu;async function sT(e,t){const n=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new aT.ContractFactory(e,n).at(t)}zu.SignatureValidator=sT;var b_={},E_={},v_={},S_={},w_={},ue={},tp=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});ue.validateType=ue.generateLazyValidator=ue.Ajv=void 0;const T_=tp(eT);ue.Ajv=T_.default;const oT=tp(tT),cT=tp(nT);function uT(e,t){let n=null;const r=(i,a)=>{if(!n){const s=new T_.default({$data:!0,allErrors:!0});(0,oT.default)(s),(0,cT.default)(s,{singleError:!0}),t?.forEach(o=>s.addKeyword(o)),n=s.compile(e),Object.defineProperty(r,"errors",{get(){return n?.errors}})}return n(i,a)};return r}ue.generateLazyValidator=uT;function lT(e,t){return e.validate(t)}ue.validateType=lT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=ue;e.SCENE_UPDATE="SCENE_UPDATE",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SceneUpdate||(e.SceneUpdate={}))})(w_);var I_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=ue;e.UPDATE="update",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Update||(e.Update={}))})(I_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(w_,e),n(I_,e)})(S_);var A_={},O_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=ue;(function(n){n.SCENE="scene",n.SMART_ITEM="smart-item",n.PORTABLE_EXPERIENCE="portable-experience",n.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProjectType||(e.ProjectType={}))})(O_);var R_={},eo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=ue;(function(n){n.UNIQUE="unique",n.MYTHIC="mythic",n.EXOTIC="exotic",n.LEGENDARY="legendary",n.EPIC="epic",n.RARE="rare",n.UNCOMMON="uncommon",n.COMMON="common"})(e.Rarity||(e.Rarity={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema);const r={[n.UNIQUE]:1,[n.MYTHIC]:10,[n.EXOTIC]:50,[n.LEGENDARY]:100,[n.EPIC]:1e3,[n.RARE]:5e3,[n.UNCOMMON]:1e4,[n.COMMON]:1e5},i={[n.UNIQUE]:"#FFE617",[n.MYTHIC]:"#FB7DE3",[n.EXOTIC]:"#E4FFB8",[n.LEGENDARY]:"#A657ED",[n.EPIC]:"#6397F2",[n.RARE]:"#3AD682",[n.UNCOMMON]:"#FF8563",[n.COMMON]:"#D4E0E0"},a={[n.UNIQUE]:"#FFB626",[n.MYTHIC]:"#FF63E1",[n.EXOTIC]:"#CAFF73",[n.LEGENDARY]:"#842DDA",[n.EPIC]:"#3D85E6",[n.RARE]:"#36CF75",[n.UNCOMMON]:"#ED6D4F",[n.COMMON]:"#ABC1C1"};function s(f){return r[f]}n.getMaxSupply=s;function o(f){return a[f]}n.getColor=o;function c(){return[n.UNIQUE,n.MYTHIC,n.EXOTIC,n.LEGENDARY,n.EPIC,n.RARE,n.UNCOMMON,n.COMMON]}n.getRarities=c;function u(f){return[i[f],a[f]]}n.getGradient=u}(e.Rarity||(e.Rarity={}))})(eo);var Ti={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=ue;(function(n){n.EYEBROWS="eyebrows",n.EYES="eyes",n.FACIAL_HAIR="facial_hair",n.HAIR="hair",n.BODY_SHAPE="body_shape",n.MOUTH="mouth",n.UPPER_BODY="upper_body",n.LOWER_BODY="lower_body",n.FEET="feet",n.EARRING="earring",n.EYEWEAR="eyewear",n.HAT="hat",n.HELMET="helmet",n.MASK="mask",n.TIARA="tiara",n.TOP_HEAD="top_head",n.SKIN="skin",n.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableCategory||(e.WearableCategory={}))})(Ti);var Yu={},Ku={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=ue;(function(n){n.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",n.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyShape||(e.BodyShape={}))})(Ku);var Xu={},np={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=ue;(function(n){n.HEAD="head",n.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyPartCategory||(e.BodyPartCategory={}))})(np);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=Ti,n=ue,r=np;(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},r.BodyPartCategory.schema)]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Xu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=ue,n=Ku,r=Xu;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:r.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:r.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Yu);var Ju={},C_={},rp={},Ii={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=ue;(function(n){n.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const r=(0,t.generateLazyValidator)(n.schema);n.validate=i=>r(i)})(e.Color3||(e.Color3={})),function(n){n.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.EthAddress||(e.EthAddress={})),function(n){n.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv2||(e.IPFSv2={})),function(n){n.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv1||(e.IPFSv1={}))})(Ii);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=Ti,n=Ii,r=ue;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:n.IPFSv2.schema,body:n.IPFSv2.schema}},c.validate=(0,r.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const u=new RegExp(c.schema.pattern,"i");c.validate=f=>u.test(f)})(s=e.LinkUrl||(e.LinkUrl={}));var o;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=e.Link||(e.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},nameColor:Object.assign(Object.assign({},n.Color3.schema),{nullable:!0}),description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:n.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)}(e.Avatar||(e.Avatar={}))})(rp);var N_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=ue,n=rp;(function(r){r.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:n.Avatar.schema}},additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Profile||(e.Profile={}))})(N_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(rp,e),n(N_,e)})(C_);var M_={},ip={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=ue;e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],function(n){n.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.FeatureToggles||(e.FeatureToggles={}))})(ip);var ap={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(ap);var sp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=ue;(function(n){n.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},n.schemaValidator=(0,t.generateLazyValidator)(n.schema),n.validate=r=>n.schemaValidator(r)&&r.parcels.includes(r.base)})(e.SceneParcels||(e.SceneParcels={}))})(sp);var P_={},os={};Object.defineProperty(os,"__esModule",{value:!0});os.displayableProperties=void 0;os.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var op={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Source||(e.Source={}))})(op);var cp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(cp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=ue,n=os,r=ip,i=sp,a=op,s=cp,o=ap;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=e.RequiredPermission||(e.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},n.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},r.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,t.generateLazyValidator)(u.schema)}(e.Scene||(e.Scene={}))})(P_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=ip;Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var n=ap;Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return n.WorldConfiguration}});var r=sp;Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return r.SceneParcels}});var i=P_;Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=op;Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return a.Source}});var s=cp;Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(M_);var Hl={},up={},lp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=ue;(function(n){n.EN="en",n.ES="es"})(e.Locale||(e.Locale={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Locale||(e.Locale={}))})(lp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=ue,n=lp;(function(r){r.schema={type:"object",properties:{code:n.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.I18N||(e.I18N={}))})(up);var dp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Metrics||(e.Metrics={}))})(dp);var Zu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=eo,n=ue;e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const r={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,n.generateLazyValidator)(r);function a(s){return i(s)}e.isStandard=a})(Zu);var Qu={},fp={},k_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MerkleProof||(e.MerkleProof={}))})(k_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(k_,e)})(fp);var $u={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const t=ue;var n;(function(l){l.SINGLE="single",l.ANY="any",l.MULTIPLE="multiple",l.RANGE="range"})(n=e.MappingType||(e.MappingType={}));var r;(function(l){l.MAINNET="mainnet",l.BASE_MAINNET="base_mainnet",l.BASE_SEPOLIA="base_sepolia",l.MONAD_MAINNET="monad_mainnet",l.MONAD_TESTNET="monad_testnet",l.APE_MAINNET="ape_mainnet",l.APE_CALDERA="ape_caldera",l.MATIC="matic",l.SEPOLIA="sepolia",l.AMOY="amoy"})(r=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.ANY}},required:["type"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var s;(function(l){l._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(g,_){if(!_||!_.from||!_.to)return!1;let{to:T,from:B}=_;return(typeof B!="bigint"||typeof T!="bigint")&&(B=BigInt(B),T=BigInt(T)),B<=T},errors:!1},l.schema={type:"object",properties:{type:{type:"string",const:n.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},l.validate=(0,t.generateLazyValidator)(l.schema,[l._fromLessThanOrEqualTo])})(s=e.RangeMapping||(e.RangeMapping={}));var o;(function(l){l.schema={type:"object",properties:{type:{type:"string",const:n.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},l.validate=(0,t.generateLazyValidator)(l.schema)})(o=e.MultipleMapping||(e.MultipleMapping={}));var c;(function(l){l.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)}},required:["type"],oneOf:[i.schema,a.schema,s.schema,o.schema]},l.validate=(0,t.generateLazyValidator)(l.schema,[s._fromLessThanOrEqualTo])})(c=e.Mapping||(e.Mapping={})),function(l){l._isMappingsValid={keyword:"_isMappingsValid",validate:function(g,_){try{f(_)}catch{return!1}return!0},errors:!1},l.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:c.schema}},minProperties:1,required:[],additionalProperties:!1};const m=Object.values(r).reduce((g,_)=>(g[_]=l.innerSchema,g),{});l.schema={type:"object",properties:m,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},l.validate=(0,t.generateLazyValidator)(l.schema,[s._fromLessThanOrEqualTo,l._isMappingsValid])}(e.Mappings||(e.Mappings={}));class u extends Error{constructor(m,g,_){super(m),this.existingMapping=g,this.conflictingMapping=_}}e.AddMappingError=u;function f(l={}){const m={};for(const[F,k]of Object.entries(l)){m[F]={};for(const[j,te]of Object.entries(k))for(const L of te)K(F,j,L)}function g(){return JSON.parse(JSON.stringify(m))}function _(F,k,j){const te=BigInt(F);return te>=BigInt(k)&&te<=BigInt(j)}function T(F,k){switch(k.type){case n.SINGLE:return F.id===k.id;case n.MULTIPLE:return k.ids.includes(F.id);case n.RANGE:return _(F.id,k.from,k.to);default:return!1}}function B(F,k){switch(k.type){case n.SINGLE:return F.ids.includes(k.id);case n.MULTIPLE:return F.ids.some(j=>k.ids.includes(j));case n.RANGE:return F.ids.some(j=>_(j,k.from,k.to));default:return!1}}function U(F,k){switch(k.type){case n.SINGLE:return _(k.id,F.from,F.to);case n.MULTIPLE:return k.ids.some(j=>_(j,F.from,F.to));case n.RANGE:return BigInt(F.from)<=BigInt(k.to)&&BigInt(F.to)>=BigInt(k.from)}}function J(F,k){if(F.type===n.ANY||k.type===n.ANY)return!0;switch(F.type){case n.SINGLE:return T(F,k);case n.MULTIPLE:return B(F,k);case n.RANGE:return U(F,k)}}function K(F,k,j){var te,L;const G=k.toLowerCase();m[F]=(te=m[F])!==null&&te!==void 0?te:{},m[F][G]=(L=m[F][G])!==null&&L!==void 0?L:[];for(const W of m[F][G])if(J(W,j))throw new u(`Cannot add mapping to contract ${G} on network ${F} because it overlaps with existing mapping`,W,j);m[F][G].push(j)}function H(F,k,j){var te;return!((te=m[F])===null||te===void 0)&&te[k]?m[F][k].some(L=>{switch(L.type){case n.SINGLE:return L.id===j;case n.ANY:return!0;case n.MULTIPLE:return L.ids.includes(j);case n.RANGE:return BigInt(j)>=BigInt(L.from)&&BigInt(j)<=BigInt(L.to)}}):!1}return{addMapping:K,getMappings:g,includesNft:H}}e.createMappingsHelper=f})($u);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const t=ue,n=fp,r=$u;e.schema={type:"object",properties:{merkleProof:n.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},r.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(o,c){var u;const f=c;return!((u=f?.merkleProof)===null||u===void 0)&&u.hashingKeys?f.merkleProof.hashingKeys.every(l=>f.hasOwnProperty(l)):!1},errors:!1},a=(0,t.generateLazyValidator)(e.schema,[i,r.RangeMapping._fromLessThanOrEqualTo,r.Mappings._isMappingsValid]);function s(o){return a(o)}e.isThirdParty=s})(Qu);var L_={},D_={},ar={};Object.defineProperty(ar,"__esModule",{value:!0});ar.isBaseEmote=ar.isBaseAvatar=ar.requiredBaseItemProps=ar.baseItemProperties=void 0;const dT=up,fT=dp,pT=os;ar.baseItemProperties=Object.assign(Object.assign({},pT.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:dT.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},fT.Metrics.schema),{nullable:!0})});ar.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function hT(e){if(!e||!e.id)return!1;const t=e.id.split(":"),n=t[1]==="decentraland",r=t[3]==="base-avatars";return t.length===5&&n&&r}ar.isBaseAvatar=hT;function mT(e){if(!e||!e.id)return!1;const t=e.id.split(":");return t.length===5&&t[1]==="decentraland"&&t[3]==="base-emotes"}ar.isBaseEmote=mT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=ue,n=Ti,r=Yu,i=ar,a=Zu,s=Qu,o=Xu,c=$u;(function(u){u.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const f={keyword:"_isThirdParty",validate:(m,g)=>!m||(0,s.isThirdParty)(g),errors:!1},l={keyword:"_isBaseAvatar",validate:(m,g)=>!m||(0,i.isBaseAvatar)(g),errors:!1};u.validate=(0,t.generateLazyValidator)(u.schema,[f,l,c.RangeMapping._fromLessThanOrEqualTo,c.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(D_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Yu;Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var n=D_;Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return n.Wearable}});var r=Ti;Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return r.WearableCategory}});var i=np;Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=Xu;Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(L_);var Ul={},jl={},pp={},hp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=ue;(function(n){n.DANCE="dance",n.STUNT="stunt",n.GREETINGS="greetings",n.FUN="fun",n.POSES="poses",n.REACTIONS="reactions",n.HORROR="horror",n.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteCategory||(e.EmoteCategory={}))})(hp);var mp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=ue,n=Ku;(function(r){r.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(mp);var gp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const t=ue;var n;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(n=e.ArmatureId||(e.ArmatureId={})),function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,t.generateLazyValidator)(i.schema)}(n=e.ArmatureId||(e.ArmatureId={}));var r;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.EmoteClip||(e.EmoteClip={})),function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[n.Armature]:Object.assign(Object.assign({},r.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[n.Armature_Prop]:Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",n.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[n.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.StartAnimation||(e.StartAnimation={})),function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(n).reduce((a,s)=>(a[s]=Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:`outcome.clips.${s} must contain valid animation data when provided`}),a),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.OutcomeGroup||(e.OutcomeGroup={}))})(gp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=hp,n=ue,r=mp,i=gp;(function(a){a.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(pp);var Xh;function gT(){return Xh||(Xh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=x_(),n=ue,r=ar,i=Zu,a=Qu,s=pp;(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},r.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...r.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(f,l)=>!f||(0,t.isThirdParty)(l),errors:!1},u={keyword:"_isBaseEmote",validate:(f,l)=>!f||(0,r.isBaseEmote)(l),errors:!1};o.validate=(0,n.generateLazyValidator)(o.schema,[c,u,t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))}(jl)),jl}var B_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=ue;(function(n){n.SIMPLE="simple",n.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmotePlayMode||(e.EmotePlayMode={}))})(B_);var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const t=ue;(function(n){n.SIMPLE_OUTCOME="so",n.MULTIPLE_OUTCOME="mo",n.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(F_);var Jh;function yT(){return Jh||(Jh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=gT();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var n=mp;Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return n.EmoteRepresentationADR74}});var r=pp;Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return r.EmoteDataADR74}});var i=gp;Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var a=hp;Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return a.EmoteCategory}});var s=B_;Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}});var o=F_;Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return o.EmoteOutcomeType}})}(Ul)),Ul}var Zh;function x_(){return Zh||(Zh=1,function(e){var t=ie&&ie.__createBinding||(Object.create?function(u,f,l,m){m===void 0&&(m=l);var g=Object.getOwnPropertyDescriptor(f,l);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[l]}}),Object.defineProperty(u,m,g)}:function(u,f,l,m){m===void 0&&(m=l),u[m]=f[l]}),n=ie&&ie.__exportStar||function(u,f){for(var l in u)l!=="default"&&!Object.prototype.hasOwnProperty.call(f,l)&&t(f,u,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var r=up;Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return r.I18N}});var i=lp;Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=dp;Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=Ku;Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=Zu;Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var c=Qu;Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),n($u,e),n(L_,e),n(yT(),e)}(Hl)),Hl}var H_={},cs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=ue;var n;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(n=e.AuthLinkType||(e.AuthLinkType={}));var r;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:n.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.AuthLink||(e.AuthLink={})),function(i){i.schema={type:"array",items:r.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.AuthChain||(e.AuthChain={}))})(cs);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Ii,n=cs,r=ue;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(H_);var yp={},_p={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Ii,n=ue;(function(r){r.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.ContentMapping||(e.ContentMapping={}))})(_p);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Ii,n=_p,r=ue;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:n.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.Entity||(e.Entity={}))})(yp);var U_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=cs,n=ue;(function(r){r.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(U_);var j_={},V_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=Ti,n=Ii,r=ue;var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)})(i=e.Outfit||(e.Outfit={})),function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,r.generateLazyValidator)(a.schema)}(e.Outfits||(e.Outfits={}))})(V_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(V_,e)})(j_);var G_={},bp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,function(t){t.BADGE_GRANTED="badge_granted",t.BID_ACCEPTED="bid_accepted",t.BID_RECEIVED="bid_received",t.EVENTS_STARTED="events_started",t.EVENTS_STARTS_SOON="events_starts_soon",t.EVENT_CREATED="event_created",t.GOVERNANCE_ANNOUNCEMENT="governance_announcement",t.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",t.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",t.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",t.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",t.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",t.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",t.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",t.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",t.GOVERNANCE_TENDER_PASSED="governance_tender_passed",t.GOVERNANCE_WHALE_VOTE="governance_whale_vote",t.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",t.ITEM_SOLD="item_sold",t.ITEM_PUBLISHED="item_published",t.LAND_RENTAL_ENDED="rental_ended",t.LAND_RENTED="rental_started",t.REWARD_ASSIGNED="reward_assignment",t.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",t.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",t.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",t.REWARD_DELAYED="reward_delayed",t.REWARD_IN_PROGRESS="reward_in_progress",t.ROYALTIES_EARNED="royalties_earned",t.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",t.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",t.WORLDS_ACCESS_RESTORED="worlds_access_restored",t.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",t.WORLDS_MISSING_RESOURCES="worlds_missing_resources",t.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",t.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",t.CREDITS_GOAL_COMPLETED="credits_goal_completed",t.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",t.STREAMING_KEY_RESET="streaming_key_reset",t.STREAMING_KEY_REVOKE="streaming_key_revoke",t.STREAMING_KEY_EXPIRED="streaming_key_expired",t.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",t.STREAMING_PLACE_UPDATED="streaming_place_updated",t.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",t.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",t.CREDITS_REMINDER_USAGE="credits_reminder_usage",t.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",t.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",t.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",t.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",t.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",t.COMMUNITY_DELETED="community_deleted",t.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",t.COMMUNITY_RENAMED="community_renamed",t.COMMUNITY_MEMBER_BANNED="community_member_banned",t.COMMUNITY_MEMBER_REMOVED="community_member_removed",t.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",t.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",t.COMMUNITY_INVITE_RECEIVED="community_invite_received",t.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",t.COMMUNITY_POST_ADDED="community_post_added",t.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",t.USER_BANNED_FROM_SCENE="user_banned_from_scene",t.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",t.TRANSFER_RECEIVED="transfer_received",t.TIP_RECEIVED="tip_received",t.BANNED="banned",t.BAN_WARNING="ban_warning",t.BAN_LIFTED="ban_lifted"}(e.NotificationType||(e.NotificationType={})),function(t){t.COMMUNITY="community"}(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(bp);var q_={},Ep={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const t=ue,n=bp,r={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(n.NotificationType).reduce((a,s)=>(a[s]=r,a),{});(function(a){a.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(n.NotificationType),additionalProperties:!1,properties:i}}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Ep);var vp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,function(t){t.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const n=new RegExp(t.schema.pattern);t.validate=r=>n.test(r)}(e.Email||(e.Email={}))})(vp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const t=ue,n=Ep,r=Ii,i=vp;(function(a){a.schema={type:"object",required:["address","details"],properties:{address:r.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:n.SubscriptionDetails.schema}},a.validate=(0,t.generateLazyValidator)(a.schema)})(e.Subscription||(e.Subscription={}))})(q_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(bp,e),n(q_,e),n(Ep,e)})(G_);var W_={},mn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,function(t){(function(n){n.BLOCKCHAIN="blockchain",n.CATALYST_DEPLOYMENT="catalyst-deployment",n.WORLD="world",n.CLIENT="client",n.WEB="web",n.MARKETPLACE="marketplace",n.REWARDS="rewards",n.BADGE="badge",n.ASSET_BUNDLE="asset-bundle",n.SOCIAL_SERVICE="social-service",n.CREDITS_SERVICE="credits-service",n.STREAMING="streaming",n.COMMS="comms",n.REFERRAL="referral",n.COMMUNITY="community",n.CAMERA="camera",n.EVENT="event",n.GOVERNANCE="governance",n.MODERATION="moderation"})(t.Type||(t.Type={})),function(n){(function(r){r.BID_ACCEPTED="bid-accepted",r.ITEM_SOLD="item-sold",r.RENTAL_ENDED="land-rental-ended",r.RENTAL_STARTED="land-rental-started",r.ROYALTIES_EARNED="royalties-earned",r.COLLECTION_CREATED="collection-created",r.ITEM_PUBLISHED="item-published",r.TRANSFER_RECEIVED="transfer-received",r.TIP_RECEIVED="tip-received"})(n.Blockchain||(n.Blockchain={})),function(r){r.BID_RECEIVED="bid-received"}(n.Marketplace||(n.Marketplace={})),function(r){r.SCENE="scene",r.PROFILE="profile",r.WEARABLE="wearable",r.STORE="store",r.EMOTE="emote",r.OUTFITS="outfits"}(n.CatalystDeployment||(n.CatalystDeployment={})),function(r){r.DEPLOYMENT="deployment",r.WORLD_SETTINGS_CHANGED="world_settings_changed",r.WORLD_SCENES_UNDEPLOYMENT="world_scenes_undeployment",r.WORLD_UNDEPLOYMENT="world_undeployment",r.WORLD_SPAWN_COORDINATE_SET="world_spawn_coordinate_set",r.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",r.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",r.WORLDS_ACCESS_RESTORED="worlds_access_restored",r.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",r.WORLDS_MISSING_RESOURCES="worlds_missing_resources"}(n.Worlds||(n.Worlds={})),function(r){r.LOGGED_IN="logged-in",r.LOGGED_IN_CACHED="logged-in-cached",r.MOVE_TO_PARCEL="move-to-parcel",r.USED_EMOTE="used-emote",r.PASSPORT_OPENED="passport-opened",r.WALKED_DISTANCE="walked-distance",r.VERTICAL_HEIGHT_REACHED="vertical-height-reached"}(n.Client||(n.Client={})),function(r){r.AUTH_IDENTIFY="auth-identify"}(n.Web||(n.Web={})),function(r){r.REWARD_IN_PROGRESS="reward-in-progress",r.REWARD_ASSIGNED="reward-assigned",r.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",r.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",r.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",r.REWARD_DELAYED="reward-delayed"}(n.Rewards||(n.Rewards={})),function(r){r.GRANTED="badge-granted"}(n.Badge||(n.Badge={})),function(r){r.CONVERTED="converted",r.MANUALLY_QUEUED="manually-queued"}(n.AssetBundle||(n.AssetBundle={})),function(r){r.FRIENDSHIP_REQUEST="friendship-request",r.FRIENDSHIP_ACCEPTED="friendship-accepted"}(n.SocialService||(n.SocialService={})),function(r){r.CREDITS_GOAL_COMPLETED="credits-goal-completed",r.COMPLETE_GOALS_REMINDER="complete-goals-reminder",r.CLAIM_CREDITS_REMINDER="claim-credits-reminder",r.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",r.USAGE_REMINDER="usage-reminder",r.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",r.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",r.NEW_SEASON_REMINDER="new-season-reminder"}(n.CreditsService||(n.CreditsService={})),function(r){r.STREAMING_KEY_RESET="streaming-key-reset",r.STREAMING_KEY_REVOKE="streaming-key-revoke",r.STREAMING_KEY_EXPIRED="streaming-key-expired",r.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",r.STREAMING_PLACE_UPDATED="streaming-place-updated",r.COMMUNITY_STREAMING_ENDED="community-streaming-ended"}(n.Streaming||(n.Streaming={})),function(r){r.USER_JOINED_ROOM="user-joined-room",r.USER_LEFT_ROOM="user-left-room",r.USER_BANNED_FROM_SCENE="user-banned-from-scene",r.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"}(n.Comms||(n.Comms={})),function(r){r.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",r.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"}(n.Referral||(n.Referral={})),function(r){r.DELETED="community-deleted",r.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",r.RENAMED="community-renamed",r.MEMBER_BANNED="community-member-banned",r.MEMBER_LEFT="community-member-left",r.MEMBER_REMOVED="community-member-removed",r.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",r.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",r.INVITE_RECEIVED="community-invite-received",r.OWNERSHIP_TRANSFERRED="community-ownership-transferred",r.POST_ADDED="community-post-added",r.VOICE_CHAT_STARTED="community-voice-chat-started"}(n.Community||(n.Community={})),function(r){r.PHOTO_TAKEN="photo-taken",r.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"}(n.Camera||(n.Camera={})),function(r){r.EVENT_CREATED="event-created",r.EVENT_STARTS_SOON="event-starts-soon",r.EVENT_STARTED="event-started",r.EVENT_ENDED="event-ended"}(n.Event||(n.Event={})),function(r){r.PROPOSAL_ENACTED="governance_proposal_enacted",r.COAUTHOR_REQUESTED="governance_coauthor_requested",r.PITCH_PASSED="governance_pitch_passed",r.TENDER_PASSED="governance_tender_passed",r.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",r.VOTING_ENDED_VOTER="governance_voting_ended_voter",r.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",r.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",r.WHALE_VOTE="governance_whale_vote",r.VOTED_ON_BEHALF="governance_voted_on_behalf",r.CLIFF_ENDED="governance_cliff_ended"}(n.Governance||(n.Governance={})),function(r){r.USER_BAN_CREATED="user-ban-created",r.USER_BAN_LIFTED="user-ban-lifted",r.USER_WARNING_CREATED="user-warning-created"}(n.Moderation||(n.Moderation={}))}(t.SubType||(t.SubType={}))}(e.Events||(e.Events={}))})(mn);var z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.ItemSoldEvent||(e.ItemSoldEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RentalEndedEvent||(e.RentalEndedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RentalStartedEvent||(e.RentalStartedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BLOCKCHAIN},subType:{type:"string",const:n.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},amount:{type:"string"}},required:["senderAddress","receiverAddress","amount"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.TipReceivedEvent||(e.TipReceivedEvent={}))})(z_);var Y_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const t=cs,n=ue,r=yp,i=mn;(function(a){a.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:r.Entity.schema,authChain:t.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},a.validate=(0,n.generateLazyValidator)(a.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Y_);var K_={};Object.defineProperty(K_,"__esModule",{value:!0});var X_={};Object.defineProperty(X_,"__esModule",{value:!0});var J_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MARKETPLACE},subType:{type:"string",const:n.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(J_);var Z_={},ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.createEventSchema=void 0;function _T(e,t,n){return{type:"object",properties:{type:{type:"string",const:e},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}ea.createEventSchema=_T;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},a={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),s.validate=(0,t.generateLazyValidator)(s.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_ASSIGNED,i),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),function(s){s.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_DELAYED,i),s.validate=(0,t.generateLazyValidator)(s.schema)}(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Z_);var Q_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.BADGE},subType:{type:"string",const:n.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:n.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:n.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:n.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:n.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:n.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Q_);var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_RESET,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})($_);var eb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const t=ue,n=mn;var r;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(r=e.RoomType||(e.RoomType={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(r)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(r)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMS},subType:{type:"string",const:n.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(eb);var tb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(tb);var nb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_LEFT},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},memberAddress:{type:"string"}},required:["id","memberAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.COMMUNITY},subType:{type:"string",const:n.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(nb);var rb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CAMERA},subType:{type:"string",const:n.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.CAMERA},subType:{type:"string",const:n.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(rb);var ib={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventCreatedEvent||(e.EventCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.EVENT},subType:{type:"string",const:n.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.EventEndedEvent||(e.EventEndedEvent={}))})(ib);var ab={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const t=ue,n=mn,r=ea,i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PROPOSAL_ENACTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.COAUTHOR_REQUESTED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PITCH_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.TENDER_PASSED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTING_ENDED_VOTER,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.WHALE_VOTE,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTED_ON_BEHALF,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),function(a){a.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.CLIFF_ENDED,i),a.validate=(0,t.generateLazyValidator)(a.schema)}(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(ab);var sb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;const t=cs,n=ue,r=mn;(function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},title:{type:"string",nullable:!0},description:{type:"string",nullable:!0},contentRating:{type:"string",nullable:!0},skyboxTime:{type:"number",nullable:!0},categories:{type:"array",items:{type:"string"},nullable:!0},singlePlayer:{type:"boolean",nullable:!0},showInPlaces:{type:"boolean",nullable:!0},thumbnailUrl:{type:"string",nullable:!0},accessType:{type:"string",nullable:!0}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string",pattern:"^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$"},oldCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1,nullable:!0},newCoordinate:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"],additionalProperties:!1}},required:["name","oldCoordinate","newCoordinate"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"},scenes:{type:"array",items:{type:"object",properties:{entityId:{type:"string"},baseParcel:{type:"string"}},required:["entityId","baseParcel"],additionalProperties:!1},minItems:1}},required:["worldName","scenes"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{worldName:{type:"string"}},required:["worldName"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:t.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),function(i){i.schema={type:"object",properties:{type:{type:"string",const:r.Events.Type.WORLD},subType:{type:"string",const:r.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,n.generateLazyValidator)(i.schema)}(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(sb);var ob={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;const t=ue,n=mn;(function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},bannedBy:{type:"string"},reason:{type:"string"},bannedAt:{type:"number",minimum:0},expiresAt:{type:"number",nullable:!0,minimum:0},customMessage:{type:"string",nullable:!0}},required:["id","bannedAddress","bannedBy","reason","bannedAt","expiresAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},bannedAddress:{type:"string"},liftedBy:{type:"string"},liftedAt:{type:"number",minimum:0}},required:["id","bannedAddress","liftedBy","liftedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),function(r){r.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.MODERATION},subType:{type:"string",const:n.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{id:{type:"string"},warnedAddress:{type:"string"},warnedBy:{type:"string"},reason:{type:"string"},warnedAt:{type:"number",minimum:0}},required:["id","warnedAddress","warnedBy","reason","warnedAt"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})(ob);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(mn,e),n(z_,e),n(Y_,e),n(K_,e),n(X_,e),n(J_,e),n(Z_,e),n(Q_,e),n($_,e),n(eb,e),n(tb,e),n(nb,e),n(rb,e),n(ib,e),n(ab,e),n(sb,e),n(ob,e)})(W_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(C_,e),n(M_,e),n(x_(),e),n(os,e),n(fp,e),n(H_,e),n(yp,e),n(U_,e),n(j_,e),n(G_,e),n(W_,e)})(Ju);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=eo,n=Ti,r=Yu,i=ue,a=Ju;(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:n.WearableCategory.schema},hides:{type:"array",items:n.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(R_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(O_,e),n(R_,e)})(A_);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(S_,e),n(A_,e)})(v_);var cb={},ub={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=ue;(function(n){n.MOST_SALES="most_sales",n.MOST_PURCHASES="most_purchases",n.MOST_SPENT="most_spent",n.MOST_EARNED="most_earned",n.MOST_ROYALTIES="most_royalties",n.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),function(n){n.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Account||(e.Account={}))})(ub);var Vl={},Gl={},Qh;function lb(){return Qh||(Qh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=ue,n=hr();var r;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai",a.MATIC_AMOY="Amoy",a.AVALANCHE_MAINNET="Avalanche",a.BINANCE_MAINNET="Binance Smart Chain",a.ARBITRUM_MAINNET="Arbitrum",a.OPTIMISM_MAINNET="Optimism",a.FANTOM_MAINNET="Fantom"})(r=e.ChainName||(e.ChainName={}));function i(a){switch(a){case r.ETHEREUM_MAINNET:return n.ChainId.ETHEREUM_MAINNET;case r.ETHEREUM_ROPSTEN:return n.ChainId.ETHEREUM_ROPSTEN;case r.ETHEREUM_RINKEBY:return n.ChainId.ETHEREUM_RINKEBY;case r.ETHEREUM_GOERLI:return n.ChainId.ETHEREUM_GOERLI;case r.ETHEREUM_KOVAN:return n.ChainId.ETHEREUM_KOVAN;case r.ETHEREUM_SEPOLIA:return n.ChainId.ETHEREUM_SEPOLIA;case r.MATIC_MAINNET:return n.ChainId.MATIC_MAINNET;case r.MATIC_MUMBAI:return n.ChainId.MATIC_MUMBAI;case r.MATIC_AMOY:return n.ChainId.MATIC_AMOY;case r.AVALANCHE_MAINNET:return n.ChainId.AVALANCHE_MAINNET;case r.BINANCE_MAINNET:return n.ChainId.BSC_MAINNET;case r.ARBITRUM_MAINNET:return n.ChainId.ARBITRUM_MAINNET;case r.OPTIMISM_MAINNET:return n.ChainId.OPTIMISM_MAINNET;case r.FANTOM_MAINNET:return n.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,t.generateLazyValidator)(a.schema)}(r=e.ChainName||(e.ChainName={}))}(Gl)),Gl}var Jn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=ue;(function(n){n.ETHEREUM="ETHEREUM",n.MATIC="MATIC",n.AVALANCHE="AVALANCHE",n.BSC="BINANCE SMART CHAIN",n.OPTIMISM="OPTIMISM",n.ARBITRUM="ARBITRUM",n.FANTOM="FANTOM"})(e.Network||(e.Network={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Network||(e.Network={}))})(Jn);var $h;function hr(){return $h||($h=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=ue,n=lb(),r=Jn;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI",u[u.MATIC_AMOY=80002]="MATIC_AMOY",u[u.BSC_MAINNET=56]="BSC_MAINNET",u[u.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",u[u.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",u[u.FANTOM_MAINNET=250]="FANTOM_MAINNET",u[u.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function a(u){switch(u){case i.ETHEREUM_MAINNET:return n.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return n.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return n.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return n.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return n.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return n.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return n.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return n.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return n.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return n.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return n.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return n.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return n.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return n.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function s(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=s;function o(u){const f={[r.Network.BSC]:i.BSC_MAINNET,[r.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[r.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[r.Network.FANTOM]:i.FANTOM_MAINNET,[r.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(u){case i.ETHEREUM_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f);case i.ETHEREUM_ROPSTEN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_RINKEBY:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_GOERLI:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_KOVAN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.ETHEREUM_SEPOLIA:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[r.Network.MATIC]:i.MATIC_AMOY},f);case i.MATIC_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f);case i.MATIC_MUMBAI:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MUMBAI,[r.Network.MATIC]:i.MATIC_MUMBAI},f);case i.MATIC_AMOY:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_AMOY,[r.Network.MATIC]:i.MATIC_AMOY},f);default:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},f)}}e.getNetworkMapping=o;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return r.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return r.Network.MATIC;case i.BSC_MAINNET:return r.Network.BSC;case i.OPTIMISM_MAINNET:return r.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return r.Network.ARBITRUM;case i.FANTOM_MAINNET:return r.Network.FANTOM;case i.AVALANCHE_MAINNET:return r.Network.AVALANCHE}}e.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,t.generateLazyValidator)(u.schema)}(i=e.ChainId||(e.ChainId={}))}(Vl)),Vl}var db={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=ue,n=hr(),r=Jn;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Collection||(e.Collection={}))})(db);var fb={},to={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=ue;(function(n){n.PARCEL="parcel",n.ESTATE="estate",n.WEARABLE="wearable",n.ENS="ens",n.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.NFTCategory||(e.NFTCategory={}))})(to);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=ue,n=hr(),r=Jn,i=to;(function(a){a.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:r.Network.schema,chainId:n.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Contract||(e.Contract={}))})(fb);var pb={},Sp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=ue,n=hr(),r=Ju,i=Jn,a=to,s=eo,o=Ti;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:r.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:n.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,t.generateLazyValidator)(c.schema)}(e.NFT||(e.NFT={}))})(Sp);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=ue,n=hr(),r=Jn,i=Sp,a=to;(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:r.Network.schema,chainId:n.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)}(e.Item||(e.Item={}))})(pb);var el={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=ue;(function(n){n.OPEN="open",n.SOLD="sold",n.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ListingStatus||(e.ListingStatus={}))})(el);var hb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(hb);var mb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=ue,n=hr(),r=Jn;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Mint||(e.Mint={}))})(mb);var gb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"}(e.CatalogSortBy||(e.CatalogSortBy={})),function(t){t.ASC="asc",t.DESC="desc"}(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(gb);var yb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=ue,n=hr(),r=el,i=Jn;(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:r.ListingStatus.schema,network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Order||(e.Order={}))})(yb);var _b={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=ue;(function(n){n.INJECTED="injected",n.MAGIC="magic",n.MAGIC_TEST="magic_test",n.FORTMATIC="formatic",n.NETWORK="network",n.WALLET_CONNECT="wallet_connect",n.WALLET_CONNECT_V2="wallet_connect_v2",n.WALLET_LINK="wallet_link",n.METAMASK_MOBILE="metamask_mobile",n.AUTH_SERVER="auth_server",n.THIRDWEB="thirdweb"})(e.ProviderType||(e.ProviderType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProviderType||(e.ProviderType={}))})(_b);var wp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=ue;(function(n){n.ORDER="order",n.BID="bid",n.MINT="mint"})(e.SaleType||(e.SaleType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SaleType||(e.SaleType={}))})(wp);var bb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=ue,n=hr(),r=wp,i=Jn;(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},type:r.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:n.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Sale||(e.Sale={}))})(bb);var Eb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=ue,n=hr(),r=Jn;(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),function(a){a.ASC="asc",a.DESC="desc"}(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),function(a){a.PARCEL="parcel",a.ESTATE="estate"}(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"}(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,t.generateLazyValidator)(a.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),function(a){a.schema={type:"object",properties:{network:r.Network.schema,chainId:n.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.RentalListingCreation||(e.RentalListingCreation={}))})(Eb);var vb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,function(t){t.DATE="date",t.MOST_SALES="most_sales"}(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(vb);var Sb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Store||(e.Store={}))})(Sb);var wb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=ue;(function(n){n.MALE="male",n.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),function(n){n.MALE="male",n.FEMALE="female",n.UNISEX="unisex"}(e.GenderFilterOption||(e.GenderFilterOption={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableGender||(e.WearableGender={}))})(wb);var Tb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=ue;function n(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=n;function r(i,a){const s=n().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}e.isInsideWorldLimits=r,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.World||(e.World={}))})(Tb);var Ib={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=ue,n=hr(),r=el,i=Jn;(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),function(a){const s={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:r.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};a.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...s.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},s.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...s.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},a.validate=(0,t.generateLazyValidator)(a.schema)}(e.Bid||(e.Bid={}))})(Ib);var Ab={};Object.defineProperty(Ab,"__esModule",{value:!0});var Ob={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,function(t){t.BID="bid",t.PUBLIC_NFT_ORDER="public_nft_order",t.PUBLIC_ITEM_ORDER="public_item_order"}(e.TradeType||(e.TradeType={})),function(t){t[t.ERC20=1]="ERC20",t[t.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",t[t.ERC721=3]="ERC721",t[t.COLLECTION_ITEM=4]="COLLECTION_ITEM"}(e.TradeAssetType||(e.TradeAssetType={})),function(t){t.SENT="sent",t.RECEIVED="received"}(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ob);var Rb={},Cb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=ue;(function(n){n.STATIC="static",n.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewCamera||(e.PreviewCamera={}))})(Cb);var Nb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,function(t){t.AUTH="authentication",t.BUILDER="builder",t.MARKETPLACE="marketplace",t.PROFILE="profile",t.CONFIG="configurator",t.JESUS="jesus"}(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Nb);var Mb={};Object.defineProperty(Mb,"__esModule",{value:!0});var Pb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=ue;(function(n){n.ANIMATION_PLAY="animation_play",n.ANIMATION_PAUSE="animation_pause",n.ANIMATION_LOOP="animation_loop",n.ANIMATION_END="animation_end",n.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Pb);var kb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=ue;(function(n){n.IDLE="idle",n.WALK="walk",n.RUN="run",n.JUMP="jump",n.CLAP="clap",n.DAB="dab",n.DANCE="dance",n.FASHION="fashion",n.FASHION_2="fashion-2",n.FASHION_3="fashion-3",n.FASHION_4="fashion-4",n.LOVE="love",n.MONEY="money",n.FIST_PUMP="fist-pump",n.HEAD_EXPLODE="head-explode",n.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmote||(e.PreviewEmote={}))})(kb);var Lb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const t=ue;(function(r){r.READY="ready",r.LOAD="load",r.ERROR="error",r.UPDATE="update",r.CONTROLLER_REQUEST="controller_request",r.CONTROLLER_RESPONSE="controller_response",r.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),function(r){r.BABYLON="babylon",r.UNITY="unity"}(e.PreviewRenderer||(e.PreviewRenderer={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PreviewMessageType||(e.PreviewMessageType={}));const n=(r,i,a,s="*")=>{const o={type:i,payload:a};r.postMessage(o,s)};e.sendMessage=n})(Lb);var Db={};Object.defineProperty(Db,"__esModule",{value:!0});var Bb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=ue;(function(n){n.ORTHOGRAPHIC="orthographic",n.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewProjection||(e.PreviewProjection={}))})(Bb);var Fb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=ue;(function(n){n.TEXTURE="texture",n.WEARABLE="wearable",n.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewType||(e.PreviewType={}))})(Fb);var xb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpringBoneParams=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{stiffness:{type:"number",minimum:0,maximum:5},gravityPower:{type:"number",minimum:0,maximum:10},gravityDir:{type:"array",items:[{type:"number"},{type:"number"},{type:"number"}],minItems:3,maxItems:3},dragForce:{type:"number",minimum:0,maximum:1},center:{type:"integer",minimum:0,nullable:!0}},required:["stiffness","gravityPower","gravityDir","dragForce"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})(xb);var Hb={};Object.defineProperty(Hb,"__esModule",{value:!0});var Ub={};Object.defineProperty(Ub,"__esModule",{value:!0});var jb={};Object.defineProperty(jb,"__esModule",{value:!0});var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0});var Gb={};Object.defineProperty(Gb,"__esModule",{value:!0});var qb={};Object.defineProperty(qb,"__esModule",{value:!0});var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0});var zb={};Object.defineProperty(zb,"__esModule",{value:!0});(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Cb,e),n(Nb,e),n(Mb,e),n(Pb,e),n(kb,e),n(Lb,e),n(Db,e),n(Bb,e),n(Fb,e),n(xb,e),n(Hb,e),n(Ub,e),n(jb,e),n(Vb,e),n(Gb,e),n(qb,e),n(Wb,e),n(zb,e)})(Rb);var Yb={},tl={};Object.defineProperty(tl,"__esModule",{value:!0});tl.isSysLink=void 0;const bT=e=>e!==null&&typeof e=="object"&&"sys"in e&&"id"in e.sys;tl.isSysLink=bT;var nl={};Object.defineProperty(nl,"__esModule",{value:!0});nl.ContentfulLocale=void 0;var Zd;(function(e){e.enUS="en-US",e.es="es",e.zh="zh"})(Zd||(Zd={}));nl.ContentfulLocale=Zd;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0});(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(tl,e),n(nl,e),n(Kb,e)})(Yb);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(G,W,z,ae){ae===void 0&&(ae=z);var Ee=Object.getOwnPropertyDescriptor(W,z);(!Ee||("get"in Ee?!W.__esModule:Ee.writable||Ee.configurable))&&(Ee={enumerable:!0,get:function(){return W[z]}}),Object.defineProperty(G,ae,Ee)}:function(G,W,z,ae){ae===void 0&&(ae=z),G[ae]=W[z]}),n=ie&&ie.__exportStar||function(G,W){for(var z in G)z!=="default"&&!Object.prototype.hasOwnProperty.call(W,z)&&t(W,G,z)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var r=ub;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return r.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return r.AccountSortBy}});var i=hr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var a=lb();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return a.getChainId}});var s=db;Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return s.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return s.CollectionSortBy}});var o=fb;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return o.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return o.ContractSortBy}});var c=pb;Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return c.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return c.ItemSortBy}});var u=el;Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return u.ListingStatus}});var f=hb;Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return f.MetaTransaction}});var l=mb;Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return l.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return l.MintSortBy}});var m=Jn;Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return m.Network}});var g=to;Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return g.NFTCategory}});var _=Sp;Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var T=gb;Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return T.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return T.CatalogSortDirection}});var B=yb;Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return B.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return B.OrderSortBy}});var U=_b;Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return U.ProviderType}});var J=eo;Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return J.Rarity}});var K=wp;Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return K.SaleType}});var H=bb;Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return H.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return H.SaleSortBy}});var F=Eb;Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return F.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return F.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return F.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return F.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return F.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return F.PeriodCreation}});var k=vb;Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return k.AnalyticsDayDataSortBy}});var j=Sb;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return j.Store}});var te=wb;Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return te.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return te.GenderFilterOption}});var L=Tb;Object.defineProperty(e,"World",{enumerable:!0,get:function(){return L.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return L.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return L.isInsideWorldLimits}}),n(Ib,e),n(Ab,e),n(Ob,e),n(Rb,e),n(Yb,e)})(cb);var Xb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=ue;(function(n){n.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Xb);var Jb={},Zb={},no={};Object.defineProperty(no,"__esModule",{value:!0});no.isInExceptionBlock=void 0;function ET(e,t){return e>=62&&e<=150&&t>=151&&t<=158}function vT(e,t){return e>=151&&e<=162&&t>=144&&t<=158}function ST(e,t){return e>=151&&e<=163&&t>=59&&t<=143}function wT(e,t){return ET(e,t)||vT(e,t)||ST(e,t)}no.isInExceptionBlock=wT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const t=ue,n=no;e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},function(r){r._isInLimits={keyword:"_isInLimits",validate:function(g,_){return!_||typeof _.x!="number"||typeof _.y!="number"?!1:o(_)||(0,n.isInExceptionBlock)(_.x,_.y)},errors:!1},r.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema,[r._isInLimits]);function i({x:m,y:g}){return`${m},${g}`}r.parcelToString=i;function a(m){const g=m.match(/^(-?\d+),(-?\d+)$/);if(!g)return null;const[,_,T]=g,B=parseInt(_,10),U=parseInt(T,10);return{x:B,y:U}}r.stringToParcel=a;function s(m){const g=a(m);return g?r.validate(g):!1}r.isParcelStringValid=s;function o(m){const{x:g,y:_}=m;return g>=e.PARCEL_LIMITS.minX&&g<=e.PARCEL_LIMITS.maxX&&_>=e.PARCEL_LIMITS.minY&&_<=e.PARCEL_LIMITS.maxY}r.isInStandardBounds=o;function c(m){return(0,n.isInExceptionBlock)(m.x,m.y)}r.isExceptionParcel=c;function u(m){return o(m)||c(m)}r.isInBounds=u;function f(m){return r.validate(m)}r.isValid=f;function l(m){const g=a(m);return g?r.validate(g):!1}r.isValidString=l}(e.Parcel||(e.Parcel={}))})(Zb);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.validateUrlInstance=Fa.validateUrl=void 0;const TT={allowLocalhost:!1,allowedPorts:[]};function Qb(e,t=2){let n=e;for(let r=0;r<t;r++)try{n=decodeURIComponent(n)}catch{break}return n.normalize("NFKC")}function Fs(e){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(e)}function IT(e){return!!(e.username||e.password)}function Ca(e){return/\\/.test(e)}const AT=["80","443"];function OT(e,t){return!!e.port&&!t.includes(e.port)}function RT(e){const t=e.toLowerCase();return!!(t==="localhost"||t.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(t)||t==="::1"||t==="[::1]"||t.startsWith("fe80:")||t.startsWith("fc00:"))}function CT(e){if(e.startsWith("//"))return null;try{return{url:new URL(e),wasRelative:!1}}catch{try{return{url:new URL(e,"https://example.com"),wasRelative:!0}}catch{return null}}}function em(e){const t=Qb(String(e).toLowerCase());return!(Fs(t)||Ca(t))}function NT(e){return!(!e||e.includes("..")||e.includes("//")||Fs(e)||Ca(e))}function $b(e,t={}){const n=Object.assign(Object.assign({},TT),t),r=[...AT,...n.allowedPorts];if(!e||e.length===0||e.length>4096||Fs(e)||Ca(e))return!1;const i=Qb(e);if(Fs(i)||Ca(i)||e.startsWith("//"))return!1;const a=CT(e);if(!a)return!1;const{url:s,wasRelative:o}=a;if(s.protocol!=="http:"&&s.protocol!=="https:"&&s.protocol!==""||IT(s)||Ca(e)||Ca(s.href)||!o&&(OT(s,r)||!n.allowLocalhost&&s.hostname&&RT(s.hostname))||!NT(s.pathname)||s.pathname.length>2048)return!1;const c=Array.from(s.searchParams.entries());if(c.length>50||(s.search?s.search.startsWith("?")?s.search.length-1:s.search.length:0)>2048)return!1;for(const[f,l]of c)if(f.length===0||!em(f)||!em(l)||f.length>128||l.length>1024)return!1;return!(s.hash&&Fs(s.hash))}Fa.validateUrl=$b;function MT(e,t={}){return $b(e.toString(),t)}Fa.validateUrlInstance=MT;(function(e){var t=ie&&ie.__createBinding||(Object.create?function(r,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,s,o)}:function(r,i,a,s){s===void 0&&(s=a),r[s]=i[a]}),n=ie&&ie.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Zb,e),n(no,e),n(Fa,e)})(Jb);(function(e){var t=ie&&ie.__createBinding||(Object.create?function(s,o,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(o,c);(!f||("get"in f?!o.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return o[c]}}),Object.defineProperty(s,u,f)}:function(s,o,c,u){u===void 0&&(u=c),s[u]=o[c]}),n=ie&&ie.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),r=ie&&ie.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var c in s)c!=="default"&&Object.prototype.hasOwnProperty.call(s,c)&&t(o,s,c);return n(o,s),o},i=ie&&ie.__exportStar||function(s,o){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&t(o,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const a=r(v_);e.sdk=a,i(ue,e),i(cb,e),i(Ju,e),i(Ii,e),i(Xb,e),i(cs,e),i(_p,e),i(vp,e),i(Jb,e)})(E_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=E_;Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}})})(b_);var rl={};Object.defineProperty(rl,"__esModule",{value:!0});rl.moveMinutes=void 0;function PT(e){const t=new Date;return t.setMinutes(t.getMinutes()+e),t}rl.moveMinutes=PT;var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0});const Ts=Wu;class kT{constructor(t,n=!0){this.requestManager=t,this.checkedBlocks={},this.saveBlocks=n,n&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const t=await this.getBlockWrapper("latest"),n=await this.getBlockWrapper(1);this.blockTime=(t.timestamp-n.timestamp)/Number(t.number)-1,this.firstTimestamp=n.timestamp}async getDate(t,n=!0){const r=t/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),r<this.firstTimestamp)return{block:1,timestamp:r};if(r>=i||r>this.savedBlocks.latest.timestamp)return{block:(0,Ts.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];const a=await this.getBlockWrapper(Math.ceil((r-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(r,a,n),timestamp:r}}async findBetter(t,n,r,i=this.blockTime){if(await this.isBetterBlock(t,n,r))return n.number;const a=t-n.timestamp;let s=Math.ceil(a/i);s===0&&(s=a<0?-1:1);const o=await this.getBlockWrapper(this.getNextBlock(t,n.number,s));return i=Math.abs((n.timestamp-o.timestamp)/(n.number-o.number)),this.findBetter(t,o,r,i)}async isBetterBlock(t,n,r){const i=n.timestamp;if(r){if(i<t)return!1;const a=await this.getBlockWrapper(n.number-1);if(i>=t&&a.timestamp<t)return!0}else{if(i>=t)return!1;const a=await this.getBlockWrapper(n.number+1);if(i<t&&a.timestamp>=t)return!0}return!1}getNextBlock(t,n,r){const i=n+r;return this.checkedBlocks[t].includes(i)?this.getNextBlock(t,n,r<0?++r:--r):(this.checkedBlocks[t].push(i),i)}async getBlockWrapper(t){if(!this.saveBlocks){const r=await this.requestManager.eth_getBlockByNumber(t,!1);return{number:(0,Ts.toBigNumber)(r.number).toNumber(),timestamp:(0,Ts.toBigNumber)(r.timestamp).toNumber()}}if(this.savedBlocks[t.toString()])return this.savedBlocks[t];if(typeof t=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=t)return this.savedBlocks.latest;const{timestamp:n}=await this.requestManager.eth_getBlockByNumber(t,!1);return this.savedBlocks[t.toString()]={number:(0,Ts.toBigNumber)(t==="latest"?await this.requestManager.eth_blockNumber():t).toNumber(),timestamp:(0,Ts.toBigNumber)(n).toNumber()},this.requests++,this.savedBlocks[t.toString()]}}Tp.default=kT;var hn={},Ip={},eE={},ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.output=ln.exists=ln.hash=ln.bytes=ln.bool=ln.number=void 0;function lu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ln.number=lu;function tE(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ln.bool=tE;function Ap(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}ln.bytes=Ap;function nE(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");lu(e.outputLen),lu(e.blockLen)}ln.hash=nE;function rE(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ln.exists=rE;function iE(e,t){Ap(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}ln.output=iE;const LT={number:lu,bool:tE,bytes:Ap,hash:nE,exists:rE,output:iE};ln.default=LT;var xa={},il={};Object.defineProperty(il,"__esModule",{value:!0});il.crypto=void 0;il.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const t=il,n=H=>new Uint8Array(H.buffer,H.byteOffset,H.byteLength);e.u8=n;const r=H=>new Uint32Array(H.buffer,H.byteOffset,Math.floor(H.byteLength/4));e.u32=r;const i=H=>new DataView(H.buffer,H.byteOffset,H.byteLength);e.createView=i;const a=(H,F)=>H<<32-F|H>>>F;if(e.rotr=a,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},(H,F)=>F.toString(16).padStart(2,"0"));function o(H){if(!(H instanceof Uint8Array))throw new Error("Uint8Array expected");let F="";for(let k=0;k<H.length;k++)F+=s[H[k]];return F}e.bytesToHex=o;function c(H){if(typeof H!="string")throw new TypeError("hexToBytes: expected string, got "+typeof H);if(H.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const F=new Uint8Array(H.length/2);for(let k=0;k<F.length;k++){const j=k*2,te=H.slice(j,j+2),L=Number.parseInt(te,16);if(Number.isNaN(L)||L<0)throw new Error("Invalid byte sequence");F[k]=L}return F}e.hexToBytes=c;const u=async()=>{};e.nextTick=u;async function f(H,F,k){let j=Date.now();for(let te=0;te<H;te++){k(te);const L=Date.now()-j;L>=0&&L<F||(await(0,e.nextTick)(),j+=L)}}e.asyncLoop=f;function l(H){if(typeof H!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof H}`);return new TextEncoder().encode(H)}e.utf8ToBytes=l;function m(H){if(typeof H=="string"&&(H=l(H)),!(H instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof H})`);return H}e.toBytes=m;function g(...H){if(!H.every(j=>j instanceof Uint8Array))throw new Error("Uint8Array list expected");if(H.length===1)return H[0];const F=H.reduce((j,te)=>j+te.length,0),k=new Uint8Array(F);for(let j=0,te=0;j<H.length;j++){const L=H[j];k.set(L,te),te+=L.length}return k}e.concatBytes=g;class _{clone(){return this._cloneInto()}}e.Hash=_;const T=H=>Object.prototype.toString.call(H)==="[object Object]"&&H.constructor===Object;function B(H,F){if(F!==void 0&&(typeof F!="object"||!T(F)))throw new TypeError("Options should be object or undefined");return Object.assign(H,F)}e.checkOpts=B;function U(H){const F=j=>H().update(m(j)).digest(),k=H();return F.outputLen=k.outputLen,F.blockLen=k.blockLen,F.create=()=>H(),F}e.wrapConstructor=U;function J(H){const F=(j,te)=>H(te).update(m(j)).digest(),k=H({});return F.outputLen=k.outputLen,F.blockLen=k.blockLen,F.create=j=>H(j),F}e.wrapConstructorWithOpts=J;function K(H=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(H));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(H).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=K})(xa);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=ln,n=xa;class r extends n.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,t.default.hash(s);const c=(0,n.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,f=new Uint8Array(u);f.set(c.length>u?s.create().update(c).digest():c);for(let l=0;l<f.length;l++)f[l]^=54;this.iHash.update(f),this.oHash=s.create();for(let l=0;l<f.length;l++)f[l]^=106;this.oHash.update(f),f.fill(0)}update(s){return t.default.exists(this),this.iHash.update(s),this}digestInto(s){t.default.exists(this),t.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:c,finished:u,destroyed:f,blockLen:l,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=f,s.blockLen=l,s.outputLen=m,s.oHash=o._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(a,s,o)=>new r(a,s).update(o).digest();e.hmac=i,e.hmac.create=(a,s)=>new r(a,s)})(eE);var Yi={},al={};Object.defineProperty(al,"__esModule",{value:!0});al.SHA2=void 0;const ql=ln,Is=xa;function DT(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}class BT extends Is.Hash{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,Is.createView)(this.buffer)}update(t){ql.default.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=(0,Is.toBytes)(t);const a=t.length;for(let s=0;s<a;){const o=Math.min(i-this.pos,a-s);if(o===i){const c=(0,Is.createView)(t);for(;i<=a-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){ql.default.exists(this),ql.default.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:a}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let l=s;l<i;l++)n[l]=0;DT(r,i-8,BigInt(this.length*8),a),this.process(r,0);const o=(0,Is.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)o.setUint32(4*l,f[l],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:a,destroyed:s,pos:o}=this;return t.length=i,t.pos=o,t.finished=a,t.destroyed=s,i%n&&t.buffer.set(r),t}}al.SHA2=BT;Object.defineProperty(Yi,"__esModule",{value:!0});Yi.sha224=Yi.sha256=void 0;const FT=al,zn=xa,xT=(e,t,n)=>e&t^~e&n,HT=(e,t,n)=>e&t^e&n^t&n,UT=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ci=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ui=new Uint32Array(64);class aE extends FT.SHA2{constructor(){super(64,32,8,!1),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0}get(){const{A:t,B:n,C:r,D:i,E:a,F:s,G:o,H:c}=this;return[t,n,r,i,a,s,o,c]}set(t,n,r,i,a,s,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=a|0,this.F=s|0,this.G=o|0,this.H=c|0}process(t,n){for(let l=0;l<16;l++,n+=4)ui[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const m=ui[l-15],g=ui[l-2],_=(0,zn.rotr)(m,7)^(0,zn.rotr)(m,18)^m>>>3,T=(0,zn.rotr)(g,17)^(0,zn.rotr)(g,19)^g>>>10;ui[l]=T+ui[l-7]+_+ui[l-16]|0}let{A:r,B:i,C:a,D:s,E:o,F:c,G:u,H:f}=this;for(let l=0;l<64;l++){const m=(0,zn.rotr)(o,6)^(0,zn.rotr)(o,11)^(0,zn.rotr)(o,25),g=f+m+xT(o,c,u)+UT[l]+ui[l]|0,T=((0,zn.rotr)(r,2)^(0,zn.rotr)(r,13)^(0,zn.rotr)(r,22))+HT(r,i,a)|0;f=u,u=c,c=o,o=s+g|0,s=a,a=i,i=r,r=g+T|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,i,a,s,o,c,u,f)}roundClean(){ui.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class jT extends aE{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Yi.sha256=(0,zn.wrapConstructor)(()=>new aE);Yi.sha224=(0,zn.wrapConstructor)(()=>new jT);var Qd={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=$w,n=BigInt(0),r=BigInt(1),i=BigInt(2),a=BigInt(3),s=BigInt(8),o=Object.freeze({a:n,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=o;const c=(C,b)=>(C+b/i)/b,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(C){const{n:b}=o,A=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),D=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Y=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ee=A,me=BigInt("0x100000000000000000000000000000000"),_e=c(ee*C,b),De=c(-D*C,b);let Me=ce(C-_e*A-De*Y,b),ze=ce(-_e*D-De*ee,b);const ut=Me>me,lt=ze>me;if(ut&&(Me=b-Me),lt&&(ze=b-ze),Me>me||ze>me)throw new Error("splitScalarEndo: Endomorphism failed, k="+C);return{k1neg:ut,k1:Me,k2neg:lt,k2:ze}}},f=32,l=32,m=32,g=f+1,_=2*f+1;function T(C){const{a:b,b:A}=o,D=ce(C*C),Y=ce(D*C);return ce(Y+b*C+A)}const B=o.a===n;class U extends Error{constructor(b){super(b)}}function J(C){if(!(C instanceof K))throw new TypeError("JacobianPoint expected")}class K{constructor(b,A,D){this.x=b,this.y=A,this.z=D}static fromAffine(b){if(!(b instanceof k))throw new TypeError("JacobianPoint#fromAffine: expected Point");return b.equals(k.ZERO)?K.ZERO:new K(b.x,b.y,r)}static toAffineBatch(b){const A=tn(b.map(D=>D.z));return b.map((D,Y)=>D.toAffine(A[Y]))}static normalizeZ(b){return K.toAffineBatch(b).map(K.fromAffine)}equals(b){J(b);const{x:A,y:D,z:Y}=this,{x:ee,y:me,z:_e}=b,De=ce(Y*Y),Me=ce(_e*_e),ze=ce(A*Me),ut=ce(ee*De),lt=ce(ce(D*_e)*Me),Vt=ce(ce(me*Y)*De);return ze===ut&<===Vt}negate(){return new K(this.x,ce(-this.y),this.z)}double(){const{x:b,y:A,z:D}=this,Y=ce(b*b),ee=ce(A*A),me=ce(ee*ee),_e=b+ee,De=ce(i*(ce(_e*_e)-Y-me)),Me=ce(a*Y),ze=ce(Me*Me),ut=ce(ze-i*De),lt=ce(Me*(De-ut)-s*me),Vt=ce(i*A*D);return new K(ut,lt,Vt)}add(b){J(b);const{x:A,y:D,z:Y}=this,{x:ee,y:me,z:_e}=b;if(ee===n||me===n)return this;if(A===n||D===n)return b;const De=ce(Y*Y),Me=ce(_e*_e),ze=ce(A*Me),ut=ce(ee*De),lt=ce(ce(D*_e)*Me),Vt=ce(ce(me*Y)*De),Ht=ce(ut-ze),an=ce(Vt-lt);if(Ht===n)return an===n?this.double():K.ZERO;const ri=ce(Ht*Ht),Pr=ce(Ht*ri),ii=ce(ze*ri),pa=ce(an*an-Pr-i*ii),On=ce(an*(ii-pa)-lt*Pr),ki=ce(Y*_e*Ht);return new K(pa,On,ki)}subtract(b){return this.add(b.negate())}multiplyUnsafe(b){const A=K.ZERO;if(typeof b=="bigint"&&b===n)return A;let D=Xe(b);if(D===r)return this;if(!B){let ut=A,lt=this;for(;D>n;)D&r&&(ut=ut.add(lt)),lt=lt.double(),D>>=r;return ut}let{k1neg:Y,k1:ee,k2neg:me,k2:_e}=u.splitScalar(D),De=A,Me=A,ze=this;for(;ee>n||_e>n;)ee&r&&(De=De.add(ze)),_e&r&&(Me=Me.add(ze)),ze=ze.double(),ee>>=r,_e>>=r;return Y&&(De=De.negate()),me&&(Me=Me.negate()),Me=new K(ce(Me.x*u.beta),Me.y,Me.z),De.add(Me)}precomputeWindow(b){const A=B?128/b+1:256/b+1,D=[];let Y=this,ee=Y;for(let me=0;me<A;me++){ee=Y,D.push(ee);for(let _e=1;_e<2**(b-1);_e++)ee=ee.add(Y),D.push(ee);Y=ee.double()}return D}wNAF(b,A){!A&&this.equals(K.BASE)&&(A=k.BASE);const D=A&&A._WINDOW_SIZE||1;if(256%D)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Y=A&&F.get(A);Y||(Y=this.precomputeWindow(D),A&&D!==1&&(Y=K.normalizeZ(Y),F.set(A,Y)));let ee=K.ZERO,me=K.BASE;const _e=1+(B?128/D:256/D),De=2**(D-1),Me=BigInt(2**D-1),ze=2**D,ut=BigInt(D);for(let lt=0;lt<_e;lt++){const Vt=lt*De;let Ht=Number(b&Me);b>>=ut,Ht>De&&(Ht-=ze,b+=r);const an=Vt,ri=Vt+Math.abs(Ht)-1,Pr=lt%2!==0,ii=Ht<0;Ht===0?me=me.add(H(Pr,Y[an])):ee=ee.add(H(ii,Y[ri]))}return{p:ee,f:me}}multiply(b,A){let D=Xe(b),Y,ee;if(B){const{k1neg:me,k1:_e,k2neg:De,k2:Me}=u.splitScalar(D);let{p:ze,f:ut}=this.wNAF(_e,A),{p:lt,f:Vt}=this.wNAF(Me,A);ze=H(me,ze),lt=H(De,lt),lt=new K(ce(lt.x*u.beta),lt.y,lt.z),Y=ze.add(lt),ee=ut.add(Vt)}else{const{p:me,f:_e}=this.wNAF(D,A);Y=me,ee=_e}return K.normalizeZ([Y,ee])[0]}toAffine(b){const{x:A,y:D,z:Y}=this,ee=this.equals(K.ZERO);b==null&&(b=ee?s:vt(Y));const me=b,_e=ce(me*me),De=ce(_e*me),Me=ce(A*_e),ze=ce(D*De),ut=ce(Y*me);if(ee)return k.ZERO;if(ut!==r)throw new Error("invZ was invalid");return new k(Me,ze)}}K.BASE=new K(o.Gx,o.Gy,r),K.ZERO=new K(n,r,n);function H(C,b){const A=b.negate();return C?A:b}const F=new WeakMap;class k{constructor(b,A){this.x=b,this.y=A}_setWindowSize(b){this._WINDOW_SIZE=b,F.delete(this)}hasEvenY(){return this.y%i===n}static fromCompressedHex(b){const A=b.length===32,D=fe(A?b:b.subarray(1));if(!nt(D))throw new Error("Point is not on curve");const Y=T(D);let ee=Et(Y);const me=(ee&r)===r;A?me&&(ee=ce(-ee)):(b[0]&1)===1!==me&&(ee=ce(-ee));const _e=new k(D,ee);return _e.assertValidity(),_e}static fromUncompressedHex(b){const A=fe(b.subarray(1,f+1)),D=fe(b.subarray(f+1,f*2+1)),Y=new k(A,D);return Y.assertValidity(),Y}static fromHex(b){const A=Se(b),D=A.length,Y=A[0];if(D===f)return this.fromCompressedHex(A);if(D===g&&(Y===2||Y===3))return this.fromCompressedHex(A);if(D===_&&Y===4)return this.fromUncompressedHex(A);throw new Error(`Point.fromHex: received invalid point. Expected 32-${g} compressed bytes or ${_} uncompressed bytes, not ${D}`)}static fromPrivateKey(b){return k.BASE.multiply(Je(b))}static fromSignature(b,A,D){const{r:Y,s:ee}=Lt(A);if(![0,1,2,3].includes(D))throw new Error("Cannot recover: invalid recovery bit");const me=Gn(Se(b)),{n:_e}=o,De=D===2||D===3?Y+_e:Y,Me=vt(De,_e),ze=ce(-me*Me,_e),ut=ce(ee*Me,_e),lt=D&1?"03":"02",Vt=k.fromHex(lt+pe(De)),Ht=k.BASE.multiplyAndAddUnsafe(Vt,ze,ut);if(!Ht)throw new Error("Cannot recover signature: point at infinify");return Ht.assertValidity(),Ht}toRawBytes(b=!1){return ge(this.toHex(b))}toHex(b=!1){const A=pe(this.x);return b?`${this.hasEvenY()?"02":"03"}${A}`:`04${A}${pe(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const b="Point is not on elliptic curve",{x:A,y:D}=this;if(!nt(A)||!nt(D))throw new Error(b);const Y=ce(D*D),ee=T(A);if(ce(Y-ee)!==n)throw new Error(b)}equals(b){return this.x===b.x&&this.y===b.y}negate(){return new k(this.x,ce(-this.y))}double(){return K.fromAffine(this).double().toAffine()}add(b){return K.fromAffine(this).add(K.fromAffine(b)).toAffine()}subtract(b){return this.add(b.negate())}multiply(b){return K.fromAffine(this).multiply(b,this).toAffine()}multiplyAndAddUnsafe(b,A,D){const Y=K.fromAffine(this),ee=A===n||A===r||this!==k.BASE?Y.multiplyUnsafe(A):Y.multiply(A),me=K.fromAffine(b).multiplyUnsafe(D),_e=ee.add(me);return _e.equals(K.ZERO)?void 0:_e.toAffine()}}e.Point=k,k.BASE=new k(o.Gx,o.Gy),k.ZERO=new k(n,n);function j(C){return Number.parseInt(C[0],16)>=8?"00"+C:C}function te(C){if(C.length<2||C[0]!==2)throw new Error(`Invalid signature integer tag: ${ae(C)}`);const b=C[1],A=C.subarray(2,b+2);if(!b||A.length!==b)throw new Error("Invalid signature integer: wrong length");if(A[0]===0&&A[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:fe(A),left:C.subarray(b+2)}}function L(C){if(C.length<2||C[0]!=48)throw new Error(`Invalid signature tag: ${ae(C)}`);if(C[1]!==C.length-2)throw new Error("Invalid signature: incorrect length");const{data:b,left:A}=te(C.subarray(2)),{data:D,left:Y}=te(A);if(Y.length)throw new Error(`Invalid signature: left bytes after parsing: ${ae(Y)}`);return{r:b,s:D}}class G{constructor(b,A){this.r=b,this.s=A,this.assertValidity()}static fromCompact(b){const A=b instanceof Uint8Array,D="Signature.fromCompact";if(typeof b!="string"&&!A)throw new TypeError(`${D}: Expected string or Uint8Array`);const Y=A?ae(b):b;if(Y.length!==128)throw new Error(`${D}: Expected 64-byte hex`);return new G(ve(Y.slice(0,64)),ve(Y.slice(64,128)))}static fromDER(b){const A=b instanceof Uint8Array;if(typeof b!="string"&&!A)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:D,s:Y}=L(A?b:ge(b));return new G(D,Y)}static fromHex(b){return this.fromDER(b)}assertValidity(){const{r:b,s:A}=this;if(!Wt(b))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Wt(A))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const b=o.n>>r;return this.s>b}normalizeS(){return this.hasHighS()?new G(this.r,ce(-this.s,o.n)):this}toDERRawBytes(){return ge(this.toDERHex())}toDERHex(){const b=j($(this.s)),A=j($(this.r)),D=b.length/2,Y=A.length/2,ee=$(D),me=$(Y);return`30${$(Y+D+4)}02${me}${A}02${ee}${b}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ge(this.toCompactHex())}toCompactHex(){return pe(this.r)+pe(this.s)}}e.Signature=G;function W(...C){if(!C.every(D=>D instanceof Uint8Array))throw new Error("Uint8Array list expected");if(C.length===1)return C[0];const b=C.reduce((D,Y)=>D+Y.length,0),A=new Uint8Array(b);for(let D=0,Y=0;D<C.length;D++){const ee=C[D];A.set(ee,Y),Y+=ee.length}return A}const z=Array.from({length:256},(C,b)=>b.toString(16).padStart(2,"0"));function ae(C){if(!(C instanceof Uint8Array))throw new Error("Expected Uint8Array");let b="";for(let A=0;A<C.length;A++)b+=z[C[A]];return b}const Ee=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function pe(C){if(typeof C!="bigint")throw new Error("Expected bigint");if(!(n<=C&&C<Ee))throw new Error("Expected number 0 <= n < 2^256");return C.toString(16).padStart(64,"0")}function le(C){const b=ge(pe(C));if(b.length!==32)throw new Error("Error: expected 32 bytes");return b}function $(C){const b=C.toString(16);return b.length&1?`0${b}`:b}function ve(C){if(typeof C!="string")throw new TypeError("hexToNumber: expected string, got "+typeof C);return BigInt(`0x${C}`)}function ge(C){if(typeof C!="string")throw new TypeError("hexToBytes: expected string, got "+typeof C);if(C.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+C.length);const b=new Uint8Array(C.length/2);for(let A=0;A<b.length;A++){const D=A*2,Y=C.slice(D,D+2),ee=Number.parseInt(Y,16);if(Number.isNaN(ee)||ee<0)throw new Error("Invalid byte sequence");b[A]=ee}return b}function fe(C){return ve(ae(C))}function Se(C){return C instanceof Uint8Array?Uint8Array.from(C):ge(C)}function Xe(C){if(typeof C=="number"&&Number.isSafeInteger(C)&&C>0)return BigInt(C);if(typeof C=="bigint"&&Wt(C))return C;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function ce(C,b=o.P){const A=C%b;return A>=n?A:b+A}function He(C,b){const{P:A}=o;let D=C;for(;b-- >n;)D*=D,D%=A;return D}function Et(C){const{P:b}=o,A=BigInt(6),D=BigInt(11),Y=BigInt(22),ee=BigInt(23),me=BigInt(44),_e=BigInt(88),De=C*C*C%b,Me=De*De*C%b,ze=He(Me,a)*Me%b,ut=He(ze,a)*Me%b,lt=He(ut,i)*De%b,Vt=He(lt,D)*lt%b,Ht=He(Vt,Y)*Vt%b,an=He(Ht,me)*Ht%b,ri=He(an,_e)*an%b,Pr=He(ri,me)*Ht%b,ii=He(Pr,a)*Me%b,pa=He(ii,ee)*Vt%b,On=He(pa,A)*De%b,ki=He(On,i);if(ki*ki%b!==C)throw new Error("Cannot find square root");return ki}function vt(C,b=o.P){if(C===n||b<=n)throw new Error(`invert: expected positive integers, got n=${C} mod=${b}`);let A=ce(C,b),D=b,Y=n,ee=r;for(;A!==n;){const _e=D/A,De=D%A,Me=Y-ee*_e;D=A,A=De,Y=ee,ee=Me}if(D!==r)throw new Error("invert: does not exist");return ce(Y,b)}function tn(C,b=o.P){const A=new Array(C.length),D=C.reduce((ee,me,_e)=>me===n?ee:(A[_e]=ee,ce(ee*me,b)),r),Y=vt(D,b);return C.reduceRight((ee,me,_e)=>me===n?ee:(A[_e]=ce(ee*A[_e],b),ce(ee*me,b)),Y),A}function nn(C){const b=C.length*8-l*8,A=fe(C);return b>0?A>>BigInt(b):A}function Gn(C,b=!1){const A=nn(C);if(b)return A;const{n:D}=o;return A>=D?A-D:A}let Ne,pt;class gt{constructor(b,A){if(this.hashLen=b,this.qByteLen=A,typeof b!="number"||b<2)throw new Error("hashLen must be a number");if(typeof A!="number"||A<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(b).fill(1),this.k=new Uint8Array(b).fill(0),this.counter=0}hmac(...b){return e.utils.hmacSha256(this.k,...b)}hmacSync(...b){return pt(this.k,...b)}checkSync(){if(typeof pt!="function")throw new U("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(b=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),b),this.v=await this.hmac(this.v),b.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),b),this.v=await this.hmac(this.v))}reseedSync(b=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),b),this.v=this.hmacSync(this.v),b.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),b),this.v=this.hmacSync(this.v))}async generate(){this.incr();let b=0;const A=[];for(;b<this.qByteLen;){this.v=await this.hmac(this.v);const D=this.v.slice();A.push(D),b+=this.v.length}return W(...A)}generateSync(){this.checkSync(),this.incr();let b=0;const A=[];for(;b<this.qByteLen;){this.v=this.hmacSync(this.v);const D=this.v.slice();A.push(D),b+=this.v.length}return W(...A)}}function Wt(C){return n<C&&C<o.n}function nt(C){return n<C&&C<o.P}function rt(C,b,A,D=!0){const{n:Y}=o,ee=Gn(C,!0);if(!Wt(ee))return;const me=vt(ee,Y),_e=k.BASE.multiply(ee),De=ce(_e.x,Y);if(De===n)return;const Me=ce(me*ce(b+A*De,Y),Y);if(Me===n)return;let ze=new G(De,Me),ut=(_e.x===ze.r?0:2)|Number(_e.y&r);return D&&ze.hasHighS()&&(ze=ze.normalizeS(),ut^=1),{sig:ze,recovery:ut}}function Je(C){let b;if(typeof C=="bigint")b=C;else if(typeof C=="number"&&Number.isSafeInteger(C)&&C>0)b=BigInt(C);else if(typeof C=="string"){if(C.length!==2*l)throw new Error("Expected 32 bytes of private key");b=ve(C)}else if(C instanceof Uint8Array){if(C.length!==l)throw new Error("Expected 32 bytes of private key");b=fe(C)}else throw new TypeError("Expected valid private key");if(!Wt(b))throw new Error("Expected private key: 0 < key < n");return b}function yn(C){return C instanceof k?(C.assertValidity(),C):k.fromHex(C)}function Lt(C){if(C instanceof G)return C.assertValidity(),C;try{return G.fromDER(C)}catch{return G.fromCompact(C)}}function ti(C,b=!1){return k.fromPrivateKey(C).toRawBytes(b)}e.getPublicKey=ti;function Qe(C,b,A,D=!1){return k.fromSignature(C,b,A).toRawBytes(D)}e.recoverPublicKey=Qe;function rn(C){const b=C instanceof Uint8Array,A=typeof C=="string",D=(b||A)&&C.length;return b?D===g||D===_:A?D===g*2||D===_*2:C instanceof k}function et(C,b,A=!1){if(rn(C))throw new TypeError("getSharedSecret: first arg must be private key");if(!rn(b))throw new TypeError("getSharedSecret: second arg must be public key");const D=yn(b);return D.assertValidity(),D.multiply(Je(C)).toRawBytes(A)}e.getSharedSecret=et;function Dt(C){const b=C.length>f?C.slice(0,f):C;return fe(b)}function ot(C){const b=Dt(C),A=ce(b,o.n);return Ln(A<n?b:A)}function Ln(C){return le(C)}function _s(C,b,A){if(C==null)throw new Error(`sign: expected valid message hash, not "${C}"`);const D=Se(C),Y=Je(b),ee=[Ln(Y),ot(D)];if(A!=null){A===!0&&(A=e.utils.randomBytes(f));const De=Se(A);if(De.length!==f)throw new Error(`sign: Expected ${f} bytes of extra data`);ee.push(De)}const me=W(...ee),_e=Dt(D);return{seed:me,m:_e,d:Y}}function bs(C,b){const{sig:A,recovery:D}=C,{der:Y,recovered:ee}=Object.assign({canonical:!0,der:!0},b),me=Y?A.toDERRawBytes():A.toCompactRawBytes();return ee?[me,D]:me}async function An(C,b,A={}){const{seed:D,m:Y,d:ee}=_s(C,b,A.extraEntropy),me=new gt(m,l);await me.reseed(D);let _e;for(;!(_e=rt(await me.generate(),Y,ee,A.canonical));)await me.reseed();return bs(_e,A)}e.sign=An;function Pi(C,b,A={}){const{seed:D,m:Y,d:ee}=_s(C,b,A.extraEntropy),me=new gt(m,l);me.reseedSync(D);let _e;for(;!(_e=rt(me.generateSync(),Y,ee,A.canonical));)me.reseedSync();return bs(_e,A)}e.signSync=Pi;const Nr={strict:!0};function la(C,b,A,D=Nr){let Y;try{Y=Lt(C),b=Se(b)}catch{return!1}const{r:ee,s:me}=Y;if(D.strict&&Y.hasHighS())return!1;const _e=Gn(b);let De;try{De=yn(A)}catch{return!1}const{n:Me}=o,ze=vt(me,Me),ut=ce(_e*ze,Me),lt=ce(ee*ze,Me),Vt=k.BASE.multiplyAndAddUnsafe(De,ut,lt);return Vt?ce(Vt.x,Me)===ee:!1}e.verify=la;function qn(C){return ce(fe(C),o.n)}class Mr{constructor(b,A){this.r=b,this.s=A,this.assertValidity()}static fromHex(b){const A=Se(b);if(A.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${A.length}`);const D=fe(A.subarray(0,32)),Y=fe(A.subarray(32,64));return new Mr(D,Y)}assertValidity(){const{r:b,s:A}=this;if(!nt(b)||!Wt(A))throw new Error("Invalid signature")}toHex(){return pe(this.r)+pe(this.s)}toRawBytes(){return ge(this.toHex())}}function $n(C){return k.fromPrivateKey(C).toRawX()}class da{constructor(b,A,D=e.utils.randomBytes()){if(b==null)throw new TypeError(`sign: Expected valid message, not "${b}"`);this.m=Se(b);const{x:Y,scalar:ee}=this.getScalar(Je(A));if(this.px=Y,this.d=ee,this.rand=Se(D),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(b){const A=k.fromPrivateKey(b),D=A.hasEvenY()?b:o.n-b;return{point:A,scalar:D,x:A.toRawX()}}initNonce(b,A){return le(b^fe(A))}finalizeNonce(b){const A=ce(fe(b),o.n);if(A===n)throw new Error("sign: Creation of signature failed. k is zero");const{point:D,x:Y,scalar:ee}=this.getScalar(A);return{R:D,rx:Y,k:ee}}finalizeSig(b,A,D,Y){return new Mr(b.x,ce(A+D*Y,o.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:b,d:A,px:D,rand:Y}=this,ee=e.utils.taggedHash,me=this.initNonce(A,await ee(Wn.aux,Y)),{R:_e,rx:De,k:Me}=this.finalizeNonce(await ee(Wn.nonce,me,D,b)),ze=qn(await ee(Wn.challenge,De,D,b)),ut=this.finalizeSig(_e,Me,ze,A);return await Ss(ut,b,D)||this.error(),ut}calcSync(){const{m:b,d:A,px:D,rand:Y}=this,ee=e.utils.taggedHashSync,me=this.initNonce(A,ee(Wn.aux,Y)),{R:_e,rx:De,k:Me}=this.finalizeNonce(ee(Wn.nonce,me,D,b)),ze=qn(ee(Wn.challenge,De,D,b)),ut=this.finalizeSig(_e,Me,ze,A);return gr(ut,b,D)||this.error(),ut}}async function ni(C,b,A){return new da(C,b,A).calc()}function Es(C,b,A){return new da(C,b,A).calcSync()}function vs(C,b,A){const D=C instanceof Mr,Y=D?C:Mr.fromHex(C);return D&&Y.assertValidity(),{...Y,m:Se(b),P:yn(A)}}function fa(C,b,A,D){const Y=k.BASE.multiplyAndAddUnsafe(b,Je(A),ce(-D,o.n));return!(!Y||!Y.hasEvenY()||Y.x!==C)}async function Ss(C,b,A){try{const{r:D,s:Y,m:ee,P:me}=vs(C,b,A),_e=qn(await e.utils.taggedHash(Wn.challenge,le(D),me.toRawX(),ee));return fa(D,me,Y,_e)}catch{return!1}}function gr(C,b,A){try{const{r:D,s:Y,m:ee,P:me}=vs(C,b,A),_e=qn(e.utils.taggedHashSync(Wn.challenge,le(D),me.toRawX(),ee));return fa(D,me,Y,_e)}catch(D){if(D instanceof U)throw D;return!1}}e.schnorr={Signature:Mr,getPublicKey:$n,sign:ni,verify:Ss,signSync:Es,verifySync:gr},k.BASE._setWindowSize(8);const bt={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Wn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},er={};e.utils={bytesToHex:ae,hexToBytes:ge,concatBytes:W,mod:ce,invert:vt,isValidPrivateKey(C){try{return Je(C),!0}catch{return!1}},_bigintTo32Bytes:le,_normalizePrivateKey:Je,hashToPrivateKey:C=>{C=Se(C);const b=l+8;if(C.length<b||C.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const A=ce(fe(C),o.n-r)+r;return le(A)},randomBytes:(C=32)=>{if(bt.web)return bt.web.getRandomValues(new Uint8Array(C));if(bt.node){const{randomBytes:b}=bt.node;return Uint8Array.from(b(C))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(l+8)),precompute(C=8,b=k.BASE){const A=b===k.BASE?b:new k(b.x,b.y);return A._setWindowSize(C),A.multiply(a),A},sha256:async(...C)=>{if(bt.web){const b=await bt.web.subtle.digest("SHA-256",W(...C));return new Uint8Array(b)}else if(bt.node){const{createHash:b}=bt.node,A=b("sha256");return C.forEach(D=>A.update(D)),Uint8Array.from(A.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(C,...b)=>{if(bt.web){const A=await bt.web.subtle.importKey("raw",C,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),D=W(...b),Y=await bt.web.subtle.sign("HMAC",A,D);return new Uint8Array(Y)}else if(bt.node){const{createHmac:A}=bt.node,D=A("sha256",C);return b.forEach(Y=>D.update(Y)),Uint8Array.from(D.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(C,...b)=>{let A=er[C];if(A===void 0){const D=await e.utils.sha256(Uint8Array.from(C,Y=>Y.charCodeAt(0)));A=W(D,D),er[C]=A}return e.utils.sha256(A,...b)},taggedHashSync:(C,...b)=>{if(typeof Ne!="function")throw new U("sha256Sync is undefined, you need to set it");let A=er[C];if(A===void 0){const D=Ne(Uint8Array.from(C,Y=>Y.charCodeAt(0)));A=W(D,D),er[C]=A}return Ne(A,...b)},_JacobianPoint:K},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Ne},set(C){Ne||(Ne=C)}},hmacSha256Sync:{configurable:!1,get(){return pt},set(C){pt||(pt=C)}}})})(Qd);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const t=eE,n=Yi,r=Qd;var i=Qd;Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),r.utils.hmacSha256Sync=(a,...s)=>{const o=t.hmac.create(n.sha256,a);return s.forEach(c=>o.update(c)),o.digest()}})(Ip);var Ke={};function tm(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var du={exports:{}};du.exports;(function(e,t){var n=ie&&ie.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const r=n(ln),i=xa,a=r.default.bool;t.assertBool=a;const s=r.default.bytes;t.assertBytes=s;var o=xa;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return o.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return o.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return o.utf8ToBytes}});function c(m){if(!(m instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof m}`);return new TextDecoder().decode(m)}t.bytesToUtf8=c;function u(m){const g=m.startsWith("0x")?m.substring(2):m;return(0,i.hexToBytes)(g)}t.hexToBytes=u;function f(m,g){if(m.length!==g.length)return!1;for(let _=0;_<m.length;_++)if(m[_]!==g[_])return!1;return!0}t.equalsBytes=f;function l(m){return g=>(r.default.bytes(g),m(g))}t.wrapHash=l,t.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,g=typeof tm=="function"&&tm.bind(e);return{node:g&&!m?g("crypto"):void 0,web:m}})()})(du,du.exports);var VT=du.exports,GT=ie&&ie.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),qT=ie&&ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),WT=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&>(t,e,n);return qT(t,e),t};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.contextRandomize=Ke.ecdh=Ke.signatureNormalize=Ke.signatureImport=Ke.signatureExport=Ke.privateKeyTweakMul=Ke.publicKeyTweakMul=Ke.publicKeyTweakAdd=Ke.publicKeyCombine=Ke.publicKeyNegate=Ke.privateKeyNegate=Ke.privateKeyTweakAdd=Ke.ecdsaVerify=Ke.ecdsaRecover=Ke.ecdsaSign=Ke.publicKeyConvert=Ke.publicKeyVerify=Ke.publicKeyCreate=Ke.privateKeyVerify=Ke.createPrivateKey=Ke.createPrivateKeySync=void 0;const zT=Yi,Ft=WT(Ip),We=VT;function YT(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const bi=e=>YT((0,We.toHex)(e)),sl=e=>e.toString(16).padStart(64,"0"),$d=e=>(0,We.hexToBytes)(sl(e)),{mod:sE}=Ft.utils,or=Ft.CURVE.n;function Kn(e=r=>new Uint8Array(r),t,n){return typeof e=="function"&&(e=e(t)),(0,We.assertBytes)(e,t),n&&e.set(n),e}function qs(e){return(0,We.assertBytes)(e,64),Ft.Signature.fromCompact(e)}function oE(){return Ft.utils.randomPrivateKey()}Ke.createPrivateKeySync=oE;async function KT(){return oE()}Ke.createPrivateKey=KT;function XT(e){return(0,We.assertBytes)(e,32),Ft.utils.isValidPrivateKey(e)}Ke.privateKeyVerify=XT;function JT(e,t=!0,n){(0,We.assertBytes)(e,32),(0,We.assertBool)(t);const r=Ft.getPublicKey(e,t);return Kn(n,t?33:65,r)}Ke.publicKeyCreate=JT;function ZT(e){(0,We.assertBytes)(e,33,65);try{return Ft.Point.fromHex(e),!0}catch{return!1}}Ke.publicKeyVerify=ZT;function QT(e,t=!0,n){(0,We.assertBytes)(e,33,65),(0,We.assertBool)(t);const r=Ft.Point.fromHex(e).toRawBytes(t);return Kn(n,t?33:65,r)}Ke.publicKeyConvert=QT;function $T(e,t,n={noncefn:void 0,data:void 0},r){if((0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(n&&(n.noncefn!==void 0||n.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,a]=Ft.signSync(e,t,{recovered:!0,der:!1});return{signature:Kn(r,64,i),recid:a}}Ke.ecdsaSign=$T;function eI(e,t,n,r=!0,i){(0,We.assertBytes)(n,32),(0,We.assertBool)(r);const a=qs(e).toHex(),s=Ft.Point.fromSignature(n,a,t);return Kn(i,r?33:65,s.toRawBytes(r))}Ke.ecdsaRecover=eI;function tI(e,t,n){(0,We.assertBytes)(e,64),(0,We.assertBytes)(t,32),(0,We.assertBytes)(n,33,65),(0,We.assertBytes)(e,64);const r=bi(e.slice(0,32)),i=bi(e.slice(32,64));if(r>=or||i>=or)throw new Error("Cannot parse signature");const a=Ft.Point.fromHex(n);let s;try{s=qs(e)}catch{return!1}return Ft.verify(s,t,a)}Ke.ecdsaVerify=tI;function nI(e,t){(0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32);let n=bi(t);if(n===0n)throw new Error("Tweak must not be zero");if(n>=or)throw new Error("Tweak bigger than curve order");if(n+=bi(e),n>=or&&(n-=or),n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,We.hexToBytes)(sl(n))),e}Ke.privateKeyTweakAdd=nI;function rI(e){(0,We.assertBytes)(e,32);const t=sE(-bi(e),or);return e.set((0,We.hexToBytes)(sl(t))),e}Ke.privateKeyNegate=rI;function iI(e,t=!0,n){(0,We.assertBytes)(e,33,65),(0,We.assertBool)(t);const r=Ft.Point.fromHex(e).negate();return Kn(n,t?33:65,r.toRawBytes(t))}Ke.publicKeyNegate=iI;function aI(e,t=!0,n){if(!Array.isArray(e)||!e.length)throw new TypeError(`Expected array with one or more items, not ${e}`);for(const i of e)(0,We.assertBytes)(i,33,65);(0,We.assertBool)(t);const r=e.map(i=>Ft.Point.fromHex(i)).reduce((i,a)=>i.add(a),Ft.Point.ZERO);if(r.equals(Ft.Point.ZERO))throw new Error("Combined result must not be zero");return Kn(n,t?33:65,r.toRawBytes(t))}Ke.publicKeyCombine=aI;function sI(e,t,n=!0,r){(0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),(0,We.assertBool)(n);const i=Ft.Point.fromHex(e),a=Ft.Point.fromPrivateKey(t),s=i.add(a);if(a.equals(Ft.Point.ZERO)||s.equals(Ft.Point.ZERO))throw new Error("Tweak must not be zero");return Kn(r,n?33:65,s.toRawBytes(n))}Ke.publicKeyTweakAdd=sI;function oI(e,t,n=!0,r){(0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),(0,We.assertBool)(n);const i=bi(t);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=or)throw new Error("Tweak is zero or bigger than curve order");const a=Ft.Point.fromHex(e).multiply(i);return Kn(r,n?33:65,a.toRawBytes(n))}Ke.publicKeyTweakMul=oI;function cI(e,t){(0,We.assertBytes)(e,32),(0,We.assertBytes)(t,32);const n=bi(t);if(n<=1||n>=or)throw new Error("Tweak is zero or bigger than curve order");const r=sE(n*bi(e),or);if(r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,We.hexToBytes)(sl(r))),e}Ke.privateKeyTweakMul=cI;function uI(e,t){const n=qs(e).toRawBytes();return Kn(t,72,qs(e).toRawBytes()).slice(0,n.length)}Ke.signatureExport=uI;function lI(e,t){(0,We.assertBytes)(e);const n=Ft.Signature.fromDER(e);return Kn(t,64,(0,We.hexToBytes)(n.toCompactHex()))}Ke.signatureImport=lI;function dI(e){const t=qs(e);return t.s>or/2n&&e.set($d(or-t.s),32),e}Ke.signatureNormalize=dI;function fI(e,t,n={},r){if((0,We.assertBytes)(e,33,65),(0,We.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdh: options should be object");n.data!==void 0&&(0,We.assertBytes)(n.data);const i=Ft.Point.fromHex(Ft.getSharedSecret(t,e));if(n.hashfn===void 0)return Kn(r,32,(0,zT.sha256)(i.toRawBytes(!0)));if(typeof n.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");n.xbuf!==void 0&&(0,We.assertBytes)(n.xbuf,32),n.ybuf!==void 0&&(0,We.assertBytes)(n.ybuf,32),(0,We.assertBytes)(r,32);const a=n.xbuf||new Uint8Array(32);a.set($d(i.x));const s=n.ybuf||new Uint8Array(32);s.set($d(i.y));const o=n.hashfn(a,s,n.data);if(!(o instanceof Uint8Array)||o.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return Kn(r,32,o)}Ke.ecdh=fI;function pI(e){e!==null&&(0,We.assertBytes)(e,32)}Ke.contextRandomize=pI;Object.defineProperty(hn,"__esModule",{value:!0});hn.createUnsafeIdentity=hn.computeAddress=hn.ethSign=hn.createEthereumMessageHash=hn.sign=hn.recoverAddressFromEthSignature=hn.recoverPublicKey=void 0;const xn=Wu,nm=Ip,cE=Ke;function uE(e,t){if(e.length!==65)throw new Error("Invalid signature length"+e.length);const n=e.slice(0,e.length-1),r=e[64]===28?1:0;return(0,cE.ecdsaRecover)(n,r,t,!1).slice(1)}hn.recoverPublicKey=uE;function hI(e){if(e.length!==65)throw new Error("Invalid ethereum signature");const t=e[64];if(t===0||t===1){const n=new Uint8Array(e);return n[64]=t+27,n}return e}function lE(e,t){if(typeof e=="string"){if((0,xn.isHex)(e))return lE((0,xn.hexToBytes)(e),t);throw new Error("String signatures must be encoded in hex")}return Rp(uE(hI(e),Op(t)))}hn.recoverAddressFromEthSignature=lE;function dE(e,t){const n=(0,cE.ecdsaSign)(t,e),r=n.recid===1?"1c":"1b";return(0,xn.toHex)(n.signature)+r}hn.sign=dE;function Op(e){const t=typeof e=="string"?(0,xn.stringToUtf8Bytes)(e):e,n=(0,xn.concatBytes)((0,xn.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
14
14
|
`),(0,xn.stringToUtf8Bytes)(String(t.length)),t);return(0,xn.hexToBytes)((0,xn.sha3)(n))}hn.createEthereumMessageHash=Op;function mI(e,t){return dE(e,Op(t))}hn.ethSign=mI;function Rp(e){const t=e.length===65&&e[0]===4?e.slice(1):e;return(0,xn.getAddress)((0,xn.sha3)(t).substring(24))}hn.computeAddress=Rp;function gI(){const e=nm.utils.randomPrivateKey(),t=(0,nm.getPublicKey)(e).slice(1),n=Rp(t);return{privateKey:(0,xn.bytesToHex)(e),publicKey:(0,xn.bytesToHex)(t),address:n}}hn.createUnsafeIdentity=gI;(function(e){var t=ie&&ie.__createBinding||(Object.create?function(L,G,W,z){z===void 0&&(z=W);var ae=Object.getOwnPropertyDescriptor(G,W);(!ae||("get"in ae?!G.__esModule:ae.writable||ae.configurable))&&(ae={enumerable:!0,get:function(){return G[W]}}),Object.defineProperty(L,z,ae)}:function(L,G,W,z){z===void 0&&(z=W),L[z]=G[W]}),n=ie&&ie.__setModuleDefault||(Object.create?function(L,G){Object.defineProperty(L,"default",{enumerable:!0,value:G})}:function(L,G){L.default=G}),r=ie&&ie.__importStar||function(L){if(L&&L.__esModule)return L;var G={};if(L!=null)for(var W in L)W!=="default"&&Object.prototype.hasOwnProperty.call(L,W)&&t(G,L,W);return n(G,L),G},i=ie&&ie.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const a=r(Wu),s=zu,o=b_,c=rl,u=i(Tp),f=hn;e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const l=132;var m;(function(L){async function G(fe,Se,Xe,ce=Date.now()){let He="";if(!L.isValidAuthChain(Se))return{ok:!1,message:"ERROR: Malformed authChain"};for(const vt of Se){const tn=te(vt.type);try{const{nextAuthority:nn}=await tn(He,vt,{provider:Xe,dateToValidateExpirationInMillis:ce});He=nn||""}catch(nn){return{ok:!1,message:`ERROR. Link type: ${vt.type}. ${nn.message}.`}}}const Et=He===fe;return{ok:Et,message:Et?void 0:`ERROR: Invalid final authority. Expected: ${fe}. Current ${He}.`}}L.validateSignature=G;function W(fe){for(const[Se,Xe]of fe.entries())if(Se===0&&Xe.type!==o.AuthLinkType.SIGNER||Xe.type===o.AuthLinkType.SIGNER&&Se!==0)return!1;return!0}L.isValidAuthChain=W;function z(fe){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(fe)))}L.createEIP1271MessageHash=z;function ae(fe,Se,Xe){return[{type:o.AuthLinkType.SIGNER,payload:Se,signature:""},{type:H(Xe),payload:fe,signature:Xe}]}L.createSimpleAuthChain=ae;function Ee(fe,Se,Xe,ce){const He=(0,c.moveMinutes)(Xe),Et=L.getEphemeralMessage(Se.address,He),vt=L.createSignature(fe,Et),tn=L.createSignature(Se,ce);return[{type:o.AuthLinkType.SIGNER,payload:fe.address,signature:""},{type:o.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:Et,signature:vt},{type:o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:ce,signature:tn}]}L.createAuthChain=Ee;async function pe(fe,Se,Xe,ce){const He=new Date;He.setMinutes(He.getMinutes()+Xe);const Et=L.getEphemeralMessage(Se.address,He),vt=await ce(Et),tn=[{type:o.AuthLinkType.SIGNER,payload:fe,signature:""},{type:K(vt),payload:Et,signature:vt}];return{ephemeralIdentity:Se,expiration:He,authChain:tn}}L.initializeAuthChain=pe;function le(fe,Se){const Xe=L.createSignature(fe.ephemeralIdentity,Se);return[...fe.authChain,{type:o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:Se,signature:Xe}]}L.signPayload=le,L.createEthereumMessageHash=f.createEthereumMessageHash;function $(fe,Se){return(0,f.ethSign)((0,a.hexToBytes)(fe.privateKey),Se)}L.createSignature=$;function ve(fe){return fe.length>0&&fe[0].type===o.AuthLinkType.SIGNER?fe[0].payload:"Invalid-Owner-Address"}L.ownerAddress=ve;function ge(fe,Se){return`Decentraland Login
|
|
15
15
|
Ephemeral address: ${fe}
|
|
16
16
|
Expiration: ${Se.toISOString()}`}L.getEphemeralMessage=ge})(m=e.Authenticator||(e.Authenticator={}));const g=async(L,G)=>({nextAuthority:G.payload});e.SIGNER_VALIDATOR=g;const _=async(L,G)=>{if(!G.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const W=(0,f.recoverAddressFromEthSignature)(G.signature,G.payload),z=L.toLocaleLowerCase(),ae=W.toLocaleLowerCase();if(z===ae)return{nextAuthority:G.payload};throw new Error(`Invalid signer address. Expected: ${z}. Actual: ${ae}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=_;const T=async(L,G,W)=>{if(!G.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:z,ephemeralAddress:ae,expiration:Ee}=F(G.payload),pe=W.dateToValidateExpirationInMillis?W.dateToValidateExpirationInMillis:Date.now();if(Ee>pe){const le=(0,f.recoverAddressFromEthSignature)(G.signature,z),$=L.toLocaleLowerCase(),ve=le.toLocaleLowerCase();if($===ve)return{nextAuthority:ae};throw new Error(`Invalid signer address. Expected: ${$}. Actual: ${ve}`)}throw new Error(`Ephemeral key expired. Expiration: ${Ee}. Test: ${pe}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=T;const B=async(L,G,W)=>{if(!G.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:z,ephemeralAddress:ae,expiration:Ee}=F(G.payload),pe=W?.dateToValidateExpirationInMillis?W?.dateToValidateExpirationInMillis:Date.now();if(Ee>pe&&await j(W.provider,L,z,G.signature,pe))return{nextAuthority:ae};throw new Error(`Ephemeral key expired. Expiration: ${Ee}. Test: ${pe}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=B;const U=async(L,G,W)=>{if(!G.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await j(W.provider,L,G.payload,G.signature,W.dateToValidateExpirationInMillis))return{nextAuthority:G.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=U;const J=async(L,G)=>({error:"Error Validator."});function K(L){return L.length===l?o.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:o.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=K;function H(L){return L.length===l?o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:o.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=H;function F(L){const G=L.replace(/\r/g,""),W=G.split(`
|
|
@@ -511,7 +511,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
511
511
|
`).reduce((n,r)=>{const[i,a]=r.split(": ");return a&&(n[i.toLowerCase()]=a),n},{}):{}}function px(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return hx(e.response,e.responseType)}catch(n){t.push(n)}return je&&Ve.warn("Failed to get xhr response body",...t),[void 0]}function hx(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return je&&Ve.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return je&&Ve.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function mx(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Nl(n)}catch{return}}function gx(e){const t=Ce();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:s}=e.getOptions(),o={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>yx(o,c,u))}catch{}}function yx(e,t,n){if(t.data)try{_x(t)&&Ex(n)&&(lx(t,n),ux(t,n,e)),bx(t)&&vx(n)&&($F(t,n),QF(t,n,e))}catch(r){je&&Ve.exception(r,"Error when enriching network breadcrumb")}}function _x(e){return e.category==="xhr"}function bx(e){return e.category==="fetch"}function Ex(e){return e?.xhr}function vx(e){return e?.response}function Sx(e){const t=Ce();Y0(ZB(e)),Tl(YF(e)),xF(e),gx(e);const n=WF(e);Rv(n),t&&(t.on("beforeSendEvent",BF(e)),t.on("afterSendEvent",kF(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const a=e.getSessionId();i?.includeReplay&&e.isEnabled()&&a&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=a)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function wx(e){try{return Promise.all(Cl(e,[Tx(Mt.performance.memory)]))}catch{return[]}}function Tx(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ix(e,t,n){return eM(e,t,{...n,setTimeoutImpl:wo})}const Dc=Ge.navigator;function Ax(){return/iPhone|iPad|iPod/i.test(Dc?.userAgent??"")||/Macintosh/i.test(Dc?.userAgent??"")&&Dc?.maxTouchPoints&&Dc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Ox(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){je&&Ve.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&zB(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Ah(e,n,i))return!0;if(!i)return!1;const a=e.session;if(Cx(e,i),e.recordingMode==="buffer"&&a&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(je&&Ve.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),a.started=s,e.getOptions().stickySession&&Ih(a))}return a?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function Rx(e){const t=e.getOptions();return{type:it.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Cx(e,t){!t||!e.session||e.session.segmentId!==0||Ah(e,Rx(e),!1)}function Nx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Mx(e,t,n,r){return ei(_v(e,jp(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Px({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
512
512
|
`;if(typeof e=="string")n=`${r}${e}`;else{const a=new TextEncoder().encode(r);n=new Uint8Array(a.length+e.length),n.set(a),n.set(e,a.length)}return n}async function kx({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,a={event_id:n,integrations:i};e.emit("preprocessEvent",r,a);const s=await Tv(e.getOptions(),r,a,t,e,$t());if(!s)return null;e.emit("postprocessEvent",s,a),s.platform=s.platform||"javascript";const o=e.getSdkMetadata(),{name:c,version:u}=o?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function Lx({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){const s=Px({recordingData:e,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:u,initialTimestamp:f}=r,l=Ce(),m=tt(),g=l?.getTransport(),_=l?.getDsn();if(!l||!g||!_||!a.sampled)return Jr({});const T={type:u2,replay_start_timestamp:f/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:o,replay_id:t,segment_id:n,replay_type:a.sampled},B=await kx({scope:m,client:l,replayId:t,event:T});if(!B)return l.recordDroppedEvent("event_processor","replay"),je&&Ve.log("An event processor returned `null`, will not send event."),Jr({});delete B.sdkProcessingMetadata;const U=Mx(B,s,_,l.getOptions().tunnel);let J;try{J=await g.send(U)}catch(H){const F=new Error(hh);try{F.cause=H}catch{}throw F}if(typeof J.statusCode=="number"&&(J.statusCode<200||J.statusCode>=300))throw new ew(J.statusCode);const K=Vv({},J);if(jv(K,"replay"))throw new Rh(K);return J}class ew extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Rh extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function tw(e,t={count:0,interval:m2}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Lx(e),!0}catch(i){if(i instanceof ew||i instanceof Rh)throw i;if(Iv("Replays",{_retryCount:t.count}),r&&r(i),t.count>=g2){const a=new Error(`${hh} - max retries exceeded`);try{a.cause=i}catch{}throw a}return t.interval*=++t.count,new Promise((a,s)=>{wo(async()=>{try{await tw(e,t),a(!0)}catch(o){s(o)}},t.interval)})}}const nw="__THROTTLED",Dx="__SKIPPED";function Bx(e,t,n){const r=new Map,i=o=>{const c=o-n;r.forEach((u,f)=>{f<c&&r.delete(f)})},a=()=>[...r.values()].reduce((o,c)=>o+c,0);let s=!1;return(...o)=>{const c=Math.floor(Date.now()/1e3);if(i(c),a()>=t){const f=s;return s=!0,f?Dx:nw}s=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...o)}}class Fx{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:l2,sessionIdleExpire:d2},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Ix(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Bx((s,o)=>NF(this,s,o),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),a=r?{threshold:Math.min(y2,r),timeout:r,scrollTimeout:_2,ignoreSelector:i?i.join(","):""}:void 0;if(a&&(this.clickDetector=new VB(this,a)),je){const s=t._experiments;Ve.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Mt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=Ir({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=Ir({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{tF(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){je&&Ve.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){je&&Ve.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",je&&Ve.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){je&&Ve.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){je&&Ve.log("Buffering is in progress, call `flush()` to save the replay");return}je&&Ve.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Md({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){je&&Ve.log("Buffering is in progress, call `flush()` to save the replay");return}je&&Ve.infoTick("Starting replay in buffer mode");const t=Md({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=Gr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:h2}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Ox(this),...Ax(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{je&&Ve.log(`Stopping Replay${n?` triggered by ${n}`:""}`),XS(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,IF(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),je&&Ve.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),je&&Ve.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();je&&Ve.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Bf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Mt.location.pathname}${Mt.location.hash}${Mt.location.search}`,n=`${Mt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===nw){const i=Ir({category:"replay.throttled"});this.addUpdate(()=>!Ah(this,{type:DB,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||en(),n=t&&Qt(t),i=(n&&$e(n).data||{})[Un];if(!(!n||!i||!["route","custom"].includes(i)))return $e(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=SF({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Md({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return WS(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Mt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Mt.addEventListener("blur",this._handleWindowBlur),Mt.addEventListener("focus",this._handleWindowFocus),Mt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Sx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=mF(this)}_removeListeners(){try{Mt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Mt.removeEventListener("blur",this._handleWindowBlur),Mt.removeEventListener("focus",this._handleWindowFocus),Mt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||qS(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){je&&Ve.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:it.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=aF(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Cl(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){je&&Ve.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await wx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const a=await this.eventBuffer.finish();await tw({replayId:t,recordingData:a,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Ce();if(r){const i=n instanceof Rh?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){je&&Ve.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const a=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(a||s){je&&Ve.log(`Session duration (${Math.floor(i/1e3)}s) is too ${a?"short":"long"}, not sending replay.`),a&&this._debouncedFlush();return}const o=this.eventBuffer;o&&this.session.segmentId===0&&!o.hasCheckout&&je&&Ve.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ih(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(o=>{const c=Nx(o.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,i=this._options.mutationLimit,a=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>a||s){const o=Ir({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(o)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Cs(e,t){return[...e,...t].join(",")}function xx({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const a=["base","iframe[srcdoc]:not([src])"],s=Cs(e,[".sentry-mask","[data-sentry-mask]"]),o=Cs(t,[]);return{maskTextSelector:s,unmaskTextSelector:o,blockSelector:Cs(n,[".sentry-block","[data-sentry-block]",...a]),unblockSelector:Cs(r,[]),ignoreSelector:Cs(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Hx({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?a:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?a.replace(/[\S]/g,"*"):a}const ly='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Ux=["content-length","content-type","accept"];let dy=!1;const jx=e=>new Vx(e);class Vx{constructor({flushMinDelay:t=f2,flushMaxDelay:n=p2,minReplayDuration:r=b2,maxReplayDuration:i=Gg,stickySession:a=!0,useCompression:s=!0,workerUrl:o,_experiments:c={},maskAllText:u=!0,maskAllInputs:f=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:m=750,mutationLimit:g=1e4,slowClickTimeout:_=7e3,slowClickIgnoreSelectors:T=[],networkDetailAllowUrls:B=[],networkDetailDenyUrls:U=[],networkCaptureBodies:J=!0,networkRequestHeaders:K=[],networkResponseHeaders:H=[],mask:F=[],maskAttributes:k=["title","placeholder","aria-label"],unmask:j=[],block:te=[],unblock:L=[],ignore:G=[],maskFn:W,beforeAddRecordingEvent:z,beforeErrorSampling:ae,onError:Ee}={}){this.name="Replay";const pe=xx({mask:F,unmask:j,block:te,unblock:L,ignore:G});if(this._recordingOptions={maskAllInputs:f,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:W,maskInputFn:W,maskAttributeFn:(le,$,ve)=>Hx({maskAttributes:k,maskAllText:u,privacyOptions:pe,key:le,value:$,el:ve}),...pe,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:le=>{try{le.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,E2),maxReplayDuration:Math.min(i,Gg),stickySession:a,useCompression:s,workerUrl:o,blockAllMedia:l,maskAllInputs:f,maskAllText:u,mutationBreadcrumbLimit:m,mutationLimit:g,slowClickTimeout:_,slowClickIgnoreSelectors:T,networkDetailAllowUrls:B,networkDetailDenyUrls:U,networkCaptureBodies:J,networkRequestHeaders:fy(K),networkResponseHeaders:fy(H),beforeAddRecordingEvent:z,beforeErrorSampling:ae,onError:Ee,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${ly}`:ly),this._isInitialized&&bf())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return dy}set _isInitialized(t){dy=t}afterAllSetup(t){!bf()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Gx(this._initialOptions,t);this._replay=new Fx({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Gx(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=Xi(n.replaysSessionSampleRate),a=Xi(n.replaysOnErrorSampleRate);return i==null&&a==null&&Ai(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function fy(e){return[...Ux,...e.map(t=>t.toLowerCase())]}function qx(){return Ce()?.getIntegrationByName("Replay")}var Wx=Object.defineProperty,zx=(e,t,n)=>t in e?Wx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,py=(e,t,n)=>zx(e,typeof t!="symbol"?t+"":t,n);class Yx{constructor(){py(this,"idNodeMap",new Map),py(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Kx(){return new Yx}function Xx(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Hf(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Hf(e.parentNode,t,n,r+1)}function hy(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Xx(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Ra=`Please stop import mirror directly. Instead of that,\r
|
|
513
513
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
514
|
-
or you can use record.mirror to access the mirror instance during recording.`;let my={map:{},getId(){return console.error(Ra),-1},getNode(){return console.error(Ra),null},removeNodeFromMap(){console.error(Ra)},has(){return console.error(Ra),!1},reset(){console.error(Ra)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(my=new Proxy(my,{get(e,t,n){return t==="map"&&console.error(Ra),Reflect.get(e,t,n)}}));function Ch(e,t,n,r,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){iw(()=>{n.set.call(this,s)},0),a&&a.set&&a.set.call(this,s)}}),()=>Ch(e,t,a||{},!0)}function Nh(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function Jx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ml(e,t,n,r,i){if(!e)return!1;const a=Jx(e);if(!a)return!1;const s=hy(t,n),o=Hf(a,s);let c=-1;return o<0?!1:(r&&(c=Hf(a,hy(null,r))),o>-1&&c<0?!0:o<c)}const gy={};function rw(e){const t=gy[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const a=i.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(i)}catch{}return gy[e]=r.bind(window)}function Li(...e){return rw("requestAnimationFrame")(...e)}function iw(...e){return rw("setTimeout")(...e)}var es=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(es||{});let iu;function Zx(e){iu=e}const Pd=e=>iu?(...n)=>{try{return e(...n)}catch(r){if(iu&&iu(r)===!0)return()=>{};throw r}}:e;var Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bc=0;Bc<Da.length;Bc++)Qx[Da.charCodeAt(Bc)]=Bc;var $x=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Da[t[n]>>2],i+=Da[(t[n]&3)<<4|t[n+1]>>4],i+=Da[(t[n+1]&15)<<2|t[n+2]>>6],i+=Da[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const yy=new Map;function eH(e,t){let n=yy.get(e);return n||(n=new Map,yy.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const aw=(e,t,n)=>{if(!e||!(ow(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=eH(n,r);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function au(e,t,n){if(e instanceof Array)return e.map(r=>au(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=$x(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[au(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[au(e.data,t,n),e.width,e.height]};if(ow(e,t)||typeof e=="object"){const r=e.constructor.name,i=aw(e,t,n);return{rr_type:r,index:i}}}}return e}const sw=(e,t,n)=>e.map(r=>au(r,t,n)),ow=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function tH(e,t,n,r,i){const a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const c=Nh(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...f){return Ml(this.canvas,n,r,i,!0)||iw(()=>{const l=sw(f,t,this);e(this.canvas,{type:es["2D"],property:o,args:l})},0),u.apply(this,f)}});a.push(c)}catch{const c=Ch(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:es["2D"],property:o,args:[u],setter:!0})}});a.push(c)}return()=>{a.forEach(o=>o())}}function nH(e){return e==="experimental-webgl"?"webgl":e}function _y(e,t,n,r,i){const a=[];try{const s=Nh(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(c,...u){if(!Ml(this,t,n,r,!0)){const f=nH(c);if("__context"in this||(this.__context=f),i&&["webgl","webgl2"].includes(f))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[c,...u])}});a.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(s=>s())}}function by(e,t,n,r,i,a,s,o){const c=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Nh(e,f,function(m){return function(...g){const _=m.apply(this,g);if(aw(_,o,this),"tagName"in this.canvas&&!Ml(this.canvas,r,i,a,!0)){const T=sw(g,o,this),B={type:t,property:f,args:T};n(this.canvas,B)}return _}});c.push(l)}catch{const l=Ch(e,f,{set(m){n(this.canvas,{type:t,property:f,args:[m],setter:!0})}});c.push(l)}return c}function rH(e,t,n,r,i,a){const s=[];return s.push(...by(t.WebGLRenderingContext.prototype,es.WebGL,e,n,r,i,a,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...by(t.WebGL2RenderingContext.prototype,es.WebGL2,e,n,r,i,a,t)),()=>{s.forEach(o=>o())}}const iH='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function aH(){const e=new Blob([iH]);return URL.createObjectURL(e)}class sH{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:a,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&Zx(s),(a&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&Pd(()=>{a&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),a&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:a,recordCanvas:s,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(t)){if(o){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Pd(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,a),s&&typeof n=="number"){const c=_y(t,r,i,a,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Li(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(aH());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:a,type:s,width:o,height:c}=r;this.mutationCb({id:i,type:es["2D"],commands:[{property:"clearRect",args:[0,0,o,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:a}],type:s}]},0,0,o,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Li(n)};t=Li(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const a=_y(t,n,r,i,!1),s=tH(this.processMutation.bind(this),t,n,r,i),o=rH(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{a(),s(),o()})}getCanvasElements(t,n,r){const i=[],a=s=>{s.querySelectorAll("canvas").forEach(o=>{Ml(o,t,n,r)||i.push(o)})};for(const s of this.windows){const o=s.deref();let c;try{c=o&&o.document}catch{}c&&a(c)}for(const s of this.shadowDoms){const o=s.deref();o&&a(o)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:a,blockSelector:s,unblockSelector:o,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(a,s,o)).forEach(_=>{const T=this.mirror.getId(_);if(!(!this.mirror.hasNode(_)||!_.width||!_.height||this.snapshotInProgressMap.get(T))){if(this.snapshotInProgressMap.set(T,!0),!n&&["webgl","webgl2"].includes(_.__context)){const B=_.getContext(_.__context);B?.getContextAttributes()?.preserveDrawingBuffer===!1&&B.clear(B.COLOR_BUFFER_BIT)}createImageBitmap(_).then(B=>{this.worker?.postMessage({id:T,bitmap:B,width:_.width,height:_.height,dataURLOptions:c,maxCanvasSize:u},[B])}).catch(B=>{Pd(()=>{throw this.snapshotInProgressMap.delete(T),B})()})}}),!0)}startPendingCanvasMutationFlusher(){Li(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Li(t)};Li(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Li(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:o,...c}=s;return c}),{type:a}=r[0];this.mutationCb({id:n,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Kx();var Ey;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ey||(Ey={}));const vy={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},oH="ReplayCanvas",Fc=1280,cH=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Fc):Fc,n?Math.min(n,Fc):Fc]};let i;const a=new Promise(s=>i=s);return{name:oH,getOptions(){const{quality:s,enableManualSnapshot:o,maxCanvasSize:c}=r;return{enableManualSnapshot:o,recordCanvas:!0,getCanvasManager:u=>{const f=new sH({...u,enableManualSnapshot:o,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return i(f),f},...vy[s]||vy.medium}},async snapshot(s,o){(await a).snapshot(s,o)}}},uH=cH;function vr(e=0){return((gn()||performance.timeOrigin)+e)/1e3}function lH(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=q0(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return gn()?[...t,["http.request.redirect_start",vr(e.redirectStart)],["http.request.fetch_start",vr(e.fetchStart)],["http.request.domain_lookup_start",vr(e.domainLookupStart)],["http.request.domain_lookup_end",vr(e.domainLookupEnd)],["http.request.connect_start",vr(e.connectStart)],["http.request.secure_connection_start",vr(e.secureConnectionStart)],["http.request.connection_end",vr(e.connectEnd)],["http.request.request_start",vr(e.requestStart)],["http.request.response_start",vr(e.responseStart)],["http.request.response_end",vr(e.responseEnd)]]:t}const Sy=new WeakMap,kd=new Map,Mh={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function cw(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s,tracePropagationTargets:o,onRequestSpanStart:c}={...Mh,...t},u=typeof a=="function"?a:m=>!0,f=m=>fH(m,o),l={};n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(g=>{if(g.op==="http.client"){const _=kd.get(g.span_id);_&&(g.timestamp=_/1e3,kd.delete(g.span_id))}}),m)),i&&RP(m=>{if(m.response){const g=Sy.get(m.response);g&&m.endTimestamp&&kd.set(g,m.endTimestamp)}}),Jp(m=>{const g=mP(m,u,f,l);if(m.response&&m.fetchData.__span&&Sy.set(m.response,m.fetchData.__span),g){const _=uw(m.fetchData.url),T=_?zi(_).host:void 0;g.setAttributes({"http.url":_,"server.address":T}),s&&wy(g),c?.(g,{headers:m.headers})}})),r&&lh(m=>{const g=pH(m,u,f,l);if(g){s&&wy(g);let _;try{_=new Headers(m.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(g,{headers:_})}})}function dH(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function wy(e){const{url:t}=$e(e).data;if(!t||typeof t!="string")return;const n=Qi("resource",({entries:r})=>{r.forEach(i=>{dH(i)&&i.name.endsWith(t)&&(lH(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function fH(e,t){const n=ra();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const a=r.origin===i;return t?ur(r.toString(),t)||a&&ur(r.pathname,t):a}else{const r=!!e.match(/^\/(?!\/)/);return t?ur(e,t):r}}function pH(e,t,n,r){const i=e.xhr,a=i?.[Ur];if(!i||i.__sentry_own_request__||!a)return;const{url:s,method:o}=a,c=vi()&&t(s);if(e.endTimestamp&&c){const T=i.__sentry_xhr_span_id__;if(!T)return;const B=r[T];B&&a.status_code!==void 0&&(zs(B,a.status_code),B.end(),delete r[T]);return}const u=uw(s),f=zi(u||s),l=s0(s),m=!!en(),g=c&&m?oa({name:`${o} ${l}`,attributes:{url:s,type:"xhr","http.method":o,"http.url":u,"server.address":f?.host,[xt]:"auto.http.browser",[Vn]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Xr;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(s)&&hH(i,vi()&&m?g:void 0);const _=Ce();return _&&_.emit("beforeOutgoingRequestSpan",g,e),g}function hH(e,t){const{"sentry-trace":n,baggage:r}=Yp({span:t});n&&mH(e,n,r)}function mH(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const i=r?.baggage;(!i||!gH(i))&&e.setRequestHeader("baggage",n)}}catch{}}function gH(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function uw(e){try{return new URL(e,xe.location.origin).href}catch{return}}function yH(){xe.document?xe.document.addEventListener("visibilitychange",()=>{const e=en();if(!e)return;const t=Qt(e);if(xe.document.hidden&&t){const n="cancelled",{op:r,status:i}=$e(t);st&&X.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:qt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):st&&X.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const _H=3600,lw="sentry_previous_trace",bH="sentry.previous_trace";function EH(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?wH():void 0;e.on("spanStart",s=>{if(Qt(s)!==s)return;const o=tt().getPropagationContext();i=vH(i,s,o),r&&SH(i)});let a=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const o=tt(),c=o.getPropagationContext();if(a&&c.parentSpanId){a=!1;return}o.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(Uf(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Uf(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[JE]:i.sampleRate}})}function vH(e,t,n){const r=$e(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[fl])}catch{return 0}}const a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=_H&&(st&&X.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[YR]:"previous_trace"}}),t.setAttribute(bH,`${s.traceId}-${s.spanId}-${Uf(s)?1:0}`)),a)}function SH(e){try{xe.sessionStorage.setItem(lw,JSON.stringify(e))}catch(t){st&&X.warn("Could not store previous trace in sessionStorage",t)}}function wH(){try{const e=xe.sessionStorage?.getItem(lw);return JSON.parse(e)}catch{return}}function Uf(e){return e.traceFlags===1}const TH="BrowserTracing",IH={...Yc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Mh},AH=(e={})=>{const t={name:void 0,source:void 0},n=xe.document,{enableInp:r,enableElementTiming:i,enableLongTask:a,enableLongAnimationFrame:s,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:f,idleTimeout:l,finalTimeout:m,childSpanTimeout:g,markBackgroundSpan:_,traceFetch:T,traceXHR:B,trackFetchStreamPerformance:U,shouldCreateSpanForRequest:J,enableHTTPTimings:K,ignoreResourceSpans:H,ignorePerformanceApiSpans:F,instrumentPageLoad:k,instrumentNavigation:j,detectRedirects:te,linkPreviousTrace:L,consistentTraceSampling:G,onRequestSpanStart:W}={...IH,...e};let z,ae;function Ee(pe,le,$=!0){const ve=le.op==="pageload",ge=f?f(le):le,fe=ge.attributes||{};if(le.name!==ge.name&&(fe[Un]="custom",ge.attributes=fe),!$){const ce=ia();oa({...ge,startTime:ce}).end(ce);return}t.name=ge.name,t.source=fe[Un];const Se=Sv(ge,{idleTimeout:l,finalTimeout:m,childSpanTimeout:g,disableAutoFinish:ve,beforeSpanEnd:ce=>{z?.(),aL(ce,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:H,ignorePerformanceApiSpans:F}),Iy(pe,void 0);const He=tt(),Et=He.getPropagationContext();He.setPropagationContext({...Et,traceId:Se.spanContext().traceId,sampled:aa(Se),dsc:dr(ce)})}});Iy(pe,Se);function Xe(){n&&["interactive","complete"].includes(n.readyState)&&pe.emit("idleSpanEnableAutoFinish",Se)}ve&&n&&(n.addEventListener("readystatechange",()=>{Xe()}),Xe())}return{name:TH,setup(pe){if(dv(),z=Z1({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:pe}),r&&OL(),i&&mL(),s&&Ge.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?$1():a&&Q1(),o&&eL(),te&&n){const $=()=>{ae=Kt()};addEventListener("click",$,{capture:!0}),addEventListener("keydown",$,{capture:!0,passive:!0})}function le(){const $=Qs(pe);$&&!$e($).timestamp&&(st&&X.log(`[Tracing] Finishing current active span with op: ${$e($).op}`),$.setAttribute(gu,"cancelled"),$.end())}pe.on("startNavigationSpan",($,ve)=>{if(Ce()!==pe)return;if(ve?.isRedirect){st&&X.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),Ee(pe,{op:"navigation.redirect",...$},!1);return}le(),$t().setPropagationContext({traceId:Kr(),sampleRand:Math.random()});const ge=tt();ge.setPropagationContext({traceId:Kr(),sampleRand:Math.random()}),ge.setSDKProcessingMetadata({normalizedRequest:void 0}),Ee(pe,{op:"navigation",...$})}),pe.on("startPageLoadSpan",($,ve={})=>{if(Ce()!==pe)return;le();const ge=ve.sentryTrace||Ty("sentry-trace"),fe=ve.baggage||Ty("baggage"),Se=rv(ge,fe),Xe=tt();Xe.setPropagationContext(Se),Xe.setSDKProcessingMetadata({normalizedRequest:nh()}),Ee(pe,{op:"pageload",...$})})},afterAllSetup(pe){let le=ra();if(L!=="off"&&EH(pe,{linkPreviousTrace:L,consistentTraceSampling:G}),xe.location){if(k){const $=gn();dw(pe,{name:xe.location.pathname,startTime:$?$/1e3:void 0,attributes:{[Un]:"url",[xt]:"auto.pageload.browser"}})}j&&Tl(({to:$,from:ve})=>{if(ve===void 0&&le?.indexOf($)!==-1){le=void 0;return}le=void 0;const ge=a0($),fe=Qs(pe),Se=fe&&te&&RH(fe,ae);fw(pe,{name:ge?.pathname||xe.location.pathname,attributes:{[Un]:"url",[xt]:"auto.navigation.browser"}},{url:$,isRedirect:Se})})}_&&yH(),o&&OH(pe,l,m,g,t),r&&NL(),cw(pe,{traceFetch:T,traceXHR:B,trackFetchStreamPerformance:U,tracePropagationTargets:pe.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:J,enableHTTPTimings:K,onRequestSpanStart:W})}}};function dw(e,t,n){e.emit("startPageLoadSpan",t,n),tt().setTransactionName(t.name);const r=Qs(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function fw(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const a=tt();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...nh(),url:r}}),Qs(e)}function Ty(e){return xe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function OH(e,t,n,r,i){const a=xe.document;let s;const o=()=>{const c="ui.action.click",u=Qs(e);if(u){const f=$e(u).op;if(["navigation","pageload"].includes(f)){st&&X.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(gu,"interactionInterrupted"),s.end(),s=void 0),!i.name){st&&X.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=Sv({name:i.name,op:c,attributes:{[Un]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};a&&addEventListener("click",o,{capture:!0})}const pw="_sentry_idleSpan";function Qs(e){return e[pw]}function Iy(e,t){Pn(e,pw,t)}const Ay=.3;function RH(e,t){const n=$e(e),r=ia(),i=n.start_timestamp;return!(r-i>Ay||t&&r-t<=Ay)}function ts(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function CH(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=ts(n);return i=>r.then(a=>i(a.transaction(t,"readwrite").objectStore(t)))}function Ph(e){return ts(e.getAllKeys())}function NH(e,t,n){return e(r=>Ph(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),ts(r.transaction)}))}function MH(e,t,n){return e(r=>Ph(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),ts(r.transaction)}))}function PH(e){return e(t=>Ph(t).then(n=>{const r=n[0];if(r!=null)return ts(t.get(r)).then(i=>(t.delete(r),ts(t.transaction).then(()=>i)))}))}function kH(e){let t;function n(){return t==null&&(t=CH(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=await bu(r);await NH(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=await bu(r);await MH(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await PH(n());if(r)return vC(r)}catch{}}}}function LH(e){return t=>{const n=e({...t,createStore:kH});return xe.addEventListener("online",async r=>{await n.flush()}),n}}function DH(e=fh){return LH(GN(e))}const Oy=1e6,su=String(0),BH="main",Uu=xe.navigator;let hw="",mw="",gw="",jf=Uu?.userAgent||"",yw="";const FH=Uu?.language||Uu?.languages?.[0]||"";function xH(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const Ry=Uu?.userAgentData;xH(Ry)&&Ry.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(hw=e.platform||"",gw=e.architecture||"",yw=e.model||"",mw=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];jf=`${t.brand} ${t.version}`}}).catch(e=>{});function HH(e){return!("thread_metadata"in e)}function UH(e){return HH(e)?GH(e):e}function jH(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&st&&X.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function VH(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=jH(r),a=UH(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Kt()*1e3),o=typeof r.timestamp=="number"?r.timestamp*1e3:Kt()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||pl,runtime:{name:"javascript",version:xe.navigator.userAgent},os:{name:hw,version:mw,build_number:jf},device:{locale:FH,model:yw,manufacturer:jf,architecture:gw,is_emulator:!1},debug_meta:{images:zH(n.resources)},profile:a,transactions:[{name:r.transaction||"",id:r.event_id||In(),trace_id:i,active_thread_id:su,relative_start_ns:"0",relative_end_ns:((o-s)*1e6).toFixed(0)}]}}function _w(e){return $e(e).op==="pageload"}function GH(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[su]:{name:BH}}},i=e.samples[0];if(!i)return r;const a=i.timestamp,s=gn(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=o-(s||o);return e.samples.forEach((u,f)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((u.timestamp+c-a)*Oy).toFixed(0),stack_id:t,thread_id:su};return}let l=e.stacks[u.stackId];const m=[];for(;l;){m.push(l.frameId);const _=e.frames[l.frameId];_&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:_.name,abs_path:typeof _.resourceId=="number"?e.resources[_.resourceId]:void 0,lineno:_.line,colno:_.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const g={elapsed_since_start_ns:((u.timestamp+c-a)*Oy).toFixed(0),stack_id:n,thread_id:su};r.stacks[n]=m,r.samples[f]=g,n++}),r}function qH(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function WH(e){const t=[];return Ji(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function zH(e){const r=Ce()?.getOptions()?.stackParser;return r?ZC(r,e):[]}function YH(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(st&&X.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(st&&X.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function KH(e){return e.samples.length<2?(st&&X.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(st&&X.log("[Profiling] Discarding profile because it contains no frames"),!1)}let bw=!1;const Ew=3e4;function XH(e){return typeof e=="function"}function JH(){const e=xe.Profiler;if(!XH(e)){st&&X.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Ew/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{st&&(X.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),X.log("[Profiling] Disabling profiling for current user session.")),bw=!0}}function Cy(e){if(bw)return st&&X.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return st&&X.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=Ce()?.getOptions();if(!n)return st&&X.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return YH(r)?r?(r===!0?!0:Math.random()<r)?!0:(st&&X.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(st&&X.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(st&&X.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function ZH(e,t,n,r){return KH(n)?VH(e,t,n,r):null}const Gi=new Map;function QH(){return Gi.size}function $H(e){const t=Gi.get(e);return t&&Gi.delete(e),t}function eU(e,t){if(Gi.set(e,t),Gi.size>30){const n=Gi.keys().next().value;Gi.delete(n)}}function Ny(e){let t;_w(e)&&(t=Kt()*1e3);const n=JH();if(!n)return;st&&X.log(`[Profiling] started profiling span: ${$e(e).description}`);const r=In();tt().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n)return n.stop().then(c=>{if(a&&(xe.clearTimeout(a),a=void 0),st&&X.log(`[Profiling] stopped profiling of span: ${$e(e).description}`),!c){st&&X.log(`[Profiling] profiler returned null profile for: ${$e(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}eU(r,c)}).catch(c=>{st&&X.log("[Profiling] error while stopping profiler:",c)})}let a=xe.setTimeout(()=>{st&&X.log("[Profiling] max profile duration elapsed, stopping profiling for:",$e(e).description),i()},Ew);const s=e.end.bind(e);function o(){return e?(i().then(()=>{s()},()=>{s()}),e):s()}e.end=o}const tU="BrowserProfiling",nU=()=>({name:tU,setup(e){const t=en(),n=t&&Qt(t);n&&_w(n)&&Cy(n)&&Ny(n),e.on("spanStart",r=>{r===Qt(r)&&Cy(r)&&Ny(r)}),e.on("beforeEnvelope",r=>{if(!QH())return;const i=WH(r);if(!i.length)return;const a=[];for(const s of i){const o=s?.contexts,c=o?.profile?.profile_id,u=o?.profile?.start_timestamp;if(typeof c!="string"){st&&X.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){st&&X.log("[Profiling] cannot find profile for a span without a profile context");continue}o?.profile&&delete o.profile;const f=$H(c);if(!f){st&&X.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const l=ZH(c,u,f,s);l&&a.push(l)}qH(r,a)})}}),rU=nU,iU="SpotlightBrowser",aU=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:iU,setup:()=>{st&&X.log("Using Sidecar URL",t)},processEvent:n=>cU(n)?null:n,afterAllSetup:n=>{sU(n,t)}}};function sU(e,t){const n=uh("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){X.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:bu(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(a=>{a.status>=200&&a.status<400&&(r=0)},a=>{r++,X.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",a)})})}const oU=aU;function cU(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const uU=()=>({name:"LaunchDarkly",processEvent(e,t,n){return yo(e)}});function lU(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Ga(e,t.value),qa(e,t.value)}}}const dU=()=>({name:"OpenFeature",processEvent(e,t,n){return yo(e)}});class fU{after(t,n){Ga(n.flagKey,n.value),qa(n.flagKey,n.value)}error(t,n,r){Ga(t.flagKey,t.defaultValue),qa(t.flagKey,t.defaultValue)}}const pU=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Tn(t,"isEnabled",hU)},processEvent(t,n,r){return yo(t)}});function hU(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Ga(n,r),qa(n,r)):st&&X.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const mU=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Ga(n.gate.name,n.gate.value),qa(n.gate.name,n.gate.value)})},processEvent(t,n,r){return yo(t)}});async function gU(){const e=Ce();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}const yU="WebWorker",_U=({worker:e})=>({name:yU,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>My(t))},addWorker:t=>My(t)});function My(e){e.addEventListener("message",t=>{EU(t.data)&&(t.stopImmediatePropagation(),st&&X.log("Sentry debugId web worker message received",t.data),xe._sentryDebugIds={...t.data._sentryDebugIds,...xe._sentryDebugIds})})}function bU({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function EU(e){return zr(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(zr(e._sentryDebugIds)||e._sentryDebugIds===void 0)}const vU=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:N0,OpenFeatureIntegrationHook:fU,SDK_VERSION:Vr,SEMANTIC_ATTRIBUTE_SENTRY_OP:Vn,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:xt,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:fl,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Un,Scope:lr,WINDOW:xe,addBreadcrumb:Rr,addEventProcessor:Rv,addIntegration:pf,breadcrumbsIntegration:eS,browserApiErrorsIntegration:tS,browserProfilingIntegration:rU,browserSessionIntegration:nS,browserTracingIntegration:AH,buildLaunchDarklyFlagUsedHandler:lU,captureConsoleIntegration:EM,captureEvent:go,captureException:Zi,captureFeedback:o0,captureMessage:wu,captureSession:ff,chromeStackLineParser:X0,close:hN,consoleLoggingIntegration:wP,contextLinesIntegration:e2,continueTrace:BC,createTransport:Gv,createUserFeedbackEnvelope:QL,dedupeIntegration:$v,defaultRequestInstrumentationOptions:Mh,defaultStackLineParsers:Z0,defaultStackParser:Q0,diagnoseSdkConnectivity:gU,endSession:Wp,eventFiltersIntegration:Kv,eventFromException:R0,eventFromMessage:C0,exceptionFromError:bl,extraErrorDataIntegration:CM,featureFlagsIntegration:fP,feedbackAsyncIntegration:Zk,feedbackIntegration:Pg,feedbackSyncIntegration:Pg,flush:pN,forceLoad:MD,functionToStringIntegration:Yv,geckoStackLineParser:J0,getActiveSpan:en,getClient:Ce,getCurrentScope:tt,getDefaultIntegrations:oS,getFeedback:ok,getGlobalScope:dl,getIsolationScope:$t,getReplay:qx,getRootSpan:Qt,getSpanDescendants:xs,getSpanStatusFromHttpCode:ZE,getTraceData:Yp,globalHandlersIntegration:rS,graphqlClientIntegration:c2,httpClientIntegration:UD,httpContextIntegration:aS,inboundFiltersIntegration:Xv,init:ND,instrumentOutgoingRequests:cw,instrumentSupabaseClient:r0,isEnabled:Ov,isInitialized:mN,lastEventId:Av,launchDarklyIntegration:uU,lazyLoadIntegration:A0,linkedErrorsIntegration:sS,logger:i1,makeBrowserOfflineTransport:DH,makeFetchTransport:fh,makeMultiplexedTransport:zN,moduleMetadataIntegration:gM,onLoad:PD,openFeatureIntegration:dU,opera10StackLineParser:KL,opera11StackLineParser:ZL,parameterize:zv,registerSpanErrorInstrumentation:dv,registerWebWorker:bU,replayCanvasIntegration:uH,replayIntegration:jx,reportingObserverIntegration:FD,rewriteFramesIntegration:xM,sendFeedback:f0,setContext:Iv,setCurrentClient:xv,setExtra:uN,setExtras:cN,setHttpStatus:zs,setMeasurement:bv,setTag:dN,setTags:lN,setUser:fN,showReportDialog:kD,spanToBaggageHeader:fC,spanToJSON:$e,spanToTraceHeader:ov,spotlightBrowserIntegration:oU,startBrowserTracingNavigationSpan:fw,startBrowserTracingPageLoadSpan:dw,startInactiveSpan:oa,startNewTrace:xC,startSession:df,startSpan:ml,startSpanManual:DC,statsigIntegration:mU,supabaseIntegration:ZM,suppressTracing:FC,thirdPartyErrorFilterIntegration:oP,unleashIntegration:pU,updateSpanName:sC,webWorkerIntegration:_U,winjsStackLineParser:WL,withActiveSpan:ho,withIsolationScope:qR,withScope:Zn,zodErrorsIntegration:sP},Symbol.toStringTag,{value:"Module"})),Pl=e=>{typeof window<"u"&&window.Sentry&&e(vU)},{useEffect:SU}=await kn("react"),vw=(e,t)=>SU(()=>{const n=e().catch(r=>{console.error("AsyncEffect error: ",r),Pl(i=>i.captureException("AsyncEffect error: "+r.message,{extra:r}))});return function(){n.then(r=>{typeof r=="function"&&r()})}},t),{createContext:wU,useMemo:TU,useRef:IU,useState:AU}=await kn("react"),Sw=wU(null),Uj=e=>{const{writeKey:t,userId:n,traits:r,children:i}=e,a=IU(null),[s,o]=AU(!1);vw(async()=>{if(!t){console.log("[Analytics] No writeKey provided");return}const u=navigator.userAgent;if(lR(u)){console.log("[Analytics] Skipping load: bot detected");return}try{const{AnalyticsBrowser:l}=await rT(async()=>{const{AnalyticsBrowser:m}=await import("../index-BjA_RJ3F.js").then(g=>g.q);return{AnalyticsBrowser:m}},__vite__mapDeps([0,1,2,3,4]));a.current=l.load({writeKey:t}),n&&a.current.identify(n,r),o(!0)}catch(l){console.error("[Analytics] Failed to initialize:",l),a.current=null}},[t,n,r]);const c=TU(()=>!a.current||!s?{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}:{isInitialized:!0,track:(u,f)=>{a.current?.track(u,f)},identify:(u,f)=>{a.current?.identify(u,f)},page:(u,f)=>{a.current?.page(u,f)}},[s]);return m_.jsx(Sw.Provider,{value:c,children:i})},{createContext:OU}=await kn("react"),ww=OU(null);function wr(e,t){var n=t&&t.cache?t.cache:LU,r=t&&t.serializer?t.serializer:PU,i=t&&t.strategy?t.strategy:NU;return i(e,{cache:n,serializer:r})}function RU(e){return e==null||typeof e=="number"||typeof e=="boolean"}function CU(e,t,n,r){var i=RU(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Tw(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Iw(e,t,n,r,i){return n.bind(t,e,r,i)}function NU(e,t){var n=e.length===1?CU:Tw;return Iw(e,this,n,t.cache.create(),t.serializer)}function MU(e,t){return Iw(e,this,Tw,t.cache.create(),t.serializer)}var PU=function(){return JSON.stringify(arguments)},kU=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),LU={create:function(){return new kU}},Tr={variadic:MU},ft;(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"})(ft||(ft={}));var Pt;(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"})(Pt||(Pt={}));var ns;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ns||(ns={}));function Py(e){return e.type===Pt.literal}function DU(e){return e.type===Pt.argument}function Aw(e){return e.type===Pt.number}function Ow(e){return e.type===Pt.date}function Rw(e){return e.type===Pt.time}function Cw(e){return e.type===Pt.select}function Nw(e){return e.type===Pt.plural}function BU(e){return e.type===Pt.pound}function Mw(e){return e.type===Pt.tag}function Pw(e){return!!(e&&typeof e=="object"&&e.type===ns.number)}function Vf(e){return!!(e&&typeof e=="object"&&e.type===ns.dateTime)}var kw=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,FU=/(?:[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 xU(e){var t={};return e.replace(FU,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===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"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-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=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-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"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-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"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<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 HU=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function UU(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(HU).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],c=s.slice(1),u=0,f=c;u<f.length;u++){var l=f[u];if(l.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:c})}return n}function jU(e){return e.replace(/^(.*?)-/,"")}var ky=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Lw=/^(@+)?(\+|#+)?[rs]?$/g,VU=/(\*)(0+)|(#+)(0+)|(0+)/g,Dw=/^(0+)$/;function Ly(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Lw,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Bw(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 GU(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 n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Dw.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Dy(e){var t={},n=Bw(e);return n||t}function qU(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=jU(i.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=Fe(Fe(Fe({},t),{notation:"scientific"}),i.options.reduce(function(c,u){return Fe(Fe({},c),Dy(u))},{}));continue;case"engineering":t=Fe(Fe(Fe({},t),{notation:"engineering"}),i.options.reduce(function(c,u){return Fe(Fe({},c),Dy(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(i.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(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(VU,function(c,u,f,l,m,g){if(u)t.minimumIntegerDigits=f.length;else{if(l&&m)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Dw.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ky.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ky,function(c,u,f,l,m,g){return f==="*"?t.minimumFractionDigits=u.length:l&&l[0]==="#"?t.maximumFractionDigits=l.length:m&&g?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+g.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=Fe(Fe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=Fe(Fe({},t),Ly(a)));continue}if(Lw.test(i.stem)){t=Fe(Fe({},t),Ly(i.stem));continue}var s=Bw(i.stem);s&&(t=Fe(Fe({},t),s));var o=GU(i.stem);o&&(t=Fe(Fe({},t),o))}return t}var xc={"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 WU(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),c="a",u=zU(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function zU(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 n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=xc[r||""]||xc[n||""]||xc["".concat(n,"-001")]||xc["001"];return i[0]}var Ld,YU=new RegExp("^".concat(kw.source,"*")),KU=new RegExp("".concat(kw.source,"*$"));function ht(e,t){return{start:e,end:t}}var XU=!!String.prototype.startsWith&&"_a".startsWith("a",1),JU=!!String.fromCodePoint,ZU=!!Object.fromEntries,QU=!!String.prototype.codePointAt,$U=!!String.prototype.trimStart,e3=!!String.prototype.trimEnd,t3=!!Number.isSafeInteger,n3=t3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Gf=!0;try{var r3=xw("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Gf=((Ld=r3.exec("a"))===null||Ld===void 0?void 0:Ld[0])==="a"}catch{Gf=!1}var By=XU?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},qf=JU?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Fy=ZU?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Fw=QU?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},i3=$U?function(t){return t.trimStart()}:function(t){return t.replace(YU,"")},a3=e3?function(t){return t.trimEnd()}:function(t){return t.replace(KU,"")};function xw(e,t){return new RegExp(e,t)}var Wf;if(Gf){var xy=xw("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Wf=function(t,n){var r;xy.lastIndex=n;var i=xy.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Wf=function(t,n){for(var r=[];;){var i=Fw(t,n);if(i===void 0||Hw(i)||u3(i))break;r.push(i),n+=i>=65536?2:1}return qf.apply(void 0,r)};var s3=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.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,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Pt.pound,location:ht(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,ht(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&zf(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Pt.literal,value:"<".concat(i,"/>"),location:ht(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!zf(this.char()))return this.error(ft.INVALID_TAG,ht(o,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(ft.UNMATCHED_CLOSING_TAG,ht(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Pt.tag,value:i,children:s,location:ht(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,ht(o,this.clonePosition())))}else return this.error(ft.UNCLOSED_TAG,ht(r,this.clonePosition()))}else return this.error(ft.INVALID_TAG,ht(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&c3(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var c=ht(r,this.clonePosition());return{val:{type:Pt.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!o3(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 n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return qf.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),qf(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ft.EMPTY_ARGUMENT,ht(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ft.MALFORMED_ARGUMENT,ht(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Pt.argument,value:i,location:ht(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ft.MALFORMED_ARGUMENT,ht(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Wf(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=ht(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(o){case"":return this.error(ft.EXPECT_ARGUMENT_TYPE,ht(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),l=this.parseSimpleArgStyleIfPossible();if(l.err)return l;var m=a3(l.val);if(m.length===0)return this.error(ft.EXPECT_ARGUMENT_STYLE,ht(this.clonePosition(),this.clonePosition()));var g=ht(f,this.clonePosition());u={style:m,styleLocation:g}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var T=ht(i,this.clonePosition());if(u&&By(u?.style,"::",0)){var B=i3(u.style.slice(2));if(o==="number"){var l=this.parseNumberSkeletonFromString(B,u.styleLocation);return l.err?l:{val:{type:Pt.number,value:r,location:T,style:l.val},err:null}}else{if(B.length===0)return this.error(ft.EXPECT_DATE_TIME_SKELETON,T);var U=B;this.locale&&(U=WU(B,this.locale));var m={type:ns.dateTime,pattern:U,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?xU(U):{}},J=o==="date"?Pt.date:Pt.time;return{val:{type:J,value:r,location:T,style:m},err:null}}}return{val:{type:o==="number"?Pt.number:o==="date"?Pt.date:Pt.time,value:r,location:T,style:(a=u?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var K=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,ht(K,Fe({},K)));this.bumpSpace();var H=this.parseIdentifierIfPossible(),F=0;if(o!=="select"&&H.value==="offset"){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ht(this.clonePosition(),this.clonePosition()));this.bumpSpace();var l=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(l.err)return l;this.bumpSpace(),H=this.parseIdentifierIfPossible(),F=l.val}var k=this.tryParsePluralOrSelectOptions(t,o,n,H);if(k.err)return k;var _=this.tryParseArgumentClose(i);if(_.err)return _;var j=ht(i,this.clonePosition());return o==="select"?{val:{type:Pt.select,value:r,options:Fy(k.val),location:j},err:null}:{val:{type:Pt.plural,value:r,options:Fy(k.val),offset:F,pluralType:o==="plural"?"cardinal":"ordinal",location:j},err:null}}default:return this.error(ft.INVALID_ARGUMENT_TYPE,ht(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ft.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ht(i,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(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=UU(t)}catch{return this.error(ft.INVALID_NUMBER_SKELETON,n)}return{val:{type:ns.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?qU(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],c=new Set,u=i.value,f=i.location;;){if(u.length===0){var l=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ft.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;f=ht(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(s=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ht(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,n,r);if(_.err)return _;var T=this.tryParseArgumentClose(g);if(T.err)return T;o.push([u,{value:_.val,location:ht(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,f=a.location}return o.length===0?this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ht(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ft.MISSING_OTHER_CLAUSE,ht(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var c=ht(i,this.clonePosition());return a?(s*=r,n3(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},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 n=Fw(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},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(By(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!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 n=this.offset();if(n===t)break;if(n>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()&&Hw(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function zf(e){return e>=97&&e<=122||e>=65&&e<=90}function o3(e){return zf(e)||e===47}function c3(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 Hw(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function u3(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 Yf(e){e.forEach(function(t){if(delete t.location,Cw(t)||Nw(t))for(var n in t.options)delete t.options[n].location,Yf(t.options[n].value);else Aw(t)&&Pw(t.style)||(Ow(t)||Rw(t))&&Vf(t.style)?delete t.style.location:Mw(t)&&Yf(t.children)})}function l3(e,t){t===void 0&&(t={}),t=Fe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new s3(e,t).parse();if(n.err){var r=SyntaxError(ft[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Yf(n.val),n.val}var Cr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Cr||(Cr={}));var Ni=function(e){pr(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Hy=function(e){pr(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Cr.INVALID_VALUE,a)||this}return t}(Ni),d3=function(e){pr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Cr.INVALID_VALUE,i)||this}return t}(Ni),f3=function(e){pr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Cr.MISSING_VALUE,r)||this}return t}(Ni),vn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(vn||(vn={}));function p3(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==vn.literal||n.type!==vn.literal?t.push(n):r.value+=n.value,t},[])}function h3(e){return typeof e=="function"}function ou(e,t,n,r,i,a,s){if(e.length===1&&Py(e[0]))return[{type:vn.literal,value:e[0].value}];for(var o=[],c=0,u=e;c<u.length;c++){var f=u[c];if(Py(f)){o.push({type:vn.literal,value:f.value});continue}if(BU(f)){typeof a=="number"&&o.push({type:vn.literal,value:n.getNumberFormat(t).format(a)});continue}var l=f.value;if(!(i&&l in i))throw new f3(l,s);var m=i[l];if(DU(f)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?vn.literal:vn.object,value:m});continue}if(Ow(f)){var g=typeof f.style=="string"?r.date[f.style]:Vf(f.style)?f.style.parsedOptions:void 0;o.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Rw(f)){var g=typeof f.style=="string"?r.time[f.style]:Vf(f.style)?f.style.parsedOptions:r.time.medium;o.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Aw(f)){var g=typeof f.style=="string"?r.number[f.style]:Pw(f.style)?f.style.parsedOptions:void 0;g&&g.scale&&(m=m*(g.scale||1)),o.push({type:vn.literal,value:n.getNumberFormat(t,g).format(m)});continue}if(Mw(f)){var _=f.children,T=f.value,B=i[T];if(!h3(B))throw new d3(T,"function",s);var U=ou(_,t,n,r,i,a),J=B(U.map(function(F){return F.value}));Array.isArray(J)||(J=[J]),o.push.apply(o,J.map(function(F){return{type:typeof F=="string"?vn.literal:vn.object,value:F}}))}if(Cw(f)){var K=f.options[m]||f.options.other;if(!K)throw new Hy(f.value,m,Object.keys(f.options),s);o.push.apply(o,ou(K.value,t,n,r,i));continue}if(Nw(f)){var K=f.options["=".concat(m)];if(!K){if(!Intl.PluralRules)throw new Ni(`Intl.PluralRules is not available in this environment.
|
|
514
|
+
or you can use record.mirror to access the mirror instance during recording.`;let my={map:{},getId(){return console.error(Ra),-1},getNode(){return console.error(Ra),null},removeNodeFromMap(){console.error(Ra)},has(){return console.error(Ra),!1},reset(){console.error(Ra)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(my=new Proxy(my,{get(e,t,n){return t==="map"&&console.error(Ra),Reflect.get(e,t,n)}}));function Ch(e,t,n,r,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){iw(()=>{n.set.call(this,s)},0),a&&a.set&&a.set.call(this,s)}}),()=>Ch(e,t,a||{},!0)}function Nh(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function Jx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ml(e,t,n,r,i){if(!e)return!1;const a=Jx(e);if(!a)return!1;const s=hy(t,n),o=Hf(a,s);let c=-1;return o<0?!1:(r&&(c=Hf(a,hy(null,r))),o>-1&&c<0?!0:o<c)}const gy={};function rw(e){const t=gy[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const a=i.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(i)}catch{}return gy[e]=r.bind(window)}function Li(...e){return rw("requestAnimationFrame")(...e)}function iw(...e){return rw("setTimeout")(...e)}var es=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(es||{});let iu;function Zx(e){iu=e}const Pd=e=>iu?(...n)=>{try{return e(...n)}catch(r){if(iu&&iu(r)===!0)return()=>{};throw r}}:e;var Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bc=0;Bc<Da.length;Bc++)Qx[Da.charCodeAt(Bc)]=Bc;var $x=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Da[t[n]>>2],i+=Da[(t[n]&3)<<4|t[n+1]>>4],i+=Da[(t[n+1]&15)<<2|t[n+2]>>6],i+=Da[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const yy=new Map;function eH(e,t){let n=yy.get(e);return n||(n=new Map,yy.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const aw=(e,t,n)=>{if(!e||!(ow(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=eH(n,r);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function au(e,t,n){if(e instanceof Array)return e.map(r=>au(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=$x(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[au(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[au(e.data,t,n),e.width,e.height]};if(ow(e,t)||typeof e=="object"){const r=e.constructor.name,i=aw(e,t,n);return{rr_type:r,index:i}}}}return e}const sw=(e,t,n)=>e.map(r=>au(r,t,n)),ow=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function tH(e,t,n,r,i){const a=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const c=Nh(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...f){return Ml(this.canvas,n,r,i,!0)||iw(()=>{const l=sw(f,t,this);e(this.canvas,{type:es["2D"],property:o,args:l})},0),u.apply(this,f)}});a.push(c)}catch{const c=Ch(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:es["2D"],property:o,args:[u],setter:!0})}});a.push(c)}return()=>{a.forEach(o=>o())}}function nH(e){return e==="experimental-webgl"?"webgl":e}function _y(e,t,n,r,i){const a=[];try{const s=Nh(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(c,...u){if(!Ml(this,t,n,r,!0)){const f=nH(c);if("__context"in this||(this.__context=f),i&&["webgl","webgl2"].includes(f))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[c,...u])}});a.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(s=>s())}}function by(e,t,n,r,i,a,s,o){const c=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Nh(e,f,function(m){return function(...g){const _=m.apply(this,g);if(aw(_,o,this),"tagName"in this.canvas&&!Ml(this.canvas,r,i,a,!0)){const T=sw(g,o,this),B={type:t,property:f,args:T};n(this.canvas,B)}return _}});c.push(l)}catch{const l=Ch(e,f,{set(m){n(this.canvas,{type:t,property:f,args:[m],setter:!0})}});c.push(l)}return c}function rH(e,t,n,r,i,a){const s=[];return s.push(...by(t.WebGLRenderingContext.prototype,es.WebGL,e,n,r,i,a,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...by(t.WebGL2RenderingContext.prototype,es.WebGL2,e,n,r,i,a,t)),()=>{s.forEach(o=>o())}}const iH='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function aH(){const e=new Blob([iH]);return URL.createObjectURL(e)}class sH{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:a,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&Zx(s),(a&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&Pd(()=>{a&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),a&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:a,recordCanvas:s,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(t)){if(o){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Pd(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,a),s&&typeof n=="number"){const c=_y(t,r,i,a,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Li(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(aH());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:a,type:s,width:o,height:c}=r;this.mutationCb({id:i,type:es["2D"],commands:[{property:"clearRect",args:[0,0,o,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:a}],type:s}]},0,0,o,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Li(n)};t=Li(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const a=_y(t,n,r,i,!1),s=tH(this.processMutation.bind(this),t,n,r,i),o=rH(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{a(),s(),o()})}getCanvasElements(t,n,r){const i=[],a=s=>{s.querySelectorAll("canvas").forEach(o=>{Ml(o,t,n,r)||i.push(o)})};for(const s of this.windows){const o=s.deref();let c;try{c=o&&o.document}catch{}c&&a(c)}for(const s of this.shadowDoms){const o=s.deref();o&&a(o)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:a,blockSelector:s,unblockSelector:o,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(a,s,o)).forEach(_=>{const T=this.mirror.getId(_);if(!(!this.mirror.hasNode(_)||!_.width||!_.height||this.snapshotInProgressMap.get(T))){if(this.snapshotInProgressMap.set(T,!0),!n&&["webgl","webgl2"].includes(_.__context)){const B=_.getContext(_.__context);B?.getContextAttributes()?.preserveDrawingBuffer===!1&&B.clear(B.COLOR_BUFFER_BIT)}createImageBitmap(_).then(B=>{this.worker?.postMessage({id:T,bitmap:B,width:_.width,height:_.height,dataURLOptions:c,maxCanvasSize:u},[B])}).catch(B=>{Pd(()=>{throw this.snapshotInProgressMap.delete(T),B})()})}}),!0)}startPendingCanvasMutationFlusher(){Li(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Li(t)};Li(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Li(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:o,...c}=s;return c}),{type:a}=r[0];this.mutationCb({id:n,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Kx();var Ey;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ey||(Ey={}));const vy={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},oH="ReplayCanvas",Fc=1280,cH=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Fc):Fc,n?Math.min(n,Fc):Fc]};let i;const a=new Promise(s=>i=s);return{name:oH,getOptions(){const{quality:s,enableManualSnapshot:o,maxCanvasSize:c}=r;return{enableManualSnapshot:o,recordCanvas:!0,getCanvasManager:u=>{const f=new sH({...u,enableManualSnapshot:o,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}});return i(f),f},...vy[s]||vy.medium}},async snapshot(s,o){(await a).snapshot(s,o)}}},uH=cH;function vr(e=0){return((gn()||performance.timeOrigin)+e)/1e3}function lH(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=q0(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return gn()?[...t,["http.request.redirect_start",vr(e.redirectStart)],["http.request.fetch_start",vr(e.fetchStart)],["http.request.domain_lookup_start",vr(e.domainLookupStart)],["http.request.domain_lookup_end",vr(e.domainLookupEnd)],["http.request.connect_start",vr(e.connectStart)],["http.request.secure_connection_start",vr(e.secureConnectionStart)],["http.request.connection_end",vr(e.connectEnd)],["http.request.request_start",vr(e.requestStart)],["http.request.response_start",vr(e.responseStart)],["http.request.response_end",vr(e.responseEnd)]]:t}const Sy=new WeakMap,kd=new Map,Mh={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function cw(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:a,enableHTTPTimings:s,tracePropagationTargets:o,onRequestSpanStart:c}={...Mh,...t},u=typeof a=="function"?a:m=>!0,f=m=>fH(m,o),l={};n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(g=>{if(g.op==="http.client"){const _=kd.get(g.span_id);_&&(g.timestamp=_/1e3,kd.delete(g.span_id))}}),m)),i&&RP(m=>{if(m.response){const g=Sy.get(m.response);g&&m.endTimestamp&&kd.set(g,m.endTimestamp)}}),Jp(m=>{const g=mP(m,u,f,l);if(m.response&&m.fetchData.__span&&Sy.set(m.response,m.fetchData.__span),g){const _=uw(m.fetchData.url),T=_?zi(_).host:void 0;g.setAttributes({"http.url":_,"server.address":T}),s&&wy(g),c?.(g,{headers:m.headers})}})),r&&lh(m=>{const g=pH(m,u,f,l);if(g){s&&wy(g);let _;try{_=new Headers(m.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(g,{headers:_})}})}function dH(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function wy(e){const{url:t}=$e(e).data;if(!t||typeof t!="string")return;const n=Qi("resource",({entries:r})=>{r.forEach(i=>{dH(i)&&i.name.endsWith(t)&&(lH(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function fH(e,t){const n=ra();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const a=r.origin===i;return t?ur(r.toString(),t)||a&&ur(r.pathname,t):a}else{const r=!!e.match(/^\/(?!\/)/);return t?ur(e,t):r}}function pH(e,t,n,r){const i=e.xhr,a=i?.[Ur];if(!i||i.__sentry_own_request__||!a)return;const{url:s,method:o}=a,c=vi()&&t(s);if(e.endTimestamp&&c){const T=i.__sentry_xhr_span_id__;if(!T)return;const B=r[T];B&&a.status_code!==void 0&&(zs(B,a.status_code),B.end(),delete r[T]);return}const u=uw(s),f=zi(u||s),l=s0(s),m=!!en(),g=c&&m?oa({name:`${o} ${l}`,attributes:{url:s,type:"xhr","http.method":o,"http.url":u,"server.address":f?.host,[xt]:"auto.http.browser",[Vn]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Xr;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(s)&&hH(i,vi()&&m?g:void 0);const _=Ce();return _&&_.emit("beforeOutgoingRequestSpan",g,e),g}function hH(e,t){const{"sentry-trace":n,baggage:r}=Yp({span:t});n&&mH(e,n,r)}function mH(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const i=r?.baggage;(!i||!gH(i))&&e.setRequestHeader("baggage",n)}}catch{}}function gH(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function uw(e){try{return new URL(e,xe.location.origin).href}catch{return}}function yH(){xe.document?xe.document.addEventListener("visibilitychange",()=>{const e=en();if(!e)return;const t=Qt(e);if(xe.document.hidden&&t){const n="cancelled",{op:r,status:i}=$e(t);st&&X.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:qt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):st&&X.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const _H=3600,lw="sentry_previous_trace",bH="sentry.previous_trace";function EH(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?wH():void 0;e.on("spanStart",s=>{if(Qt(s)!==s)return;const o=tt().getPropagationContext();i=vH(i,s,o),r&&SH(i)});let a=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const o=tt(),c=o.getPropagationContext();if(a&&c.parentSpanId){a=!1;return}o.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(Uf(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Uf(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[JE]:i.sampleRate}})}function vH(e,t,n){const r=$e(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[fl])}catch{return 0}}const a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=_H&&(st&&X.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[YR]:"previous_trace"}}),t.setAttribute(bH,`${s.traceId}-${s.spanId}-${Uf(s)?1:0}`)),a)}function SH(e){try{xe.sessionStorage.setItem(lw,JSON.stringify(e))}catch(t){st&&X.warn("Could not store previous trace in sessionStorage",t)}}function wH(){try{const e=xe.sessionStorage?.getItem(lw);return JSON.parse(e)}catch{return}}function Uf(e){return e.traceFlags===1}const TH="BrowserTracing",IH={...Yc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Mh},AH=(e={})=>{const t={name:void 0,source:void 0},n=xe.document,{enableInp:r,enableElementTiming:i,enableLongTask:a,enableLongAnimationFrame:s,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:f,idleTimeout:l,finalTimeout:m,childSpanTimeout:g,markBackgroundSpan:_,traceFetch:T,traceXHR:B,trackFetchStreamPerformance:U,shouldCreateSpanForRequest:J,enableHTTPTimings:K,ignoreResourceSpans:H,ignorePerformanceApiSpans:F,instrumentPageLoad:k,instrumentNavigation:j,detectRedirects:te,linkPreviousTrace:L,consistentTraceSampling:G,onRequestSpanStart:W}={...IH,...e};let z,ae;function Ee(pe,le,$=!0){const ve=le.op==="pageload",ge=f?f(le):le,fe=ge.attributes||{};if(le.name!==ge.name&&(fe[Un]="custom",ge.attributes=fe),!$){const ce=ia();oa({...ge,startTime:ce}).end(ce);return}t.name=ge.name,t.source=fe[Un];const Se=Sv(ge,{idleTimeout:l,finalTimeout:m,childSpanTimeout:g,disableAutoFinish:ve,beforeSpanEnd:ce=>{z?.(),aL(ce,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:H,ignorePerformanceApiSpans:F}),Iy(pe,void 0);const He=tt(),Et=He.getPropagationContext();He.setPropagationContext({...Et,traceId:Se.spanContext().traceId,sampled:aa(Se),dsc:dr(ce)})}});Iy(pe,Se);function Xe(){n&&["interactive","complete"].includes(n.readyState)&&pe.emit("idleSpanEnableAutoFinish",Se)}ve&&n&&(n.addEventListener("readystatechange",()=>{Xe()}),Xe())}return{name:TH,setup(pe){if(dv(),z=Z1({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:pe}),r&&OL(),i&&mL(),s&&Ge.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?$1():a&&Q1(),o&&eL(),te&&n){const $=()=>{ae=Kt()};addEventListener("click",$,{capture:!0}),addEventListener("keydown",$,{capture:!0,passive:!0})}function le(){const $=Qs(pe);$&&!$e($).timestamp&&(st&&X.log(`[Tracing] Finishing current active span with op: ${$e($).op}`),$.setAttribute(gu,"cancelled"),$.end())}pe.on("startNavigationSpan",($,ve)=>{if(Ce()!==pe)return;if(ve?.isRedirect){st&&X.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),Ee(pe,{op:"navigation.redirect",...$},!1);return}le(),$t().setPropagationContext({traceId:Kr(),sampleRand:Math.random()});const ge=tt();ge.setPropagationContext({traceId:Kr(),sampleRand:Math.random()}),ge.setSDKProcessingMetadata({normalizedRequest:void 0}),Ee(pe,{op:"navigation",...$})}),pe.on("startPageLoadSpan",($,ve={})=>{if(Ce()!==pe)return;le();const ge=ve.sentryTrace||Ty("sentry-trace"),fe=ve.baggage||Ty("baggage"),Se=rv(ge,fe),Xe=tt();Xe.setPropagationContext(Se),Xe.setSDKProcessingMetadata({normalizedRequest:nh()}),Ee(pe,{op:"pageload",...$})})},afterAllSetup(pe){let le=ra();if(L!=="off"&&EH(pe,{linkPreviousTrace:L,consistentTraceSampling:G}),xe.location){if(k){const $=gn();dw(pe,{name:xe.location.pathname,startTime:$?$/1e3:void 0,attributes:{[Un]:"url",[xt]:"auto.pageload.browser"}})}j&&Tl(({to:$,from:ve})=>{if(ve===void 0&&le?.indexOf($)!==-1){le=void 0;return}le=void 0;const ge=a0($),fe=Qs(pe),Se=fe&&te&&RH(fe,ae);fw(pe,{name:ge?.pathname||xe.location.pathname,attributes:{[Un]:"url",[xt]:"auto.navigation.browser"}},{url:$,isRedirect:Se})})}_&&yH(),o&&OH(pe,l,m,g,t),r&&NL(),cw(pe,{traceFetch:T,traceXHR:B,trackFetchStreamPerformance:U,tracePropagationTargets:pe.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:J,enableHTTPTimings:K,onRequestSpanStart:W})}}};function dw(e,t,n){e.emit("startPageLoadSpan",t,n),tt().setTransactionName(t.name);const r=Qs(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function fw(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const a=tt();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...nh(),url:r}}),Qs(e)}function Ty(e){return xe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function OH(e,t,n,r,i){const a=xe.document;let s;const o=()=>{const c="ui.action.click",u=Qs(e);if(u){const f=$e(u).op;if(["navigation","pageload"].includes(f)){st&&X.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(gu,"interactionInterrupted"),s.end(),s=void 0),!i.name){st&&X.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=Sv({name:i.name,op:c,attributes:{[Un]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};a&&addEventListener("click",o,{capture:!0})}const pw="_sentry_idleSpan";function Qs(e){return e[pw]}function Iy(e,t){Pn(e,pw,t)}const Ay=.3;function RH(e,t){const n=$e(e),r=ia(),i=n.start_timestamp;return!(r-i>Ay||t&&r-t<=Ay)}function ts(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function CH(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=ts(n);return i=>r.then(a=>i(a.transaction(t,"readwrite").objectStore(t)))}function Ph(e){return ts(e.getAllKeys())}function NH(e,t,n){return e(r=>Ph(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),ts(r.transaction)}))}function MH(e,t,n){return e(r=>Ph(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),ts(r.transaction)}))}function PH(e){return e(t=>Ph(t).then(n=>{const r=n[0];if(r!=null)return ts(t.get(r)).then(i=>(t.delete(r),ts(t.transaction).then(()=>i)))}))}function kH(e){let t;function n(){return t==null&&(t=CH(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=await bu(r);await NH(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=await bu(r);await MH(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await PH(n());if(r)return vC(r)}catch{}}}}function LH(e){return t=>{const n=e({...t,createStore:kH});return xe.addEventListener("online",async r=>{await n.flush()}),n}}function DH(e=fh){return LH(GN(e))}const Oy=1e6,su=String(0),BH="main",Uu=xe.navigator;let hw="",mw="",gw="",jf=Uu?.userAgent||"",yw="";const FH=Uu?.language||Uu?.languages?.[0]||"";function xH(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const Ry=Uu?.userAgentData;xH(Ry)&&Ry.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(hw=e.platform||"",gw=e.architecture||"",yw=e.model||"",mw=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];jf=`${t.brand} ${t.version}`}}).catch(e=>{});function HH(e){return!("thread_metadata"in e)}function UH(e){return HH(e)?GH(e):e}function jH(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&st&&X.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function VH(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=jH(r),a=UH(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Kt()*1e3),o=typeof r.timestamp=="number"?r.timestamp*1e3:Kt()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||pl,runtime:{name:"javascript",version:xe.navigator.userAgent},os:{name:hw,version:mw,build_number:jf},device:{locale:FH,model:yw,manufacturer:jf,architecture:gw,is_emulator:!1},debug_meta:{images:zH(n.resources)},profile:a,transactions:[{name:r.transaction||"",id:r.event_id||In(),trace_id:i,active_thread_id:su,relative_start_ns:"0",relative_end_ns:((o-s)*1e6).toFixed(0)}]}}function _w(e){return $e(e).op==="pageload"}function GH(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[su]:{name:BH}}},i=e.samples[0];if(!i)return r;const a=i.timestamp,s=gn(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=o-(s||o);return e.samples.forEach((u,f)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((u.timestamp+c-a)*Oy).toFixed(0),stack_id:t,thread_id:su};return}let l=e.stacks[u.stackId];const m=[];for(;l;){m.push(l.frameId);const _=e.frames[l.frameId];_&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:_.name,abs_path:typeof _.resourceId=="number"?e.resources[_.resourceId]:void 0,lineno:_.line,colno:_.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const g={elapsed_since_start_ns:((u.timestamp+c-a)*Oy).toFixed(0),stack_id:n,thread_id:su};r.stacks[n]=m,r.samples[f]=g,n++}),r}function qH(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function WH(e){const t=[];return Ji(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function zH(e){const r=Ce()?.getOptions()?.stackParser;return r?ZC(r,e):[]}function YH(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(st&&X.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(st&&X.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function KH(e){return e.samples.length<2?(st&&X.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(st&&X.log("[Profiling] Discarding profile because it contains no frames"),!1)}let bw=!1;const Ew=3e4;function XH(e){return typeof e=="function"}function JH(){const e=xe.Profiler;if(!XH(e)){st&&X.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Ew/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{st&&(X.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),X.log("[Profiling] Disabling profiling for current user session.")),bw=!0}}function Cy(e){if(bw)return st&&X.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return st&&X.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=Ce()?.getOptions();if(!n)return st&&X.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return YH(r)?r?(r===!0?!0:Math.random()<r)?!0:(st&&X.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(st&&X.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(st&&X.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function ZH(e,t,n,r){return KH(n)?VH(e,t,n,r):null}const Gi=new Map;function QH(){return Gi.size}function $H(e){const t=Gi.get(e);return t&&Gi.delete(e),t}function eU(e,t){if(Gi.set(e,t),Gi.size>30){const n=Gi.keys().next().value;Gi.delete(n)}}function Ny(e){let t;_w(e)&&(t=Kt()*1e3);const n=JH();if(!n)return;st&&X.log(`[Profiling] started profiling span: ${$e(e).description}`);const r=In();tt().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n)return n.stop().then(c=>{if(a&&(xe.clearTimeout(a),a=void 0),st&&X.log(`[Profiling] stopped profiling of span: ${$e(e).description}`),!c){st&&X.log(`[Profiling] profiler returned null profile for: ${$e(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}eU(r,c)}).catch(c=>{st&&X.log("[Profiling] error while stopping profiler:",c)})}let a=xe.setTimeout(()=>{st&&X.log("[Profiling] max profile duration elapsed, stopping profiling for:",$e(e).description),i()},Ew);const s=e.end.bind(e);function o(){return e?(i().then(()=>{s()},()=>{s()}),e):s()}e.end=o}const tU="BrowserProfiling",nU=()=>({name:tU,setup(e){const t=en(),n=t&&Qt(t);n&&_w(n)&&Cy(n)&&Ny(n),e.on("spanStart",r=>{r===Qt(r)&&Cy(r)&&Ny(r)}),e.on("beforeEnvelope",r=>{if(!QH())return;const i=WH(r);if(!i.length)return;const a=[];for(const s of i){const o=s?.contexts,c=o?.profile?.profile_id,u=o?.profile?.start_timestamp;if(typeof c!="string"){st&&X.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){st&&X.log("[Profiling] cannot find profile for a span without a profile context");continue}o?.profile&&delete o.profile;const f=$H(c);if(!f){st&&X.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const l=ZH(c,u,f,s);l&&a.push(l)}qH(r,a)})}}),rU=nU,iU="SpotlightBrowser",aU=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:iU,setup:()=>{st&&X.log("Using Sidecar URL",t)},processEvent:n=>cU(n)?null:n,afterAllSetup:n=>{sU(n,t)}}};function sU(e,t){const n=uh("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){X.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:bu(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(a=>{a.status>=200&&a.status<400&&(r=0)},a=>{r++,X.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",a)})})}const oU=aU;function cU(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const uU=()=>({name:"LaunchDarkly",processEvent(e,t,n){return yo(e)}});function lU(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Ga(e,t.value),qa(e,t.value)}}}const dU=()=>({name:"OpenFeature",processEvent(e,t,n){return yo(e)}});class fU{after(t,n){Ga(n.flagKey,n.value),qa(n.flagKey,n.value)}error(t,n,r){Ga(t.flagKey,t.defaultValue),qa(t.flagKey,t.defaultValue)}}const pU=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Tn(t,"isEnabled",hU)},processEvent(t,n,r){return yo(t)}});function hU(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Ga(n,r),qa(n,r)):st&&X.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const mU=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Ga(n.gate.name,n.gate.value),qa(n.gate.name,n.gate.value)})},processEvent(t,n,r){return yo(t)}});async function gU(){const e=Ce();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}const yU="WebWorker",_U=({worker:e})=>({name:yU,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>My(t))},addWorker:t=>My(t)});function My(e){e.addEventListener("message",t=>{EU(t.data)&&(t.stopImmediatePropagation(),st&&X.log("Sentry debugId web worker message received",t.data),xe._sentryDebugIds={...t.data._sentryDebugIds,...xe._sentryDebugIds})})}function bU({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function EU(e){return zr(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(zr(e._sentryDebugIds)||e._sentryDebugIds===void 0)}const vU=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:N0,OpenFeatureIntegrationHook:fU,SDK_VERSION:Vr,SEMANTIC_ATTRIBUTE_SENTRY_OP:Vn,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:xt,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:fl,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Un,Scope:lr,WINDOW:xe,addBreadcrumb:Rr,addEventProcessor:Rv,addIntegration:pf,breadcrumbsIntegration:eS,browserApiErrorsIntegration:tS,browserProfilingIntegration:rU,browserSessionIntegration:nS,browserTracingIntegration:AH,buildLaunchDarklyFlagUsedHandler:lU,captureConsoleIntegration:EM,captureEvent:go,captureException:Zi,captureFeedback:o0,captureMessage:wu,captureSession:ff,chromeStackLineParser:X0,close:hN,consoleLoggingIntegration:wP,contextLinesIntegration:e2,continueTrace:BC,createTransport:Gv,createUserFeedbackEnvelope:QL,dedupeIntegration:$v,defaultRequestInstrumentationOptions:Mh,defaultStackLineParsers:Z0,defaultStackParser:Q0,diagnoseSdkConnectivity:gU,endSession:Wp,eventFiltersIntegration:Kv,eventFromException:R0,eventFromMessage:C0,exceptionFromError:bl,extraErrorDataIntegration:CM,featureFlagsIntegration:fP,feedbackAsyncIntegration:Zk,feedbackIntegration:Pg,feedbackSyncIntegration:Pg,flush:pN,forceLoad:MD,functionToStringIntegration:Yv,geckoStackLineParser:J0,getActiveSpan:en,getClient:Ce,getCurrentScope:tt,getDefaultIntegrations:oS,getFeedback:ok,getGlobalScope:dl,getIsolationScope:$t,getReplay:qx,getRootSpan:Qt,getSpanDescendants:xs,getSpanStatusFromHttpCode:ZE,getTraceData:Yp,globalHandlersIntegration:rS,graphqlClientIntegration:c2,httpClientIntegration:UD,httpContextIntegration:aS,inboundFiltersIntegration:Xv,init:ND,instrumentOutgoingRequests:cw,instrumentSupabaseClient:r0,isEnabled:Ov,isInitialized:mN,lastEventId:Av,launchDarklyIntegration:uU,lazyLoadIntegration:A0,linkedErrorsIntegration:sS,logger:i1,makeBrowserOfflineTransport:DH,makeFetchTransport:fh,makeMultiplexedTransport:zN,moduleMetadataIntegration:gM,onLoad:PD,openFeatureIntegration:dU,opera10StackLineParser:KL,opera11StackLineParser:ZL,parameterize:zv,registerSpanErrorInstrumentation:dv,registerWebWorker:bU,replayCanvasIntegration:uH,replayIntegration:jx,reportingObserverIntegration:FD,rewriteFramesIntegration:xM,sendFeedback:f0,setContext:Iv,setCurrentClient:xv,setExtra:uN,setExtras:cN,setHttpStatus:zs,setMeasurement:bv,setTag:dN,setTags:lN,setUser:fN,showReportDialog:kD,spanToBaggageHeader:fC,spanToJSON:$e,spanToTraceHeader:ov,spotlightBrowserIntegration:oU,startBrowserTracingNavigationSpan:fw,startBrowserTracingPageLoadSpan:dw,startInactiveSpan:oa,startNewTrace:xC,startSession:df,startSpan:ml,startSpanManual:DC,statsigIntegration:mU,supabaseIntegration:ZM,suppressTracing:FC,thirdPartyErrorFilterIntegration:oP,unleashIntegration:pU,updateSpanName:sC,webWorkerIntegration:_U,winjsStackLineParser:WL,withActiveSpan:ho,withIsolationScope:qR,withScope:Zn,zodErrorsIntegration:sP},Symbol.toStringTag,{value:"Module"})),Pl=e=>{typeof window<"u"&&window.Sentry&&e(vU)},{useEffect:SU}=await kn("react"),vw=(e,t)=>SU(()=>{const n=e().catch(r=>{console.error("AsyncEffect error: ",r),Pl(i=>i.captureException("AsyncEffect error: "+r.message,{extra:r}))});return function(){n.then(r=>{typeof r=="function"&&r()})}},t),{createContext:wU,useMemo:TU,useRef:IU,useState:AU}=await kn("react"),Sw=wU(null),Hj=e=>{const{writeKey:t,userId:n,traits:r,children:i}=e,a=IU(null),[s,o]=AU(!1);vw(async()=>{if(!t){console.log("[Analytics] No writeKey provided");return}const u=navigator.userAgent;if(lR(u)){console.log("[Analytics] Skipping load: bot detected");return}try{const{AnalyticsBrowser:l}=await rT(async()=>{const{AnalyticsBrowser:m}=await import("../index-C1_ZJ2Fz.js").then(g=>g.q);return{AnalyticsBrowser:m}},__vite__mapDeps([0,1,2,3,4]));a.current=l.load({writeKey:t}),n&&a.current.identify(n,r),o(!0)}catch(l){console.error("[Analytics] Failed to initialize:",l),a.current=null}},[t,n,r]);const c=TU(()=>!a.current||!s?{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}:{isInitialized:!0,track:(u,f)=>{a.current?.track(u,f)},identify:(u,f)=>{a.current?.identify(u,f)},page:(u,f)=>{a.current?.page(u,f)}},[s]);return m_.jsx(Sw.Provider,{value:c,children:i})},{createContext:OU}=await kn("react"),ww=OU(null);function wr(e,t){var n=t&&t.cache?t.cache:LU,r=t&&t.serializer?t.serializer:PU,i=t&&t.strategy?t.strategy:NU;return i(e,{cache:n,serializer:r})}function RU(e){return e==null||typeof e=="number"||typeof e=="boolean"}function CU(e,t,n,r){var i=RU(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Tw(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Iw(e,t,n,r,i){return n.bind(t,e,r,i)}function NU(e,t){var n=e.length===1?CU:Tw;return Iw(e,this,n,t.cache.create(),t.serializer)}function MU(e,t){return Iw(e,this,Tw,t.cache.create(),t.serializer)}var PU=function(){return JSON.stringify(arguments)},kU=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),LU={create:function(){return new kU}},Tr={variadic:MU},ft;(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"})(ft||(ft={}));var Pt;(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"})(Pt||(Pt={}));var ns;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ns||(ns={}));function Py(e){return e.type===Pt.literal}function DU(e){return e.type===Pt.argument}function Aw(e){return e.type===Pt.number}function Ow(e){return e.type===Pt.date}function Rw(e){return e.type===Pt.time}function Cw(e){return e.type===Pt.select}function Nw(e){return e.type===Pt.plural}function BU(e){return e.type===Pt.pound}function Mw(e){return e.type===Pt.tag}function Pw(e){return!!(e&&typeof e=="object"&&e.type===ns.number)}function Vf(e){return!!(e&&typeof e=="object"&&e.type===ns.dateTime)}var kw=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,FU=/(?:[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 xU(e){var t={};return e.replace(FU,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===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"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-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=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-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"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-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"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<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 HU=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function UU(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(HU).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],c=s.slice(1),u=0,f=c;u<f.length;u++){var l=f[u];if(l.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:c})}return n}function jU(e){return e.replace(/^(.*?)-/,"")}var ky=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Lw=/^(@+)?(\+|#+)?[rs]?$/g,VU=/(\*)(0+)|(#+)(0+)|(0+)/g,Dw=/^(0+)$/;function Ly(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Lw,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Bw(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 GU(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 n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Dw.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Dy(e){var t={},n=Bw(e);return n||t}function qU(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=jU(i.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=Fe(Fe(Fe({},t),{notation:"scientific"}),i.options.reduce(function(c,u){return Fe(Fe({},c),Dy(u))},{}));continue;case"engineering":t=Fe(Fe(Fe({},t),{notation:"engineering"}),i.options.reduce(function(c,u){return Fe(Fe({},c),Dy(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(i.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(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(VU,function(c,u,f,l,m,g){if(u)t.minimumIntegerDigits=f.length;else{if(l&&m)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Dw.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ky.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ky,function(c,u,f,l,m,g){return f==="*"?t.minimumFractionDigits=u.length:l&&l[0]==="#"?t.maximumFractionDigits=l.length:m&&g?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+g.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=Fe(Fe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=Fe(Fe({},t),Ly(a)));continue}if(Lw.test(i.stem)){t=Fe(Fe({},t),Ly(i.stem));continue}var s=Bw(i.stem);s&&(t=Fe(Fe({},t),s));var o=GU(i.stem);o&&(t=Fe(Fe({},t),o))}return t}var xc={"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 WU(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),c="a",u=zU(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function zU(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 n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=xc[r||""]||xc[n||""]||xc["".concat(n,"-001")]||xc["001"];return i[0]}var Ld,YU=new RegExp("^".concat(kw.source,"*")),KU=new RegExp("".concat(kw.source,"*$"));function ht(e,t){return{start:e,end:t}}var XU=!!String.prototype.startsWith&&"_a".startsWith("a",1),JU=!!String.fromCodePoint,ZU=!!Object.fromEntries,QU=!!String.prototype.codePointAt,$U=!!String.prototype.trimStart,e3=!!String.prototype.trimEnd,t3=!!Number.isSafeInteger,n3=t3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Gf=!0;try{var r3=xw("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Gf=((Ld=r3.exec("a"))===null||Ld===void 0?void 0:Ld[0])==="a"}catch{Gf=!1}var By=XU?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},qf=JU?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Fy=ZU?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Fw=QU?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},i3=$U?function(t){return t.trimStart()}:function(t){return t.replace(YU,"")},a3=e3?function(t){return t.trimEnd()}:function(t){return t.replace(KU,"")};function xw(e,t){return new RegExp(e,t)}var Wf;if(Gf){var xy=xw("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Wf=function(t,n){var r;xy.lastIndex=n;var i=xy.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Wf=function(t,n){for(var r=[];;){var i=Fw(t,n);if(i===void 0||Hw(i)||u3(i))break;r.push(i),n+=i>=65536?2:1}return qf.apply(void 0,r)};var s3=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.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,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Pt.pound,location:ht(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,ht(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&zf(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Pt.literal,value:"<".concat(i,"/>"),location:ht(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!zf(this.char()))return this.error(ft.INVALID_TAG,ht(o,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(ft.UNMATCHED_CLOSING_TAG,ht(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Pt.tag,value:i,children:s,location:ht(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,ht(o,this.clonePosition())))}else return this.error(ft.UNCLOSED_TAG,ht(r,this.clonePosition()))}else return this.error(ft.INVALID_TAG,ht(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&c3(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var c=ht(r,this.clonePosition());return{val:{type:Pt.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!o3(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 n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return qf.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),qf(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ft.EMPTY_ARGUMENT,ht(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ft.MALFORMED_ARGUMENT,ht(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Pt.argument,value:i,location:ht(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ft.MALFORMED_ARGUMENT,ht(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Wf(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=ht(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(o){case"":return this.error(ft.EXPECT_ARGUMENT_TYPE,ht(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),l=this.parseSimpleArgStyleIfPossible();if(l.err)return l;var m=a3(l.val);if(m.length===0)return this.error(ft.EXPECT_ARGUMENT_STYLE,ht(this.clonePosition(),this.clonePosition()));var g=ht(f,this.clonePosition());u={style:m,styleLocation:g}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var T=ht(i,this.clonePosition());if(u&&By(u?.style,"::",0)){var B=i3(u.style.slice(2));if(o==="number"){var l=this.parseNumberSkeletonFromString(B,u.styleLocation);return l.err?l:{val:{type:Pt.number,value:r,location:T,style:l.val},err:null}}else{if(B.length===0)return this.error(ft.EXPECT_DATE_TIME_SKELETON,T);var U=B;this.locale&&(U=WU(B,this.locale));var m={type:ns.dateTime,pattern:U,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?xU(U):{}},J=o==="date"?Pt.date:Pt.time;return{val:{type:J,value:r,location:T,style:m},err:null}}}return{val:{type:o==="number"?Pt.number:o==="date"?Pt.date:Pt.time,value:r,location:T,style:(a=u?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var K=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,ht(K,Fe({},K)));this.bumpSpace();var H=this.parseIdentifierIfPossible(),F=0;if(o!=="select"&&H.value==="offset"){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ht(this.clonePosition(),this.clonePosition()));this.bumpSpace();var l=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(l.err)return l;this.bumpSpace(),H=this.parseIdentifierIfPossible(),F=l.val}var k=this.tryParsePluralOrSelectOptions(t,o,n,H);if(k.err)return k;var _=this.tryParseArgumentClose(i);if(_.err)return _;var j=ht(i,this.clonePosition());return o==="select"?{val:{type:Pt.select,value:r,options:Fy(k.val),location:j},err:null}:{val:{type:Pt.plural,value:r,options:Fy(k.val),offset:F,pluralType:o==="plural"?"cardinal":"ordinal",location:j},err:null}}default:return this.error(ft.INVALID_ARGUMENT_TYPE,ht(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,ht(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ft.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ht(i,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(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=UU(t)}catch{return this.error(ft.INVALID_NUMBER_SKELETON,n)}return{val:{type:ns.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?qU(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],c=new Set,u=i.value,f=i.location;;){if(u.length===0){var l=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ft.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;f=ht(l,this.clonePosition()),u=this.message.slice(l.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(s=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ht(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,n,r);if(_.err)return _;var T=this.tryParseArgumentClose(g);if(T.err)return T;o.push([u,{value:_.val,location:ht(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,f=a.location}return o.length===0?this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ht(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ft.MISSING_OTHER_CLAUSE,ht(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var c=ht(i,this.clonePosition());return a?(s*=r,n3(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},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 n=Fw(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},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(By(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!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 n=this.offset();if(n===t)break;if(n>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()&&Hw(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function zf(e){return e>=97&&e<=122||e>=65&&e<=90}function o3(e){return zf(e)||e===47}function c3(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 Hw(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function u3(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 Yf(e){e.forEach(function(t){if(delete t.location,Cw(t)||Nw(t))for(var n in t.options)delete t.options[n].location,Yf(t.options[n].value);else Aw(t)&&Pw(t.style)||(Ow(t)||Rw(t))&&Vf(t.style)?delete t.style.location:Mw(t)&&Yf(t.children)})}function l3(e,t){t===void 0&&(t={}),t=Fe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new s3(e,t).parse();if(n.err){var r=SyntaxError(ft[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Yf(n.val),n.val}var Cr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Cr||(Cr={}));var Ni=function(e){pr(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Hy=function(e){pr(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Cr.INVALID_VALUE,a)||this}return t}(Ni),d3=function(e){pr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Cr.INVALID_VALUE,i)||this}return t}(Ni),f3=function(e){pr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Cr.MISSING_VALUE,r)||this}return t}(Ni),vn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(vn||(vn={}));function p3(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==vn.literal||n.type!==vn.literal?t.push(n):r.value+=n.value,t},[])}function h3(e){return typeof e=="function"}function ou(e,t,n,r,i,a,s){if(e.length===1&&Py(e[0]))return[{type:vn.literal,value:e[0].value}];for(var o=[],c=0,u=e;c<u.length;c++){var f=u[c];if(Py(f)){o.push({type:vn.literal,value:f.value});continue}if(BU(f)){typeof a=="number"&&o.push({type:vn.literal,value:n.getNumberFormat(t).format(a)});continue}var l=f.value;if(!(i&&l in i))throw new f3(l,s);var m=i[l];if(DU(f)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?vn.literal:vn.object,value:m});continue}if(Ow(f)){var g=typeof f.style=="string"?r.date[f.style]:Vf(f.style)?f.style.parsedOptions:void 0;o.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Rw(f)){var g=typeof f.style=="string"?r.time[f.style]:Vf(f.style)?f.style.parsedOptions:r.time.medium;o.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Aw(f)){var g=typeof f.style=="string"?r.number[f.style]:Pw(f.style)?f.style.parsedOptions:void 0;g&&g.scale&&(m=m*(g.scale||1)),o.push({type:vn.literal,value:n.getNumberFormat(t,g).format(m)});continue}if(Mw(f)){var _=f.children,T=f.value,B=i[T];if(!h3(B))throw new d3(T,"function",s);var U=ou(_,t,n,r,i,a),J=B(U.map(function(F){return F.value}));Array.isArray(J)||(J=[J]),o.push.apply(o,J.map(function(F){return{type:typeof F=="string"?vn.literal:vn.object,value:F}}))}if(Cw(f)){var K=f.options[m]||f.options.other;if(!K)throw new Hy(f.value,m,Object.keys(f.options),s);o.push.apply(o,ou(K.value,t,n,r,i));continue}if(Nw(f)){var K=f.options["=".concat(m)];if(!K){if(!Intl.PluralRules)throw new Ni(`Intl.PluralRules is not available in this environment.
|
|
515
515
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
516
516
|
`,Cr.MISSING_INTL_API,s);var H=n.getPluralRules(t,{type:f.pluralType}).select(m-(f.offset||0));K=f.options[H]||f.options.other}if(!K)throw new Hy(f.value,m,Object.keys(f.options),s);o.push.apply(o,ou(K.value,t,n,r,i,m-(f.offset||0)));continue}}return p3(o)}function m3(e,t){return t?Fe(Fe(Fe({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Fe(Fe({},e[r]),t[r]||{}),n},{})):e}function g3(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=m3(e[r],t[r]),n},Fe({},e)):e}function Dd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function y3(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:wr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Hr([void 0],n,!1)))},{cache:Dd(e.number),strategy:Tr.variadic}),getDateTimeFormat:wr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Hr([void 0],n,!1)))},{cache:Dd(e.dateTime),strategy:Tr.variadic}),getPluralRules:wr(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Hr([void 0],n,!1)))},{cache:Dd(e.pluralRules),strategy:Tr.variadic})}}var Uw=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=a.formatToParts(c);if(u.length===1)return u[0].value;var f=u.reduce(function(l,m){return!l.length||m.type!==vn.literal||typeof l[l.length-1]!="string"?l.push(m.value):l[l.length-1]+=m.value,l},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(c){return ou(a.ast,a.locales,a.formatters,a.formats,c,void 0,a.message)},this.resolvedOptions=function(){var c;return{locale:((c=a.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=iT(s,["formatters"]);this.ast=e.__parse(t,Fe(Fe({},o),{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=g3(e.formats,r),this.formatters=i&&i.formatters||y3(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 n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=l3,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}(),$i;(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"})($i||($i={}));var Ao=function(e){pr(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
|
|
517
517
|
`).concat(s?`
|
|
@@ -532,4 +532,4 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
532
532
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
533
533
|
`,Cr.MISSING_INTL_API));try{return U3(e,t,i).format(n,r)}catch(s){e.onError(new Qn("Error formatting relative time.",e.locale,s))}return String(n)}var V3=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function Gw(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&kh(i,"number",s,a)||{},c=ys(n,V3,o);return t(r,c)}function G3(e,t,n,r){r===void 0&&(r={});try{return Gw(e,t,r).format(n)}catch(i){e.onError(new Qn("Error formatting number.",e.locale,i))}return String(n)}function q3(e,t,n,r){r===void 0&&(r={});try{return Gw(e,t,r).formatToParts(n)}catch(i){e.onError(new Qn("Error formatting number.",e.locale,i))}return[]}function W3(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function z3(e){e.onWarn&&e.defaultRichTextElements&&W3(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
534
534
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
535
|
-
For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function Fd(e,t){var n=I3(t),r=Fe(Fe({},T3),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Uy('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Uy('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new b3('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),z3(r),Fe(Fe({},r),{formatters:n,formatNumber:G3.bind(null,r,n.getNumberFormat),formatNumberToParts:q3.bind(null,r,n.getNumberFormat),formatRelativeTime:j3.bind(null,r,n.getRelativeTimeFormat),formatDate:O3.bind(null,r,n.getDateTimeFormat),formatDateToParts:N3.bind(null,r,n.getDateTimeFormat),formatTime:R3.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:C3.bind(null,r,n.getDateTimeFormat),formatTimeToParts:M3.bind(null,r,n.getDateTimeFormat),formatPlural:x3.bind(null,r,n.getPluralRules),formatMessage:Gy.bind(null,r,n),$t:Gy.bind(null,r,n),formatList:B3.bind(null,r,n.getListFormat),formatListToParts:Vw.bind(null,r,n.getListFormat),formatDisplayName:k3.bind(null,r,n.getDisplayNames)})}const{useCallback:Wy,useContext:Y3,useMemo:zy,useState:K3}=await kn("react"),xd=jw(),qw=(e,t="",n={})=>(Object.entries(e).forEach(([r,i])=>{const a=t?`${t}.${r}`:r;if(typeof i=="string"){n[a]=i;return}if(i&&typeof i=="object"&&!Array.isArray(i)){qw(i,a,n);return}console.error(`Invalid translation value for key "${a}". Expected string or nested object.`)}),n),X3=e=>{const t=Y3(ww);if(!e&&!t)throw new Error("useTranslation must be used with either options or within a TranslationProvider");if(!e&&t)return t;if(e&&!e.locale)throw new Error("locale is required when using useTranslation with options");if(e&&!e.translations)throw new Error("translations is required when using useTranslation with options");const n=e,[r,i]=K3({locale:n.locale,translations:n.translations,error:null}),a=zy(()=>{const u={};return Object.entries(r.translations).forEach(([f,l])=>{u[f]=qw(l)}),u},[r.translations]),s=zy(()=>{const u=a[r.locale],f=n.fallbackLocale&&a[n.fallbackLocale];if(!u&&f)return console.error(`No translations found for locale "${r.locale}". Using fallback locale "${n.fallbackLocale}".`),Fd({locale:r.locale,messages:f},xd);if(!u)return console.error(`No translations found for locale "${r.locale}". Using empty translations.`),Fd({locale:r.locale,messages:{}},xd);const m=n.fallbackLocale&&r.locale!==n.fallbackLocale&&f?{...f,...u}:u;return Fd({locale:r.locale,messages:m},xd)},[r.locale,a,n.fallbackLocale]),o=Wy((u,f)=>s.formatMessage({id:u},f),[s]),c=Wy(u=>{if(!r.translations[u]){console.error(`Locale "${u}" not found in translations. Available locales: ${Object.keys(r.translations).join(", ")}`),i(f=>({...f,error:`Locale "${u}" not found`}));return}i(f=>({...f,locale:u,error:null}))},[r.translations]);return{t:o,intl:s,locale:r.locale,setLocale:c,error:r.error}},{useMemo:J3}=await kn("react"),jj=e=>{const{locale:t,translations:n,fallbackLocale:r,children:i}=e,a=X3({locale:t,translations:n,fallbackLocale:r}),s=J3(()=>a,[a]);return m_.jsx(ww.Provider,{value:s,children:i})};var Z3="2.0.9",Q3=500,Yy="user-agent",rs="",Ky="?",Yt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Mn="browser",qr="cpu",Ar="device",sr="engine",jn="os",is="result",re="name",Z="type",oe="vendor",se="version",Sn="architecture",$s="major",ne="model",cu="console",Ye="mobile",St="tablet",Jt="smarttv",Sr="wearable",Uc="xr",Bs="embedded",$3="fetcher",Ea="inapp",Lh="brands",Hi="formFactors",Dh="fullVersionList",as="platform",Bh="platformVersion",kl="bitness",Mi="sec-ch-ua",ej=Mi+"-full-version-list",tj=Mi+"-arch",nj=Mi+"-"+kl,rj=Mi+"-form-factors",ij=Mi+"-"+Ye,aj=Mi+"-"+ne,Ww=Mi+"-"+as,sj=Ww+"-version",zw=[Lh,Dh,Ye,ne,as,Bh,Sn,Hi,kl],jc="Amazon",va="Apple",Xy="ASUS",Jy="BlackBerry",Bi="Google",Zy="Huawei",Hd="Lenovo",Qy="Honor",Vc="LG",Ud="Microsoft",jd="Motorola",$y="Nvidia",e_="OnePlus",Vd="OPPO",Ns="Samsung",t_="Sharp",Ms="Sony",Gd="Xiaomi",qd="Zebra",n_="Chrome",r_="Chromium",di="Chromecast",uu="Edge",Ps="Firefox",Sa="Opera",Wd="Facebook",i_="Sogou",wa="Mobile ",Ta=" Browser",Kf="Windows",oj=typeof window!==Yt.UNDEFINED,Nn=oj&&window.navigator?window.navigator:void 0,Ui=Nn&&Nn.userAgentData?Nn.userAgentData:void 0,cj=function(e,t){var n={},r=t;if(!ju(t)){r={};for(var i in t)for(var a in t[i])r[a]=t[i][a].concat(r[a]?r[a]:[])}for(var s in e)n[s]=r[s]&&r[s].length%2===0?r[s].concat(e[s]):e[s];return n},Ll=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Xf=function(e,t){if(typeof e===Yt.OBJECT&&e.length>0){for(var n in e)if(gi(t)==gi(e[n]))return!0;return!1}return Ro(e)?gi(t)==gi(e):!1},ju=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?ju(e[n]):!1)},Ro=function(e){return typeof e===Yt.STRING},zd=function(e){if(e){for(var t=[],n=ss(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Vu(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=Vu(n[r]);return t}},gi=function(e){return Ro(e)?e.toLowerCase():e},Jf=function(e){return Ro(e)?ss(/[^\d\.]/g,e).split(".")[0]:void 0},jr=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==Yt.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},ss=function(e,t){return Ro(t)?t.replace(e,rs):t},ks=function(e){return ss(/\\?\"/g,e)},Vu=function(e,t){return e=ss(/^\s\s*/,String(e)),typeof t===Yt.UNDEFINED?e:e.substring(0,t)},Zf=function(e,t){if(!(!e||!t))for(var n=0,r,i,a,s,o,c;n<t.length&&!o;){var u=t[n],f=t[n+1];for(r=i=0;r<u.length&&!o&&u[r];)if(o=u[r++].exec(e),o)for(a=0;a<f.length;a++)c=o[++i],s=f[a],typeof s===Yt.OBJECT&&s.length>0?s.length===2?typeof s[1]==Yt.FUNCTION?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Yt.FUNCTION&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=c?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:s.length==3?this[s[0]]=c?c.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=c?s[3].apply(this,[c.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=c||void 0;n+=2}},nr=function(e,t){for(var n in t)if(typeof t[n]===Yt.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Xf(t[n][r],e))return n===Ky?void 0:n}else if(Xf(t[n],e))return n===Ky?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},a_={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},s_={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},uj={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},o_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[se,[re,wa+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[se,[re,uu+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[se,[re,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[re,se],[/opios[\/ ]+([\w\.]+)/i],[se,[re,Sa+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[se,[re,Sa+" GX"]],[/\bopr\/([\w\.]+)/i],[se,[re,Sa]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[se,[re,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[se,[re,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[re,se],[/quark(?:pc)?\/([-\w\.]+)/i],[se,[re,"Quark"]],[/\bddg\/([\w\.]+)/i],[se,[re,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[se,[re,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[se,[re,"WeChat"]],[/konqueror\/([\w\.]+)/i],[se,[re,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[se,[re,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[se,[re,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[se,[re,"Smart "+Hd+Ta]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[re,/(.+)/,"$1 Secure"+Ta],se],[/norton\/([\w\.]+)/i],[se,[re,"Norton Private"+Ta]],[/\bfocus\/([\w\.]+)/i],[se,[re,Ps+" Focus"]],[/ mms\/([\w\.]+)$/i],[se,[re,Sa+" Neon"]],[/ opt\/([\w\.]+)$/i],[se,[re,Sa+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[se,[re,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[se,[re,"Dolphin"]],[/coast\/([\w\.]+)/i],[se,[re,Sa+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[se,[re,"MIUI"+Ta]],[/fxios\/([\w\.-]+)/i],[se,[re,wa+Ps]],[/\bqihoobrowser\/?([\w\.]*)/i],[se,[re,"360"]],[/\b(qq)\/([\w\.]+)/i],[[re,/(.+)/,"$1Browser"],se],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[re,/(.+)/,"$1"+Ta],se],[/samsungbrowser\/([\w\.]+)/i],[se,[re,Ns+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[se,[re,i_+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[re,i_+" Mobile"],se],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[re,se],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[re],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[se,re],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[re,Wd],se,[Z,Ea]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[re,se,[Z,Ea]],[/\bgsa\/([\w\.]+) .*safari\//i],[se,[re,"GSA"],[Z,Ea]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[se,[re,"TikTok"],[Z,Ea]],[/\[(linkedin)app\]/i],[re,[Z,Ea]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[re,/(.+)/,"Zalo"],se,[Z,Ea]],[/(chromium)[\/ ]([-\w\.]+)/i],[re,se],[/ome-(lighthouse)$/i],[re,[Z,$3]],[/headlesschrome(?:\/([\w\.]+)| )/i],[se,[re,n_+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[se,[re,uu+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[re,n_+" WebView"],se],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[se,[re,"Android"+Ta]],[/chrome\/([\w\.]+) mobile/i],[se,[re,wa+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[re,se],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[se,[re,wa+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[re,wa+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[se,re],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[re,[se,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[re,se],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[re,wa+Ps],se],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[re,"Netscape"],se],[/(wolvic|librewolf)\/([\w\.]+)/i],[re,se],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[se,[re,Ps+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[re,[se,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[re,[se,/[^\d\.]+./,rs]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Sn,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Sn,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Sn,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Sn,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Sn,"arm"]],[/ sun4\w[;\)]/i],[[Sn,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Sn,/ower/,rs,gi]],[/mc680.0/i],[[Sn,"68k"]],[/winnt.+\[axp/i],[[Sn,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[ne,[oe,Ns],[Z,St]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[ne,[oe,Ns],[Z,Ye]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[ne,[oe,va],[Z,Ye]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[ne,[oe,va],[Z,St]],[/(macintosh);/i],[ne,[oe,va]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ne,[oe,t_],[Z,Ye]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[ne,[oe,Qy],[Z,St]],[/honor([-\w ]+)[;\)]/i],[ne,[oe,Qy],[Z,Ye]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[ne,[oe,Zy],[Z,St]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[ne,[oe,Zy],[Z,Ye]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[ne,/_/g," "],[oe,Gd],[Z,St]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[ne,/_/g," "],[oe,Gd],[Z,Ye]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ne,[oe,e_],[Z,Ye]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ne,[oe,Vd],[Z,Ye]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[ne,[oe,nr,{OnePlus:["203","304","403","404","413","415"],"*":Vd}],[Z,St]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[ne,[oe,"BLU"],[Z,Ye]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ne,[oe,"Vivo"],[Z,Ye]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ne,[oe,"Realme"],[Z,Ye]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[ne,[oe,Hd],[Z,St]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[ne,[oe,Hd],[Z,Ye]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[ne,[oe,jd],[Z,Ye]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ne,[oe,jd],[Z,St]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ne,[oe,Vc],[Z,St]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[ne,[oe,Vc],[Z,Ye]],[/(nokia) (t[12][01])/i],[oe,ne,[Z,St]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[ne,/_/g," "],[Z,Ye],[oe,"Nokia"]],[/(pixel (c|tablet))\b/i],[ne,[oe,Bi],[Z,St]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[ne,[oe,Bi],[Z,Ye]],[/(google) (pixelbook( go)?)/i],[oe,ne],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[ne,[oe,Ms],[Z,Ye]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ne,"Xperia Tablet"],[oe,Ms],[Z,St]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ne,[oe,jc],[Z,St]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ne,/(.+)/g,"Fire Phone $1"],[oe,jc],[Z,Ye]],[/(playbook);[-\w\),; ]+(rim)/i],[ne,oe,[Z,St]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[ne,[oe,Jy],[Z,Ye]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ne,[oe,Xy],[Z,St]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ne,[oe,Xy],[Z,Ye]],[/(nexus 9)/i],[ne,[oe,"HTC"],[Z,St]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[oe,[ne,/_/g," "],[Z,Ye]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[ne,[oe,"TCL"],[Z,St]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[ne,[oe,"TCL"],[Z,Ye]],[/(itel) ((\w+))/i],[[oe,gi],ne,[Z,nr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ne,[oe,"Acer"],[Z,St]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ne,[oe,"Meizu"],[Z,Ye]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ne,[oe,"Ulefone"],[Z,Ye]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ne,[oe,"Energizer"],[Z,Ye]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ne,[oe,"Cat"],[Z,Ye]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ne,[oe,"Smartfren"],[Z,Ye]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[ne,[oe,"Nothing"],[Z,Ye]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[ne,[oe,"Archos"],[Z,St]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[ne,[oe,"Archos"],[Z,Ye]],[/; (n159v)/i],[ne,[oe,"HMD"],[Z,Ye]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[oe,ne,[Z,St]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[oe,ne,[Z,Ye]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[oe,ne,[Z,St]],[/(surface duo)/i],[ne,[oe,Ud],[Z,St]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ne,[oe,"Fairphone"],[Z,Ye]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[ne,[oe,$y],[Z,St]],[/(sprint) (\w+)/i],[oe,ne,[Z,Ye]],[/(kin\.[onetw]{3})/i],[[ne,/\./g," "],[oe,Ud],[Z,Ye]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ne,[oe,qd],[Z,St]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ne,[oe,qd],[Z,Ye]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[oe,[Z,Jt]],[/hbbtv.+maple;(\d+)/i],[[ne,/^/,"SmartTV"],[oe,Ns],[Z,Jt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[oe,ne,[Z,Jt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[oe,Vc],[Z,Jt]],[/(apple) ?tv/i],[oe,[ne,va+" TV"],[Z,Jt]],[/crkey.*devicetype\/chromecast/i],[[ne,di+" Third Generation"],[oe,Bi],[Z,Jt]],[/crkey.*devicetype\/([^/]*)/i],[[ne,/^/,"Chromecast "],[oe,Bi],[Z,Jt]],[/fuchsia.*crkey/i],[[ne,di+" Nest Hub"],[oe,Bi],[Z,Jt]],[/crkey/i],[[ne,di],[oe,Bi],[Z,Jt]],[/(portaltv)/i],[ne,[oe,Wd],[Z,Jt]],[/droid.+aft(\w+)( bui|\))/i],[ne,[oe,jc],[Z,Jt]],[/(shield \w+ tv)/i],[ne,[oe,$y],[Z,Jt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ne,[oe,t_],[Z,Jt]],[/(bravia[\w ]+)( bui|\))/i],[ne,[oe,Ms],[Z,Jt]],[/(mi(tv|box)-?\w+) bui/i],[ne,[oe,Gd],[Z,Jt]],[/Hbbtv.*(technisat) (.*);/i],[oe,ne,[Z,Jt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[oe,/.+\/(\w+)/,"$1",nr,{LG:"lge"}],[ne,Vu],[Z,Jt]],[/(playstation \w+)/i],[ne,[oe,Ms],[Z,cu]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ne,[oe,Ud],[Z,cu]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[oe,nr,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],ne,[Z,cu]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[ne,[oe,Ns],[Z,Sr]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[oe,ne,[Z,Sr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[ne,[oe,Vd],[Z,Sr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ne,[oe,va],[Z,Sr]],[/(opwwe\d{3})/i],[ne,[oe,e_],[Z,Sr]],[/(moto 360)/i],[ne,[oe,jd],[Z,Sr]],[/(smartwatch 3)/i],[ne,[oe,Ms],[Z,Sr]],[/(g watch r)/i],[ne,[oe,Vc],[Z,Sr]],[/droid.+; (wt63?0{2,3})\)/i],[ne,[oe,qd],[Z,Sr]],[/droid.+; (glass) \d/i],[ne,[oe,Bi],[Z,Uc]],[/(pico) ([\w ]+) os\d/i],[oe,ne,[Z,Uc]],[/(quest( \d| pro)?s?).+vr/i],[ne,[oe,Wd],[Z,Uc]],[/mobile vr; rv.+firefox/i],[[Z,Uc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[oe,[Z,Bs]],[/(aeobc)\b/i],[ne,[oe,jc],[Z,Bs]],[/(homepod).+mac os/i],[ne,[oe,va],[Z,Bs]],[/windows iot/i],[[Z,Bs]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[ne,[Z,Jt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[Z,Jt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[ne,[Z,nr,{mobile:"Mobile",xr:"VR","*":St}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Z,St]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Z,Ye]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[ne,[oe,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[se,[re,uu+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[re,se],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[se,[re,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[re,se],[/ladybird\//i],[[re,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[se,re]],os:[[/(windows nt) (6\.[23]); arm/i],[[re,/N/,"R"],[se,nr,a_]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[re,se],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[se,/(;|\))/g,"",nr,a_],[re,Kf]],[/(windows ce)\/?([\d\.]*)/i],[re,se],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[se,/_/g,"."],[re,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[re,"macOS"],[se,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[se,[re,di+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[se,[re,di+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[se,[re,di+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[se,[re,di+" Linux"]],[/crkey\/([\d\.]+)/i],[se,[re,di]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[se,re],[/(ubuntu) ([\w\.]+) like android/i],[[re,/(.+)/,"$1 Touch"],se],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[re,se],[/\(bb(10);/i],[se,[re,Jy]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[se,[re,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[se,[re,Ps+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[se,[re,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[se,nr,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[re,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[se,[re,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[se,[re,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[se,[re,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[re,se],[/(sunos) ?([\d\.]*)/i],[[re,"Solaris"],se],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[re,se]]},Gc=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return jr.call(e.init,[[Mn,[re,se,$s,Z]],[qr,[Sn]],[Ar,[Z,ne,oe]],[sr,[re,se]],[jn,[re,se]]]),jr.call(e.isIgnore,[[Mn,[se,$s]],[sr,[se]],[jn,[se]]]),jr.call(e.isIgnoreRgx,[[Mn,/ ?browser$/i],[jn,/ ?os$/i]]),jr.call(e.toString,[[Mn,[re,se]],[qr,[Sn]],[Ar,[oe,ne]],[sr,[re,se]],[jn,[re,se]]]),e}(),lj=function(e,t){var n=Gc.init[t],r=Gc.isIgnore[t]||0,i=Gc.isIgnoreRgx[t]||0,a=Gc.toString[t]||0;function s(){jr.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Ui?Ui.getHighEntropyValues(zw).then(function(o){return e.setCH(new Yw(o,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=is&&(s.prototype.is=function(o){var c=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Xf(r,u)&&gi(i?ss(i,this[u]):this[u])==gi(i?ss(i,o):o)){if(c=!0,o!=Yt.UNDEFINED)break}else if(o==Yt.UNDEFINED&&c){c=!c;break}return c},s.prototype.toString=function(){var o=rs;for(var c in a)typeof this[a[c]]!==Yt.UNDEFINED&&(o+=(o?" ":rs)+this[a[c]]);return o||Yt.UNDEFINED}),s.prototype.then=function(o){var c=this,u=function(){for(var l in c)c.hasOwnProperty(l)&&(this[l]=c[l])};u.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var f=new u;return o(f),f},new s};function Yw(e,t){if(e=e||{},jr.call(this,zw),t)jr.call(this,[[Lh,zd(e[Mi])],[Dh,zd(e[ej])],[Ye,/\?1/.test(e[ij])],[ne,ks(e[aj])],[as,ks(e[Ww])],[Bh,ks(e[sj])],[Sn,ks(e[tj])],[Hi,zd(e[rj])],[kl,ks(e[nj])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==Yt.UNDEFINED&&(this[n]=e[n])}function wi(e,t,n,r){return jr.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",lj(this,e)]]),this}wi.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};wi.prototype.set=function(e,t){return this.data[e]=t,this};wi.prototype.setCH=function(e){return this.uaCH=e,this};wi.prototype.detectFeature=function(){if(Nn&&Nn.userAgent==this.ua)switch(this.itemType){case Mn:Nn.brave&&typeof Nn.brave.isBrave==Yt.FUNCTION&&this.set(re,"Brave");break;case Ar:!this.get(Z)&&Ui&&Ui[Ye]&&this.set(Z,Ye),this.get(ne)=="Macintosh"&&Nn&&typeof Nn.standalone!==Yt.UNDEFINED&&Nn.maxTouchPoints&&Nn.maxTouchPoints>2&&this.set(ne,"iPad").set(Z,St);break;case jn:!this.get(re)&&Ui&&Ui[as]&&this.set(re,Ui[as]);break;case is:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(Mn,t(Mn)).set(qr,t(qr)).set(Ar,t(Ar)).set(sr,t(sr)).set(jn,t(jn))}return this};wi.prototype.parseUA=function(){switch(this.itemType!=is&&Zf.call(this.data,this.ua,this.rgxMap),this.itemType){case Mn:this.set($s,Jf(this.get(se)));break;case jn:if(this.get(re)=="iOS"&&this.get(se)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(se,e[1])}break}return this};wi.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case Mn:case sr:var n=e[Dh]||e[Lh],r;if(n)for(var i=0;i<n.length;i++){var a=n[i].brand||n[i],s=n[i].version;this.itemType==Mn&&!/not.a.brand/i.test(a)&&(!r||/Chrom/.test(r)&&a!=r_||r==uu&&/WebView2/.test(a))&&(a=nr(a,uj),r=this.get(re),r&&!/Chrom/.test(r)&&/Chrom/.test(a)||this.set(re,a).set(se,s).set($s,Jf(s)),r=a),this.itemType==sr&&a==r_&&this.set(se,s)}break;case qr:var o=e[Sn];o&&(o&&e[kl]=="64"&&(o+="64"),Zf.call(this.data,o+";",t));break;case Ar:if(e[Ye]&&this.set(Z,Ye),e[ne]&&(this.set(ne,e[ne]),!this.get(Z)||!this.get(oe))){var c={};Zf.call(c,"droid 9; "+e[ne]+")",t),!this.get(Z)&&c.type&&this.set(Z,c.type),!this.get(oe)&&c.vendor&&this.set(oe,c.vendor)}if(e[Hi]){var u;if(typeof e[Hi]!="string")for(var f=0;!u&&f<e[Hi].length;)u=nr(e[Hi][f++],s_);else u=nr(e[Hi],s_);this.set(Z,u)}break;case jn:var l=e[as];if(l){var m=e[Bh];l==Kf&&(m=parseInt(Jf(m),10)>=13?"11":"10"),this.set(re,l).set(se,m)}this.get(re)==Kf&&e[ne]=="Xbox"&&this.set(re,"Xbox").set(se,void 0);break;case is:var g=this.data,_=function(T){return g[T].getItem().setCH(e).parseCH().get()};this.set(Mn,_(Mn)).set(qr,_(qr)).set(Ar,_(Ar)).set(sr,_(sr)).set(jn,_(jn))}return this};function fr(e,t,n){if(typeof e===Yt.OBJECT?(ju(e,!0)?(typeof t===Yt.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===Yt.STRING&&!ju(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===Yt.FUNCTION){var r={};n.forEach(function(f,l){r[String(l).toLowerCase()]=f}),n=r}else{var i={};for(var a in n)n.hasOwnProperty(a)&&(i[String(a).toLowerCase()]=n[a]);n=i}if(!(this instanceof fr))return new fr(e,t,n).getResult();var s=typeof e===Yt.STRING?e:n&&n[Yy]?n[Yy]:Nn&&Nn.userAgent?Nn.userAgent:rs,o=new Yw(n,!0),c=t?cj(o_,t):o_,u=function(f){return f==is?function(){return new wi(f,s,c,o).set("ua",s).set(Mn,this.getBrowser()).set(qr,this.getCPU()).set(Ar,this.getDevice()).set(sr,this.getEngine()).set(jn,this.getOS()).get()}:function(){return new wi(f,s,c[f],o).parseUA().get()}};return jr.call(this,[["getBrowser",u(Mn)],["getCPU",u(qr)],["getDevice",u(Ar)],["getEngine",u(sr)],["getOS",u(jn)],["getResult",u(is)],["getUA",function(){return s}],["setUA",function(f){return Ro(f)&&(s=Vu(f,Q3)),this}]]).setUA(s),this}fr.VERSION=Z3;fr.BROWSER=Ll([re,se,$s,Z]);fr.CPU=Ll([Sn]);fr.DEVICE=Ll([ne,oe,Z,cu,Ye,Jt,St,Sr,Bs]);fr.ENGINE=fr.OS=Ll([re,se]);const dj=Object.freeze({"68K":"68k",ALPHA:"alpha",ARM:"arm",ARM_64:"arm64",ARM_HF:"armhf",AVR:"avr",AVR_32:"avr32",IA64:"ia64",IRIX:"irix",IRIX_64:"irix64",MIPS:"mips",MIPS_64:"mips64",PA_RISC:"pa-risc",PPC:"ppc",SPARC:"sparc",SPARC_64:"sparc64",X86:"ia32",X86_64:"amd64"}),fj=Object.freeze({AIX:"AIX",AMIGA_OS:"Amiga OS",ANDROID:"Android",ANDROID_X86:"Android-x86",ARCAOS:"ArcaOS",ARCH:"Arch",BADA:"Bada",BEOS:"BeOS",BLACKBERRY:"BlackBerry",CENTOS:"CentOS",CHROME_OS:"Chrome OS",CHROMECAST:"Chromecast",CHROMECAST_ANDROID:"Chromecast Android",CHROMECAST_FUCHSIA:"Chromecast Fuchsia",CHROMECAST_LINUX:"Chromecast Linux",CHROMECAST_SMARTSPEAKER:"Chromecast SmartSpeaker",CONTIKI:"Contiki",DEBIAN:"Debian",DEEPIN:"Deepin",DRAGONFLY:"DragonFly",ELEMENTARY_OS:"elementary OS",FEDORA:"Fedora",FIREFOX_OS:"Firefox OS",FREEBSD:"FreeBSD",FUCHSIA:"Fuchsia",GENTOO:"Gentoo",GHOSTBSD:"GhostBSD",GNU:"GNU",HAIKU:"Haiku",HARMONYOS:"HarmonyOS",HP_UX:"HP-UX",HURD:"Hurd",IOS:"iOS",JOLI:"Joli",KAIOS:"KaiOS",KNOPPIX:"Knoppix",KUBUNTU:"Kubuntu",LINPUS:"Linpus",LINSPIRE:"Linspire",LINUX:"Linux",MACOS:"macOS",MAEMO:"Maemo",MAGEIA:"Mageia",MANDRIVA:"Mandriva",MANJARO:"Manjaro",MEEGO:"MeeGo",MINIX:"Minix",MINT:"Mint",MORPH_OS:"Morph OS",NETBSD:"NetBSD",NETRANGE:"NetRange",NETTV:"NetTV",NINTENDO:"Nintendo",OPENHARMONY:"OpenHarmony",OPENBSD:"OpenBSD",OPENVMS:"OpenVMS",OS2:"OS/2",PALM:"Palm",PC_BSD:"PC-BSD",PCLINUXOS:"PCLinuxOS",PICO:"Pico",PLAN9:"Plan9",PLAYSTATION:"PlayStation",QNX:"QNX",RASPBIAN:"Raspbian",REDHAT:"RedHat",RIM_TABLET_OS:"RIM Tablet OS",RISC_OS:"RISC OS",SABAYON:"Sabayon",SAILFISH:"Sailfish",SERENITYOS:"SerenityOS",SERIES40:"Series40",SLACKWARE:"Slackware",SOLARIS:"Solaris",SUSE:"SUSE",SYMBIAN:"Symbian",TIZEN:"Tizen",UBUNTU:"Ubuntu",UBUNTU_TOUCH:"Ubuntu Touch",UNIX:"Unix",VECTORLINUX:"VectorLinux",VEGA_OS:"Vega OS",WATCHOS:"watchOS",WEBOS:"WebOS",WINDOWS:"Windows",WINDOWS_CE:"Windows CE",WINDOWS_IOT:"Windows IoT",WINDOWS_MOBILE:"Windows Mobile",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",XBOX:"Xbox",XUBUNTU:"Xubuntu",ZENWALK:"Zenwalk"}),pj=e=>{const{os:t,cpu:n}=typeof e!="string"?e:{os:new fr(e).getOS(),cpu:new fr(e).getCPU()};if(t.is(fj.MACOS)){if(n.is(dj.ARM))return!0;if(typeof window<"u")try{const r=document.createElement("canvas"),i=r.getContext("webgl2")||r.getContext("webgl")||r.getContext("experimental-webgl");return i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL).match(/apple m\d/i)}catch{return!1}}return!1},{useState:c_}=await kn("react"),Ia="Unknown";let Yd,Kd=!1;function Vj(){const[e,t]=c_(!Kd),[n,r]=c_(Yd);return vw(async()=>{if(Kd)return;t(!0);const i=new fr(navigator.userAgent),a=i.getResult(),s={name:a.browser.name??Ia,version:a.browser.version??Ia},o={name:a.engine.name??Ia,version:a.engine.version??Ia},[c,u,f]=await Promise.all([a.withClientHints(),i.getOS().withClientHints(),i.getCPU().withClientHints()]),l={name:u.name??Ia,version:u.version??Ia};let m;f.architecture?m=f.architecture:m=l.name==="macOS"&&pj(c)?"arm64":"Unknown";const g={browser:s,engine:o,os:l,cpu:{architecture:m},mobile:i.getDevice().is("mobile"),tablet:i.getDevice().is("tablet")};Yd=g,Kd=!0,r(g),t(!1)},[]),[e,Yd??n]}const{useContext:hj}=await kn("react"),mj=()=>{const e=hj(Sw);if(!e)throw new Error("useAnalytics must be used within AnalyticsProvider");return e.isInitialized?{isInitialized:!0,track:e.track,identify:e.identify,page:e.page}:{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}},{useCallback:u_,useEffect:l_,useMemo:gj,useState:yj}=await kn("react"),Gj=()=>({version:0,loading:!1,time:0,error:null,loaded:!1,reload:()=>{},set:()=>{}}),_j=(e,t=[],n={})=>{const[r,i]=yj({version:0,loading:!1,value:n.initialValue??null,time:0,error:null}),a=u_(()=>{n.callWithTruthyDeps&&t.some(c=>!c)||i(c=>({...c,loading:!0,version:c.version+1}))},[r,n.callWithTruthyDeps,...t]);l_(()=>{a()},t),l_(()=>{if(!r.loading)return;let c=!1;const u=!1,f=Date.now();return Promise.resolve().then(()=>e()).then(l=>{c||i(m=>({...m,value:l,error:null,loading:u,time:Date.now()-f}))}).catch(l=>{console.error(l),Pl(m=>m.captureException(l)),!c&&i(m=>({...m,value:m.value,error:l,loading:u,time:Date.now()-f}))}),()=>{c=!0}},[r]);const s=u_(c=>{const u=typeof c=="function"?c(r.value):c;i(f=>({...f,value:u}))},[r]),o=gj(()=>({version:r.version,loading:r.loading,error:r.error,time:r.time,loaded:r.version!==0,reload:a,set:s}),[r,a,s]);return[r.value,o]},qj=_j,{useCallback:bj,useEffect:Ej,useState:vj}=await kn("react"),Wj=(e,t)=>{const[{loading:n,args:r},i]=vj({loading:!1,args:null});Ej(()=>{if(!n||r===null)return;let s=!1;return Promise.resolve().then(()=>e(...r)).then(()=>{s||i({loading:!1,args:null})}).catch(o=>{console.error(o),Pl(c=>c.captureException(o)),!s&&i({loading:!1,args:null})}),()=>{s=!0}},[n]);const a=bj((...s)=>{i({loading:!0,args:s})},[n,r,...t]);return[n,a]},{useCallback:Sj,useMemo:wj,useState:Tj}=await kn("react"),zj=(e,t)=>{const[n,r]=Tj([]),i=wj(()=>n.map(([s])=>s),[n]),a=Sj((s,...o)=>{if(n.find(([u])=>u===s))return;const c=Promise.resolve().then(()=>e(s,...o)).then(()=>{r(u=>u.filter(([f])=>f!==s))}).catch(u=>{console.error(u),Pl(f=>f.captureException(u)),r(f=>f.filter(([l])=>l!==s))});r(u=>[...u,[s,c]])},[n,...t]);return[i,a]},{useEffect:d_,useRef:f_}=await kn("react"),Yj=({onLoadMore:e,hasMore:t,isLoading:n,threshold:r=500,debounceMs:i=500})=>{const a=f_(e),s=f_(0);d_(()=>{a.current=e},[e]),d_(()=>{const o=()=>{const u=Date.now();if(u-s.current<i)return;const f=document.documentElement.scrollHeight,l=document.documentElement.scrollTop,m=document.documentElement.clientHeight;f-(l+m)<r&&t&&!n&&(s.current=u,a.current())};window.addEventListener("scroll",o,{passive:!0});const c=setTimeout(o,500);return()=>{window.removeEventListener("scroll",o),clearTimeout(c)}},[t,n,r,i])};var Qf;(function(e){e.NEWEST="newest",e.READ="read"})(Qf||(Qf={}));const Ij=(e,t)=>{try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},Kw=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},Kj=e=>{try{localStorage.removeItem(e)}catch{}},{useCallback:Ls,useEffect:qc,useMemo:Aj,useRef:p_,useState:Xd}=await kn("react"),Oj=6e4,$f="dcl_notifications_onboarding",Rj=()=>{const e=Ij($f,null);return e===null?(Kw($f,!0),!0):e},h_=()=>{Kw($f,!1)},Xj=e=>{const{identity:t,isNotificationsEnabled:n,notificationsUrl:r,availableNotificationTypes:i,queryIntervalMs:a=Oj,initialActiveTab:s=Qf.NEWEST,onError:o,renderProfile:c}=e,[u,f]=Xd({isLoading:!1,notifications:[]}),[l,m]=Xd(()=>({activeTab:s,isOnboarding:Rj(),isOpen:!1})),[g,_]=Xd(null),T=p_([]),B=p_(null);qc(()=>{T.current=u.notifications},[u.notifications]),qc(()=>{B.current=g},[g]);const U=Aj(()=>i?new Set(i):null,[i]),J=Ls(j=>Promise.resolve().then(()=>j.getNotifications()).then(te=>{const L=U?te.filter(W=>U.has(W.type)):te,G=L.some(W=>W.read);f(W=>({...W,isLoading:!1,notifications:L})),G&&(h_(),m(W=>W.isOnboarding?{...W,isOnboarding:!1}:W))}).catch(te=>{const L=te instanceof Error?te:new Error("Unknown error");console.error("Error fetching notifications:",L),o&&o(L),f(G=>({...G,isLoading:!1}))}),[U,o]);qc(()=>{if(!t){_(null);return}if(!r){const W=new Error("notificationsUrl is required");console.error("Notifications URL missing:",W),o&&o(W),_(null);return}const j=sR(t,{url:r});if(_(j),!n)return;let te=!1;f(W=>({...W,isLoading:!0}));const L=()=>{te||J(j)};L();const G=setInterval(L,a);return()=>{te=!0,clearInterval(G)}},[t,n,r,o,J,a]),qc(()=>{if(!!l.isOpen)return;const te=T.current,L=B.current;if(!L)return;const G=te.filter(z=>!z.read).map(z=>z.id);if(G.length===0)return;let W=!1;return Promise.resolve().then(()=>L.markNotificationsAsRead(G)).then(()=>{W||f(z=>({...z,notifications:z.notifications.map(ae=>({...ae,read:G.includes(ae.id)?!0:ae.read}))}))}).catch(z=>{if(W)return;const ae=z instanceof Error?z:new Error("Unknown error");console.error("Error marking notifications as read:",ae),o&&o(ae)}),()=>{W=!0}},[l.isOpen,o]);const K=Ls(()=>{h_(),m(j=>({...j,isOnboarding:!1}))},[]),H=Ls(()=>{m(j=>({...j,isOpen:!j.isOpen}))},[]),F=Ls(j=>{m(te=>({...te,activeTab:j}))},[]),k=Ls(j=>c?c(j):null,[c]);return{notifications:u.notifications,isLoading:u.isLoading,isModalOpen:l.isOpen,modalActiveTab:l.activeTab,isNotificationsOnboarding:l.isOnboarding,handleOnBegin:K,handleNotificationsOpen:H,handleOnChangeModalTab:F,handleRenderProfile:k}},{useEffect:Cj}=await kn("react"),Jj=e=>{const{page:t}=mj();Cj(()=>{t(e)},[t,e])},{useCallback:Nj,useState:Mj}=await kn("react"),Zj=e=>{const[t,n]=Mj(e),r=Nj(i=>n(a=>({...a,...i})),[]);return[t,r]};export{Sw as AnalyticsContext,Uj as AnalyticsProvider,ww as TranslationContext,jj as TranslationProvider,Rj as checkIsOnboarding,Gj as createAsyncMemoState,Gj as createAsyncStateState,sR as createNotificationsClient,Ij as getStorageItem,Kj as removeStorageItem,h_ as setOnboardingDone,Kw as setStorageItem,Vj as useAdvancedUserAgentData,mj as useAnalytics,vw as useAsyncEffect,qj as useAsyncMemo,_j as useAsyncState,Wj as useAsyncTask,zj as useAsyncTasks,Yj as useInfiniteScroll,Xj as useNotifications,Jj as usePageTracking,Zj as usePatchState,X3 as useTranslation};
|
|
535
|
+
For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function Fd(e,t){var n=I3(t),r=Fe(Fe({},T3),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Uy('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Uy('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new b3('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),z3(r),Fe(Fe({},r),{formatters:n,formatNumber:G3.bind(null,r,n.getNumberFormat),formatNumberToParts:q3.bind(null,r,n.getNumberFormat),formatRelativeTime:j3.bind(null,r,n.getRelativeTimeFormat),formatDate:O3.bind(null,r,n.getDateTimeFormat),formatDateToParts:N3.bind(null,r,n.getDateTimeFormat),formatTime:R3.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:C3.bind(null,r,n.getDateTimeFormat),formatTimeToParts:M3.bind(null,r,n.getDateTimeFormat),formatPlural:x3.bind(null,r,n.getPluralRules),formatMessage:Gy.bind(null,r,n),$t:Gy.bind(null,r,n),formatList:B3.bind(null,r,n.getListFormat),formatListToParts:Vw.bind(null,r,n.getListFormat),formatDisplayName:k3.bind(null,r,n.getDisplayNames)})}const{useCallback:Wy,useContext:Y3,useMemo:zy,useState:K3}=await kn("react"),xd=jw(),qw=(e,t="",n={})=>(Object.entries(e).forEach(([r,i])=>{const a=t?`${t}.${r}`:r;if(typeof i=="string"){n[a]=i;return}if(i&&typeof i=="object"&&!Array.isArray(i)){qw(i,a,n);return}console.error(`Invalid translation value for key "${a}". Expected string or nested object.`)}),n),X3=e=>{const t=Y3(ww);if(!e&&!t)throw new Error("useTranslation must be used with either options or within a TranslationProvider");if(!e&&t)return t;if(e&&!e.locale)throw new Error("locale is required when using useTranslation with options");if(e&&!e.translations)throw new Error("translations is required when using useTranslation with options");const n=e,[r,i]=K3({locale:n.locale,translations:n.translations,error:null}),a=zy(()=>{const u={};return Object.entries(r.translations).forEach(([f,l])=>{u[f]=qw(l)}),u},[r.translations]),s=zy(()=>{const u=a[r.locale],f=n.fallbackLocale&&a[n.fallbackLocale];if(!u&&f)return console.error(`No translations found for locale "${r.locale}". Using fallback locale "${n.fallbackLocale}".`),Fd({locale:r.locale,messages:f},xd);if(!u)return console.error(`No translations found for locale "${r.locale}". Using empty translations.`),Fd({locale:r.locale,messages:{}},xd);const m=n.fallbackLocale&&r.locale!==n.fallbackLocale&&f?{...f,...u}:u;return Fd({locale:r.locale,messages:m},xd)},[r.locale,a,n.fallbackLocale]),o=Wy((u,f)=>s.formatMessage({id:u},f),[s]),c=Wy(u=>{if(!r.translations[u]){console.error(`Locale "${u}" not found in translations. Available locales: ${Object.keys(r.translations).join(", ")}`),i(f=>({...f,error:`Locale "${u}" not found`}));return}i(f=>({...f,locale:u,error:null}))},[r.translations]);return{t:o,intl:s,locale:r.locale,setLocale:c,error:r.error}},{useMemo:J3}=await kn("react"),Uj=e=>{const{locale:t,translations:n,fallbackLocale:r,children:i}=e,a=X3({locale:t,translations:n,fallbackLocale:r}),s=J3(()=>a,[a]);return m_.jsx(ww.Provider,{value:s,children:i})};var Z3="2.0.9",Q3=500,Yy="user-agent",rs="",Ky="?",Yt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Mn="browser",qr="cpu",Ar="device",sr="engine",jn="os",is="result",re="name",Z="type",oe="vendor",se="version",Sn="architecture",$s="major",ne="model",cu="console",Ye="mobile",St="tablet",Jt="smarttv",Sr="wearable",Uc="xr",Bs="embedded",$3="fetcher",Ea="inapp",Lh="brands",Hi="formFactors",Dh="fullVersionList",as="platform",Bh="platformVersion",kl="bitness",Mi="sec-ch-ua",ej=Mi+"-full-version-list",tj=Mi+"-arch",nj=Mi+"-"+kl,rj=Mi+"-form-factors",ij=Mi+"-"+Ye,aj=Mi+"-"+ne,Ww=Mi+"-"+as,sj=Ww+"-version",zw=[Lh,Dh,Ye,ne,as,Bh,Sn,Hi,kl],jc="Amazon",va="Apple",Xy="ASUS",Jy="BlackBerry",Bi="Google",Zy="Huawei",Hd="Lenovo",Qy="Honor",Vc="LG",Ud="Microsoft",jd="Motorola",$y="Nvidia",e_="OnePlus",Vd="OPPO",Ns="Samsung",t_="Sharp",Ms="Sony",Gd="Xiaomi",qd="Zebra",n_="Chrome",r_="Chromium",di="Chromecast",uu="Edge",Ps="Firefox",Sa="Opera",Wd="Facebook",i_="Sogou",wa="Mobile ",Ta=" Browser",Kf="Windows",oj=typeof window!==Yt.UNDEFINED,Nn=oj&&window.navigator?window.navigator:void 0,Ui=Nn&&Nn.userAgentData?Nn.userAgentData:void 0,cj=function(e,t){var n={},r=t;if(!ju(t)){r={};for(var i in t)for(var a in t[i])r[a]=t[i][a].concat(r[a]?r[a]:[])}for(var s in e)n[s]=r[s]&&r[s].length%2===0?r[s].concat(e[s]):e[s];return n},Ll=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Xf=function(e,t){if(typeof e===Yt.OBJECT&&e.length>0){for(var n in e)if(gi(t)==gi(e[n]))return!0;return!1}return Ro(e)?gi(t)==gi(e):!1},ju=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?ju(e[n]):!1)},Ro=function(e){return typeof e===Yt.STRING},zd=function(e){if(e){for(var t=[],n=ss(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Vu(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=Vu(n[r]);return t}},gi=function(e){return Ro(e)?e.toLowerCase():e},Jf=function(e){return Ro(e)?ss(/[^\d\.]/g,e).split(".")[0]:void 0},jr=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==Yt.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},ss=function(e,t){return Ro(t)?t.replace(e,rs):t},ks=function(e){return ss(/\\?\"/g,e)},Vu=function(e,t){return e=ss(/^\s\s*/,String(e)),typeof t===Yt.UNDEFINED?e:e.substring(0,t)},Zf=function(e,t){if(!(!e||!t))for(var n=0,r,i,a,s,o,c;n<t.length&&!o;){var u=t[n],f=t[n+1];for(r=i=0;r<u.length&&!o&&u[r];)if(o=u[r++].exec(e),o)for(a=0;a<f.length;a++)c=o[++i],s=f[a],typeof s===Yt.OBJECT&&s.length>0?s.length===2?typeof s[1]==Yt.FUNCTION?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Yt.FUNCTION&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=c?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:s.length==3?this[s[0]]=c?c.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=c?s[3].apply(this,[c.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=c||void 0;n+=2}},nr=function(e,t){for(var n in t)if(typeof t[n]===Yt.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Xf(t[n][r],e))return n===Ky?void 0:n}else if(Xf(t[n],e))return n===Ky?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},a_={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},s_={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},uj={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},o_={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[se,[re,wa+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[se,[re,uu+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[se,[re,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[re,se],[/opios[\/ ]+([\w\.]+)/i],[se,[re,Sa+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[se,[re,Sa+" GX"]],[/\bopr\/([\w\.]+)/i],[se,[re,Sa]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[se,[re,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[se,[re,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[re,se],[/quark(?:pc)?\/([-\w\.]+)/i],[se,[re,"Quark"]],[/\bddg\/([\w\.]+)/i],[se,[re,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[se,[re,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[se,[re,"WeChat"]],[/konqueror\/([\w\.]+)/i],[se,[re,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[se,[re,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[se,[re,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[se,[re,"Smart "+Hd+Ta]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[re,/(.+)/,"$1 Secure"+Ta],se],[/norton\/([\w\.]+)/i],[se,[re,"Norton Private"+Ta]],[/\bfocus\/([\w\.]+)/i],[se,[re,Ps+" Focus"]],[/ mms\/([\w\.]+)$/i],[se,[re,Sa+" Neon"]],[/ opt\/([\w\.]+)$/i],[se,[re,Sa+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[se,[re,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[se,[re,"Dolphin"]],[/coast\/([\w\.]+)/i],[se,[re,Sa+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[se,[re,"MIUI"+Ta]],[/fxios\/([\w\.-]+)/i],[se,[re,wa+Ps]],[/\bqihoobrowser\/?([\w\.]*)/i],[se,[re,"360"]],[/\b(qq)\/([\w\.]+)/i],[[re,/(.+)/,"$1Browser"],se],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[re,/(.+)/,"$1"+Ta],se],[/samsungbrowser\/([\w\.]+)/i],[se,[re,Ns+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[se,[re,i_+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[re,i_+" Mobile"],se],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[re,se],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[re],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[se,re],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[re,Wd],se,[Z,Ea]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[re,se,[Z,Ea]],[/\bgsa\/([\w\.]+) .*safari\//i],[se,[re,"GSA"],[Z,Ea]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[se,[re,"TikTok"],[Z,Ea]],[/\[(linkedin)app\]/i],[re,[Z,Ea]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[re,/(.+)/,"Zalo"],se,[Z,Ea]],[/(chromium)[\/ ]([-\w\.]+)/i],[re,se],[/ome-(lighthouse)$/i],[re,[Z,$3]],[/headlesschrome(?:\/([\w\.]+)| )/i],[se,[re,n_+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[se,[re,uu+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[re,n_+" WebView"],se],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[se,[re,"Android"+Ta]],[/chrome\/([\w\.]+) mobile/i],[se,[re,wa+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[re,se],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[se,[re,wa+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[re,wa+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[se,re],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[re,[se,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[re,se],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[re,wa+Ps],se],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[re,"Netscape"],se],[/(wolvic|librewolf)\/([\w\.]+)/i],[re,se],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[se,[re,Ps+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[re,[se,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[re,[se,/[^\d\.]+./,rs]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Sn,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Sn,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Sn,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Sn,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Sn,"arm"]],[/ sun4\w[;\)]/i],[[Sn,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Sn,/ower/,rs,gi]],[/mc680.0/i],[[Sn,"68k"]],[/winnt.+\[axp/i],[[Sn,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[ne,[oe,Ns],[Z,St]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[ne,[oe,Ns],[Z,Ye]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[ne,[oe,va],[Z,Ye]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[ne,[oe,va],[Z,St]],[/(macintosh);/i],[ne,[oe,va]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ne,[oe,t_],[Z,Ye]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[ne,[oe,Qy],[Z,St]],[/honor([-\w ]+)[;\)]/i],[ne,[oe,Qy],[Z,Ye]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[ne,[oe,Zy],[Z,St]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[ne,[oe,Zy],[Z,Ye]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[ne,/_/g," "],[oe,Gd],[Z,St]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[ne,/_/g," "],[oe,Gd],[Z,Ye]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ne,[oe,e_],[Z,Ye]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ne,[oe,Vd],[Z,Ye]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[ne,[oe,nr,{OnePlus:["203","304","403","404","413","415"],"*":Vd}],[Z,St]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[ne,[oe,"BLU"],[Z,Ye]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ne,[oe,"Vivo"],[Z,Ye]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ne,[oe,"Realme"],[Z,Ye]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[ne,[oe,Hd],[Z,St]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[ne,[oe,Hd],[Z,Ye]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[ne,[oe,jd],[Z,Ye]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ne,[oe,jd],[Z,St]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ne,[oe,Vc],[Z,St]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[ne,[oe,Vc],[Z,Ye]],[/(nokia) (t[12][01])/i],[oe,ne,[Z,St]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[ne,/_/g," "],[Z,Ye],[oe,"Nokia"]],[/(pixel (c|tablet))\b/i],[ne,[oe,Bi],[Z,St]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[ne,[oe,Bi],[Z,Ye]],[/(google) (pixelbook( go)?)/i],[oe,ne],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[ne,[oe,Ms],[Z,Ye]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ne,"Xperia Tablet"],[oe,Ms],[Z,St]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ne,[oe,jc],[Z,St]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ne,/(.+)/g,"Fire Phone $1"],[oe,jc],[Z,Ye]],[/(playbook);[-\w\),; ]+(rim)/i],[ne,oe,[Z,St]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[ne,[oe,Jy],[Z,Ye]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ne,[oe,Xy],[Z,St]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ne,[oe,Xy],[Z,Ye]],[/(nexus 9)/i],[ne,[oe,"HTC"],[Z,St]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[oe,[ne,/_/g," "],[Z,Ye]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[ne,[oe,"TCL"],[Z,St]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[ne,[oe,"TCL"],[Z,Ye]],[/(itel) ((\w+))/i],[[oe,gi],ne,[Z,nr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ne,[oe,"Acer"],[Z,St]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ne,[oe,"Meizu"],[Z,Ye]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ne,[oe,"Ulefone"],[Z,Ye]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ne,[oe,"Energizer"],[Z,Ye]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ne,[oe,"Cat"],[Z,Ye]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ne,[oe,"Smartfren"],[Z,Ye]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[ne,[oe,"Nothing"],[Z,Ye]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[ne,[oe,"Archos"],[Z,St]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[ne,[oe,"Archos"],[Z,Ye]],[/; (n159v)/i],[ne,[oe,"HMD"],[Z,Ye]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[oe,ne,[Z,St]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[oe,ne,[Z,Ye]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[oe,ne,[Z,St]],[/(surface duo)/i],[ne,[oe,Ud],[Z,St]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ne,[oe,"Fairphone"],[Z,Ye]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[ne,[oe,$y],[Z,St]],[/(sprint) (\w+)/i],[oe,ne,[Z,Ye]],[/(kin\.[onetw]{3})/i],[[ne,/\./g," "],[oe,Ud],[Z,Ye]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ne,[oe,qd],[Z,St]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ne,[oe,qd],[Z,Ye]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[oe,[Z,Jt]],[/hbbtv.+maple;(\d+)/i],[[ne,/^/,"SmartTV"],[oe,Ns],[Z,Jt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[oe,ne,[Z,Jt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[oe,Vc],[Z,Jt]],[/(apple) ?tv/i],[oe,[ne,va+" TV"],[Z,Jt]],[/crkey.*devicetype\/chromecast/i],[[ne,di+" Third Generation"],[oe,Bi],[Z,Jt]],[/crkey.*devicetype\/([^/]*)/i],[[ne,/^/,"Chromecast "],[oe,Bi],[Z,Jt]],[/fuchsia.*crkey/i],[[ne,di+" Nest Hub"],[oe,Bi],[Z,Jt]],[/crkey/i],[[ne,di],[oe,Bi],[Z,Jt]],[/(portaltv)/i],[ne,[oe,Wd],[Z,Jt]],[/droid.+aft(\w+)( bui|\))/i],[ne,[oe,jc],[Z,Jt]],[/(shield \w+ tv)/i],[ne,[oe,$y],[Z,Jt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ne,[oe,t_],[Z,Jt]],[/(bravia[\w ]+)( bui|\))/i],[ne,[oe,Ms],[Z,Jt]],[/(mi(tv|box)-?\w+) bui/i],[ne,[oe,Gd],[Z,Jt]],[/Hbbtv.*(technisat) (.*);/i],[oe,ne,[Z,Jt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[oe,/.+\/(\w+)/,"$1",nr,{LG:"lge"}],[ne,Vu],[Z,Jt]],[/(playstation \w+)/i],[ne,[oe,Ms],[Z,cu]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ne,[oe,Ud],[Z,cu]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[oe,nr,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],ne,[Z,cu]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[ne,[oe,Ns],[Z,Sr]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[oe,ne,[Z,Sr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[ne,[oe,Vd],[Z,Sr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ne,[oe,va],[Z,Sr]],[/(opwwe\d{3})/i],[ne,[oe,e_],[Z,Sr]],[/(moto 360)/i],[ne,[oe,jd],[Z,Sr]],[/(smartwatch 3)/i],[ne,[oe,Ms],[Z,Sr]],[/(g watch r)/i],[ne,[oe,Vc],[Z,Sr]],[/droid.+; (wt63?0{2,3})\)/i],[ne,[oe,qd],[Z,Sr]],[/droid.+; (glass) \d/i],[ne,[oe,Bi],[Z,Uc]],[/(pico) ([\w ]+) os\d/i],[oe,ne,[Z,Uc]],[/(quest( \d| pro)?s?).+vr/i],[ne,[oe,Wd],[Z,Uc]],[/mobile vr; rv.+firefox/i],[[Z,Uc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[oe,[Z,Bs]],[/(aeobc)\b/i],[ne,[oe,jc],[Z,Bs]],[/(homepod).+mac os/i],[ne,[oe,va],[Z,Bs]],[/windows iot/i],[[Z,Bs]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[ne,[Z,Jt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[Z,Jt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[ne,[Z,nr,{mobile:"Mobile",xr:"VR","*":St}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Z,St]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Z,Ye]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[ne,[oe,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[se,[re,uu+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[re,se],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[se,[re,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[re,se],[/ladybird\//i],[[re,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[se,re]],os:[[/(windows nt) (6\.[23]); arm/i],[[re,/N/,"R"],[se,nr,a_]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[re,se],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[se,/(;|\))/g,"",nr,a_],[re,Kf]],[/(windows ce)\/?([\d\.]*)/i],[re,se],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[se,/_/g,"."],[re,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[re,"macOS"],[se,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[se,[re,di+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[se,[re,di+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[se,[re,di+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[se,[re,di+" Linux"]],[/crkey\/([\d\.]+)/i],[se,[re,di]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[se,re],[/(ubuntu) ([\w\.]+) like android/i],[[re,/(.+)/,"$1 Touch"],se],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[re,se],[/\(bb(10);/i],[se,[re,Jy]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[se,[re,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[se,[re,Ps+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[se,[re,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[se,nr,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[re,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[se,[re,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[se,[re,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[se,[re,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[re,se],[/(sunos) ?([\d\.]*)/i],[[re,"Solaris"],se],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[re,se]]},Gc=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return jr.call(e.init,[[Mn,[re,se,$s,Z]],[qr,[Sn]],[Ar,[Z,ne,oe]],[sr,[re,se]],[jn,[re,se]]]),jr.call(e.isIgnore,[[Mn,[se,$s]],[sr,[se]],[jn,[se]]]),jr.call(e.isIgnoreRgx,[[Mn,/ ?browser$/i],[jn,/ ?os$/i]]),jr.call(e.toString,[[Mn,[re,se]],[qr,[Sn]],[Ar,[oe,ne]],[sr,[re,se]],[jn,[re,se]]]),e}(),lj=function(e,t){var n=Gc.init[t],r=Gc.isIgnore[t]||0,i=Gc.isIgnoreRgx[t]||0,a=Gc.toString[t]||0;function s(){jr.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Ui?Ui.getHighEntropyValues(zw).then(function(o){return e.setCH(new Yw(o,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=is&&(s.prototype.is=function(o){var c=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Xf(r,u)&&gi(i?ss(i,this[u]):this[u])==gi(i?ss(i,o):o)){if(c=!0,o!=Yt.UNDEFINED)break}else if(o==Yt.UNDEFINED&&c){c=!c;break}return c},s.prototype.toString=function(){var o=rs;for(var c in a)typeof this[a[c]]!==Yt.UNDEFINED&&(o+=(o?" ":rs)+this[a[c]]);return o||Yt.UNDEFINED}),s.prototype.then=function(o){var c=this,u=function(){for(var l in c)c.hasOwnProperty(l)&&(this[l]=c[l])};u.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var f=new u;return o(f),f},new s};function Yw(e,t){if(e=e||{},jr.call(this,zw),t)jr.call(this,[[Lh,zd(e[Mi])],[Dh,zd(e[ej])],[Ye,/\?1/.test(e[ij])],[ne,ks(e[aj])],[as,ks(e[Ww])],[Bh,ks(e[sj])],[Sn,ks(e[tj])],[Hi,zd(e[rj])],[kl,ks(e[nj])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==Yt.UNDEFINED&&(this[n]=e[n])}function wi(e,t,n,r){return jr.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",lj(this,e)]]),this}wi.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};wi.prototype.set=function(e,t){return this.data[e]=t,this};wi.prototype.setCH=function(e){return this.uaCH=e,this};wi.prototype.detectFeature=function(){if(Nn&&Nn.userAgent==this.ua)switch(this.itemType){case Mn:Nn.brave&&typeof Nn.brave.isBrave==Yt.FUNCTION&&this.set(re,"Brave");break;case Ar:!this.get(Z)&&Ui&&Ui[Ye]&&this.set(Z,Ye),this.get(ne)=="Macintosh"&&Nn&&typeof Nn.standalone!==Yt.UNDEFINED&&Nn.maxTouchPoints&&Nn.maxTouchPoints>2&&this.set(ne,"iPad").set(Z,St);break;case jn:!this.get(re)&&Ui&&Ui[as]&&this.set(re,Ui[as]);break;case is:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(Mn,t(Mn)).set(qr,t(qr)).set(Ar,t(Ar)).set(sr,t(sr)).set(jn,t(jn))}return this};wi.prototype.parseUA=function(){switch(this.itemType!=is&&Zf.call(this.data,this.ua,this.rgxMap),this.itemType){case Mn:this.set($s,Jf(this.get(se)));break;case jn:if(this.get(re)=="iOS"&&this.get(se)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(se,e[1])}break}return this};wi.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case Mn:case sr:var n=e[Dh]||e[Lh],r;if(n)for(var i=0;i<n.length;i++){var a=n[i].brand||n[i],s=n[i].version;this.itemType==Mn&&!/not.a.brand/i.test(a)&&(!r||/Chrom/.test(r)&&a!=r_||r==uu&&/WebView2/.test(a))&&(a=nr(a,uj),r=this.get(re),r&&!/Chrom/.test(r)&&/Chrom/.test(a)||this.set(re,a).set(se,s).set($s,Jf(s)),r=a),this.itemType==sr&&a==r_&&this.set(se,s)}break;case qr:var o=e[Sn];o&&(o&&e[kl]=="64"&&(o+="64"),Zf.call(this.data,o+";",t));break;case Ar:if(e[Ye]&&this.set(Z,Ye),e[ne]&&(this.set(ne,e[ne]),!this.get(Z)||!this.get(oe))){var c={};Zf.call(c,"droid 9; "+e[ne]+")",t),!this.get(Z)&&c.type&&this.set(Z,c.type),!this.get(oe)&&c.vendor&&this.set(oe,c.vendor)}if(e[Hi]){var u;if(typeof e[Hi]!="string")for(var f=0;!u&&f<e[Hi].length;)u=nr(e[Hi][f++],s_);else u=nr(e[Hi],s_);this.set(Z,u)}break;case jn:var l=e[as];if(l){var m=e[Bh];l==Kf&&(m=parseInt(Jf(m),10)>=13?"11":"10"),this.set(re,l).set(se,m)}this.get(re)==Kf&&e[ne]=="Xbox"&&this.set(re,"Xbox").set(se,void 0);break;case is:var g=this.data,_=function(T){return g[T].getItem().setCH(e).parseCH().get()};this.set(Mn,_(Mn)).set(qr,_(qr)).set(Ar,_(Ar)).set(sr,_(sr)).set(jn,_(jn))}return this};function fr(e,t,n){if(typeof e===Yt.OBJECT?(ju(e,!0)?(typeof t===Yt.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===Yt.STRING&&!ju(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===Yt.FUNCTION){var r={};n.forEach(function(f,l){r[String(l).toLowerCase()]=f}),n=r}else{var i={};for(var a in n)n.hasOwnProperty(a)&&(i[String(a).toLowerCase()]=n[a]);n=i}if(!(this instanceof fr))return new fr(e,t,n).getResult();var s=typeof e===Yt.STRING?e:n&&n[Yy]?n[Yy]:Nn&&Nn.userAgent?Nn.userAgent:rs,o=new Yw(n,!0),c=t?cj(o_,t):o_,u=function(f){return f==is?function(){return new wi(f,s,c,o).set("ua",s).set(Mn,this.getBrowser()).set(qr,this.getCPU()).set(Ar,this.getDevice()).set(sr,this.getEngine()).set(jn,this.getOS()).get()}:function(){return new wi(f,s,c[f],o).parseUA().get()}};return jr.call(this,[["getBrowser",u(Mn)],["getCPU",u(qr)],["getDevice",u(Ar)],["getEngine",u(sr)],["getOS",u(jn)],["getResult",u(is)],["getUA",function(){return s}],["setUA",function(f){return Ro(f)&&(s=Vu(f,Q3)),this}]]).setUA(s),this}fr.VERSION=Z3;fr.BROWSER=Ll([re,se,$s,Z]);fr.CPU=Ll([Sn]);fr.DEVICE=Ll([ne,oe,Z,cu,Ye,Jt,St,Sr,Bs]);fr.ENGINE=fr.OS=Ll([re,se]);const dj=Object.freeze({"68K":"68k",ALPHA:"alpha",ARM:"arm",ARM_64:"arm64",ARM_HF:"armhf",AVR:"avr",AVR_32:"avr32",IA64:"ia64",IRIX:"irix",IRIX_64:"irix64",MIPS:"mips",MIPS_64:"mips64",PA_RISC:"pa-risc",PPC:"ppc",SPARC:"sparc",SPARC_64:"sparc64",X86:"ia32",X86_64:"amd64"}),fj=Object.freeze({AIX:"AIX",AMIGA_OS:"Amiga OS",ANDROID:"Android",ANDROID_X86:"Android-x86",ARCAOS:"ArcaOS",ARCH:"Arch",BADA:"Bada",BEOS:"BeOS",BLACKBERRY:"BlackBerry",CENTOS:"CentOS",CHROME_OS:"Chrome OS",CHROMECAST:"Chromecast",CHROMECAST_ANDROID:"Chromecast Android",CHROMECAST_FUCHSIA:"Chromecast Fuchsia",CHROMECAST_LINUX:"Chromecast Linux",CHROMECAST_SMARTSPEAKER:"Chromecast SmartSpeaker",CONTIKI:"Contiki",DEBIAN:"Debian",DEEPIN:"Deepin",DRAGONFLY:"DragonFly",ELEMENTARY_OS:"elementary OS",FEDORA:"Fedora",FIREFOX_OS:"Firefox OS",FREEBSD:"FreeBSD",FUCHSIA:"Fuchsia",GENTOO:"Gentoo",GHOSTBSD:"GhostBSD",GNU:"GNU",HAIKU:"Haiku",HARMONYOS:"HarmonyOS",HP_UX:"HP-UX",HURD:"Hurd",IOS:"iOS",JOLI:"Joli",KAIOS:"KaiOS",KNOPPIX:"Knoppix",KUBUNTU:"Kubuntu",LINPUS:"Linpus",LINSPIRE:"Linspire",LINUX:"Linux",MACOS:"macOS",MAEMO:"Maemo",MAGEIA:"Mageia",MANDRIVA:"Mandriva",MANJARO:"Manjaro",MEEGO:"MeeGo",MINIX:"Minix",MINT:"Mint",MORPH_OS:"Morph OS",NETBSD:"NetBSD",NETRANGE:"NetRange",NETTV:"NetTV",NINTENDO:"Nintendo",OPENHARMONY:"OpenHarmony",OPENBSD:"OpenBSD",OPENVMS:"OpenVMS",OS2:"OS/2",PALM:"Palm",PC_BSD:"PC-BSD",PCLINUXOS:"PCLinuxOS",PICO:"Pico",PLAN9:"Plan9",PLAYSTATION:"PlayStation",QNX:"QNX",RASPBIAN:"Raspbian",REDHAT:"RedHat",RIM_TABLET_OS:"RIM Tablet OS",RISC_OS:"RISC OS",SABAYON:"Sabayon",SAILFISH:"Sailfish",SERENITYOS:"SerenityOS",SERIES40:"Series40",SLACKWARE:"Slackware",SOLARIS:"Solaris",SUSE:"SUSE",SYMBIAN:"Symbian",TIZEN:"Tizen",UBUNTU:"Ubuntu",UBUNTU_TOUCH:"Ubuntu Touch",UNIX:"Unix",VECTORLINUX:"VectorLinux",VEGA_OS:"Vega OS",WATCHOS:"watchOS",WEBOS:"WebOS",WINDOWS:"Windows",WINDOWS_CE:"Windows CE",WINDOWS_IOT:"Windows IoT",WINDOWS_MOBILE:"Windows Mobile",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",XBOX:"Xbox",XUBUNTU:"Xubuntu",ZENWALK:"Zenwalk"}),pj=e=>{const{os:t,cpu:n}=typeof e!="string"?e:{os:new fr(e).getOS(),cpu:new fr(e).getCPU()};if(t.is(fj.MACOS)){if(n.is(dj.ARM))return!0;if(typeof window<"u")try{const r=document.createElement("canvas"),i=r.getContext("webgl2")||r.getContext("webgl")||r.getContext("experimental-webgl");return i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL).match(/apple m\d/i)}catch{return!1}}return!1},{useState:c_}=await kn("react"),Ia="Unknown";let Yd,Kd=!1;function jj(){const[e,t]=c_(!Kd),[n,r]=c_(Yd);return vw(async()=>{if(Kd)return;t(!0);const i=new fr(navigator.userAgent),a=i.getResult(),s={name:a.browser.name??Ia,version:a.browser.version??Ia},o={name:a.engine.name??Ia,version:a.engine.version??Ia},[c,u,f]=await Promise.all([a.withClientHints(),i.getOS().withClientHints(),i.getCPU().withClientHints()]),l={name:u.name??Ia,version:u.version??Ia};let m;f.architecture?m=f.architecture:m=l.name==="macOS"&&pj(c)?"arm64":"Unknown";const g={browser:s,engine:o,os:l,cpu:{architecture:m},mobile:i.getDevice().is("mobile"),tablet:i.getDevice().is("tablet")};Yd=g,Kd=!0,r(g),t(!1)},[]),[e,Yd??n]}const{useContext:hj}=await kn("react"),mj=()=>{const e=hj(Sw);if(!e)throw new Error("useAnalytics must be used within AnalyticsProvider");return e.isInitialized?{isInitialized:!0,track:e.track,identify:e.identify,page:e.page}:{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}},{useCallback:u_,useEffect:l_,useMemo:gj,useState:yj}=await kn("react"),Vj=()=>({version:0,loading:!1,time:0,error:null,loaded:!1,reload:()=>{},set:()=>{}}),_j=(e,t=[],n={})=>{const[r,i]=yj({version:0,loading:!1,value:n.initialValue??null,time:0,error:null}),a=u_(()=>{n.callWithTruthyDeps&&t.some(c=>!c)||i(c=>({...c,loading:!0,version:c.version+1}))},[r,n.callWithTruthyDeps,...t]);l_(()=>{a()},t),l_(()=>{if(!r.loading)return;let c=!1;const u=!1,f=Date.now();return Promise.resolve().then(()=>e()).then(l=>{c||i(m=>({...m,value:l,error:null,loading:u,time:Date.now()-f}))}).catch(l=>{console.error(l),Pl(m=>m.captureException(l)),!c&&i(m=>({...m,value:m.value,error:l,loading:u,time:Date.now()-f}))}),()=>{c=!0}},[r]);const s=u_(c=>{const u=typeof c=="function"?c(r.value):c;i(f=>({...f,value:u}))},[r]),o=gj(()=>({version:r.version,loading:r.loading,error:r.error,time:r.time,loaded:r.version!==0,reload:a,set:s}),[r,a,s]);return[r.value,o]},Gj=_j,{useCallback:bj,useEffect:Ej,useState:vj}=await kn("react"),qj=(e,t)=>{const[{loading:n,args:r},i]=vj({loading:!1,args:null});Ej(()=>{if(!n||r===null)return;let s=!1;return Promise.resolve().then(()=>e(...r)).then(()=>{s||i({loading:!1,args:null})}).catch(o=>{console.error(o),Pl(c=>c.captureException(o)),!s&&i({loading:!1,args:null})}),()=>{s=!0}},[n]);const a=bj((...s)=>{i({loading:!0,args:s})},[n,r,...t]);return[n,a]},{useCallback:Sj,useMemo:wj,useState:Tj}=await kn("react"),Wj=(e,t)=>{const[n,r]=Tj([]),i=wj(()=>n.map(([s])=>s),[n]),a=Sj((s,...o)=>{if(n.find(([u])=>u===s))return;const c=Promise.resolve().then(()=>e(s,...o)).then(()=>{r(u=>u.filter(([f])=>f!==s))}).catch(u=>{console.error(u),Pl(f=>f.captureException(u)),r(f=>f.filter(([l])=>l!==s))});r(u=>[...u,[s,c]])},[n,...t]);return[i,a]},{useEffect:d_,useRef:f_}=await kn("react"),zj=({onLoadMore:e,hasMore:t,isLoading:n,threshold:r=500,debounceMs:i=500})=>{const a=f_(e),s=f_(0);d_(()=>{a.current=e},[e]),d_(()=>{const o=()=>{const u=Date.now();if(u-s.current<i)return;const f=document.documentElement.scrollHeight,l=document.documentElement.scrollTop,m=document.documentElement.clientHeight;f-(l+m)<r&&t&&!n&&(s.current=u,a.current())};window.addEventListener("scroll",o,{passive:!0});const c=setTimeout(o,500);return()=>{window.removeEventListener("scroll",o),clearTimeout(c)}},[t,n,r,i])};var Qf;(function(e){e.NEWEST="newest",e.READ="read"})(Qf||(Qf={}));const Ij=(e,t)=>{try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},Kw=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},Yj=e=>{try{localStorage.removeItem(e)}catch{}},{useCallback:Ls,useEffect:qc,useMemo:Aj,useRef:p_,useState:Xd}=await kn("react"),Oj=6e4,$f="dcl_notifications_onboarding",Rj=()=>{const e=Ij($f,null);return e===null?(Kw($f,!0),!0):e},h_=()=>{Kw($f,!1)},Kj=e=>{const{identity:t,isNotificationsEnabled:n,notificationsUrl:r,availableNotificationTypes:i,queryIntervalMs:a=Oj,initialActiveTab:s=Qf.NEWEST,onError:o,renderProfile:c}=e,[u,f]=Xd({isLoading:!1,notifications:[]}),[l,m]=Xd(()=>({activeTab:s,isOnboarding:Rj(),isOpen:!1})),[g,_]=Xd(null),T=p_([]),B=p_(null);qc(()=>{T.current=u.notifications},[u.notifications]),qc(()=>{B.current=g},[g]);const U=Aj(()=>i?new Set(i):null,[i]),J=Ls(j=>Promise.resolve().then(()=>j.getNotifications()).then(te=>{const L=U?te.filter(W=>U.has(W.type)):te,G=L.some(W=>W.read);f(W=>({...W,isLoading:!1,notifications:L})),G&&(h_(),m(W=>W.isOnboarding?{...W,isOnboarding:!1}:W))}).catch(te=>{const L=te instanceof Error?te:new Error("Unknown error");console.error("Error fetching notifications:",L),o&&o(L),f(G=>({...G,isLoading:!1}))}),[U,o]);qc(()=>{if(!t){_(null);return}if(!r){const W=new Error("notificationsUrl is required");console.error("Notifications URL missing:",W),o&&o(W),_(null);return}const j=sR(t,{url:r});if(_(j),!n)return;let te=!1;f(W=>({...W,isLoading:!0}));const L=()=>{te||J(j)};L();const G=setInterval(L,a);return()=>{te=!0,clearInterval(G)}},[t,n,r,o,J,a]),qc(()=>{if(!!l.isOpen)return;const te=T.current,L=B.current;if(!L)return;const G=te.filter(z=>!z.read).map(z=>z.id);if(G.length===0)return;let W=!1;return Promise.resolve().then(()=>L.markNotificationsAsRead(G)).then(()=>{W||f(z=>({...z,notifications:z.notifications.map(ae=>({...ae,read:G.includes(ae.id)?!0:ae.read}))}))}).catch(z=>{if(W)return;const ae=z instanceof Error?z:new Error("Unknown error");console.error("Error marking notifications as read:",ae),o&&o(ae)}),()=>{W=!0}},[l.isOpen,o]);const K=Ls(()=>{h_(),m(j=>({...j,isOnboarding:!1}))},[]),H=Ls(()=>{m(j=>({...j,isOpen:!j.isOpen}))},[]),F=Ls(j=>{m(te=>({...te,activeTab:j}))},[]),k=Ls(j=>c?c(j):null,[c]);return{notifications:u.notifications,isLoading:u.isLoading,isModalOpen:l.isOpen,modalActiveTab:l.activeTab,isNotificationsOnboarding:l.isOnboarding,handleOnBegin:K,handleNotificationsOpen:H,handleOnChangeModalTab:F,handleRenderProfile:k}},{useEffect:Cj}=await kn("react"),Xj=e=>{const{page:t}=mj();Cj(()=>{t(e)},[t,e])},{useCallback:Nj,useState:Mj}=await kn("react"),Jj=e=>{const[t,n]=Mj(e),r=Nj(i=>n(a=>({...a,...i})),[]);return[t,r]};export{Sw as AnalyticsContext,Hj as AnalyticsProvider,ww as TranslationContext,Uj as TranslationProvider,Rj as checkIsOnboarding,Vj as createAsyncMemoState,Vj as createAsyncStateState,sR as createNotificationsClient,Ij as getStorageItem,Yj as removeStorageItem,h_ as setOnboardingDone,Kw as setStorageItem,jj as useAdvancedUserAgentData,mj as useAnalytics,vw as useAsyncEffect,Gj as useAsyncMemo,_j as useAsyncState,qj as useAsyncTask,Wj as useAsyncTasks,zj as useInfiniteScroll,Kj as useNotifications,Xj as usePageTracking,Jj as usePatchState,X3 as useTranslation};
|