@dcl/blog-site 0.2.2 → 0.2.3-23954909858.commit-24a2883

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/assets/QueryClientProvider-BJpEZgT0.js +2 -0
  2. package/assets/RoobertPRO-Bold-DDyOqNrI.woff2 +0 -0
  3. package/assets/SignInRedirect-D0Bi_UTp.js +11 -0
  4. package/assets/X-DBL-MTtR.js +15 -0
  5. package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +1 -0
  6. package/assets/__federation_expose_App-BTqBR-5x.js +1 -0
  7. package/assets/__federation_fn_import-DHqMJa-J.js +1 -0
  8. package/assets/__federation_shared_@dcl/hooks-D32Mt1Ea.js +535 -0
  9. package/assets/__federation_shared_@dcl/schemas-CVwtHlVJ.js +1 -0
  10. package/assets/__federation_shared_@emotion/react-CPbKHY6Z.js +1 -0
  11. package/assets/__federation_shared_@emotion/styled-CmRZFyIE.js +1 -0
  12. package/assets/__federation_shared_@reduxjs/toolkit-DIZvwqf7.js +1 -0
  13. package/assets/__federation_shared_decentraland-ui2-Bzlj4OSa.js +358 -0
  14. package/assets/__federation_shared_react-B3tlNTLg.js +1 -0
  15. package/assets/__federation_shared_react-dom-CCS4dT_K.js +1 -0
  16. package/assets/__federation_shared_react-redux-CAEXbsaD.js +13 -0
  17. package/assets/__federation_shared_react-router-dom-L3Yg9xMM.js +49 -0
  18. package/assets/__federation_shared_viem-LQCb9k9A.js +2 -0
  19. package/assets/__federation_shared_wagmi-CelLoIC2.js +17 -0
  20. package/assets/__vite-optional-peer-dep_lottie-react_decentraland-ui2-BIHI7g3E.js +1 -0
  21. package/assets/_commonjsHelpers-C4iS2aBk.js +1 -0
  22. package/assets/{add-Dnkf3E3Q.js → add-CvQPBN-D.js} +2 -2
  23. package/assets/all-wallets-yft4I5Se.js +6 -0
  24. package/assets/{app-store-C9FH4_zP.js → app-store-s3xLhjvX.js} +2 -2
  25. package/assets/{apple-Dm5w1W69.js → apple-CJyFiw5y.js} +2 -2
  26. package/assets/arrow-bottom-BVjcAWaT.js +8 -0
  27. package/assets/{arrow-bottom-circle-Bgw9yiHN.js → arrow-bottom-circle-Dvn8yr1Y.js} +2 -2
  28. package/assets/arrow-left-BJqEVbeq.js +8 -0
  29. package/assets/arrow-right-brge2drP.js +8 -0
  30. package/assets/arrow-top-CBZTxSjd.js +8 -0
  31. package/assets/auto-track-5E4-vkLt.js +1 -0
  32. package/assets/{bank-qNUWniDB.js → bank-XdnikovD.js} +2 -2
  33. package/assets/{basic-DJvhbg9L.js → basic-m_9MWlm0.js} +124 -124
  34. package/assets/biconomy-DQDd-ucU.js +1 -0
  35. package/assets/{browser-Du0KKb8R.js → browser-DLAPWBMl.js} +2 -2
  36. package/assets/{card-BpDAuOwe.js → card-CIUScwlX.js} +2 -2
  37. package/assets/ccip-BsBvXqql.js +1 -0
  38. package/assets/chains-D88UzVoE.js +1 -0
  39. package/assets/{checkmark-srdyV91l.js → checkmark-DYQFszdi.js} +2 -2
  40. package/assets/{checkmark-bold-BYtPga6u.js → checkmark-bold-CGajBikz.js} +2 -2
  41. package/assets/chevron-bottom-hX62f6hS.js +8 -0
  42. package/assets/chevron-left-Cpr6YyH7.js +8 -0
  43. package/assets/chevron-right-CkJYdZNJ.js +8 -0
  44. package/assets/chevron-top-BSnKr1-5.js +8 -0
  45. package/assets/{chrome-store-D-UYtj15.js → chrome-store-53Ypvt55.js} +2 -2
  46. package/assets/{clock-BGyfn2Ix.js → clock-DEfatJ8Z.js} +2 -2
  47. package/assets/close-DqBHD3Hm.js +8 -0
  48. package/assets/{coinPlaceholder-o1yCmFLN.js → coinPlaceholder-CMSZKiXY.js} +2 -2
  49. package/assets/common-D37S_OFt.js +1 -0
  50. package/assets/{compass-BrX88OdU.js → compass-0UuoUyB5.js} +2 -2
  51. package/assets/controller-Ds0TIVFD.js +2 -0
  52. package/assets/{copy-CGKLgPMf.js → copy-CsBcgu67.js} +2 -2
  53. package/assets/core-CboH7_QS.js +907 -0
  54. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  55. package/assets/createBundlerClient-BUvayuyH.js +4 -0
  56. package/assets/createClient-CpxNZHGg.js +1 -0
  57. package/assets/cursor-DiiKg4u1.js +3 -0
  58. package/assets/{cursor-transparent--gaS-5ET.js → cursor-transparent-wp7iKHki.js} +2 -2
  59. package/assets/decimals-B7gh-KnI.js +1 -0
  60. package/assets/decimals-Jpvanl9t.js +1 -0
  61. package/assets/defineChain-7I0Ce1VT.js +1 -0
  62. package/assets/{desktop-D3dzP-FX.js → desktop-Ncpfek01.js} +2 -2
  63. package/assets/detectExtension-BCp8ZMqB.js +1 -0
  64. package/assets/{disconnect-CsHX0nla.js → disconnect-vxz7DJ24.js} +2 -2
  65. package/assets/{discord-TnXCJHRv.js → discord-CisclA_4.js} +2 -2
  66. package/assets/emotion-react.browser.esm-Cz9bFRVj.js +8 -0
  67. package/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-Cuis_X23.js +1 -0
  68. package/assets/encode-DJOCcbGQ.js +2 -0
  69. package/assets/engine-CMMFh7YT.js +1 -0
  70. package/assets/estimate-gas-B2i5DP7U.js +3 -0
  71. package/assets/estimate-l1-fee-6NYoqQwr.js +1 -0
  72. package/assets/eth_estimateGas-C2ENZ_HR.js +1 -0
  73. package/assets/eth_getStorageAt-c-gPgGmc.js +1 -0
  74. package/assets/eth_getTransactionCount-DWnnw2mX.js +1 -0
  75. package/assets/ethereum-dN7ENYl_.js +1 -0
  76. package/assets/{etherscan-BNOTAlpJ.js → etherscan-Dpxky7YK.js} +2 -2
  77. package/assets/events-B5inrCVE.js +1 -0
  78. package/assets/{exclamation-triangle-3cTnBFEz.js → exclamation-triangle-Vgbkzeje.js} +2 -2
  79. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  80. package/assets/{extension-C7i3kBcJ.js → extension-XiwzWZiV.js} +2 -2
  81. package/assets/external-link-DooP9vXR.js +8 -0
  82. package/assets/extractIPFS-VpklSmCB.js +1 -0
  83. package/assets/{facebook-BtRXxuTh.js → facebook-WxgYMu0W.js} +2 -2
  84. package/assets/{farcaster-DuvCkOsj.js → farcaster-_vyqLI_c.js} +2 -2
  85. package/assets/fee-data-XPcWGRRP.js +1 -0
  86. package/assets/fetchTokenMetadata-ChYAryIA.js +2 -0
  87. package/assets/{filters-q4uY0GXA.js → filters-DXIFGo38.js} +2 -2
  88. package/assets/get-ecosystem-wallet-info-CYaV8nzY.js +1 -0
  89. package/assets/getBalance-BaZfkjmp.js +2 -0
  90. package/assets/getInstalledModules-BpX15EOS.js +1 -0
  91. package/assets/getNFT-B0ychhmD.js +2 -0
  92. package/assets/getNFT-kGzOOeBa.js +1 -0
  93. package/assets/{github-DdvkoPeB.js → github-DaPE472m.js} +2 -2
  94. package/assets/{google-d4Ql9qix.js → google-DpnL2qRd.js} +2 -2
  95. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  96. package/assets/{help-circle-BY_Weu8t.js → help-circle-CUILC3kO.js} +2 -2
  97. package/assets/hex-B0Rx0hII.js +2 -0
  98. package/assets/{id-BJNb6vOI.js → id-Bw0FQKrZ.js} +1 -1
  99. package/assets/{image-DIsXNsXJ.js → image-BlGULufu.js} +2 -2
  100. package/assets/in-app-wallet-calls-C3PZKMG1.js +1 -0
  101. package/assets/index-BAhlRyDG.js +1 -0
  102. package/assets/index-BMoluWtp.js +1 -0
  103. package/assets/{index-DOqN8xaU.js → index-BTtTX-5z.js} +1 -1
  104. package/assets/index-BXFnz10D.js +2 -0
  105. package/assets/index-BeEIjpQW.js +1 -0
  106. package/assets/index-BjzJcZq6.js +1 -0
  107. package/assets/index-BjzJcZq6__bundled.js +24 -0
  108. package/assets/index-BozJS3za.js +12 -0
  109. package/assets/index-C05H8NDX.js +1 -0
  110. package/assets/index-C1IoT2if.js +3 -0
  111. package/assets/index-C2NJyluS.js +395 -0
  112. package/assets/index-CpR9p5nk.js +1 -0
  113. package/assets/index-CuF_FV-t.js +2 -0
  114. package/assets/index-DEyuwX6T.js +2 -0
  115. package/assets/{index-X-a697cI.js → index-DJ7GgcJ9.js} +2 -2
  116. package/assets/index-DOTdU2de.js +13 -0
  117. package/assets/index-Dy0yjznp.js +1 -0
  118. package/assets/index-Dy0yjznp__bundled.js +9 -0
  119. package/assets/index-DztX0_Yi.js +1 -0
  120. package/assets/index-MYKNZAUu.js +8 -0
  121. package/assets/index-Tsk25L8E.js +1 -0
  122. package/assets/index-VYRLGCVw.js +4 -0
  123. package/assets/index-rhE3CzWW.js +45 -0
  124. package/assets/index-uM0NO8r_.js +1 -0
  125. package/assets/index.es-B1N9yefF.js +11 -0
  126. package/assets/index.es-BfgStfjd.js +1 -0
  127. package/assets/index.es-D3pP9hN4.js +27 -0
  128. package/assets/index.es-D5YKsq2-.js +2 -0
  129. package/assets/index.umd-DK712HHb.js +1 -0
  130. package/assets/{info-BvPgRaaJ.js → info-C-_-F6pR.js} +2 -2
  131. package/assets/{info-circle-sWcom9RD.js → info-circle-Ci6SutID.js} +2 -2
  132. package/assets/is-plan-event-enabled-DeNtQvA5.js +1 -0
  133. package/assets/json-BHzNJmTy.js +1 -0
  134. package/assets/jsx-runtime-DncYoG30.js +1 -0
  135. package/assets/jsx-runtime-DncYoG30__bundled.js +9 -0
  136. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  137. package/assets/{lightbulb-HJchniSu.js → lightbulb-Dt7ipLz9.js} +2 -2
  138. package/assets/localBatchGatewayRequest-DGUw81MV.js +1 -0
  139. package/assets/{mail-DlRijJmV.js → mail-DrOuWXIw.js} +2 -2
  140. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
  141. package/assets/{mobile-CoiDw6cg.js → mobile-Cy4L1B3n.js} +2 -2
  142. package/assets/{more-LUiRL6x4.js → more-BCpUphIA.js} +2 -2
  143. package/assets/{network-placeholder-Cj3jgVfo.js → network-placeholder-CpU1-p17.js} +2 -2
  144. package/assets/{nftPlaceholder-LkhQmGFs.js → nftPlaceholder-rebGRUlf.js} +2 -2
  145. package/assets/off-DGqUQM_c.js +8 -0
  146. package/assets/op-gas-fee-reducer-CfxMcvXl.js +1 -0
  147. package/assets/openzeppelin-0P6DyWnM.js +1 -0
  148. package/assets/ownerOf-Dk2bEFO7.js +1 -0
  149. package/assets/parseNft-DtZPAUyF.js +2 -0
  150. package/assets/passkeys-CTJ4NPfL.js +1 -0
  151. package/assets/{play-store-DBit2AoS.js → play-store-DTDedaYk.js} +2 -2
  152. package/assets/{plus-CZe-WgSN.js → plus-9LwMwCLL.js} +2 -2
  153. package/assets/preload-helper-gq93rykL.js +1 -0
  154. package/assets/publicKeyToAddress-CxEKPAKT.js +1 -0
  155. package/assets/{qr-code-BhW7ZXY-.js → qr-code-dri7iBvJ.js} +2 -2
  156. package/assets/{qr-overlay-DsRPQv6v.js → qr-overlay-A_nwA0pd.js} +1 -1
  157. package/assets/{recycle-horizontal-DBnWoDRV.js → recycle-horizontal-BD2fGcKo.js} +2 -2
  158. package/assets/redux-BNDF-Lt-.js +1 -0
  159. package/assets/{refresh-qvocxvcf.js → refresh-8iCPOjCx.js} +2 -2
  160. package/assets/remoteEntry.js +1 -0
  161. package/assets/{reown-logo-C-45v-AJ.js → reown-logo-B_mRv8gI.js} +2 -2
  162. package/assets/resolveImplementation-ClGYKeUH.js +1 -0
  163. package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +2 -0
  164. package/assets/rpc-ti0b0r_u.js +3 -0
  165. package/assets/search-BEqxSFW_.js +8 -0
  166. package/assets/secp256k1-RErqDt1E.js +1 -0
  167. package/assets/{send-DI2x4DfJ.js → send-DurRlvo6.js} +2 -2
  168. package/assets/send-batch-transaction-DQvWQoy3.js +1 -0
  169. package/assets/send-eip712-transaction-BKY3_tUO.js +2 -0
  170. package/assets/send-gasless-transaction-DkKwh8QZ.js +2 -0
  171. package/assets/serializeTransaction-BBd1Y6Jz.js +1 -0
  172. package/assets/session-proposal-CMkr6bdh.js +1 -0
  173. package/assets/session-request-B3nAEC1B.js +2 -0
  174. package/assets/sha256-DYtpy1Qz.js +1 -0
  175. package/assets/signing-CCIWDdl7.js +5 -0
  176. package/assets/store-DOLZnwHk.js +1 -0
  177. package/assets/{swapHorizontal-eTjjU7d8.js → swapHorizontal-BbOGWuf_.js} +2 -2
  178. package/assets/{swapHorizontalBold-B86nJTAP.js → swapHorizontalBold-BOpjbN1z.js} +2 -2
  179. package/assets/{swapHorizontalMedium-CNT7ELrN.js → swapHorizontalMedium-BMckr8hm.js} +2 -2
  180. package/assets/{swapHorizontalRoundedBold-R_inXmIh.js → swapHorizontalRoundedBold-DuIuAd5r.js} +2 -2
  181. package/assets/{swapVertical-DBChOUj8.js → swapVertical-n1gcS_tW.js} +2 -2
  182. package/assets/{telegram-DjYbgHgS.js → telegram-B7Ex0lF-.js} +2 -2
  183. package/assets/thirdweb-BFjOnJdp.js +27 -0
  184. package/assets/thirdweb-CHfVLLbM.js +1 -0
  185. package/assets/{three-dots-VoULPGrI.js → three-dots-D_SO5C8m.js} +2 -2
  186. package/assets/totalSupply-C020CKSK.js +1 -0
  187. package/assets/tslib.es6-DbvBTznf.js +1 -0
  188. package/assets/{twitch-ETBgqGHE.js → twitch-DhWM8g8v.js} +2 -2
  189. package/assets/{twitterIcon-N584dzfh.js → twitterIcon-BTuTUCjb.js} +2 -2
  190. package/assets/uid-CVeUoK3j.js +44 -0
  191. package/assets/{uint8-array-CjVHUazS.js → uint8-array-DZKEMhA1.js} +1 -1
  192. package/assets/utils-C7urdXtO.js +2 -0
  193. package/assets/utils-CozXUO91.js +1 -0
  194. package/assets/{verify-Dp4bztGk.js → verify-DwP8p9op.js} +2 -2
  195. package/assets/{verify-filled-B7WhO3Kn.js → verify-filled-Ben6GFof.js} +2 -2
  196. package/assets/{w3m-modal-BmEHfmEu.js → w3m-modal-Cf39xxVY.js} +34 -34
  197. package/assets/wait-for-tx-receipt-_I_fbAIh.js +1 -0
  198. package/assets/{wallet-tXSvlbUa.js → wallet-BESSfQhF.js} +2 -2
  199. package/assets/{wallet-placeholder-B2e9Wl_u.js → wallet-placeholder-C0fWcNe8.js} +2 -2
  200. package/assets/{walletconnect-D70wSjLs.js → walletconnect-Crx4eOs5.js} +4 -4
  201. package/assets/wallets-C9ogRGc7.js +16 -0
  202. package/assets/{warning-circle-CsTkZ4Rl.js → warning-circle-DpYtfMER.js} +2 -2
  203. package/assets/web-connector-D8hJ0dwU.js +9 -0
  204. package/assets/webSocket-esTy5DPp.js +3 -0
  205. package/assets/withCache-DYumIHzL.js +1 -0
  206. package/assets/{x-DwOCQuex.js → x-HunGozNp.js} +2 -2
  207. package/assets/zora-sepolia-DNJ2DQat.js +1 -0
  208. package/index.html +17 -3
  209. package/package.json +3 -3
  210. package/assets/RoobertPRO-Bold-BLoSpx-h.otf +0 -0
  211. package/assets/all-wallets-C5N9p7Oh.js +0 -6
  212. package/assets/arrow-bottom-CXaxVEeb.js +0 -8
  213. package/assets/arrow-left-pgI3hg3C.js +0 -8
  214. package/assets/arrow-right-CyKp2yFa.js +0 -8
  215. package/assets/arrow-top-B2waxVPx.js +0 -8
  216. package/assets/auto-track-BvFI9h3i.js +0 -1
  217. package/assets/biconomy-DZsFbmF0.js +0 -1
  218. package/assets/ccip-CpLmER95.js +0 -1
  219. package/assets/chains-BJ1WS73W.js +0 -1
  220. package/assets/chevron-bottom-C2aa3E9i.js +0 -8
  221. package/assets/chevron-left-jGoftk_A.js +0 -8
  222. package/assets/chevron-right-Dt6SfcNy.js +0 -8
  223. package/assets/chevron-top-CBCgyIVe.js +0 -8
  224. package/assets/close-BQpWkcd5.js +0 -8
  225. package/assets/common-B5-2TPMC.js +0 -1
  226. package/assets/controller-BW9fJMCh.js +0 -2
  227. package/assets/core-f4taWsy5.js +0 -908
  228. package/assets/create-submenu-DEFVbrc5.png +0 -0
  229. package/assets/createBundlerClient-r1Kofl9Y.js +0 -8
  230. package/assets/cursor-l_ly71I2.js +0 -3
  231. package/assets/decimals-BB5yEnWu.js +0 -1
  232. package/assets/decimals-D7yTLBH-.js +0 -1
  233. package/assets/detectExtension-BOyq5ueD.js +0 -1
  234. package/assets/engine-COatTZhI.js +0 -1
  235. package/assets/estimate-l1-fee-gm3XrWSf.js +0 -1
  236. package/assets/eth_estimateGas-A6ba-Fl3.js +0 -1
  237. package/assets/eth_getStorageAt-DiqyV3Wq.js +0 -1
  238. package/assets/eth_getTransactionCount-CF50onAO.js +0 -1
  239. package/assets/ethereum-Bb-GI0c-.js +0 -1
  240. package/assets/events-CjOrSHaz.js +0 -1
  241. package/assets/explore-submenu-KVl6Dc-h.png +0 -0
  242. package/assets/external-link-C6RRSRES.js +0 -8
  243. package/assets/extractIPFS-BchHnCEN.js +0 -1
  244. package/assets/fetchTokenMetadata-ClRC5ORW.js +0 -2
  245. package/assets/get-ecosystem-wallet-info-C2CJ_2OU.js +0 -1
  246. package/assets/getBalance-DGuxWuYL.js +0 -1
  247. package/assets/getInstalledModules-A3tAP18V.js +0 -1
  248. package/assets/getNFT-C7cllYFm.js +0 -1
  249. package/assets/getNFT-CQKD7QHk.js +0 -2
  250. package/assets/governance-submenu-CXxLX9nT.png +0 -0
  251. package/assets/hashTypedData-7WNMs5EV.js +0 -1
  252. package/assets/in-app-wallet-calls-CIRR0eJZ.js +0 -1
  253. package/assets/index-B1P0UjN9.js +0 -1
  254. package/assets/index-BNdVKnva.js +0 -2
  255. package/assets/index-BtvcwkC4.js +0 -1
  256. package/assets/index-C3CMrfih.js +0 -1
  257. package/assets/index-C8ynIJrk.js +0 -395
  258. package/assets/index-Ca6sys5l.js +0 -3
  259. package/assets/index-CvqvWWYJ.js +0 -2
  260. package/assets/index-CxA55UWl.js +0 -1
  261. package/assets/index-D-W42D03.js +0 -12
  262. package/assets/index-DC9TKWAz.js +0 -23
  263. package/assets/index-DFfsl0Io.js +0 -4
  264. package/assets/index-DN2JqH-l.js +0 -895
  265. package/assets/index-DfqIHbWG.js +0 -2
  266. package/assets/index-pQ6ZXw4u.js +0 -13
  267. package/assets/index-qMD90g0X.js +0 -1
  268. package/assets/index.es-B2O4h03u.js +0 -12
  269. package/assets/index.es-BEAksKXY.js +0 -2
  270. package/assets/index.es-Dxxm_SKC.js +0 -1
  271. package/assets/index.es-MXG0VeeZ.js +0 -27
  272. package/assets/index.umd-DvfMpbcY.js +0 -1
  273. package/assets/is-plan-event-enabled-DS1Agtkw.js +0 -1
  274. package/assets/learn-submenu-Xs1jOwfy.png +0 -0
  275. package/assets/localBatchGatewayRequest-CHeIulW5.js +0 -1
  276. package/assets/marketplace-submenu-CjxTqNhj.png +0 -0
  277. package/assets/off-BCDn43Xl.js +0 -8
  278. package/assets/openzeppelin-_xpy9vRo.js +0 -1
  279. package/assets/ownerOf-ClSM4brX.js +0 -1
  280. package/assets/parseNft-BmEusGKu.js +0 -2
  281. package/assets/passkeys-CqFedyqV.js +0 -1
  282. package/assets/resolveImplementation-BssH7H5b.js +0 -1
  283. package/assets/rpc-DMtarHL0.js +0 -3
  284. package/assets/search-CAzZVrZw.js +0 -8
  285. package/assets/secp256k1-C_4ya0Qz.js +0 -1
  286. package/assets/secp256k1-CnKxz2gu.js +0 -1
  287. package/assets/secp256k1-oGq0B4P7.js +0 -1
  288. package/assets/send-batch-transaction-DfUNUZ4Z.js +0 -1
  289. package/assets/send-eip712-transaction-Ro5QmOlW.js +0 -2
  290. package/assets/send-gasless-transaction-B-Uu5KdW.js +0 -2
  291. package/assets/session-proposal-CRjqbz7W.js +0 -1
  292. package/assets/session-request-BI3BlMfs.js +0 -2
  293. package/assets/sha256-ChRob2fv.js +0 -1
  294. package/assets/signing-B1K_Jdsm.js +0 -30
  295. package/assets/thirdweb-0Fl_ECmE.js +0 -27
  296. package/assets/thirdweb-DZ2vK6IO.js +0 -1
  297. package/assets/totalSupply-ClM38QOc.js +0 -1
  298. package/assets/utils-B3vUvlNq.js +0 -1
  299. package/assets/wait-for-tx-receipt-pc2BJc62.js +0 -1
  300. package/assets/wallets-Dj6CY1yi.js +0 -17
  301. package/assets/web-connector-CiZO9RvI.js +0 -9
  302. package/assets/zora-sepolia-CZ4Tf1UH.js +0 -1
@@ -0,0 +1,535 @@
1
+ const __vite__fileDeps=["assets/index-DEyuwX6T.js","assets/preload-helper-gq93rykL.js","assets/tslib.es6-DbvBTznf.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/inherits_browser-BlmhoU4v.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{c as qe}from"../_commonjsHelpers-C4iS2aBk.js";import{d as lw}from"../index-CpR9p5nk.js";import{r as fw}from"../___vite-browser-external_commonjs-proxy-BqV5D26a.js";import{_ as dw}from"../preload-helper-gq93rykL.js";import{importShared as Nn}from"../__federation_fn_import-DHqMJa-J.js";import{j as sy}from"../jsx-runtime-DncYoG30.js";import{b as Le,d as ur,e as hw,c as Pr}from"../tslib.es6-DbvBTznf.js";var ay={},vd={};Object.defineProperty(vd,"__esModule",{value:!0});var cy={},Au={},ku={},uy={},_f={exports:{}};/*! eth-connect {
3
+ "date": "2024-01-01T15:10:57.542Z",
4
+ "commit": "b2fa64415d297ccce86d2a5d59d8705388f77db9",
5
+ "ref": "refs/tags/6.2.4"
6
+ } */(function(e,t){(function(n,r){r(t)})(qe,function(n){function r(l){if(l.jsonrpc="2.0",!l.id||typeof l.id!="number"||Math.floor(l.id)!==l.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(l)}`);if(!l.method||typeof l.method!="string"||l.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(l)}`);if(!l.params||typeof l.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(l)}`);return l}var i={};function o(){let l,p;const y=new Promise((E,A)=>{l=O=>{E(O),y.isPending=!1},p=O=>{A(O),y.isPending=!1}}).catch(E=>Promise.reject(E));return y.resolve=l,y.reject=p,"finally"in y||(y.finally=E=>{y.then(E),y.catch(E)}),y.isPending=!0,y}Object.defineProperty(i,"__esModule",{value:!0});var s=i.future=o;i.default=o;var a={exports:{}};/**
7
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
8
+ *
9
+ * @version 0.8.0
10
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
11
+ * @copyright Chen, Yi-Cyuan 2015-2018
12
+ * @license MIT
13
+ */(function(l){(function(){var p="input is invalid type",y=typeof window=="object",E=y?window:{};E.JS_SHA3_NO_WINDOW&&(y=!1);var A=!y&&typeof self=="object";!E.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?E=qe:A&&(E=self);var O=!E.JS_SHA3_NO_COMMON_JS&&l.exports,Z=!E.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",me="0123456789abcdef".split(""),Re=[4,1024,262144,67108864],Oe=[0,8,16,24],gn=[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],Ht=[224,256,384,512],ye=[128,256],on=["hex","buffer","arrayBuffer","array","digest"],xt={128:168,256:136};!E.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),!Z||!E.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var At=function(f,b,I){return function(S){return new gt(f,b,f).update(S)[I]()}},ln=function(f,b,I){return function(S,k){return new gt(f,b,k).update(S)[I]()}},Cr=function(f,b,I){return function(S,k,R,N){return sn["cshake"+f].update(S,k,R,N)[I]()}},dr=function(f,b,I){return function(S,k,R,N){return sn["kmac"+f].update(S,k,R,N)[I]()}},fn=function(f,b,I,S){for(var k=0;k<on.length;++k){var R=on[k];f[R]=b(I,S,R)}return f},hr=function(f,b){var I=At(f,b,"hex");return I.create=function(){return new gt(f,b,f)},I.update=function(S){return I.create().update(S)},fn(I,At,f,b)},ei=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ht,createMethod:hr},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ht,createMethod:hr},{name:"shake",padding:[31,7936,2031616,520093696],bits:ye,createMethod:function(f,b){var I=ln(f,b,"hex");return I.create=function(S){return new gt(f,b,S)},I.update=function(S,k){return I.create(k).update(S)},fn(I,ln,f,b)}},{name:"cshake",padding:Re,bits:ye,createMethod:function(f,b){var I=xt[f],S=Cr(f,0,"hex");return S.create=function(k,R,N){return R||N?new gt(f,b,k).bytepad([R,N],I):sn["shake"+f].create(k)},S.update=function(k,R,N,B){return S.create(R,N,B).update(k)},fn(S,Cr,f,b)}},{name:"kmac",padding:Re,bits:ye,createMethod:function(f,b){var I=xt[f],S=dr(f,0,"hex");return S.create=function(k,R,N){return new Mn(f,b,R).bytepad(["KMAC",N],I).bytepad([k],I)},S.update=function(k,R,N,B){return S.create(k,N,B).update(R)},fn(S,dr,f,b)}}],sn={},Rr=[],dn=0;dn<ei.length;++dn)for(var pr=ei[dn],ue=pr.bits,Nr=0;Nr<ue.length;++Nr){var so=pr.name+"_"+ue[Nr];if(Rr.push(so),sn[so]=pr.createMethod(ue[Nr],pr.padding),pr.name!=="sha3"){var ao=pr.name+ue[Nr];Rr.push(ao),sn[ao]=sn[so]}}function gt(f,b,I){this.blocks=[],this.s=[],this.padding=b,this.outputBits=I,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(f<<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 Mn(f,b,I){gt.call(this,f,b,I)}gt.prototype.update=function(f){if(this.finalized)throw new Error("finalize already called");var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}for(var S,k,R=this.blocks,N=this.byteCount,B=f.length,$=this.blockCount,H=0,de=this.s;H<B;){if(this.reset)for(this.reset=!1,R[0]=this.block,S=1;S<$+1;++S)R[S]=0;if(b)for(S=this.start;H<B&&S<N;++H)R[S>>2]|=f[H]<<Oe[3&S++];else for(S=this.start;H<B&&S<N;++H)(k=f.charCodeAt(H))<128?R[S>>2]|=k<<Oe[3&S++]:k<2048?(R[S>>2]|=(192|k>>6)<<Oe[3&S++],R[S>>2]|=(128|63&k)<<Oe[3&S++]):k<55296||k>=57344?(R[S>>2]|=(224|k>>12)<<Oe[3&S++],R[S>>2]|=(128|k>>6&63)<<Oe[3&S++],R[S>>2]|=(128|63&k)<<Oe[3&S++]):(k=65536+((1023&k)<<10|1023&f.charCodeAt(++H)),R[S>>2]|=(240|k>>18)<<Oe[3&S++],R[S>>2]|=(128|k>>12&63)<<Oe[3&S++],R[S>>2]|=(128|k>>6&63)<<Oe[3&S++],R[S>>2]|=(128|63&k)<<Oe[3&S++]);if(this.lastByteIndex=S,S>=N){for(this.start=S-N,this.block=R[$],S=0;S<$;++S)de[S]^=R[S];v(de),this.reset=!0}else this.start=S}return this},gt.prototype.encode=function(f,b){var I=255&f,S=1,k=[I];for(I=255&(f>>=8);I>0;)k.unshift(I),I=255&(f>>=8),++S;return b?k.push(S):k.unshift(S),this.update(k),k.length},gt.prototype.encodeString=function(f){var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}var S=0,k=f.length;if(b)S=k;else for(var R=0;R<f.length;++R){var N=f.charCodeAt(R);N<128?S+=1:N<2048?S+=2:N<55296||N>=57344?S+=3:(N=65536+((1023&N)<<10|1023&f.charCodeAt(++R)),S+=4)}return S+=this.encode(8*S),this.update(f),S},gt.prototype.bytepad=function(f,b){for(var I=this.encode(b),S=0;S<f.length;++S)I+=this.encodeString(f[S]);var k=b-I%b,R=[];return R.length=k,this.update(R),this},gt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var f=this.blocks,b=this.lastByteIndex,I=this.blockCount,S=this.s;if(f[b>>2]|=this.padding[3&b],this.lastByteIndex===this.byteCount)for(f[0]=f[I],b=1;b<I+1;++b)f[b]=0;for(f[I-1]|=2147483648,b=0;b<I;++b)S[b]^=f[b];v(S)}},gt.prototype.toString=gt.prototype.hex=function(){this.finalize();for(var f,b=this.blockCount,I=this.s,S=this.outputBlocks,k=this.extraBytes,R=0,N=0,B="";N<S;){for(R=0;R<b&&N<S;++R,++N)f=I[R],B+=me[f>>4&15]+me[15&f]+me[f>>12&15]+me[f>>8&15]+me[f>>20&15]+me[f>>16&15]+me[f>>28&15]+me[f>>24&15];N%b==0&&(v(I),R=0)}return k&&(f=I[R],B+=me[f>>4&15]+me[15&f],k>1&&(B+=me[f>>12&15]+me[f>>8&15]),k>2&&(B+=me[f>>20&15]+me[f>>16&15])),B},gt.prototype.arrayBuffer=function(){this.finalize();var f,b=this.blockCount,I=this.s,S=this.outputBlocks,k=this.extraBytes,R=0,N=0,B=this.outputBits>>3;f=k?new ArrayBuffer(S+1<<2):new ArrayBuffer(B);for(var $=new Uint32Array(f);N<S;){for(R=0;R<b&&N<S;++R,++N)$[N]=I[R];N%b==0&&v(I)}return k&&($[R]=I[R],f=f.slice(0,B)),f},gt.prototype.buffer=gt.prototype.arrayBuffer,gt.prototype.digest=gt.prototype.array=function(){this.finalize();for(var f,b,I=this.blockCount,S=this.s,k=this.outputBlocks,R=this.extraBytes,N=0,B=0,$=[];B<k;){for(N=0;N<I&&B<k;++N,++B)f=B<<2,b=S[N],$[f]=255&b,$[f+1]=b>>8&255,$[f+2]=b>>16&255,$[f+3]=b>>24&255;B%I==0&&v(S)}return R&&(f=B<<2,b=S[N],$[f]=255&b,R>1&&($[f+1]=b>>8&255),R>2&&($[f+2]=b>>16&255)),$},Mn.prototype=new gt,Mn.prototype.finalize=function(){return this.encode(this.outputBits,!0),gt.prototype.finalize.call(this)};var v=function(f){var b,I,S,k,R,N,B,$,H,de,Ne,Fe,lt,kt,Lt,at,yt,zt,Or,ti,ni,yn,mr,an,Xt,St,ga,ya,_a,ba,va,wa,Sa,Ea,Ta,Ia,xa,Aa,ka,Ca,Ra,Na,Oa,Ma,Pa,La,Da,Ba,Fa,Ha,Ua,$a,ja,Ga,Wa,za,Va,qa,Xa,Ya,Ka,Ja,Za;for(S=0;S<48;S+=2)k=f[0]^f[10]^f[20]^f[30]^f[40],R=f[1]^f[11]^f[21]^f[31]^f[41],N=f[2]^f[12]^f[22]^f[32]^f[42],B=f[3]^f[13]^f[23]^f[33]^f[43],$=f[4]^f[14]^f[24]^f[34]^f[44],H=f[5]^f[15]^f[25]^f[35]^f[45],de=f[6]^f[16]^f[26]^f[36]^f[46],Ne=f[7]^f[17]^f[27]^f[37]^f[47],b=(Fe=f[8]^f[18]^f[28]^f[38]^f[48])^(N<<1|B>>>31),I=(lt=f[9]^f[19]^f[29]^f[39]^f[49])^(B<<1|N>>>31),f[0]^=b,f[1]^=I,f[10]^=b,f[11]^=I,f[20]^=b,f[21]^=I,f[30]^=b,f[31]^=I,f[40]^=b,f[41]^=I,b=k^($<<1|H>>>31),I=R^(H<<1|$>>>31),f[2]^=b,f[3]^=I,f[12]^=b,f[13]^=I,f[22]^=b,f[23]^=I,f[32]^=b,f[33]^=I,f[42]^=b,f[43]^=I,b=N^(de<<1|Ne>>>31),I=B^(Ne<<1|de>>>31),f[4]^=b,f[5]^=I,f[14]^=b,f[15]^=I,f[24]^=b,f[25]^=I,f[34]^=b,f[35]^=I,f[44]^=b,f[45]^=I,b=$^(Fe<<1|lt>>>31),I=H^(lt<<1|Fe>>>31),f[6]^=b,f[7]^=I,f[16]^=b,f[17]^=I,f[26]^=b,f[27]^=I,f[36]^=b,f[37]^=I,f[46]^=b,f[47]^=I,b=de^(k<<1|R>>>31),I=Ne^(R<<1|k>>>31),f[8]^=b,f[9]^=I,f[18]^=b,f[19]^=I,f[28]^=b,f[29]^=I,f[38]^=b,f[39]^=I,f[48]^=b,f[49]^=I,kt=f[0],Lt=f[1],La=f[11]<<4|f[10]>>>28,Da=f[10]<<4|f[11]>>>28,ya=f[20]<<3|f[21]>>>29,_a=f[21]<<3|f[20]>>>29,Ya=f[31]<<9|f[30]>>>23,Ka=f[30]<<9|f[31]>>>23,Na=f[40]<<18|f[41]>>>14,Oa=f[41]<<18|f[40]>>>14,Ea=f[2]<<1|f[3]>>>31,Ta=f[3]<<1|f[2]>>>31,at=f[13]<<12|f[12]>>>20,yt=f[12]<<12|f[13]>>>20,Ba=f[22]<<10|f[23]>>>22,Fa=f[23]<<10|f[22]>>>22,ba=f[33]<<13|f[32]>>>19,va=f[32]<<13|f[33]>>>19,Ja=f[42]<<2|f[43]>>>30,Za=f[43]<<2|f[42]>>>30,Ga=f[5]<<30|f[4]>>>2,Wa=f[4]<<30|f[5]>>>2,Ia=f[14]<<6|f[15]>>>26,xa=f[15]<<6|f[14]>>>26,zt=f[25]<<11|f[24]>>>21,Or=f[24]<<11|f[25]>>>21,Ha=f[34]<<15|f[35]>>>17,Ua=f[35]<<15|f[34]>>>17,wa=f[45]<<29|f[44]>>>3,Sa=f[44]<<29|f[45]>>>3,an=f[6]<<28|f[7]>>>4,Xt=f[7]<<28|f[6]>>>4,za=f[17]<<23|f[16]>>>9,Va=f[16]<<23|f[17]>>>9,Aa=f[26]<<25|f[27]>>>7,ka=f[27]<<25|f[26]>>>7,ti=f[36]<<21|f[37]>>>11,ni=f[37]<<21|f[36]>>>11,$a=f[47]<<24|f[46]>>>8,ja=f[46]<<24|f[47]>>>8,Ma=f[8]<<27|f[9]>>>5,Pa=f[9]<<27|f[8]>>>5,St=f[18]<<20|f[19]>>>12,ga=f[19]<<20|f[18]>>>12,qa=f[29]<<7|f[28]>>>25,Xa=f[28]<<7|f[29]>>>25,Ca=f[38]<<8|f[39]>>>24,Ra=f[39]<<8|f[38]>>>24,yn=f[48]<<14|f[49]>>>18,mr=f[49]<<14|f[48]>>>18,f[0]=kt^~at&zt,f[1]=Lt^~yt&Or,f[10]=an^~St&ya,f[11]=Xt^~ga&_a,f[20]=Ea^~Ia&Aa,f[21]=Ta^~xa&ka,f[30]=Ma^~La&Ba,f[31]=Pa^~Da&Fa,f[40]=Ga^~za&qa,f[41]=Wa^~Va&Xa,f[2]=at^~zt&ti,f[3]=yt^~Or&ni,f[12]=St^~ya&ba,f[13]=ga^~_a&va,f[22]=Ia^~Aa&Ca,f[23]=xa^~ka&Ra,f[32]=La^~Ba&Ha,f[33]=Da^~Fa&Ua,f[42]=za^~qa&Ya,f[43]=Va^~Xa&Ka,f[4]=zt^~ti&yn,f[5]=Or^~ni&mr,f[14]=ya^~ba&wa,f[15]=_a^~va&Sa,f[24]=Aa^~Ca&Na,f[25]=ka^~Ra&Oa,f[34]=Ba^~Ha&$a,f[35]=Fa^~Ua&ja,f[44]=qa^~Ya&Ja,f[45]=Xa^~Ka&Za,f[6]=ti^~yn&kt,f[7]=ni^~mr&Lt,f[16]=ba^~wa&an,f[17]=va^~Sa&Xt,f[26]=Ca^~Na&Ea,f[27]=Ra^~Oa&Ta,f[36]=Ha^~$a&Ma,f[37]=Ua^~ja&Pa,f[46]=Ya^~Ja&Ga,f[47]=Ka^~Za&Wa,f[8]=yn^~kt&at,f[9]=mr^~Lt&yt,f[18]=wa^~an&St,f[19]=Sa^~Xt&ga,f[28]=Na^~Ea&Ia,f[29]=Oa^~Ta&xa,f[38]=$a^~Ma&La,f[39]=ja^~Pa&Da,f[48]=Ja^~Ga&za,f[49]=Za^~Wa&Va,f[0]^=gn[S],f[1]^=gn[S+1]};if(O)l.exports=sn;else for(dn=0;dn<Rr.length;++dn)E[Rr[dn]]=sn[Rr[dn]]})()})(a);var c=a.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,h=Math.ceil,d=Math.floor,m="[BigNumber Error] ",g=m+"Number primitive has more than 15 significant digits: ",w=1e14,T=14,L=9007199254740991,U=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],K=1e7,V=1e9;function F(l){var p=0|l;return l>0||l===p?p:p-1}function Y(l){for(var p,y,E=1,A=l.length,O=l[0]+"";E<A;){for(p=l[E++]+"",y=T-p.length;y--;p="0"+p);O+=p}for(A=O.length;O.charCodeAt(--A)===48;);return O.slice(0,A+1||1)}function D(l,p){var y,E,A=l.c,O=p.c,Z=l.s,me=p.s,Re=l.e,Oe=p.e;if(!Z||!me)return null;if(y=A&&!A[0],E=O&&!O[0],y||E)return y?E?0:-me:Z;if(Z!=me)return Z;if(y=Z<0,E=Re==Oe,!A||!O)return E?0:!A^y?1:-1;if(!E)return Re>Oe^y?1:-1;for(me=(Re=A.length)<(Oe=O.length)?Re:Oe,Z=0;Z<me;Z++)if(A[Z]!=O[Z])return A[Z]>O[Z]^y?1:-1;return Re==Oe?0:Re>Oe^y?1:-1}function G(l,p,y,E){if(l<p||l>y||l!==d(l))throw Error(m+(E||"Argument")+(typeof l=="number"?l<p||l>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(l))}function ae(l){var p=l.c.length-1;return F(l.e/T)==p&&l.c[p]%2!=0}function P(l,p){return(l.length>1?l.charAt(0)+"."+l.slice(1):l)+(p<0?"e":"e+")+p}function j(l,p,y){var E,A;if(p<0){for(A=y+".";++p;A+=y);l=A+l}else if(++p>(E=l.length)){for(A=y,p-=E;--p;A+=y);l+=A}else p<E&&(l=l.slice(0,p)+"."+l.slice(p));return l}var z=function l(p){var y,E,A,O,Z,me,Re,Oe,gn,Ht,ye=ue.prototype={constructor:ue,toString:null,valueOf:null},on=new ue(1),xt=20,At=4,ln=-7,Cr=21,dr=-1e7,fn=1e7,hr=!1,ei=1,sn=0,Rr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},dn="0123456789abcdefghijklmnopqrstuvwxyz",pr=!0;function ue(v,f){var b,I,S,k,R,N,B,$,H=this;if(!(H instanceof ue))return new ue(v,f);if(f==null){if(v&&v._isBigNumber===!0)return H.s=v.s,void(!v.c||v.e>fn?H.c=H.e=null:v.e<dr?H.c=[H.e=0]:(H.e=v.e,H.c=v.c.slice()));if((N=typeof v=="number")&&0*v==0){if(H.s=1/v<0?(v=-v,-1):1,v===~~v){for(k=0,R=v;R>=10;R/=10,k++);return void(k>fn?H.c=H.e=null:(H.e=k,H.c=[v]))}$=String(v)}else{if(!u.test($=String(v)))return A(H,$,N);H.s=$.charCodeAt(0)==45?($=$.slice(1),-1):1}(k=$.indexOf("."))>-1&&($=$.replace(".","")),(R=$.search(/e/i))>0?(k<0&&(k=R),k+=+$.slice(R+1),$=$.substring(0,R)):k<0&&(k=$.length)}else{if(G(f,2,dn.length,"Base"),f==10&&pr)return gt(H=new ue(v),xt+H.e+1,At);if($=String(v),N=typeof v=="number"){if(0*v!=0)return A(H,$,N,f);if(H.s=1/v<0?($=$.slice(1),-1):1,ue.DEBUG&&$.replace(/^0\.0*|\./,"").length>15)throw Error(g+v)}else H.s=$.charCodeAt(0)===45?($=$.slice(1),-1):1;for(b=dn.slice(0,f),k=R=0,B=$.length;R<B;R++)if(b.indexOf(I=$.charAt(R))<0){if(I=="."){if(R>k){k=B;continue}}else if(!S&&($==$.toUpperCase()&&($=$.toLowerCase())||$==$.toLowerCase()&&($=$.toUpperCase()))){S=!0,R=-1,k=0;continue}return A(H,String(v),N,f)}N=!1,(k=($=E($,f,10,H.s)).indexOf("."))>-1?$=$.replace(".",""):k=$.length}for(R=0;$.charCodeAt(R)===48;R++);for(B=$.length;$.charCodeAt(--B)===48;);if($=$.slice(R,++B)){if(B-=R,N&&ue.DEBUG&&B>15&&(v>L||v!==d(v)))throw Error(g+H.s*v);if((k=k-R-1)>fn)H.c=H.e=null;else if(k<dr)H.c=[H.e=0];else{if(H.e=k,H.c=[],R=(k+1)%T,k<0&&(R+=T),R<B){for(R&&H.c.push(+$.slice(0,R)),B-=T;R<B;)H.c.push(+$.slice(R,R+=T));R=T-($=$.slice(R)).length}else R-=B;for(;R--;$+="0");H.c.push(+$)}}else H.c=[H.e=0]}function Nr(v,f,b,I){var S,k,R,N,B;if(b==null?b=At:G(b,0,8),!v.c)return v.toString();if(S=v.c[0],R=v.e,f==null)B=Y(v.c),B=I==1||I==2&&(R<=ln||R>=Cr)?P(B,R):j(B,R,"0");else if(k=(v=gt(new ue(v),f,b)).e,N=(B=Y(v.c)).length,I==1||I==2&&(f<=k||k<=ln)){for(;N<f;B+="0",N++);B=P(B,k)}else if(f-=R,B=j(B,k,"0"),k+1>N){if(--f>0)for(B+=".";f--;B+="0");}else if((f+=k-N)>0)for(k+1==N&&(B+=".");f--;B+="0");return v.s<0&&S?"-"+B:B}function so(v,f){for(var b,I=1,S=new ue(v[0]);I<v.length;I++){if(!(b=new ue(v[I])).s){S=b;break}f.call(S,b)&&(S=b)}return S}function ao(v,f,b){for(var I=1,S=f.length;!f[--S];f.pop());for(S=f[0];S>=10;S/=10,I++);return(b=I+b*T-1)>fn?v.c=v.e=null:b<dr?v.c=[v.e=0]:(v.e=b,v.c=f),v}function gt(v,f,b,I){var S,k,R,N,B,$,H,de=v.c,Ne=U;if(de){e:{for(S=1,N=de[0];N>=10;N/=10,S++);if((k=f-S)<0)k+=T,R=f,H=(B=de[$=0])/Ne[S-R-1]%10|0;else if(($=h((k+1)/T))>=de.length){if(!I)break e;for(;de.length<=$;de.push(0));B=H=0,S=1,R=(k%=T)-T+1}else{for(B=N=de[$],S=1;N>=10;N/=10,S++);H=(R=(k%=T)-T+S)<0?0:B/Ne[S-R-1]%10|0}if(I=I||f<0||de[$+1]!=null||(R<0?B:B%Ne[S-R-1]),I=b<4?(H||I)&&(b==0||b==(v.s<0?3:2)):H>5||H==5&&(b==4||I||b==6&&(k>0?R>0?B/Ne[S-R]:0:de[$-1])%10&1||b==(v.s<0?8:7)),f<1||!de[0])return de.length=0,I?(f-=v.e+1,de[0]=Ne[(T-f%T)%T],v.e=-f||0):de[0]=v.e=0,v;if(k==0?(de.length=$,N=1,$--):(de.length=$+1,N=Ne[T-k],de[$]=R>0?d(B/Ne[S-R]%Ne[R])*N:0),I)for(;;){if($==0){for(k=1,R=de[0];R>=10;R/=10,k++);for(R=de[0]+=N,N=1;R>=10;R/=10,N++);k!=N&&(v.e++,de[0]==w&&(de[0]=1));break}if(de[$]+=N,de[$]!=w)break;de[$--]=0,N=1}for(k=de.length;de[--k]===0;de.pop());}v.e>fn?v.c=v.e=null:v.e<dr&&(v.c=[v.e=0])}return v}function Mn(v){var f,b=v.e;return b===null?v.toString():(f=Y(v.c),f=b<=ln||b>=Cr?P(f,b):j(f,b,"0"),v.s<0?"-"+f:f)}return ue.clone=l,ue.ROUND_UP=0,ue.ROUND_DOWN=1,ue.ROUND_CEIL=2,ue.ROUND_FLOOR=3,ue.ROUND_HALF_UP=4,ue.ROUND_HALF_DOWN=5,ue.ROUND_HALF_EVEN=6,ue.ROUND_HALF_CEIL=7,ue.ROUND_HALF_FLOOR=8,ue.EUCLID=9,ue.config=ue.set=function(v){var f,b;if(v!=null){if(typeof v!="object")throw Error(m+"Object expected: "+v);if(v.hasOwnProperty(f="DECIMAL_PLACES")&&(G(b=v[f],0,V,f),xt=b),v.hasOwnProperty(f="ROUNDING_MODE")&&(G(b=v[f],0,8,f),At=b),v.hasOwnProperty(f="EXPONENTIAL_AT")&&((b=v[f])&&b.pop?(G(b[0],-V,0,f),G(b[1],0,V,f),ln=b[0],Cr=b[1]):(G(b,-V,V,f),ln=-(Cr=b<0?-b:b))),v.hasOwnProperty(f="RANGE"))if((b=v[f])&&b.pop)G(b[0],-V,-1,f),G(b[1],1,V,f),dr=b[0],fn=b[1];else{if(G(b,-V,V,f),!b)throw Error(m+f+" cannot be zero: "+b);dr=-(fn=b<0?-b:b)}if(v.hasOwnProperty(f="CRYPTO")){if((b=v[f])!==!!b)throw Error(m+f+" not true or false: "+b);if(b){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw hr=!b,Error(m+"crypto unavailable");hr=b}else hr=b}if(v.hasOwnProperty(f="MODULO_MODE")&&(G(b=v[f],0,9,f),ei=b),v.hasOwnProperty(f="POW_PRECISION")&&(G(b=v[f],0,V,f),sn=b),v.hasOwnProperty(f="FORMAT")){if(typeof(b=v[f])!="object")throw Error(m+f+" not an object: "+b);Rr=b}if(v.hasOwnProperty(f="ALPHABET")){if(typeof(b=v[f])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(b))throw Error(m+f+" invalid: "+b);pr=b.slice(0,10)=="0123456789",dn=b}}return{DECIMAL_PLACES:xt,ROUNDING_MODE:At,EXPONENTIAL_AT:[ln,Cr],RANGE:[dr,fn],CRYPTO:hr,MODULO_MODE:ei,POW_PRECISION:sn,FORMAT:Rr,ALPHABET:dn}},ue.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!ue.DEBUG)return!0;var f,b,I=v.c,S=v.e,k=v.s;e:if({}.toString.call(I)=="[object Array]"){if((k===1||k===-1)&&S>=-V&&S<=V&&S===d(S)){if(I[0]===0){if(S===0&&I.length===1)return!0;break e}if((f=(S+1)%T)<1&&(f+=T),String(I[0]).length==f){for(f=0;f<I.length;f++)if((b=I[f])<0||b>=w||b!==d(b))break e;if(b!==0)return!0}}}else if(I===null&&S===null&&(k===null||k===1||k===-1))return!0;throw Error(m+"Invalid BigNumber: "+v)},ue.maximum=ue.max=function(){return so(arguments,ye.lt)},ue.minimum=ue.min=function(){return so(arguments,ye.gt)},ue.random=(O=9007199254740992,Z=Math.random()*O&2097151?function(){return d(Math.random()*O)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var f,b,I,S,k,R=0,N=[],B=new ue(on);if(v==null?v=xt:G(v,0,V),S=h(v/T),hr)if(crypto.getRandomValues){for(f=crypto.getRandomValues(new Uint32Array(S*=2));R<S;)(k=131072*f[R]+(f[R+1]>>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),f[R]=b[0],f[R+1]=b[1]):(N.push(k%1e14),R+=2);R=S/2}else{if(!crypto.randomBytes)throw hr=!1,Error(m+"crypto unavailable");for(f=crypto.randomBytes(S*=7);R<S;)(k=281474976710656*(31&f[R])+1099511627776*f[R+1]+4294967296*f[R+2]+16777216*f[R+3]+(f[R+4]<<16)+(f[R+5]<<8)+f[R+6])>=9e15?crypto.randomBytes(7).copy(f,R):(N.push(k%1e14),R+=7);R=S/7}if(!hr)for(;R<S;)(k=Z())<9e15&&(N[R++]=k%1e14);for(S=N[--R],v%=T,S&&v&&(k=U[T-v],N[R]=d(S/k)*k);N[R]===0;N.pop(),R--);if(R<0)N=[I=0];else{for(I=-1;N[0]===0;N.splice(0,1),I-=T);for(R=1,k=N[0];k>=10;k/=10,R++);R<T&&(I-=T-R)}return B.e=I,B.c=N,B}),ue.sum=function(){for(var v=1,f=arguments,b=new ue(f[0]);v<f.length;)b=b.plus(f[v++]);return b},E=function(){var v="0123456789";function f(b,I,S,k){for(var R,N,B=[0],$=0,H=b.length;$<H;){for(N=B.length;N--;B[N]*=I);for(B[0]+=k.indexOf(b.charAt($++)),R=0;R<B.length;R++)B[R]>S-1&&(B[R+1]==null&&(B[R+1]=0),B[R+1]+=B[R]/S|0,B[R]%=S)}return B.reverse()}return function(b,I,S,k,R){var N,B,$,H,de,Ne,Fe,lt,kt=b.indexOf("."),Lt=xt,at=At;for(kt>=0&&(H=sn,sn=0,b=b.replace(".",""),Ne=(lt=new ue(I)).pow(b.length-kt),sn=H,lt.c=f(j(Y(Ne.c),Ne.e,"0"),10,S,v),lt.e=lt.c.length),$=H=(Fe=f(b,I,S,R?(N=dn,v):(N=v,dn))).length;Fe[--H]==0;Fe.pop());if(!Fe[0])return N.charAt(0);if(kt<0?--$:(Ne.c=Fe,Ne.e=$,Ne.s=k,Fe=(Ne=y(Ne,lt,Lt,at,S)).c,de=Ne.r,$=Ne.e),kt=Fe[B=$+Lt+1],H=S/2,de=de||B<0||Fe[B+1]!=null,de=at<4?(kt!=null||de)&&(at==0||at==(Ne.s<0?3:2)):kt>H||kt==H&&(at==4||de||at==6&&1&Fe[B-1]||at==(Ne.s<0?8:7)),B<1||!Fe[0])b=de?j(N.charAt(1),-Lt,N.charAt(0)):N.charAt(0);else{if(Fe.length=B,de)for(--S;++Fe[--B]>S;)Fe[B]=0,B||(++$,Fe=[1].concat(Fe));for(H=Fe.length;!Fe[--H];);for(kt=0,b="";kt<=H;b+=N.charAt(Fe[kt++]));b=j(b,$,N.charAt(0))}return b}}(),y=function(){function v(I,S,k){var R,N,B,$,H=0,de=I.length,Ne=S%K,Fe=S/K|0;for(I=I.slice();de--;)H=((N=Ne*(B=I[de]%K)+(R=Fe*B+($=I[de]/K|0)*Ne)%K*K+H)/k|0)+(R/K|0)+Fe*$,I[de]=N%k;return H&&(I=[H].concat(I)),I}function f(I,S,k,R){var N,B;if(k!=R)B=k>R?1:-1;else for(N=B=0;N<k;N++)if(I[N]!=S[N]){B=I[N]>S[N]?1:-1;break}return B}function b(I,S,k,R){for(var N=0;k--;)I[k]-=N,N=I[k]<S[k]?1:0,I[k]=N*R+I[k]-S[k];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,S,k,R,N){var B,$,H,de,Ne,Fe,lt,kt,Lt,at,yt,zt,Or,ti,ni,yn,mr,an=I.s==S.s?1:-1,Xt=I.c,St=S.c;if(!(Xt&&Xt[0]&&St&&St[0]))return new ue(I.s&&S.s&&(Xt?!St||Xt[0]!=St[0]:St)?Xt&&Xt[0]==0||!St?0*an:an/0:NaN);for(Lt=(kt=new ue(an)).c=[],an=k+($=I.e-S.e)+1,N||(N=w,$=F(I.e/T)-F(S.e/T),an=an/T|0),H=0;St[H]==(Xt[H]||0);H++);if(St[H]>(Xt[H]||0)&&$--,an<0)Lt.push(1),de=!0;else{for(ti=Xt.length,yn=St.length,H=0,an+=2,(Ne=d(N/(St[0]+1)))>1&&(St=v(St,Ne,N),Xt=v(Xt,Ne,N),yn=St.length,ti=Xt.length),Or=yn,yt=(at=Xt.slice(0,yn)).length;yt<yn;at[yt++]=0);mr=St.slice(),mr=[0].concat(mr),ni=St[0],St[1]>=N/2&&ni++;do{if(Ne=0,(B=f(St,at,yn,yt))<0){if(zt=at[0],yn!=yt&&(zt=zt*N+(at[1]||0)),(Ne=d(zt/ni))>1)for(Ne>=N&&(Ne=N-1),lt=(Fe=v(St,Ne,N)).length,yt=at.length;f(Fe,at,lt,yt)==1;)Ne--,b(Fe,yn<lt?mr:St,lt,N),lt=Fe.length,B=1;else Ne==0&&(B=Ne=1),lt=(Fe=St.slice()).length;if(lt<yt&&(Fe=[0].concat(Fe)),b(at,Fe,yt,N),yt=at.length,B==-1)for(;f(St,at,yn,yt)<1;)Ne++,b(at,yn<yt?mr:St,yt,N),yt=at.length}else B===0&&(Ne++,at=[0]);Lt[H++]=Ne,at[0]?at[yt++]=Xt[Or]||0:(at=[Xt[Or]],yt=1)}while((Or++<ti||at[0]!=null)&&an--);de=at[0]!=null,Lt[0]||Lt.splice(0,1)}if(N==w){for(H=1,an=Lt[0];an>=10;an/=10,H++);gt(kt,k+(kt.e=H+$*T-1)+1,R,de)}else kt.e=$,kt.r=+de;return kt}}(),me=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Re=/^([^.]+)\.$/,Oe=/^\.([^.]+)$/,gn=/^-?(Infinity|NaN)$/,Ht=/^\s*\+(?=[\w.])|^\s+|\s+$/g,A=function(v,f,b,I){var S,k=b?f:f.replace(Ht,"");if(gn.test(k))v.s=isNaN(k)?null:k<0?-1:1;else{if(!b&&(k=k.replace(me,function(R,N,B){return S=(B=B.toLowerCase())=="x"?16:B=="b"?2:8,I&&I!=S?R:N}),I&&(S=I,k=k.replace(Re,"$1").replace(Oe,"0.$1")),f!=k))return new ue(k,S);if(ue.DEBUG)throw Error(m+"Not a"+(I?" base "+I:"")+" number: "+f);v.s=null}v.c=v.e=null},ye.absoluteValue=ye.abs=function(){var v=new ue(this);return v.s<0&&(v.s=1),v},ye.comparedTo=function(v,f){return D(this,new ue(v,f))},ye.decimalPlaces=ye.dp=function(v,f){var b,I,S,k=this;if(v!=null)return G(v,0,V),f==null?f=At:G(f,0,8),gt(new ue(k),v+k.e+1,f);if(!(b=k.c))return null;if(I=((S=b.length-1)-F(this.e/T))*T,S=b[S])for(;S%10==0;S/=10,I--);return I<0&&(I=0),I},ye.dividedBy=ye.div=function(v,f){return y(this,new ue(v,f),xt,At)},ye.dividedToIntegerBy=ye.idiv=function(v,f){return y(this,new ue(v,f),0,1)},ye.exponentiatedBy=ye.pow=function(v,f){var b,I,S,k,R,N,B,$,H=this;if((v=new ue(v)).c&&!v.isInteger())throw Error(m+"Exponent not an integer: "+Mn(v));if(f!=null&&(f=new ue(f)),R=v.e>14,!H.c||!H.c[0]||H.c[0]==1&&!H.e&&H.c.length==1||!v.c||!v.c[0])return $=new ue(Math.pow(+Mn(H),R?v.s*(2-ae(v)):+Mn(v))),f?$.mod(f):$;if(N=v.s<0,f){if(f.c?!f.c[0]:!f.s)return new ue(NaN);(I=!N&&H.isInteger()&&f.isInteger())&&(H=H.mod(f))}else{if(v.e>9&&(H.e>0||H.e<-1||(H.e==0?H.c[0]>1||R&&H.c[1]>=24e7:H.c[0]<8e13||R&&H.c[0]<=9999975e7)))return k=H.s<0&&ae(v)?-0:0,H.e>-1&&(k=1/k),new ue(N?1/k:k);sn&&(k=h(sn/T+2))}for(R?(b=new ue(.5),N&&(v.s=1),B=ae(v)):B=(S=Math.abs(+Mn(v)))%2,$=new ue(on);;){if(B){if(!($=$.times(H)).c)break;k?$.c.length>k&&($.c.length=k):I&&($=$.mod(f))}if(S){if((S=d(S/2))===0)break;B=S%2}else if(gt(v=v.times(b),v.e+1,1),v.e>14)B=ae(v);else{if((S=+Mn(v))==0)break;B=S%2}H=H.times(H),k?H.c&&H.c.length>k&&(H.c.length=k):I&&(H=H.mod(f))}return I?$:(N&&($=on.div($)),f?$.mod(f):k?gt($,sn,At,void 0):$)},ye.integerValue=function(v){var f=new ue(this);return v==null?v=At:G(v,0,8),gt(f,f.e+1,v)},ye.isEqualTo=ye.eq=function(v,f){return D(this,new ue(v,f))===0},ye.isFinite=function(){return!!this.c},ye.isGreaterThan=ye.gt=function(v,f){return D(this,new ue(v,f))>0},ye.isGreaterThanOrEqualTo=ye.gte=function(v,f){return(f=D(this,new ue(v,f)))===1||f===0},ye.isInteger=function(){return!!this.c&&F(this.e/T)>this.c.length-2},ye.isLessThan=ye.lt=function(v,f){return D(this,new ue(v,f))<0},ye.isLessThanOrEqualTo=ye.lte=function(v,f){return(f=D(this,new ue(v,f)))===-1||f===0},ye.isNaN=function(){return!this.s},ye.isNegative=function(){return this.s<0},ye.isPositive=function(){return this.s>0},ye.isZero=function(){return!!this.c&&this.c[0]==0},ye.minus=function(v,f){var b,I,S,k,R=this,N=R.s;if(f=(v=new ue(v,f)).s,!N||!f)return new ue(NaN);if(N!=f)return v.s=-f,R.plus(v);var B=R.e/T,$=v.e/T,H=R.c,de=v.c;if(!B||!$){if(!H||!de)return H?(v.s=-f,v):new ue(de?R:NaN);if(!H[0]||!de[0])return de[0]?(v.s=-f,v):new ue(H[0]?R:At==3?-0:0)}if(B=F(B),$=F($),H=H.slice(),N=B-$){for((k=N<0)?(N=-N,S=H):($=B,S=de),S.reverse(),f=N;f--;S.push(0));S.reverse()}else for(I=(k=(N=H.length)<(f=de.length))?N:f,N=f=0;f<I;f++)if(H[f]!=de[f]){k=H[f]<de[f];break}if(k&&(S=H,H=de,de=S,v.s=-v.s),(f=(I=de.length)-(b=H.length))>0)for(;f--;H[b++]=0);for(f=w-1;I>N;){if(H[--I]<de[I]){for(b=I;b&&!H[--b];H[b]=f);--H[b],H[I]+=w}H[I]-=de[I]}for(;H[0]==0;H.splice(0,1),--$);return H[0]?ao(v,H,$):(v.s=At==3?-1:1,v.c=[v.e=0],v)},ye.modulo=ye.mod=function(v,f){var b,I,S=this;return v=new ue(v,f),!S.c||!v.s||v.c&&!v.c[0]?new ue(NaN):!v.c||S.c&&!S.c[0]?new ue(S):(ei==9?(I=v.s,v.s=1,b=y(S,v,0,3),v.s=I,b.s*=I):b=y(S,v,0,ei),(v=S.minus(b.times(v))).c[0]||ei!=1||(v.s=S.s),v)},ye.multipliedBy=ye.times=function(v,f){var b,I,S,k,R,N,B,$,H,de,Ne,Fe,lt,kt,Lt,at=this,yt=at.c,zt=(v=new ue(v,f)).c;if(!(yt&&zt&&yt[0]&&zt[0]))return!at.s||!v.s||yt&&!yt[0]&&!zt||zt&&!zt[0]&&!yt?v.c=v.e=v.s=null:(v.s*=at.s,yt&&zt?(v.c=[0],v.e=0):v.c=v.e=null),v;for(I=F(at.e/T)+F(v.e/T),v.s*=at.s,(B=yt.length)<(de=zt.length)&&(lt=yt,yt=zt,zt=lt,S=B,B=de,de=S),S=B+de,lt=[];S--;lt.push(0));for(kt=w,Lt=K,S=de;--S>=0;){for(b=0,Ne=zt[S]%Lt,Fe=zt[S]/Lt|0,k=S+(R=B);k>S;)b=(($=Ne*($=yt[--R]%Lt)+(N=Fe*$+(H=yt[R]/Lt|0)*Ne)%Lt*Lt+lt[k]+b)/kt|0)+(N/Lt|0)+Fe*H,lt[k--]=$%kt;lt[k]=b}return b?++I:lt.splice(0,1),ao(v,lt,I)},ye.negated=function(){var v=new ue(this);return v.s=-v.s||null,v},ye.plus=function(v,f){var b,I=this,S=I.s;if(f=(v=new ue(v,f)).s,!S||!f)return new ue(NaN);if(S!=f)return v.s=-f,I.minus(v);var k=I.e/T,R=v.e/T,N=I.c,B=v.c;if(!k||!R){if(!N||!B)return new ue(S/0);if(!N[0]||!B[0])return B[0]?v:new ue(N[0]?I:0*S)}if(k=F(k),R=F(R),N=N.slice(),S=k-R){for(S>0?(R=k,b=B):(S=-S,b=N),b.reverse();S--;b.push(0));b.reverse()}for((S=N.length)-(f=B.length)<0&&(b=B,B=N,N=b,f=S),S=0;f;)S=(N[--f]=N[f]+B[f]+S)/w|0,N[f]=w===N[f]?0:N[f]%w;return S&&(N=[S].concat(N),++R),ao(v,N,R)},ye.precision=ye.sd=function(v,f){var b,I,S,k=this;if(v!=null&&v!==!!v)return G(v,1,V),f==null?f=At:G(f,0,8),gt(new ue(k),v,f);if(!(b=k.c))return null;if(I=(S=b.length-1)*T+1,S=b[S]){for(;S%10==0;S/=10,I--);for(S=b[0];S>=10;S/=10,I++);}return v&&k.e+1>I&&(I=k.e+1),I},ye.shiftedBy=function(v){return G(v,-9007199254740991,L),this.times("1e"+v)},ye.squareRoot=ye.sqrt=function(){var v,f,b,I,S,k=this,R=k.c,N=k.s,B=k.e,$=xt+4,H=new ue("0.5");if(N!==1||!R||!R[0])return new ue(!N||N<0&&(!R||R[0])?NaN:R?k:1/0);if((N=Math.sqrt(+Mn(k)))==0||N==1/0?(((f=Y(R)).length+B)%2==0&&(f+="0"),N=Math.sqrt(+f),B=F((B+1)/2)-(B<0||B%2),b=new ue(f=N==1/0?"5e"+B:(f=N.toExponential()).slice(0,f.indexOf("e")+1)+B)):b=new ue(N+""),b.c[0]){for((N=(B=b.e)+$)<3&&(N=0);;)if(S=b,b=H.times(S.plus(y(k,S,$,1))),Y(S.c).slice(0,N)===(f=Y(b.c)).slice(0,N)){if(b.e<B&&--N,(f=f.slice(N-3,N+1))!="9999"&&(I||f!="4999")){+f&&(+f.slice(1)||f.charAt(0)!="5")||(gt(b,b.e+xt+2,1),v=!b.times(b).eq(k));break}if(!I&&(gt(S,S.e+xt+2,0),S.times(S).eq(k))){b=S;break}$+=4,N+=4,I=1}}return gt(b,b.e+xt+1,At,v)},ye.toExponential=function(v,f){return v!=null&&(G(v,0,V),v++),Nr(this,v,f,1)},ye.toFixed=function(v,f){return v!=null&&(G(v,0,V),v=v+this.e+1),Nr(this,v,f)},ye.toFormat=function(v,f,b){var I,S=this;if(b==null)v!=null&&f&&typeof f=="object"?(b=f,f=null):v&&typeof v=="object"?(b=v,v=f=null):b=Rr;else if(typeof b!="object")throw Error(m+"Argument not an object: "+b);if(I=S.toFixed(v,f),S.c){var k,R=I.split("."),N=+b.groupSize,B=+b.secondaryGroupSize,$=b.groupSeparator||"",H=R[0],de=R[1],Ne=S.s<0,Fe=Ne?H.slice(1):H,lt=Fe.length;if(B&&(k=N,N=B,B=k,lt-=k),N>0&&lt>0){for(k=lt%N||N,H=Fe.substr(0,k);k<lt;k+=N)H+=$+Fe.substr(k,N);B>0&&(H+=$+Fe.slice(k)),Ne&&(H="-"+H)}I=de?H+(b.decimalSeparator||"")+((B=+b.fractionGroupSize)?de.replace(new RegExp("\\d{"+B+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):de):H}return(b.prefix||"")+I+(b.suffix||"")},ye.toFraction=function(v){var f,b,I,S,k,R,N,B,$,H,de,Ne,Fe=this,lt=Fe.c;if(v!=null&&(!(N=new ue(v)).isInteger()&&(N.c||N.s!==1)||N.lt(on)))throw Error(m+"Argument "+(N.isInteger()?"out of range: ":"not an integer: ")+Mn(N));if(!lt)return new ue(Fe);for(f=new ue(on),$=b=new ue(on),I=B=new ue(on),Ne=Y(lt),k=f.e=Ne.length-Fe.e-1,f.c[0]=U[(R=k%T)<0?T+R:R],v=!v||N.comparedTo(f)>0?k>0?f:$:N,R=fn,fn=1/0,N=new ue(Ne),B.c[0]=0;H=y(N,f,0,1),(S=b.plus(H.times(I))).comparedTo(v)!=1;)b=I,I=S,$=B.plus(H.times(S=$)),B=S,f=N.minus(H.times(S=f)),N=S;return S=y(v.minus(b),I,0,1),B=B.plus(S.times($)),b=b.plus(S.times(I)),B.s=$.s=Fe.s,de=y($,I,k*=2,At).minus(Fe).abs().comparedTo(y(B,b,k,At).minus(Fe).abs())<1?[$,I]:[B,b],fn=R,de},ye.toNumber=function(){return+Mn(this)},ye.toPrecision=function(v,f){return v!=null&&G(v,1,V),Nr(this,v,f,2)},ye.toString=function(v){var f,b=this,I=b.s,S=b.e;return S===null?I?(f="Infinity",I<0&&(f="-"+f)):f="NaN":(v==null?f=S<=ln||S>=Cr?P(Y(b.c),S):j(Y(b.c),S,"0"):v===10&&pr?f=j(Y((b=gt(new ue(b),xt+S+1,At)).c),b.e,"0"):(G(v,2,dn.length,"Base"),f=E(j(Y(b.c),S,"0"),10,v,I,!0)),I<0&&b.c[0]&&(f="-"+f)),f},ye.valueOf=ye.toJSON=function(){return Mn(this)},ye._isBigNumber=!0,ye[Symbol.toStringTag]="BigNumber",ye[Symbol.for("nodejs.util.inspect.custom")]=ye.valueOf,p!=null&&ue.set(p),ue}();const X={ROUNDING_MODE:z.ROUND_DOWN};function se(l){return new TextEncoder().encode(l)}function we(l){return typeof l=="string"?we(_e(l)):new TextDecoder().decode(l)}z.config(X);const fe="UNKNOWN_ERROR",ce="INVALID_ARGUMENT";function Q(l,p=fe,y={}){const E=[];Object.keys(y).forEach(Z=>{try{E.push(Z+"="+JSON.stringify(y[Z]))}catch{E.push(Z+"="+JSON.stringify(y[Z].toString()))}});const A=l;E.length&&(l+=" ("+E.join(", ")+")");const O=new Error(l);return O.reason=A,O.code=p,Object.keys(y).forEach(function(Z){O[Z]=y[Z]}),O}function _e(l){if(typeof l!="string")throw new Error("hexToBytes only accept strings, got: "+typeof l);if(l.substr(0,2)==="0x")return _e(l.substr(2));const p=new Uint8Array(Math.ceil(l.length/2));let y=0;for(let E=0;E<l.length;E+=2){const A=parseInt(l.substr(E,2),16);if(isNaN(A))throw new Error("Cannot read hex string:"+JSON.stringify(l));p[y]=A,y++}return p}function pe(l){return Array.from(l).map(p=>p.toString(16).padStart(2,"0")).join("")}function le(l,p){if(typeof l=="string"){if(p&&p.encoding==="hex"&&typeof l=="string"){let y=l;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const E=_e(y);return c.keccak256(E)}return c.keccak256(se(l))}return c.keccak256(l)}const be={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(l,p,y){return new Array(p-l.length+1).join(y||"0")+l}function oe(l){let p="",y=0;const E=l.length;for(l.substring(0,2)==="0x"&&(y=2);y<E;y+=2){const A=parseInt(l.substr(y,2),16);p+=String.fromCharCode(A)}return p}function Be(l){return jn(l)&&l.name&&l.name.indexOf("(")!==-1?l.name:l.name+"("+vt(!1,l.inputs||[]).join(",")+")"}function bt(...l){const p=l.reduce((A,O)=>A+O.length,0),y=new Uint8Array(p);let E=0;for(const A of l)y.set(A,E),E+=A.length;return y}function vt(l,p){const y=[];return p.forEach(function(E){if(typeof E.components=="object"){if(E.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let A="";const O=E.type.indexOf("[");O>=0&&(A=E.type.substring(O));const Z=vt(l,E.components);y.push("("+Z.join(",")+")"+A)}else y.push(E.type)}),y}function en(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(0,p):l}function tn(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(p+1,y-p-1).replace(" ",""):""}function $n(l){return l==null?l:Mt(l).toNumber()}function ke(l){return Mt(l).toNumber()}function dt(l){return Ir(l)?l.toString(10):""+l}function mt(l){return typeof l=="string"&&!l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?"0x"+l:Ye(l)}function Wt(l){if(typeof l=="string")return l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?Ye(l):"0x"+pe(se(l));if(l instanceof Uint8Array)return"0x"+pe(l);throw new Error(`toStringData: Error trying to convert ${l} (${typeof l}) to a hex string.`)}function tt(l){return typeof l=="boolean"?l:Mt(l).toNumber()!==0}function nt(l){const p=Mt(l),y=p.toString(16);return p.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Ye(l){if(xr(l))return nt(+l);if(Ir(l))return nt(l);if(no(l)){const p=l;if(p.indexOf("-0x")===0)return nt(p);if(p.indexOf("0x")===0)return p;if(!isFinite(p))return pe(se(p))}if(l instanceof Uint8Array)return"0x"+pe(l);if(Kn(l)||jn(l))throw new Error("toHex can only be called with scalar values, not objects or arrays");return nt(l)}function mn(l){const p=l?l.toLowerCase():"ether",y=be[p];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(be,null,2));return new z(y,10)}function Mt(l){let p=l||0;return Ir(p)?p:(typeof p=="string"&&(p=p.trim()),typeof p!="string"||p.indexOf("0x")!==0&&p.indexOf("-0x")!==0?p instanceof Uint8Array?new z(pe(p),16):new z(p,10):new z(p.replace("0x","").toLowerCase(),16))}function Kr(l){return new z(new Array(l).fill("1").join(""),2)}function Je(l,p=256){const y=Mt(l).integerValue();return y.isLessThan(0)?Kr(p).plus(y).plus(1):y}function nn(l,p){return Xe(l.toString(2),p,"0")[0]==="1"}function Qe(l){if(typeof l!="string")throw Q("invalid address",ce,{arg:"address",value:l});if(l.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return l.trim().substring(0,2)!=="0x"&&(l="0x"+l),cs(l);throw Q("invalid address",ce,{arg:"address",value:l})}function Pt(l,p=256){if(nn(l,p)){const y=Kr(p);return l.minus(y).minus(1)}return l}function st(l){return/^0x[0-9a-f]{40}$/i.test(l)}function On(l){return!!/^(0x)?[0-9a-f]{40}$/i.test(l)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(l)&&!/^(0x)?[0-9A-F]{40}$/.test(l))||as(l))}function as(l){const p=l.replace("0x",""),y=le(p.toLowerCase());for(let E=0;E<40;E++)if(parseInt(y[E],16)>7&&p[E].toUpperCase()!==p[E]||parseInt(y[E],16)<=7&&p[E].toLowerCase()!==p[E])return!1;return!0}function cs(l){if(l===void 0)return"";const p=l.toLowerCase().replace("0x",""),y=le(p);let E="0x";for(let A=0;A<p.length;A++)parseInt(y[A],16)>7?E+=p[A].toUpperCase():E+=p[A];return E}function Tn(l){if(!Array.isArray(l))throw new Error(`Value was not an array: ${JSON.stringify(l)}`);return l}function Ii(l){return st(l)?l:/^[0-9a-f]{40}$/.test(l)?"0x"+l:"0x"+Xe(Ye(l).substr(2),40)}function Ir(l){return l instanceof z}function no(l){return typeof l=="string"||l&&l.constructor&&l.constructor.name==="String"}function jn(l){return l!==null&&!Array.isArray(l)&&typeof l=="object"}function xr(l){return typeof l=="boolean"}function Kn(l){return Array.isArray(l)}var ro,Jr;function us(l,p){if(!l)throw new Error("jsonrpc method should be specified!");if(typeof l!="string")throw new Error(`jsonrpc must be a string, got ${typeof l}!`);return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:l,params:p||[]}}function ls(l){return Array.isArray(l)?l.every(p):p(l);function p(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,(ro=n.TransactionStatus||(n.TransactionStatus={})).pending="pending",ro.confirmed="confirmed",ro.failed="failed",n.TransactionType=void 0,(Jr=n.TransactionType||(n.TransactionType={})).queued="queued",Jr.dropped="dropped",Jr.replaced="replaced",Jr.pending="pending",Jr.reverted="reverted",Jr.confirmed="confirmed",n.messageId=0;function io(l){return Mt(l)}function fs(l){return l==="latest"||l==="pending"||l==="earliest"}function fr(l){return l===void 0?"latest":_t(l)}function _t(l){return l==null?null:fs(l)?l:Ye(l)}function Gn(l){return l.from&&(l.from=ee(l.from)),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=nt(l.gasPrice)),l.gas!==void 0&&(l.gas=nt(l.gas)),l.value!==void 0&&(l.value=nt(l.value)),l.nonce!==void 0&&(l.nonce=nt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function Jn(l){if(typeof l!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(l));if(l.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(l));if(l.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(l));return l}function C(l){if(typeof l!="object")throw new Error("Did not provide transaction options");if(!l.from)throw new Error('Missing "from" in transaction options');return l.from=ee(l.from),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=nt(l.gasPrice)),l.gas!==void 0&&(l.gas=nt(l.gas)),l.value!==void 0&&(l.value=nt(l.value)),l.nonce!==void 0&&(l.nonce=nt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function _(l){return l?(l.blockNumber!==null&&(l.blockNumber=ke(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=ke(l.transactionIndex)),l.nonce=ke(l.nonce),l.gas=ke(l.gas),l.gasPrice=Mt(l.gasPrice),l.value=Mt(l.value),l):null}function x(l){return l?(l.blockNumber!==null&&(l.blockNumber=ke(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=ke(l.transactionIndex)),l.cumulativeGasUsed=ke(l.cumulativeGasUsed),l.gasUsed=ke(l.gasUsed),l.logs&&Kn(l.logs)&&(l.logs=l.logs.map(function(p){return W(p)})),l.status=ke(l.status||""),l):null}function M(l){return l?(l.gasLimit=ke(l.gasLimit),l.gasUsed=ke(l.gasUsed),l.size=ke(l.size),l.timestamp=ke(l.timestamp),l.number!==null&&(l.number=ke(l.number)),l.difficulty=Mt(l.difficulty),l.totalDifficulty=Mt(l.totalDifficulty),Kn(l.transactions)&&l.transactions.forEach(function(p,y){no(p)||(l.transactions[y]=_(p)||l.transactions[y])}),l):null}function W(l){return l&&(l.blockNumber&&(l.blockNumber=ke(l.blockNumber)),l.transactionIndex&&(l.transactionIndex=ke(l.transactionIndex)),l.logIndex&&(l.logIndex=ke(l.logIndex)),l)}function ee(l){if(st(l))return l;if(On(l))return"0x"+l;throw new Error(`Invalid address: ${JSON.stringify(l)}`)}function he(l){return l}function ge(l){return l&&(l.startingBlock=ke(l.startingBlock),l.currentBlock=ke(l.currentBlock),l.highestBlock=ke(l.highestBlock),l.knownStates&&(l.knownStates=ke(l.knownStates),l.pulledStates=ke(l.pulledStates)),l)}function Me(l){if(l===null)throw Q("cannot convert null value to array",ce,{arg:"value",value:l});if(l instanceof Uint8Array)return new Uint8Array(l);if(typeof l=="string"){const p=l.match(/^(0x)?[0-9a-fA-F]*$/);if(!p)throw Q("invalid hexidecimal string",ce,{arg:"value",value:l});if(p[1]!=="0x")throw Q("hex string must have 0x prefix",ce,{arg:"value",value:l});(l=l.substring(2)).length%2&&(l="0"+l);const y=[];for(let E=0;E<l.length;E+=2)y.push(parseInt(l.substr(E,2),16));return new Uint8Array(y)}if(function(p){if(!p||parseInt(String(p.length))!==p.length||typeof p=="string")return!1;for(let y=0;y<p.length;y++){const E=p[y];if(E<0||E>=256||parseInt(String(E))!==E)return!1}return!0}(l))return new Uint8Array(l);throw Q("invalid arrayify value",void 0,{arg:"value",value:l,type:typeof l})}function Ce(l,p,y){Object.defineProperty(l,p,{enumerable:!0,value:y,writable:!1})}const We=new z(-1),ct=new z(0),ut=new z(1),$t=new z("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ft(l){return function(p,y){function E(Z){return new Error('unexpected character "'+p[Z]+'" at position '+Z+' in "'+p+'"')}const A={type:"",name:"",state:{allowType:!0}};let O=A;for(let Z=0;Z<p.length;Z++){const me=p[Z];switch(me){case"(":if(!O.state.allowParams)throw E(Z);O.state.allowType=!1,O.type=rn(O.type),O.components=[{type:"",name:"",parent:O,state:{allowType:!0}}],O=O.components[0];break;case")":delete O.state,O.name==="indexed"&&(O.indexed=!0,O.name=""),O.type=rn(O.type);const Re=O;if(O=O.parent,!O)throw E(Z);delete Re.parent,O.state.allowParams=!1,O.state.allowName=!0,O.state.allowArray=!0;break;case",":delete O.state,O.name==="indexed"&&(O.indexed=!0,O.name=""),O.type=rn(O.type);const Oe={type:"",name:"",parent:O.parent,state:{allowType:!0}};O.parent.components.push(Oe),delete O.parent,O=Oe;break;case" ":O.state.allowType&&O.type!==""&&(O.type=rn(O.type),delete O.state.allowType,O.state.allowName=!0,O.state.allowParams=!0),O.state.allowName&&O.name!==""&&(O.name==="indexed"?(O.indexed=!0,O.name=""):O.state.allowName=!1);break;case"[":if(!O.state.allowArray)throw E(Z);O.type+=me,O.state.allowArray=!1,O.state.allowName=!1,O.state.readArray=!0;break;case"]":if(!O.state.readArray)throw E(Z);O.type+=me,O.state.readArray=!1,O.state.allowArray=!0,O.state.allowName=!0;break;default:if(O.state.allowType)O.type+=me,O.state.allowParams=!0,O.state.allowArray=!0;else if(O.state.allowName)O.name+=me,delete O.state.allowArray;else{if(!O.state.readArray)throw E(Z);O.type+=me}}}if(O.parent)throw new Error("unexpected eof");return delete A.state,O.name==="indexed"&&(O.indexed=!0,O.name=""),A.type=rn(A.type),A}(l)}function rn(l){return l.match(/^uint($|[^1-9])/)?l="uint256"+l.substring(4):l.match(/^int($|[^1-9])/)&&(l="int256"+l.substring(3)),l}const Zr=new RegExp(/^bytes([0-9]*)$/),Ar=new RegExp(/^(u?int)([0-9]*)$/),Qr=new RegExp(/^(.*)\[([0-9]*)\]$/),oo=function(l,p){const y=l.match(Ar);return y&&parseInt(y[2])<=48?p.toNumber():p};class In{constructor(p,y,E,A="",O){this.coerceFunc=p,this.name=y,this.type=E,this.localName=A,this.dynamic=O}}class xi extends In{constructor(p){super(p.coerceFunc,p.name,p.type,void 0,p.dynamic),Ce(this,"coder",p)}encode(p){return this.coder.encode(p)}decode(p,y){return this.coder.decode(p,y)}}class Ph extends In{constructor(p,y){super(p,"null","",y,!1)}encode(p){return Me([])}decode(p,y){if(y>p.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function ha(l,p){return new z(l.toString(2).substr(-p),2)}class Lh extends In{constructor(p,y,E,A){const O=(E?"int":"uint")+8*y;super(p,O,O,A,!1),this.size=y,this.signed=E}encode(p){try{let y=Mt(p);if(this.signed){let A=ha($t,8*this.size-1);if(y.gt(A))throw new Error("out-of-bounds");if(A=A.plus(ut).multipliedBy(We),y.lt(A))throw new Error("out-of-bounds")}else if(y.lt(ct)||y.gt(ha($t,8*this.size)))throw new Error("out-of-bounds");y=ha(Je(y,8*this.size),8*this.size),this.signed&&(y=Je(Pt(y,8*this.size),256));const E=Xe(Je(y).toString(16),64);if(E.indexOf("NaN")!==-1)throw Q("invalid number value, NaN",ce,{arg:this.localName,coderType:this.name,value:p,v:y,twosComplement:Je(y),twosComplement16:Je(y).toString(16),pad:Xe(Je(y).toString(16),64),size:this.size});return _e(E)}catch(y){throw Q("invalid number value",ce,{arg:this.localName,coderType:this.name,value:p,message:y.toString()})}}decode(p,y){if(p.length<y+32)throw Q("insufficient data for "+this.name+" type",ce,{arg:this.localName,coderType:this.name,value:Ye(p.slice(y,y+32))});const E=32-this.size;let A=new z(pe(p.slice(y+E,y+32)),16);return A=this.signed?Pt(A,8*this.size):ha(A,8*this.size),{consumed:32,value:this.coerceFunc(this.name,A)}}}const kr=new Lh(function(l,p){return p},32,!1,"none");class Dh extends In{constructor(p,y,E){const A="bytes"+y;super(p,A,A,E,!1),this.length=y}encode(p){const y=new Uint8Array(32);try{if(typeof p=="string"&&p.length%2!=0)throw new Error("hex string cannot be odd-length");const E=Me(p);if(E.length>this.length)throw new Error("incorrect data length");y.set(E)}catch(E){throw Q("invalid "+this.name+" value. Use hex strings or Uint8Array",ce,{arg:this.localName,coderType:this.name,value:E.value||p,details:E.message})}return y}decode(p,y){if(p.length<y+32)throw Q("insufficient data for "+this.name+" type",ce,{arg:this.localName,coderType:this.name,value:Ye(p.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,p.slice(y,y+this.length))}}}function Bh(l){const p=32*Math.ceil(l.length/32),y=new Uint8Array(p-l.length);return bt(kr.encode(l.length),l,y)}function Fh(l,p,y){if(l.length<p+32)throw Q("insufficient data for dynamicBytes length",ce,{arg:y,coderType:"dynamicBytes",value:Ye(l.slice(p,p+32))});let E=kr.decode(l,p).value;try{E=E.toNumber()}catch(A){throw A("dynamic bytes count too large",ce,{arg:y,coderType:"dynamicBytes",value:E.toString()})}if(l.length<p+32+E)throw Q("insufficient data for dynamicBytes type",ce,{arg:y,coderType:"dynamicBytes",value:Ye(l.slice(p,p+32+E))});return{consumed:32+32*Math.ceil(E/32),value:l.slice(p+32,p+32+E)}}function pa(l){return 32*Math.ceil(l/32)}function Hh(l,p){if(!Array.isArray(p)){if(!p||typeof p!="object")throw Q("invalid tuple value",ce,{coderType:"tuple",value:p});{const Re=[];l.forEach(function(Oe){Re.push(p[Oe.localName])}),p=Re}}if(l.length!==p.length)throw Q("types/value length mismatch",ce,{coderType:"tuple",value:p});const y=[];l.forEach(function(Re,Oe){y.push({dynamic:Re.dynamic,value:Re.encode(p[Oe])})});let E=0,A=0;y.forEach(function(Re){Re.dynamic?(E+=32,A+=pa(Re.value.length)):E+=pa(Re.value.length)});let O=0,Z=E;const me=new Uint8Array(E+A);return y.forEach(function(Re){Re.dynamic?(me.set(kr.encode(Z),O),O+=32,me.set(Re.value,Z),Z+=pa(Re.value.length)):(me.set(Re.value,O),O+=pa(Re.value.length))}),me}class sw extends Array{}class aw extends In{constructor(p,y,E,A){super(p,"array",y.type+"["+(E>=0?E:"")+"]",A,E===-1||y.dynamic),this.coder=y,this.length=E}encode(p){if(!Array.isArray(p))throw Q("expected array value",ce,{arg:this.localName,coderType:"array",value:p});let y=this.length,E=new Uint8Array(0);y===-1&&(y=p.length,E=kr.encode(y)),function(O,Z,me){if(me||(me=""),O<Z)throw Q("missing argument"+me,"MISSING_ARGUMENT",{count:O,expectedCount:Z});if(O>Z)throw Q("too many arguments"+me,"UNEXPECTED_ARGUMENT",{count:O,expectedCount:Z})}(y,p.length,"in coder array"+(this.localName?" "+this.localName:""));const A=[];for(let O=0;O<p.length;O++)A.push(this.coder);return bt(E,Hh(A,p))}decode(p,y){let E=0,A=this.length;if(A===-1){let me;try{me=kr.decode(p,y)}catch(Re){throw Q("insufficient data for dynamic array length",ce,{arg:this.localName,coderType:"array",value:Re.value})}try{A=me.value.toNumber()}catch{throw Q("array count too large",ce,{arg:this.localName,coderType:"array",value:me.value.toString()})}E+=me.consumed,y+=me.consumed}const O=[];for(let me=0;me<A;me++)O.push(new xi(this.coder));const Z=function(me,Re,Oe){const gn=Oe;let Ht=0;const ye=[];return me.forEach(function(on){let xt;if(on.dynamic){const At=kr.decode(Re,Oe);xt=on.decode(Re,gn+At.value.toNumber()),xt.consumed=At.consumed}else xt=on.decode(Re,Oe);xt.value!==void 0&&ye.push(xt.value),Oe+=xt.consumed,Ht+=xt.consumed}),{value:ye,consumed:Ht}}(O,p,y);return Z.consumed+=E,Z.value=this.coerceFunc(this.type,Z.value),Z}}class ul extends In{constructor(p,y,E){let A=!1;const O=[];y.forEach(function(Z){Z.dynamic&&(A=!0),O.push(Z.type)}),super(p,"tuple","tuple("+O.join(",")+")",E,A),this.coders=y}encode(p){return Hh(this.coders,p)}decode(p,y){const E=function(A,O,Z){const me=Z;let Re=0;const Oe=new sw;return A.forEach(function(gn){let Ht;if(gn.dynamic){const ye=kr.decode(O,Z);Ht=gn.decode(O,me+ye.value.toNumber()),Ht.consumed=ye.consumed}else Ht=gn.decode(O,Z);Ht.value!==void 0&&Oe.push(Ht.value),Z+=Ht.consumed,Re+=Ht.consumed}),A.forEach(function(gn,Ht){let ye=gn.localName;ye&&(ye==="length"&&(ye="_length"),Oe[ye]!==null&&Oe[ye]!==void 0||(Oe[ye]=Oe[Ht]))}),{value:Oe,consumed:Re}}(this.coders,p,y);return E.value=this.coerceFunc(this.type,E.value),E}}const cw={address:class extends In{constructor(l,p){super(l,"address","address",p,!1)}encode(l){const p=new Uint8Array(32),y=l.trim();if(!On(y))throw Q("invalid address format",ce,{arg:this.localName,coderType:"address",value:l});try{p.set(_e(ee(y)),12)}catch(E){throw Q(`invalid address (${E.message})`,ce,{arg:this.localName,coderType:"address",value:l})}return p}decode(l,p){if(l.length<p+32)throw Q("insufficuent data for address type",ce,{arg:this.localName,coderType:"address",value:Ye(l.slice(p,p+32)),missingBytes:p+32-l.length});return{consumed:32,value:this.coerceFunc("address",Qe(Ye(l.slice(p+12,p+32))))}}},bool:class extends In{constructor(l,p){super(l,"bool","bool",p,!1)}encode(l){return kr.encode(l?1:0)}decode(l,p){try{const y=kr.decode(l,p);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?Q("insufficient data for boolean type",ce,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends In{constructor(l,p){super(l,"string","string",p,!0)}encode(l){if(typeof l!="string")throw Q("invalid string value",ce,{arg:this.localName,coderType:"string",value:l});return Bh(se(l))}decode(l,p){const y=Fh(l,p,this.localName);return y.value=this.coerceFunc("string",we(y.value)),y}},bytes:class extends In{constructor(l,p){super(l,"bytes","bytes",p,!0)}encode(l){try{return Bh(Me(l))}catch(p){throw p("invalid bytes value",ce,{arg:this.localName,coderType:"bytes",value:p.value})}}decode(l,p){const y=Fh(l,p,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends Dh{constructor(l,p){super(l,24,p)}}};function ma(l,p){const y=cw[p.type];if(y)return new y(l,p.name);let E=p.type.match(Ar);if(E){const A=parseInt(E[2]||"256");if(A===0||A>256||A%8!=0)throw Q("invalid "+E[1]+" bit length",ce,{arg:"param",value:p});return new Lh(l,A/8,E[1]==="int",p.name)}if(E=p.type.match(Zr),E){const A=parseInt(E[1]);if(A===0||A>32)throw Q("invalid bytes length",ce,{arg:"param",value:p});return new Dh(l,A,p.name)}if(E=p.type.match(Qr),E){const A=Object.assign({},p),O=parseInt(E[2]||"-1");return A.type=E[1],new aw(l,ma(l,A),O,p.name)}if(p.type.substring(0,5)==="tuple")return function(A,O,Z){O||(O=[]);const me=O.map(Re=>ma(A,Re));return new ul(A,me,Z)}(l,p.components,p.name);if(p.type==="")return new Ph(l,p.name);throw Q("invalid type",ce,{arg:"type",value:p.type,fullType:p})}class ll{constructor(p){(function(y,E){if(!(y instanceof E))throw Q("missing new","MISSING_NEW",{name:E.name})})(this,ll),p||(p=oo),Ce(this,"coerceFunc",p)}encode(p,y){if(p.length!==y.length)throw Q("types/values length mismatch",ce,{count:{types:p.length,values:y.length},value:{types:p,values:y}});const E=p.map(A=>typeof A=="string"?Ft(A):A).map(A=>ma(this.coerceFunc,A));return new ul(this.coerceFunc,E,"_").encode(y)}decode(p,y){const E=p.map(A=>typeof A=="string"?Ft(A):A).map(A=>ma(this.coerceFunc,A));return new ul(this.coerceFunc,E,"_").decode(y,0).value}}const Uh=new ll;var $h,Ee;function Te(l,p,y,E){var A,O=arguments.length,Z=O<3?p:E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(l,p,y,E);else for(var me=l.length-1;me>=0;me--)(A=l[me])&&(Z=(O<3?A(Z):O>3?A(p,y,Z):A(p,y))||Z);return O>3&&Z&&Object.defineProperty(p,y,Z),Z}function Ie(l,p){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(l,p)}n.coder=void 0,($h=n.coder||(n.coder={})).encodeParams=function(l,p){return pe(Uh.encode(l,p))},$h.decodeParams=function(l,p){if(l.length>0&&(!p||p==="0x"||p==="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 Uh.decode(l,_e("0x"+p.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Pe{constructor(p){this.callName=p.callName,this.params=p.params||0,this.inputFormatter=p.inputFormatter||null,this.outputFormatter=p.outputFormatter}validateArgs(p){if(p.length!==this.params)throw y=this.callName,E=p.length,A=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${E}, expected: ${A}`);var y,E,A}formatInput(p){return this.inputFormatter?this.inputFormatter.map(function(y,E){return y?y(p[E]):p[E]}):p}formatOutput(p){return p!==null?this.outputFormatter(p):null}toPayload(p){const y=this.formatInput(p);return this.validateArgs(y),{method:this.callName,params:y}}async execute(p,...y){const E=this.toPayload(y);if(!p)throw new Error("Missing RequestManager in method#exec");const A=await p.sendAsync(E);return this.formatOutput(A)}}class xn{constructor(p){this.getter=p.getter,this.outputFormatter=p.outputFormatter}formatOutput(p){return this.outputFormatter(p)}async execute(p,...y){const E=await p.sendAsync({method:this.getter,params:[]});return this.formatOutput(E)}}function jh(l){return new Promise(p=>setTimeout(p,l))}n.eth=void 0,(Ee=n.eth||(n.eth={})).eth_getBalance=new Pe({callName:"eth_getBalance",params:2,inputFormatter:[ee,fr],outputFormatter:io}),Ee.eth_getStorageAt=new Pe({callName:"eth_getStorageAt",params:3,inputFormatter:[ee,Ye,fr],outputFormatter:mt}),Ee.eth_getCode=new Pe({callName:"eth_getCode",params:2,inputFormatter:[ee,fr],outputFormatter:mt}),Ee.eth_getBlockByHash=new Pe({callName:"eth_getBlockByHash",params:2,inputFormatter:[_t,function(l){return!!l}],outputFormatter:M}),Ee.eth_getBlockByNumber=new Pe({callName:"eth_getBlockByNumber",params:2,inputFormatter:[_t,function(l){return!!l}],outputFormatter:M}),Ee.eth_getUncleByBlockHashAndIndex=new Pe({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[_t,Ye],outputFormatter:M}),Ee.eth_getUncleByBlockNumberAndIndex=new Pe({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[_t,Ye],outputFormatter:M}),Ee.eth_getBlockTransactionCountByHash=new Pe({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[_t],outputFormatter:ke}),Ee.eth_getBlockTransactionCountByNumber=new Pe({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[_t],outputFormatter:ke}),Ee.eth_getUncleCountByBlockHash=new Pe({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[_t],outputFormatter:ke}),Ee.eth_getUncleCountByBlockNumber=new Pe({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[_t],outputFormatter:ke}),Ee.eth_getTransactionByHash=new Pe({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Jn],outputFormatter:_}),Ee.eth_getTransactionByBlockHashAndIndex=new Pe({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[_t,Ye],outputFormatter:_}),Ee.eth_getTransactionByBlockNumberAndIndex=new Pe({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[_t,Ye],outputFormatter:_}),Ee.eth_getTransactionReceipt=new Pe({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Jn],outputFormatter:x}),Ee.eth_getTransactionCount=new Pe({callName:"eth_getTransactionCount",params:2,inputFormatter:[ee,fr],outputFormatter:ke}),Ee.eth_sendRawTransaction=new Pe({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:mt}),Ee.web3_sha3=new Pe({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:mt}),Ee.eth_sendTransaction=new Pe({callName:"eth_sendTransaction",params:1,inputFormatter:[C],outputFormatter:mt}),Ee.eth_sign=new Pe({callName:"eth_sign",params:2,inputFormatter:[ee,null],outputFormatter:mt}),Ee.eth_call=new Pe({callName:"eth_call",params:2,inputFormatter:[Gn,fr],outputFormatter:mt}),Ee.eth_estimateGas=new Pe({callName:"eth_estimateGas",params:1,inputFormatter:[Gn],outputFormatter:ke}),Ee.eth_submitWork=new Pe({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:tt}),Ee.eth_getWork=new Pe({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:Tn}),Ee.eth_coinbase=new xn({getter:"eth_coinbase",outputFormatter:Ii}),Ee.eth_mining=new xn({getter:"eth_mining",outputFormatter:tt}),Ee.eth_hashrate=new xn({getter:"eth_hashrate",outputFormatter:ke}),Ee.eth_syncing=new xn({getter:"eth_syncing",outputFormatter:ge}),Ee.eth_gasPrice=new xn({getter:"eth_gasPrice",outputFormatter:io}),Ee.eth_accounts=new xn({getter:"eth_accounts",outputFormatter:Tn}),Ee.eth_blockNumber=new xn({getter:"eth_blockNumber",outputFormatter:ke}),Ee.eth_protocolVersion=new xn({getter:"eth_protocolVersion",outputFormatter:ke}),Ee.web3_clientVersion=new xn({getter:"web3_clientVersion",outputFormatter:dt}),Ee.net_version=new xn({getter:"net_version",outputFormatter:dt}),Ee.shh_version=new Pe({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:ke}),Ee.shh_post=new Pe({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:tt}),Ee.personal_newAccount=new Pe({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Ii}),Ee.personal_importRawKey=new Pe({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Ii}),Ee.personal_sign=new Pe({callName:"personal_sign",params:3,inputFormatter:[Wt,ee,null],outputFormatter:mt}),Ee.personal_ecRecover=new Pe({callName:"personal_ecRecover",params:2,inputFormatter:[Wt,null],outputFormatter:Ii}),Ee.personal_unlockAccount=new Pe({callName:"personal_unlockAccount",params:3,inputFormatter:[ee,null,$n],outputFormatter:tt}),Ee.personal_sendTransaction=new Pe({callName:"personal_sendTransaction",params:2,inputFormatter:[C,null],outputFormatter:mt}),Ee.personal_lockAccount=new Pe({callName:"personal_lockAccount",params:1,inputFormatter:[ee],outputFormatter:tt}),Ee.personal_listAccounts=new xn({getter:"personal_listAccounts",outputFormatter:Tn}),Ee.net_listening=new xn({getter:"net_listening",outputFormatter:tt}),Ee.net_peerCount=new xn({getter:"net_peerCount",outputFormatter:ke}),Ee.eth_newFilter=new Pe({callName:"eth_newFilter",params:1,inputFormatter:[he],outputFormatter:Ye}),Ee.eth_getLogs=new Pe({callName:"eth_getLogs",params:1,inputFormatter:[Tn],outputFormatter:Tn}),Ee.eth_newBlockFilter=new Pe({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ye}),Ee.eth_newPendingTransactionFilter=new Pe({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ye}),Ee.eth_uninstallFilter=new Pe({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ye],outputFormatter:tt}),Ee.eth_getFilterLogs=new Pe({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ye],outputFormatter:Tn}),Ee.eth_getFilterChanges=new Pe({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ye],outputFormatter:Tn}),Ee.eth_submitHashrate=new Pe({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:tt}),Ee.shh_newIdentity=new Pe({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:mt}),Ee.shh_hasIdentity=new Pe({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:tt}),Ee.shh_newGroup=new Pe({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:mt}),Ee.shh_addToGroup=new Pe({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:tt}),Ee.shh_newFilter=new Pe({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ye}),Ee.shh_uninstallFilter=new Pe({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:tt}),Ee.shh_getLogs=new Pe({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:Tn}),Ee.shh_getFilterMessages=new Pe({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:Tn}),Ee.shh_getFilterChanges=new Pe({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:Tn}),Ee.shh_getMessages=new Pe({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:Tn});function xe(l,p){const y=n.eth[p];if(!y)throw new Error(`Could not find the method/property named ${p.toString()}`);Object.defineProperty(l,p,{value:function(...E){return y.execute(this,...E)}})}class Se{constructor(p){this.provider=p,this.requests=new Map}async sendAsync(p){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const E=us(p.method,p.params),A=s();return this.requests.set(E.id,A),y.sendAsync(E,(O,Z)=>{this.requests.delete(E.id),O?A.reject(O):ls(Z)?A.resolve(Z.result):A.reject(function(me){const Re=me&&me.error&&me.error.message?me.error.message:"Invalid JSON RPC response: "+JSON.stringify(me);return new Error(Re)}(Z))}),A}setProvider(p){this.provider=p}async getConfirmedTransaction(p){const y=await this.waitForCompletion(p);if(this.isFailure(y))throw new Error(`Transaction "${p}" failed`);return y}async waitForCompletion(p,y){const E=Jn(p);if(await this.isTxDropped(E,y)){const A=await this.getTransactionAndReceipt(E);return Object.assign(Object.assign({},A),{status:n.TransactionStatus.failed})}for(;;){const A=await this.getTransactionAndReceipt(E);if(!this.isPending(A)&&A.receipt)return Object.assign(Object.assign({},A),{status:this.isFailure(A)?n.TransactionStatus.failed:n.TransactionStatus.confirmed});await jh(2e3)}}async getTransaction(p){let y,E=null;const A=Jn(p);try{const Z=(await this.eth_accounts())[0];Z&&(E=await this.eth_getTransactionCount(Z,"latest"))}catch{E=null}try{if(y=await this.eth_getTransactionByHash(A),y===null)return null}catch{return null}if(y.blockNumber===null){if(E!==null){if(y.nonce<E)return{hash:A,type:n.TransactionType.replaced,nonce:y.nonce};if(y.nonce>E)return{hash:A,type:n.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:n.TransactionType.pending},y)}let O;try{if(O=await this.eth_getTransactionReceipt(A),O===null||O.status===0)return Object.assign({type:n.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:n.TransactionType.confirmed},y),{receipt:O})}async isTxDropped(p,y=15){let E=y;for(;E>0;){if(await this.getTransactionAndReceipt(p)!==null)return!1;E-=1,await jh(2e3)}return!0}async getTransactionAndReceipt(p){p=Jn(p);const[y,E]=await Promise.all([this.eth_getTransactionByHash(p),this.eth_getTransactionReceipt(p)]);return Object.assign(Object.assign({},y),{receipt:E})}isPending(p){return p&&p.blockNumber===null}isFailure(p){return p&&(!p.receipt||p.receipt.status===0)}}Te([xe,Ie("design:type",Function)],Se.prototype,"web3_clientVersion",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"web3_sha3",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"net_version",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"net_peerCount",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"net_listening",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_protocolVersion",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_syncing",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_coinbase",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_mining",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_hashrate",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_gasPrice",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_accounts",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_blockNumber",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getBalance",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getStorageAt",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getTransactionCount",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getBlockTransactionCountByHash",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getBlockTransactionCountByNumber",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getUncleCountByBlockHash",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getUncleCountByBlockNumber",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getCode",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_sign",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_sendTransaction",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_sendRawTransaction",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_call",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_estimateGas",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getBlockByHash",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getBlockByNumber",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getTransactionByHash",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getTransactionReceipt",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_newFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_newBlockFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_newPendingTransactionFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_uninstallFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getFilterChanges",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getFilterLogs",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getLogs",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_getWork",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_submitWork",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"eth_submitHashrate",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_post",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_version",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_newIdentity",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_hasIdentity",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_newGroup",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_addToGroup",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_newFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_uninstallFilter",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_getFilterChanges",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"shh_getMessages",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_unlockAccount",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_newAccount",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_listAccounts",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_lockAccount",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_importRawKey",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_sendTransaction",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_sign",void 0),Te([xe,Ie("design:type",Function)],Se.prototype,"personal_ecRecover",void 0);class Gh{constructor(p){this.json=p,this._inputTypes=p.inputs||[],this._outputTypes=p.outputs||[],this._constant=!!p.constant,this._payable=!!p.payable||p.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in p&&!p.constant||p.stateMutability==="nonpayable",this._name=Be(p)}extractDefaultBlock(p){return p.length>this._inputTypes.length&&!jn(p[p.length-1])&&fr(p.pop())||"latest"}validateArgs(p){if(p.some(O=>O===void 0))throw new Error("Invalid call, some arguments are undefined");const y=p.filter(function(O){return!(jn(O)===!0&&Kn(O)===!1&&Ir(O)===!1&&!(O instanceof Uint8Array))});if(y.length!==this._inputTypes.length)throw E=y.length,A=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${E}, expected: ${A}`);var E,A}toPayload(p){let y={to:void 0,data:void 0,value:void 0,from:void 0};p.length>this._inputTypes.length&&jn(p[p.length-1])&&(y=p.pop()),this.validateArgs(p);const E=this.signature();let A=n.coder.encodeParams(this._inputTypes,p);return A.indexOf("0x")===0&&(A=A.substr(2)),y.data="0x"+E+A,y}signature(){return le(this._name).slice(0,8)}unpackOutput(p){if(!p)return;const y=p.length>=2?p.slice(2):p,E=n.coder.decodeParams(this._outputTypes,y);return E.length===1?E[0]:E}async execute(p,y,...E){if(!p)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const A=this.toPayload(E);if(A.to=y,A.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!A.from)throw new Error('Missing "from" in transaction options');return await p.eth_sendTransaction(A)}{const A=this.extractDefaultBlock(E),O=this.toPayload(E);O.to=y;const Z=await p.eth_call(O,A);return this.unpackOutput(Z)}}estimateGas(p,y,...E){if(!(p instanceof Se))throw new Error("estimateGas needs to receive a RequestManager as first argument");const A=this.toPayload(E);return A.to=y,p.eth_estimateGas(A)}displayName(){return en(this._name)}typeName(){return tn(this._name)||"void"}attachToContract(p){const y=this.displayName(),E=Object.assign((...A)=>this.execute(p.requestManager,p.address,...A),{estimateGas:this.estimateGas.bind(this,p.requestManager,p.address),toPayload:(...A)=>this.toPayload(A),toRPCMessage:(...A)=>{const O=this.extractDefaultBlock(A),Z=this.toPayload(A);return Z.to=p.address,{method:"eth_call",params:[Z,O]}},unpackOutput:A=>this.unpackOutput(A)});p[y]||(p[y]=E),p[y][this.typeName()]=E}}function Wh(l){if(l==null)return null;const p=String(l).toString();return p.indexOf("0x")===0?p:pe(se(p))}class fl{constructor(p){this.requestManager=p,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(p){if(this.isDisposed)throw new Error("The filter was disposed");p&&(this.callbacks.push(p),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 p=await this.getNewFilter();if(!p)throw new Error("Could not create a filter, response: "+JSON.stringify(p));this.filterId.resolve(p)}catch(p){throw p}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const p=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: ${p}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach(E=>{this.formatter?y.forEach(A=>{E(this.formatter(A))}):y.forEach(A=>E(A))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((p=()=>this.poll(),function(){p().catch(y=>console.error(y))}),500))}else this.stopSemaphore.resolve(1);var p}}class ds extends fl{constructor(p,y,E=A=>A){super(p),this.requestManager=p,this.options=y,this.formatter=E,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(A){return Wh(A)}),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"?_t(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?_t(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const p=await this.filterId;return this.requestManager.eth_getFilterLogs(p)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const p=await this.filterId;return this.requestManager.eth_getFilterChanges(p)}async uninstall(){const p=await this.filterId;return this.requestManager.eth_uninstallFilter(p)}}class dl{constructor(p,y,E){this.requestManager=p,this.address=E,this._anonymous=!1,this._params=y.inputs||[],this._name=Be(y),this._anonymous=y.anonymous||!1}types(p){return this._params.filter(function(y){return y.indexed===p})}displayName(){return en(this._name)}typeName(){return tn(this._name)||"void"}signature(){return le(this._name)}encode(p={},y={}){const E={topics:[],address:this.address};y.fromBlock!==void 0&&(E.fromBlock=_t(y.fromBlock)||void 0),y.toBlock!==void 0&&(E.toBlock=_t(y.toBlock)||void 0),E.topics=E.topics||[],this._anonymous||E.topics.push("0x"+this.signature());const A=this._params.filter(function(O){return O.indexed===!0}).map(function(O){const Z=p[O.name];return Z==null?null:Kn(Z)?Z.map(function(me){return"0x"+n.coder.encodeParams([O],[me])}):"0x"+n.coder.encodeParams([O],[Z])});return E.topics=E.topics.concat(A),E}decode(p){p.data=p.data||"",p.topics=p.topics||[];const y=(this._anonymous?p.topics:p.topics.slice(1)).map(function(me){return me.slice(2)}).join(""),E=n.coder.decodeParams(this.types(!0),y),A=p.data.slice(2),O=n.coder.decodeParams(this.types(!1),A),Z=this._params.reduce(function(me,Re){return me[Re.name]=Re.indexed?E.shift():O.shift(),me},{});return Object.assign(Object.assign({},W(p)),{event:this.displayName(),address:p.address,args:Z})}async execute(p,y){const E=this.encode(p,y),A=this.decode.bind(this);return new ds(this.requestManager,E,A)}attachToContract(p){const y=this.execute.bind(this),E=this.displayName();p.events[E]||(p.events[E]=y),p.events[E][this.typeName()]=this.execute.bind(this,p)}}class uw{constructor(p,y,E){this._requestManager=p,this._json=y,this._address=E}encode(p={}){const y={address:this._address};return p.fromBlock!==void 0&&(y.fromBlock=_t(p.fromBlock)||void 0),p.toBlock!==void 0&&(y.toBlock=_t(p.toBlock)||void 0),y}decode(p){p.data=p.data||"";const y=Kn(p.topics)&&no(p.topics[0])?p.topics[0].slice(2):"",E=this._json.filter(function(A){return y===le(Be(A))})[0];return E?new dl(this._requestManager,E,this._address).decode(p):W(p)}async execute(p){const y=this.encode(p),E=this.decode.bind(this);return new ds(this._requestManager,y,E)}getAllEventsFunction(){return this.execute.bind(this)}}class zh{constructor(p,y,E){var A;this.requestManager=p,this.abi=y,this.address=E,this.events={},this.transactionHash=null,this.address=E,this.abi=y,(A=this).abi.filter(function(O){return O.type==="function"}).map(function(O){return new Gh(O)}).forEach(function(O){O.attachToContract(A)}),this.allEvents=function(O){const Z=O.abi.filter(function(Re){return Re.type==="event"}),me=new uw(O.requestManager,Z,O.address);return Z.map(function(Re){return new dl(O.requestManager,Re,O.address)}).forEach(function(Re){Re.attachToContract(O)}),me.getAllEventsFunction()}(this)}}n.AbstractFilter=fl,n.BigNumber=z,n.Contract=zh,n.ContractFactory=class{constructor(l,p){this.requestManager=l,this.abi=p}async deploy(...l){let p;const y=l[l.length-1];if(jn(y)&&!Kn(y)&&(p=l.pop()),!p)throw new Error("Missing options object");if(!p.data||typeof p.data!="string")throw new Error("Invalid options.data");if(ke(p.value)>0&&!(this.abi.filter(function(Oe){return Oe.type==="constructor"&&Oe.inputs.length===l.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const E=(A=this.abi,O=l,A.filter(function(Oe){return Oe.type==="constructor"&&Oe.inputs&&Oe.inputs.length===O.length}).map(function(Oe){return Oe.inputs||[]}).map(function(Oe){return n.coder.encodeParams(Oe,O)})[0]||"");var A,O;p.data+=E,p.gas||(p.gas=await this.requestManager.eth_estimateGas(p));const Z=await this.requestManager.eth_sendTransaction(p);if(!Z)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const me=await async function(Oe,gn){const Ht=s();let ye=0;const on=()=>{ye++,ye>50?Ht.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Oe.eth_getTransactionReceipt(gn).then(ln=>{ln&&ln.blockHash?Ht.resolve(ln):setTimeout(on,1e3)},ln=>Ht.reject(ln))};on();const xt=await Ht,At=await Oe.eth_getCode(xt.contractAddress,"latest");if(At&&At.length>3)return xt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:At,receipt:xt})}(this.requestManager,Z),Re=await this.at(me);return Re.transactionHash=Z,Re}async at(l){if(!On(l))throw new TypeError(`Invalid address ${JSON.stringify(l)}`);return new zh(this.requestManager,this.abi,l)}},n.EthBlockFilter=class extends ds{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},n.EthFilter=ds,n.EthPendingTransactionFilter=class extends ds{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},n.HTTPProvider=class{constructor(l,p={}){this.host=l,this.options=p,this.debug=!1,this.host=l||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){try{let y=null;y=l instanceof Array?l.map(O=>r(O)):r(l);const E=this.options.fetch||globalThis.fetch;if(E===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const A={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+A.body),E(this.host,A).then(async O=>{if(O.ok){const Z=await O.json();this.debug&&console.log("RECV << "+JSON.stringify(Z)),Z.error?p(Object.assign(new Error(Z.error.json||Z.error),Z.error)):p(null,Z)}else this.debug&&console.log("ERR << "+JSON.stringify(O)),p(new Error("External error. response code: "+O.status))},O=>{this.debug&&console.log("ERR << "+JSON.stringify(O)),p(O)})}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),p(y)}}},n.Method=Pe,n.Property=xn,n.RequestManager=Se,n.SHHFilter=class extends fl{constructor(l,p){super(l),this.requestManager=l,this.options=p,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(y){return Wh(y)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const l=await this.filterId;return this.requestManager.shh_getMessages(l)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const l=await this.filterId;return this.requestManager.shh_getFilterChanges(l)}async uninstall(){const l=await this.filterId;return this.requestManager.shh_uninstallFilter(l)}},n.SolidityEvent=dl,n.SolidityFunction=Gh,n.WebSocketProvider=class{constructor(l,p={}){this.url=l,this.options=p,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const l=this.connection;this.timeout(new Error("Provider disposed.")),l.then(p=>p.close()).catch(p=>{this.debug&&console.error(p)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){const y=[];let E;if(l instanceof Array)E=Promise.all(l.map(A=>{const O=s();try{const Z=r(A);y.push(Z),this.responseCallbacks.set(Z.id,O)}catch(Z){O.reject(Z)}return O}));else{const A=s();try{const O=r(l);y.push(O),this.responseCallbacks.set(O.id,A)}catch(O){A.reject(O)}E=A}E.then(A=>p(null,A),A=>p(A)),this.connection.then(A=>{y.forEach(O=>{const Z=JSON.stringify(O);this.debug&&console.log("SEND >> "+Z),A.send(Z)})},A=>{p(A)})}parseResponse(l){const p=[];return l.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(y=>{let E=y;this.lastChunk&&(E=this.lastChunk+E);let A=null;try{A=JSON.parse(E)}catch{return this.lastChunk=E,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",A&&p.push(A)}),p}processMessage(l){if("id"in l){const p=l.id,y=this.responseCallbacks.get(p);if(!y)return void console.error("Error: Received a response for an unknown request",l);this.responseCallbacks.delete(p),l.error!==void 0&&l.error!==null?y.reject(Object.assign(new Error(l.error.message||l.error),l.error)):"result"in l&&y.resolve(l)}else this.notificationCallbacks.forEach(p=>p(null,l))}timeout(l){this.connection&&this.connection.isPending||(this.connection=s());const p=l||new Error("Connection timeout");this.responseCallbacks.forEach(y=>y.reject(p)),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 l=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!l)throw new Error("Please provide a WebSocketConstructor");const p=new l(this.url,this.options.protocol);p.onopen=()=>{this.connection.resolve(p)},p.onerror=y=>{const E=new Error("Error in web socket");E.data=y,this.timeout(E)},p.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},p.onmessage=y=>{const E=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(E).forEach(A=>{A instanceof Array?A.forEach(O=>this.processMessage(O)):this.processMessage(A)})}}},n.bytesToHex=pe,n.bytesToUtf8String=we,n.concatBytes=bt,n.default=Se,n.extractDisplayName=en,n.extractTypeName=tn,n.fromAscii=function(l,p=0){let y="";for(let E=0;E<l.length;E++){const A=l.charCodeAt(E).toString(16);y+=A.length<2?"0"+A:A}return"0x"+y.padEnd(p,"0")},n.fromDecimal=nt,n.fromTwosComplement=Pt,n.fromWei=function(l,p){const y=Mt(l).dividedBy(mn(p));return Ir(l)?y:y.toString(10)},n.getAddress=Qe,n.getValueOfUnit=mn,n.hexToBytes=_e,n.inputAddressFormatter=ee,n.inputBlockNumberFormatter=_t,n.inputCallFormatter=Gn,n.inputDefaultBlockNumberFormatter=fr,n.inputFilterOptions=he,n.inputPostFormatter=function(l){return l?(l.ttl=nt(l.ttl),l.workToProve=nt(l.workToProve),l.priority=nt(l.priority),Kn(l.topics)||(l.topics=l.topics?[l.topics]:[]),l.topics=l.topics.map(function(p){return p.indexOf("0x")===0?p:"0x"+pe(se(p))}),l):null},n.inputTransactionFormatter=C,n.inputTransactionId=Jn,n.isAddress=On,n.isArray=Kn,n.isBigNumber=Ir,n.isBloom=function(l){return!!/^(0x)?[0-9a-f]{512}$/i.test(l)&&!!/^(0x)?[0-9a-f]{512}$/i.test(l)},n.isBoolean=xr,n.isChecksumAddress=as,n.isFunction=function(l){return typeof l=="function"},n.isHex=function(l){return typeof l=="string"&&/^0x[0-9a-fA-F]+$/.test(l)},n.isJson=function(l){try{return!!JSON.parse(l)}catch{return!1}},n.isObject=jn,n.isPredefinedBlockNumber=fs,n.isStrictAddress=st,n.isString=no,n.isTopic=function(l){return!!/^(0x)?[0-9a-f]{64}$/i.test(l)&&!!/^(0x)?[0-9a-f]{64}$/i.test(l)},n.isValidResponse=ls,n.outputBigNumberFormatter=io,n.outputBlockFormatter=M,n.outputLogFormatter=W,n.outputPostFormatter=function(l){return l?(l.expiry=ke(l.expiry),l.sent=ke(l.sent),l.ttl=ke(l.ttl),l.workProved=ke(l.workProved),l.topics||(l.topics=[]),l.topics=l.topics.map(function(p){return oe(p)}),l):null},n.outputSyncingFormatter=ge,n.outputTransactionFormatter=_,n.outputTransactionReceiptFormatter=x,n.padLeft=Xe,n.padRight=function(l,p,y){return l+new Array(p-l.length+1).join(y||"0")},n.sha3=le,n.signedIsNegative=nn,n.stringToUtf8Bytes=se,n.toAddress=Ii,n.toArray=Tn,n.toAscii=oe,n.toBatchPayload=function(l){return l.map(function(p){return us(p.method,p.params)})},n.toBigNumber=Mt,n.toBoolean=tt,n.toChecksumAddress=cs,n.toData=mt,n.toDecimal=ke,n.toHex=Ye,n.toJsonRpcRequest=us,n.toNullDecimal=$n,n.toString=dt,n.toStringData=Wt,n.toTwosComplement=Je,n.toWei=function(l,p){const y=Mt(l).times(mn(p));return Ir(l)?y:y.toString(10)},n.transformToFullName=Be,Object.defineProperty(n,"__esModule",{value:!0})})})(_f,_f.exports);var Cu=_f.exports,Ru={};Object.defineProperty(Ru,"__esModule",{value:!0});Ru.SignatureValidator=void 0;const pw=Cu;async function mw(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 pw.ContractFactory(e,n).at(t)}Ru.SignatureValidator=mw;var ly={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=lw;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}})})(ly);var Nu={};Object.defineProperty(Nu,"__esModule",{value:!0});Nu.moveMinutes=void 0;function gw(e){const t=new Date;return t.setMinutes(t.getMinutes()+e),t}Nu.moveMinutes=gw;var wd={};Object.defineProperty(wd,"__esModule",{value:!0});const hs=Cu;class yw{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,hs.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];const o=await this.getBlockWrapper(Math.ceil((r-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(r,o,n),timestamp:r}}async findBetter(t,n,r,i=this.blockTime){if(await this.isBetterBlock(t,n,r))return n.number;const o=t-n.timestamp;let s=Math.ceil(o/i);s===0&&(s=o<0?-1:1);const a=await this.getBlockWrapper(this.getNextBlock(t,n.number,s));return i=Math.abs((n.timestamp-a.timestamp)/(n.number-a.number)),this.findBetter(t,a,r,i)}async isBetterBlock(t,n,r){const i=n.timestamp;if(r){if(i<t)return!1;const o=await this.getBlockWrapper(n.number-1);if(i>=t&&o.timestamp<t)return!0}else{if(i>=t)return!1;const o=await this.getBlockWrapper(n.number+1);if(i<t&&o.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,hs.toBigNumber)(r.number).toNumber(),timestamp:(0,hs.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,hs.toBigNumber)(t==="latest"?await this.requestManager.eth_blockNumber():t).toNumber(),timestamp:(0,hs.toBigNumber)(n).toNumber()},this.requests++,this.savedBlocks[t.toString()]}}wd.default=yw;var hn={},Sd={},fy={},un={};Object.defineProperty(un,"__esModule",{value:!0});un.output=un.exists=un.hash=un.bytes=un.bool=un.number=void 0;function Xc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}un.number=Xc;function dy(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}un.bool=dy;function Ed(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}`)}un.bytes=Ed;function hy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Xc(e.outputLen),Xc(e.blockLen)}un.hash=hy;function py(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")}un.exists=py;function my(e,t){Ed(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}un.output=my;const _w={number:Xc,bool:dy,bytes:Ed,hash:hy,exists:py,output:my};un.default=_w;var Co={},Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.crypto=void 0;Ou.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=Ou,n=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);e.u8=n;const r=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));e.u32=r;const i=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);e.createView=i;const o=(F,Y)=>F<<32-Y|F>>>Y;if(e.rotr=o,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},(F,Y)=>Y.toString(16).padStart(2,"0"));function a(F){if(!(F instanceof Uint8Array))throw new Error("Uint8Array expected");let Y="";for(let D=0;D<F.length;D++)Y+=s[F[D]];return Y}e.bytesToHex=a;function c(F){if(typeof F!="string")throw new TypeError("hexToBytes: expected string, got "+typeof F);if(F.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const Y=new Uint8Array(F.length/2);for(let D=0;D<Y.length;D++){const G=D*2,ae=F.slice(G,G+2),P=Number.parseInt(ae,16);if(Number.isNaN(P)||P<0)throw new Error("Invalid byte sequence");Y[D]=P}return Y}e.hexToBytes=c;const u=async()=>{};e.nextTick=u;async function h(F,Y,D){let G=Date.now();for(let ae=0;ae<F;ae++){D(ae);const P=Date.now()-G;P>=0&&P<Y||(await(0,e.nextTick)(),G+=P)}}e.asyncLoop=h;function d(F){if(typeof F!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof F}`);return new TextEncoder().encode(F)}e.utf8ToBytes=d;function m(F){if(typeof F=="string"&&(F=d(F)),!(F instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof F})`);return F}e.toBytes=m;function g(...F){if(!F.every(G=>G instanceof Uint8Array))throw new Error("Uint8Array list expected");if(F.length===1)return F[0];const Y=F.reduce((G,ae)=>G+ae.length,0),D=new Uint8Array(Y);for(let G=0,ae=0;G<F.length;G++){const P=F[G];D.set(P,ae),ae+=P.length}return D}e.concatBytes=g;class w{clone(){return this._cloneInto()}}e.Hash=w;const T=F=>Object.prototype.toString.call(F)==="[object Object]"&&F.constructor===Object;function L(F,Y){if(Y!==void 0&&(typeof Y!="object"||!T(Y)))throw new TypeError("Options should be object or undefined");return Object.assign(F,Y)}e.checkOpts=L;function U(F){const Y=G=>F().update(m(G)).digest(),D=F();return Y.outputLen=D.outputLen,Y.blockLen=D.blockLen,Y.create=()=>F(),Y}e.wrapConstructor=U;function K(F){const Y=(G,ae)=>F(ae).update(m(G)).digest(),D=F({});return Y.outputLen=D.outputLen,Y.blockLen=D.blockLen,Y.create=G=>F(G),Y}e.wrapConstructorWithOpts=K;function V(F=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(F));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(F).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=V})(Co);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=un,n=Co;class r extends n.Hash{constructor(s,a){super(),this.finished=!1,this.destroyed=!1,t.default.hash(s);const c=(0,n.toBytes)(a);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,h=new Uint8Array(u);h.set(c.length>u?s.create().update(c).digest():c);for(let d=0;d<h.length;d++)h[d]^=54;this.iHash.update(h),this.oHash=s.create();for(let d=0;d<h.length;d++)h[d]^=106;this.oHash.update(h),h.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:a,iHash:c,finished:u,destroyed:h,blockLen:d,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=h,s.blockLen=d,s.outputLen=m,s.oHash=a._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(o,s,a)=>new r(o,s).update(a).digest();e.hmac=i,e.hmac.create=(o,s)=>new r(o,s)})(fy);var Ui={},Mu={};Object.defineProperty(Mu,"__esModule",{value:!0});Mu.SHA2=void 0;const hl=un,ps=Co;function bw(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class vw extends ps.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,ps.createView)(this.buffer)}update(t){hl.default.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=(0,ps.toBytes)(t);const o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const c=(0,ps.createView)(t);for(;i<=o-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){hl.default.exists(this),hl.default.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:o}=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 d=s;d<i;d++)n[d]=0;bw(r,i-8,BigInt(this.length*8),o),this.process(r,0);const a=(0,ps.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,h[d],o)}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:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%n&&t.buffer.set(r),t}}Mu.SHA2=vw;Object.defineProperty(Ui,"__esModule",{value:!0});Ui.sha224=Ui.sha256=void 0;const ww=Mu,Wn=Co,Sw=(e,t,n)=>e&t^~e&n,Ew=(e,t,n)=>e&t^e&n^t&n,Tw=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]),ri=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ii=new Uint32Array(64);class gy extends ww.SHA2{constructor(){super(64,32,8,!1),this.A=ri[0]|0,this.B=ri[1]|0,this.C=ri[2]|0,this.D=ri[3]|0,this.E=ri[4]|0,this.F=ri[5]|0,this.G=ri[6]|0,this.H=ri[7]|0}get(){const{A:t,B:n,C:r,D:i,E:o,F:s,G:a,H:c}=this;return[t,n,r,i,o,s,a,c]}set(t,n,r,i,o,s,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)ii[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const m=ii[d-15],g=ii[d-2],w=(0,Wn.rotr)(m,7)^(0,Wn.rotr)(m,18)^m>>>3,T=(0,Wn.rotr)(g,17)^(0,Wn.rotr)(g,19)^g>>>10;ii[d]=T+ii[d-7]+w+ii[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:h}=this;for(let d=0;d<64;d++){const m=(0,Wn.rotr)(a,6)^(0,Wn.rotr)(a,11)^(0,Wn.rotr)(a,25),g=h+m+Sw(a,c,u)+Tw[d]+ii[d]|0,T=((0,Wn.rotr)(r,2)^(0,Wn.rotr)(r,13)^(0,Wn.rotr)(r,22))+Ew(r,i,o)|0;h=u,u=c,c=a,a=s+g|0,s=o,o=i,i=r,r=g+T|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,i,o,s,a,c,u,h)}roundClean(){ii.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class Iw extends gy{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}}Ui.sha256=(0,Wn.wrapConstructor)(()=>new gy);Ui.sha224=(0,Wn.wrapConstructor)(()=>new Iw);var bf={};(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=fw,n=BigInt(0),r=BigInt(1),i=BigInt(2),o=BigInt(3),s=BigInt(8),a=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=a;const c=(C,_)=>(C+_/i)/_,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(C){const{n:_}=a,x=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),M=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),W=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ee=x,he=BigInt("0x100000000000000000000000000000000"),ge=c(ee*C,_),Me=c(-M*C,_);let Ce=oe(C-ge*x-Me*W,_),We=oe(-ge*M-Me*ee,_);const ct=Ce>he,ut=We>he;if(ct&&(Ce=_-Ce),ut&&(We=_-We),Ce>he||We>he)throw new Error("splitScalarEndo: Endomorphism failed, k="+C);return{k1neg:ct,k1:Ce,k2neg:ut,k2:We}}},h=32,d=32,m=32,g=h+1,w=2*h+1;function T(C){const{a:_,b:x}=a,M=oe(C*C),W=oe(M*C);return oe(W+_*C+x)}const L=a.a===n;class U extends Error{constructor(_){super(_)}}function K(C){if(!(C instanceof V))throw new TypeError("JacobianPoint expected")}class V{constructor(_,x,M){this.x=_,this.y=x,this.z=M}static fromAffine(_){if(!(_ instanceof D))throw new TypeError("JacobianPoint#fromAffine: expected Point");return _.equals(D.ZERO)?V.ZERO:new V(_.x,_.y,r)}static toAffineBatch(_){const x=en(_.map(M=>M.z));return _.map((M,W)=>M.toAffine(x[W]))}static normalizeZ(_){return V.toAffineBatch(_).map(V.fromAffine)}equals(_){K(_);const{x,y:M,z:W}=this,{x:ee,y:he,z:ge}=_,Me=oe(W*W),Ce=oe(ge*ge),We=oe(x*Ce),ct=oe(ee*Me),ut=oe(oe(M*ge)*Ce),$t=oe(oe(he*W)*Me);return We===ct&&ut===$t}negate(){return new V(this.x,oe(-this.y),this.z)}double(){const{x:_,y:x,z:M}=this,W=oe(_*_),ee=oe(x*x),he=oe(ee*ee),ge=_+ee,Me=oe(i*(oe(ge*ge)-W-he)),Ce=oe(o*W),We=oe(Ce*Ce),ct=oe(We-i*Me),ut=oe(Ce*(Me-ct)-s*he),$t=oe(i*x*M);return new V(ct,ut,$t)}add(_){K(_);const{x,y:M,z:W}=this,{x:ee,y:he,z:ge}=_;if(ee===n||he===n)return this;if(x===n||M===n)return _;const Me=oe(W*W),Ce=oe(ge*ge),We=oe(x*Ce),ct=oe(ee*Me),ut=oe(oe(M*ge)*Ce),$t=oe(oe(he*W)*Me),Ft=oe(ct-We),rn=oe($t-ut);if(Ft===n)return rn===n?this.double():V.ZERO;const Zr=oe(Ft*Ft),Ar=oe(Ft*Zr),Qr=oe(We*Zr),oo=oe(rn*rn-Ar-i*Qr),In=oe(rn*(Qr-oo)-ut*Ar),xi=oe(W*ge*Ft);return new V(oo,In,xi)}subtract(_){return this.add(_.negate())}multiplyUnsafe(_){const x=V.ZERO;if(typeof _=="bigint"&&_===n)return x;let M=Xe(_);if(M===r)return this;if(!L){let ct=x,ut=this;for(;M>n;)M&r&&(ct=ct.add(ut)),ut=ut.double(),M>>=r;return ct}let{k1neg:W,k1:ee,k2neg:he,k2:ge}=u.splitScalar(M),Me=x,Ce=x,We=this;for(;ee>n||ge>n;)ee&r&&(Me=Me.add(We)),ge&r&&(Ce=Ce.add(We)),We=We.double(),ee>>=r,ge>>=r;return W&&(Me=Me.negate()),he&&(Ce=Ce.negate()),Ce=new V(oe(Ce.x*u.beta),Ce.y,Ce.z),Me.add(Ce)}precomputeWindow(_){const x=L?128/_+1:256/_+1,M=[];let W=this,ee=W;for(let he=0;he<x;he++){ee=W,M.push(ee);for(let ge=1;ge<2**(_-1);ge++)ee=ee.add(W),M.push(ee);W=ee.double()}return M}wNAF(_,x){!x&&this.equals(V.BASE)&&(x=D.BASE);const M=x&&x._WINDOW_SIZE||1;if(256%M)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let W=x&&Y.get(x);W||(W=this.precomputeWindow(M),x&&M!==1&&(W=V.normalizeZ(W),Y.set(x,W)));let ee=V.ZERO,he=V.BASE;const ge=1+(L?128/M:256/M),Me=2**(M-1),Ce=BigInt(2**M-1),We=2**M,ct=BigInt(M);for(let ut=0;ut<ge;ut++){const $t=ut*Me;let Ft=Number(_&Ce);_>>=ct,Ft>Me&&(Ft-=We,_+=r);const rn=$t,Zr=$t+Math.abs(Ft)-1,Ar=ut%2!==0,Qr=Ft<0;Ft===0?he=he.add(F(Ar,W[rn])):ee=ee.add(F(Qr,W[Zr]))}return{p:ee,f:he}}multiply(_,x){let M=Xe(_),W,ee;if(L){const{k1neg:he,k1:ge,k2neg:Me,k2:Ce}=u.splitScalar(M);let{p:We,f:ct}=this.wNAF(ge,x),{p:ut,f:$t}=this.wNAF(Ce,x);We=F(he,We),ut=F(Me,ut),ut=new V(oe(ut.x*u.beta),ut.y,ut.z),W=We.add(ut),ee=ct.add($t)}else{const{p:he,f:ge}=this.wNAF(M,x);W=he,ee=ge}return V.normalizeZ([W,ee])[0]}toAffine(_){const{x,y:M,z:W}=this,ee=this.equals(V.ZERO);_==null&&(_=ee?s:vt(W));const he=_,ge=oe(he*he),Me=oe(ge*he),Ce=oe(x*ge),We=oe(M*Me),ct=oe(W*he);if(ee)return D.ZERO;if(ct!==r)throw new Error("invZ was invalid");return new D(Ce,We)}}V.BASE=new V(a.Gx,a.Gy,r),V.ZERO=new V(n,r,n);function F(C,_){const x=_.negate();return C?x:_}const Y=new WeakMap;class D{constructor(_,x){this.x=_,this.y=x}_setWindowSize(_){this._WINDOW_SIZE=_,Y.delete(this)}hasEvenY(){return this.y%i===n}static fromCompressedHex(_){const x=_.length===32,M=le(x?_:_.subarray(1));if(!tt(M))throw new Error("Point is not on curve");const W=T(M);let ee=bt(W);const he=(ee&r)===r;x?he&&(ee=oe(-ee)):(_[0]&1)===1!==he&&(ee=oe(-ee));const ge=new D(M,ee);return ge.assertValidity(),ge}static fromUncompressedHex(_){const x=le(_.subarray(1,h+1)),M=le(_.subarray(h+1,h*2+1)),W=new D(x,M);return W.assertValidity(),W}static fromHex(_){const x=be(_),M=x.length,W=x[0];if(M===h)return this.fromCompressedHex(x);if(M===g&&(W===2||W===3))return this.fromCompressedHex(x);if(M===w&&W===4)return this.fromUncompressedHex(x);throw new Error(`Point.fromHex: received invalid point. Expected 32-${g} compressed bytes or ${w} uncompressed bytes, not ${M}`)}static fromPrivateKey(_){return D.BASE.multiply(Ye(_))}static fromSignature(_,x,M){const{r:W,s:ee}=Mt(x);if(![0,1,2,3].includes(M))throw new Error("Cannot recover: invalid recovery bit");const he=$n(be(_)),{n:ge}=a,Me=M===2||M===3?W+ge:W,Ce=vt(Me,ge),We=oe(-he*Ce,ge),ct=oe(ee*Ce,ge),ut=M&1?"03":"02",$t=D.fromHex(ut+fe(Me)),Ft=D.BASE.multiplyAndAddUnsafe($t,We,ct);if(!Ft)throw new Error("Cannot recover signature: point at infinify");return Ft.assertValidity(),Ft}toRawBytes(_=!1){return pe(this.toHex(_))}toHex(_=!1){const x=fe(this.x);return _?`${this.hasEvenY()?"02":"03"}${x}`:`04${x}${fe(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const _="Point is not on elliptic curve",{x,y:M}=this;if(!tt(x)||!tt(M))throw new Error(_);const W=oe(M*M),ee=T(x);if(oe(W-ee)!==n)throw new Error(_)}equals(_){return this.x===_.x&&this.y===_.y}negate(){return new D(this.x,oe(-this.y))}double(){return V.fromAffine(this).double().toAffine()}add(_){return V.fromAffine(this).add(V.fromAffine(_)).toAffine()}subtract(_){return this.add(_.negate())}multiply(_){return V.fromAffine(this).multiply(_,this).toAffine()}multiplyAndAddUnsafe(_,x,M){const W=V.fromAffine(this),ee=x===n||x===r||this!==D.BASE?W.multiplyUnsafe(x):W.multiply(x),he=V.fromAffine(_).multiplyUnsafe(M),ge=ee.add(he);return ge.equals(V.ZERO)?void 0:ge.toAffine()}}e.Point=D,D.BASE=new D(a.Gx,a.Gy),D.ZERO=new D(n,n);function G(C){return Number.parseInt(C[0],16)>=8?"00"+C:C}function ae(C){if(C.length<2||C[0]!==2)throw new Error(`Invalid signature integer tag: ${se(C)}`);const _=C[1],x=C.subarray(2,_+2);if(!_||x.length!==_)throw new Error("Invalid signature integer: wrong length");if(x[0]===0&&x[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:le(x),left:C.subarray(_+2)}}function P(C){if(C.length<2||C[0]!=48)throw new Error(`Invalid signature tag: ${se(C)}`);if(C[1]!==C.length-2)throw new Error("Invalid signature: incorrect length");const{data:_,left:x}=ae(C.subarray(2)),{data:M,left:W}=ae(x);if(W.length)throw new Error(`Invalid signature: left bytes after parsing: ${se(W)}`);return{r:_,s:M}}class j{constructor(_,x){this.r=_,this.s=x,this.assertValidity()}static fromCompact(_){const x=_ instanceof Uint8Array,M="Signature.fromCompact";if(typeof _!="string"&&!x)throw new TypeError(`${M}: Expected string or Uint8Array`);const W=x?se(_):_;if(W.length!==128)throw new Error(`${M}: Expected 64-byte hex`);return new j(_e(W.slice(0,64)),_e(W.slice(64,128)))}static fromDER(_){const x=_ instanceof Uint8Array;if(typeof _!="string"&&!x)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:M,s:W}=P(x?_:pe(_));return new j(M,W)}static fromHex(_){return this.fromDER(_)}assertValidity(){const{r:_,s:x}=this;if(!Wt(_))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Wt(x))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const _=a.n>>r;return this.s>_}normalizeS(){return this.hasHighS()?new j(this.r,oe(-this.s,a.n)):this}toDERRawBytes(){return pe(this.toDERHex())}toDERHex(){const _=G(Q(this.s)),x=G(Q(this.r)),M=_.length/2,W=x.length/2,ee=Q(M),he=Q(W);return`30${Q(W+M+4)}02${he}${x}02${ee}${_}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return pe(this.toCompactHex())}toCompactHex(){return fe(this.r)+fe(this.s)}}e.Signature=j;function z(...C){if(!C.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(C.length===1)return C[0];const _=C.reduce((M,W)=>M+W.length,0),x=new Uint8Array(_);for(let M=0,W=0;M<C.length;M++){const ee=C[M];x.set(ee,W),W+=ee.length}return x}const X=Array.from({length:256},(C,_)=>_.toString(16).padStart(2,"0"));function se(C){if(!(C instanceof Uint8Array))throw new Error("Expected Uint8Array");let _="";for(let x=0;x<C.length;x++)_+=X[C[x]];return _}const we=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function fe(C){if(typeof C!="bigint")throw new Error("Expected bigint");if(!(n<=C&&C<we))throw new Error("Expected number 0 <= n < 2^256");return C.toString(16).padStart(64,"0")}function ce(C){const _=pe(fe(C));if(_.length!==32)throw new Error("Error: expected 32 bytes");return _}function Q(C){const _=C.toString(16);return _.length&1?`0${_}`:_}function _e(C){if(typeof C!="string")throw new TypeError("hexToNumber: expected string, got "+typeof C);return BigInt(`0x${C}`)}function pe(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 _=new Uint8Array(C.length/2);for(let x=0;x<_.length;x++){const M=x*2,W=C.slice(M,M+2),ee=Number.parseInt(W,16);if(Number.isNaN(ee)||ee<0)throw new Error("Invalid byte sequence");_[x]=ee}return _}function le(C){return _e(se(C))}function be(C){return C instanceof Uint8Array?Uint8Array.from(C):pe(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 oe(C,_=a.P){const x=C%_;return x>=n?x:_+x}function Be(C,_){const{P:x}=a;let M=C;for(;_-- >n;)M*=M,M%=x;return M}function bt(C){const{P:_}=a,x=BigInt(6),M=BigInt(11),W=BigInt(22),ee=BigInt(23),he=BigInt(44),ge=BigInt(88),Me=C*C*C%_,Ce=Me*Me*C%_,We=Be(Ce,o)*Ce%_,ct=Be(We,o)*Ce%_,ut=Be(ct,i)*Me%_,$t=Be(ut,M)*ut%_,Ft=Be($t,W)*$t%_,rn=Be(Ft,he)*Ft%_,Zr=Be(rn,ge)*rn%_,Ar=Be(Zr,he)*Ft%_,Qr=Be(Ar,o)*Ce%_,oo=Be(Qr,ee)*$t%_,In=Be(oo,x)*Me%_,xi=Be(In,i);if(xi*xi%_!==C)throw new Error("Cannot find square root");return xi}function vt(C,_=a.P){if(C===n||_<=n)throw new Error(`invert: expected positive integers, got n=${C} mod=${_}`);let x=oe(C,_),M=_,W=n,ee=r;for(;x!==n;){const ge=M/x,Me=M%x,Ce=W-ee*ge;M=x,x=Me,W=ee,ee=Ce}if(M!==r)throw new Error("invert: does not exist");return oe(W,_)}function en(C,_=a.P){const x=new Array(C.length),M=C.reduce((ee,he,ge)=>he===n?ee:(x[ge]=ee,oe(ee*he,_)),r),W=vt(M,_);return C.reduceRight((ee,he,ge)=>he===n?ee:(x[ge]=oe(ee*x[ge],_),oe(ee*he,_)),W),x}function tn(C){const _=C.length*8-d*8,x=le(C);return _>0?x>>BigInt(_):x}function $n(C,_=!1){const x=tn(C);if(_)return x;const{n:M}=a;return x>=M?x-M:x}let ke,dt;class mt{constructor(_,x){if(this.hashLen=_,this.qByteLen=x,typeof _!="number"||_<2)throw new Error("hashLen must be a number");if(typeof x!="number"||x<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(_).fill(1),this.k=new Uint8Array(_).fill(0),this.counter=0}hmac(..._){return e.utils.hmacSha256(this.k,..._)}hmacSync(..._){return dt(this.k,..._)}checkSync(){if(typeof dt!="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(_=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),_),this.v=await this.hmac(this.v),_.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),_),this.v=await this.hmac(this.v))}reseedSync(_=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),_),this.v=this.hmacSync(this.v),_.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),_),this.v=this.hmacSync(this.v))}async generate(){this.incr();let _=0;const x=[];for(;_<this.qByteLen;){this.v=await this.hmac(this.v);const M=this.v.slice();x.push(M),_+=this.v.length}return z(...x)}generateSync(){this.checkSync(),this.incr();let _=0;const x=[];for(;_<this.qByteLen;){this.v=this.hmacSync(this.v);const M=this.v.slice();x.push(M),_+=this.v.length}return z(...x)}}function Wt(C){return n<C&&C<a.n}function tt(C){return n<C&&C<a.P}function nt(C,_,x,M=!0){const{n:W}=a,ee=$n(C,!0);if(!Wt(ee))return;const he=vt(ee,W),ge=D.BASE.multiply(ee),Me=oe(ge.x,W);if(Me===n)return;const Ce=oe(he*oe(_+x*Me,W),W);if(Ce===n)return;let We=new j(Me,Ce),ct=(ge.x===We.r?0:2)|Number(ge.y&r);return M&&We.hasHighS()&&(We=We.normalizeS(),ct^=1),{sig:We,recovery:ct}}function Ye(C){let _;if(typeof C=="bigint")_=C;else if(typeof C=="number"&&Number.isSafeInteger(C)&&C>0)_=BigInt(C);else if(typeof C=="string"){if(C.length!==2*d)throw new Error("Expected 32 bytes of private key");_=_e(C)}else if(C instanceof Uint8Array){if(C.length!==d)throw new Error("Expected 32 bytes of private key");_=le(C)}else throw new TypeError("Expected valid private key");if(!Wt(_))throw new Error("Expected private key: 0 < key < n");return _}function mn(C){return C instanceof D?(C.assertValidity(),C):D.fromHex(C)}function Mt(C){if(C instanceof j)return C.assertValidity(),C;try{return j.fromDER(C)}catch{return j.fromCompact(C)}}function Kr(C,_=!1){return D.fromPrivateKey(C).toRawBytes(_)}e.getPublicKey=Kr;function Je(C,_,x,M=!1){return D.fromSignature(C,_,x).toRawBytes(M)}e.recoverPublicKey=Je;function nn(C){const _=C instanceof Uint8Array,x=typeof C=="string",M=(_||x)&&C.length;return _?M===g||M===w:x?M===g*2||M===w*2:C instanceof D}function Qe(C,_,x=!1){if(nn(C))throw new TypeError("getSharedSecret: first arg must be private key");if(!nn(_))throw new TypeError("getSharedSecret: second arg must be public key");const M=mn(_);return M.assertValidity(),M.multiply(Ye(C)).toRawBytes(x)}e.getSharedSecret=Qe;function Pt(C){const _=C.length>h?C.slice(0,h):C;return le(_)}function st(C){const _=Pt(C),x=oe(_,a.n);return On(x<n?_:x)}function On(C){return ce(C)}function as(C,_,x){if(C==null)throw new Error(`sign: expected valid message hash, not "${C}"`);const M=be(C),W=Ye(_),ee=[On(W),st(M)];if(x!=null){x===!0&&(x=e.utils.randomBytes(h));const Me=be(x);if(Me.length!==h)throw new Error(`sign: Expected ${h} bytes of extra data`);ee.push(Me)}const he=z(...ee),ge=Pt(M);return{seed:he,m:ge,d:W}}function cs(C,_){const{sig:x,recovery:M}=C,{der:W,recovered:ee}=Object.assign({canonical:!0,der:!0},_),he=W?x.toDERRawBytes():x.toCompactRawBytes();return ee?[he,M]:he}async function Tn(C,_,x={}){const{seed:M,m:W,d:ee}=as(C,_,x.extraEntropy),he=new mt(m,d);await he.reseed(M);let ge;for(;!(ge=nt(await he.generate(),W,ee,x.canonical));)await he.reseed();return cs(ge,x)}e.sign=Tn;function Ii(C,_,x={}){const{seed:M,m:W,d:ee}=as(C,_,x.extraEntropy),he=new mt(m,d);he.reseedSync(M);let ge;for(;!(ge=nt(he.generateSync(),W,ee,x.canonical));)he.reseedSync();return cs(ge,x)}e.signSync=Ii;const Ir={strict:!0};function no(C,_,x,M=Ir){let W;try{W=Mt(C),_=be(_)}catch{return!1}const{r:ee,s:he}=W;if(M.strict&&W.hasHighS())return!1;const ge=$n(_);let Me;try{Me=mn(x)}catch{return!1}const{n:Ce}=a,We=vt(he,Ce),ct=oe(ge*We,Ce),ut=oe(ee*We,Ce),$t=D.BASE.multiplyAndAddUnsafe(Me,ct,ut);return $t?oe($t.x,Ce)===ee:!1}e.verify=no;function jn(C){return oe(le(C),a.n)}class xr{constructor(_,x){this.r=_,this.s=x,this.assertValidity()}static fromHex(_){const x=be(_);if(x.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${x.length}`);const M=le(x.subarray(0,32)),W=le(x.subarray(32,64));return new xr(M,W)}assertValidity(){const{r:_,s:x}=this;if(!tt(_)||!Wt(x))throw new Error("Invalid signature")}toHex(){return fe(this.r)+fe(this.s)}toRawBytes(){return pe(this.toHex())}}function Kn(C){return D.fromPrivateKey(C).toRawX()}class ro{constructor(_,x,M=e.utils.randomBytes()){if(_==null)throw new TypeError(`sign: Expected valid message, not "${_}"`);this.m=be(_);const{x:W,scalar:ee}=this.getScalar(Ye(x));if(this.px=W,this.d=ee,this.rand=be(M),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(_){const x=D.fromPrivateKey(_),M=x.hasEvenY()?_:a.n-_;return{point:x,scalar:M,x:x.toRawX()}}initNonce(_,x){return ce(_^le(x))}finalizeNonce(_){const x=oe(le(_),a.n);if(x===n)throw new Error("sign: Creation of signature failed. k is zero");const{point:M,x:W,scalar:ee}=this.getScalar(x);return{R:M,rx:W,k:ee}}finalizeSig(_,x,M,W){return new xr(_.x,oe(x+M*W,a.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:_,d:x,px:M,rand:W}=this,ee=e.utils.taggedHash,he=this.initNonce(x,await ee(Gn.aux,W)),{R:ge,rx:Me,k:Ce}=this.finalizeNonce(await ee(Gn.nonce,he,M,_)),We=jn(await ee(Gn.challenge,Me,M,_)),ct=this.finalizeSig(ge,Ce,We,x);return await fs(ct,_,M)||this.error(),ct}calcSync(){const{m:_,d:x,px:M,rand:W}=this,ee=e.utils.taggedHashSync,he=this.initNonce(x,ee(Gn.aux,W)),{R:ge,rx:Me,k:Ce}=this.finalizeNonce(ee(Gn.nonce,he,M,_)),We=jn(ee(Gn.challenge,Me,M,_)),ct=this.finalizeSig(ge,Ce,We,x);return fr(ct,_,M)||this.error(),ct}}async function Jr(C,_,x){return new ro(C,_,x).calc()}function us(C,_,x){return new ro(C,_,x).calcSync()}function ls(C,_,x){const M=C instanceof xr,W=M?C:xr.fromHex(C);return M&&W.assertValidity(),{...W,m:be(_),P:mn(x)}}function io(C,_,x,M){const W=D.BASE.multiplyAndAddUnsafe(_,Ye(x),oe(-M,a.n));return!(!W||!W.hasEvenY()||W.x!==C)}async function fs(C,_,x){try{const{r:M,s:W,m:ee,P:he}=ls(C,_,x),ge=jn(await e.utils.taggedHash(Gn.challenge,ce(M),he.toRawX(),ee));return io(M,he,W,ge)}catch{return!1}}function fr(C,_,x){try{const{r:M,s:W,m:ee,P:he}=ls(C,_,x),ge=jn(e.utils.taggedHashSync(Gn.challenge,ce(M),he.toRawX(),ee));return io(M,he,W,ge)}catch(M){if(M instanceof U)throw M;return!1}}e.schnorr={Signature:xr,getPublicKey:Kn,sign:Jr,verify:fs,signSync:us,verifySync:fr},D.BASE._setWindowSize(8);const _t={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Gn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Jn={};e.utils={bytesToHex:se,hexToBytes:pe,concatBytes:z,mod:oe,invert:vt,isValidPrivateKey(C){try{return Ye(C),!0}catch{return!1}},_bigintTo32Bytes:ce,_normalizePrivateKey:Ye,hashToPrivateKey:C=>{C=be(C);const _=d+8;if(C.length<_||C.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const x=oe(le(C),a.n-r)+r;return ce(x)},randomBytes:(C=32)=>{if(_t.web)return _t.web.getRandomValues(new Uint8Array(C));if(_t.node){const{randomBytes:_}=_t.node;return Uint8Array.from(_(C))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(d+8)),precompute(C=8,_=D.BASE){const x=_===D.BASE?_:new D(_.x,_.y);return x._setWindowSize(C),x.multiply(o),x},sha256:async(...C)=>{if(_t.web){const _=await _t.web.subtle.digest("SHA-256",z(...C));return new Uint8Array(_)}else if(_t.node){const{createHash:_}=_t.node,x=_("sha256");return C.forEach(M=>x.update(M)),Uint8Array.from(x.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(C,..._)=>{if(_t.web){const x=await _t.web.subtle.importKey("raw",C,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),M=z(..._),W=await _t.web.subtle.sign("HMAC",x,M);return new Uint8Array(W)}else if(_t.node){const{createHmac:x}=_t.node,M=x("sha256",C);return _.forEach(W=>M.update(W)),Uint8Array.from(M.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(C,..._)=>{let x=Jn[C];if(x===void 0){const M=await e.utils.sha256(Uint8Array.from(C,W=>W.charCodeAt(0)));x=z(M,M),Jn[C]=x}return e.utils.sha256(x,..._)},taggedHashSync:(C,..._)=>{if(typeof ke!="function")throw new U("sha256Sync is undefined, you need to set it");let x=Jn[C];if(x===void 0){const M=ke(Uint8Array.from(C,W=>W.charCodeAt(0)));x=z(M,M),Jn[C]=x}return ke(x,..._)},_JacobianPoint:V},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return ke},set(C){ke||(ke=C)}},hmacSha256Sync:{configurable:!1,get(){return dt},set(C){dt||(dt=C)}}})})(bf);(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=fy,n=Ui,r=bf;var i=bf;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=(o,...s)=>{const a=t.hmac.create(n.sha256,o);return s.forEach(c=>a.update(c)),a.digest()}})(Sd);var Ve={};function Vh(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 Yc={exports:{}};Yc.exports;(function(e,t){var n=qe&&qe.__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(un),i=Co,o=r.default.bool;t.assertBool=o;const s=r.default.bytes;t.assertBytes=s;var a=Co;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return a.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return a.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return a.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 h(m,g){if(m.length!==g.length)return!1;for(let w=0;w<m.length;w++)if(m[w]!==g[w])return!1;return!0}t.equalsBytes=h;function d(m){return g=>(r.default.bytes(g),m(g))}t.wrapHash=d,t.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,g=typeof Vh=="function"&&Vh.bind(e);return{node:g&&!m?g("crypto"):void 0,web:m}})()})(Yc,Yc.exports);var xw=Yc.exports,Aw=qe&&qe.__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]}),kw=qe&&qe.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Cw=qe&&qe.__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)&&Aw(t,e,n);return kw(t,e),t};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.contextRandomize=Ve.ecdh=Ve.signatureNormalize=Ve.signatureImport=Ve.signatureExport=Ve.privateKeyTweakMul=Ve.publicKeyTweakMul=Ve.publicKeyTweakAdd=Ve.publicKeyCombine=Ve.publicKeyNegate=Ve.privateKeyNegate=Ve.privateKeyTweakAdd=Ve.ecdsaVerify=Ve.ecdsaRecover=Ve.ecdsaSign=Ve.publicKeyConvert=Ve.publicKeyVerify=Ve.publicKeyCreate=Ve.privateKeyVerify=Ve.createPrivateKey=Ve.createPrivateKeySync=void 0;const Rw=Ui,Dt=Cw(Sd),Ge=xw;function Nw(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const pi=e=>Nw((0,Ge.toHex)(e)),Pu=e=>e.toString(16).padStart(64,"0"),vf=e=>(0,Ge.hexToBytes)(Pu(e)),{mod:yy}=Dt.utils,rr=Dt.CURVE.n;function Vn(e=r=>new Uint8Array(r),t,n){return typeof e=="function"&&(e=e(t)),(0,Ge.assertBytes)(e,t),n&&e.set(n),e}function Os(e){return(0,Ge.assertBytes)(e,64),Dt.Signature.fromCompact(e)}function _y(){return Dt.utils.randomPrivateKey()}Ve.createPrivateKeySync=_y;async function Ow(){return _y()}Ve.createPrivateKey=Ow;function Mw(e){return(0,Ge.assertBytes)(e,32),Dt.utils.isValidPrivateKey(e)}Ve.privateKeyVerify=Mw;function Pw(e,t=!0,n){(0,Ge.assertBytes)(e,32),(0,Ge.assertBool)(t);const r=Dt.getPublicKey(e,t);return Vn(n,t?33:65,r)}Ve.publicKeyCreate=Pw;function Lw(e){(0,Ge.assertBytes)(e,33,65);try{return Dt.Point.fromHex(e),!0}catch{return!1}}Ve.publicKeyVerify=Lw;function Dw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Dt.Point.fromHex(e).toRawBytes(t);return Vn(n,t?33:65,r)}Ve.publicKeyConvert=Dw;function Bw(e,t,n={noncefn:void 0,data:void 0},r){if((0,Ge.assertBytes)(e,32),(0,Ge.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,o]=Dt.signSync(e,t,{recovered:!0,der:!1});return{signature:Vn(r,64,i),recid:o}}Ve.ecdsaSign=Bw;function Fw(e,t,n,r=!0,i){(0,Ge.assertBytes)(n,32),(0,Ge.assertBool)(r);const o=Os(e).toHex(),s=Dt.Point.fromSignature(n,o,t);return Vn(i,r?33:65,s.toRawBytes(r))}Ve.ecdsaRecover=Fw;function Hw(e,t,n){(0,Ge.assertBytes)(e,64),(0,Ge.assertBytes)(t,32),(0,Ge.assertBytes)(n,33,65),(0,Ge.assertBytes)(e,64);const r=pi(e.slice(0,32)),i=pi(e.slice(32,64));if(r>=rr||i>=rr)throw new Error("Cannot parse signature");const o=Dt.Point.fromHex(n);let s;try{s=Os(e)}catch{return!1}return Dt.verify(s,t,o)}Ve.ecdsaVerify=Hw;function Uw(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);let n=pi(t);if(n===0n)throw new Error("Tweak must not be zero");if(n>=rr)throw new Error("Tweak bigger than curve order");if(n+=pi(e),n>=rr&&(n-=rr),n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Pu(n))),e}Ve.privateKeyTweakAdd=Uw;function $w(e){(0,Ge.assertBytes)(e,32);const t=yy(-pi(e),rr);return e.set((0,Ge.hexToBytes)(Pu(t))),e}Ve.privateKeyNegate=$w;function jw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Dt.Point.fromHex(e).negate();return Vn(n,t?33:65,r.toRawBytes(t))}Ve.publicKeyNegate=jw;function Gw(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,Ge.assertBytes)(i,33,65);(0,Ge.assertBool)(t);const r=e.map(i=>Dt.Point.fromHex(i)).reduce((i,o)=>i.add(o),Dt.Point.ZERO);if(r.equals(Dt.Point.ZERO))throw new Error("Combined result must not be zero");return Vn(n,t?33:65,r.toRawBytes(t))}Ve.publicKeyCombine=Gw;function Ww(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=Dt.Point.fromHex(e),o=Dt.Point.fromPrivateKey(t),s=i.add(o);if(o.equals(Dt.Point.ZERO)||s.equals(Dt.Point.ZERO))throw new Error("Tweak must not be zero");return Vn(r,n?33:65,s.toRawBytes(n))}Ve.publicKeyTweakAdd=Ww;function zw(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=pi(t);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=rr)throw new Error("Tweak is zero or bigger than curve order");const o=Dt.Point.fromHex(e).multiply(i);return Vn(r,n?33:65,o.toRawBytes(n))}Ve.publicKeyTweakMul=zw;function Vw(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);const n=pi(t);if(n<=1||n>=rr)throw new Error("Tweak is zero or bigger than curve order");const r=yy(n*pi(e),rr);if(r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Pu(r))),e}Ve.privateKeyTweakMul=Vw;function qw(e,t){const n=Os(e).toRawBytes();return Vn(t,72,Os(e).toRawBytes()).slice(0,n.length)}Ve.signatureExport=qw;function Xw(e,t){(0,Ge.assertBytes)(e);const n=Dt.Signature.fromDER(e);return Vn(t,64,(0,Ge.hexToBytes)(n.toCompactHex()))}Ve.signatureImport=Xw;function Yw(e){const t=Os(e);return t.s>rr/2n&&e.set(vf(rr-t.s),32),e}Ve.signatureNormalize=Yw;function Kw(e,t,n={},r){if((0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdh: options should be object");n.data!==void 0&&(0,Ge.assertBytes)(n.data);const i=Dt.Point.fromHex(Dt.getSharedSecret(t,e));if(n.hashfn===void 0)return Vn(r,32,(0,Rw.sha256)(i.toRawBytes(!0)));if(typeof n.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");n.xbuf!==void 0&&(0,Ge.assertBytes)(n.xbuf,32),n.ybuf!==void 0&&(0,Ge.assertBytes)(n.ybuf,32),(0,Ge.assertBytes)(r,32);const o=n.xbuf||new Uint8Array(32);o.set(vf(i.x));const s=n.ybuf||new Uint8Array(32);s.set(vf(i.y));const a=n.hashfn(o,s,n.data);if(!(a instanceof Uint8Array)||a.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return Vn(r,32,a)}Ve.ecdh=Kw;function Jw(e){e!==null&&(0,Ge.assertBytes)(e,32)}Ve.contextRandomize=Jw;Object.defineProperty(hn,"__esModule",{value:!0});hn.createUnsafeIdentity=hn.computeAddress=hn.ethSign=hn.createEthereumMessageHash=hn.sign=hn.recoverAddressFromEthSignature=hn.recoverPublicKey=void 0;const Dn=Cu,qh=Sd,by=Ve;function vy(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,by.ecdsaRecover)(n,r,t,!1).slice(1)}hn.recoverPublicKey=vy;function Zw(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 wy(e,t){if(typeof e=="string"){if((0,Dn.isHex)(e))return wy((0,Dn.hexToBytes)(e),t);throw new Error("String signatures must be encoded in hex")}return Id(vy(Zw(e),Td(t)))}hn.recoverAddressFromEthSignature=wy;function Sy(e,t){const n=(0,by.ecdsaSign)(t,e),r=n.recid===1?"1c":"1b";return(0,Dn.toHex)(n.signature)+r}hn.sign=Sy;function Td(e){const t=typeof e=="string"?(0,Dn.stringToUtf8Bytes)(e):e,n=(0,Dn.concatBytes)((0,Dn.stringToUtf8Bytes)(`Ethereum Signed Message:
14
+ `),(0,Dn.stringToUtf8Bytes)(String(t.length)),t);return(0,Dn.hexToBytes)((0,Dn.sha3)(n))}hn.createEthereumMessageHash=Td;function Qw(e,t){return Sy(e,Td(t))}hn.ethSign=Qw;function Id(e){const t=e.length===65&&e[0]===4?e.slice(1):e;return(0,Dn.getAddress)((0,Dn.sha3)(t).substring(24))}hn.computeAddress=Id;function eS(){const e=qh.utils.randomPrivateKey(),t=(0,qh.getPublicKey)(e).slice(1),n=Id(t);return{privateKey:(0,Dn.bytesToHex)(e),publicKey:(0,Dn.bytesToHex)(t),address:n}}hn.createUnsafeIdentity=eS;(function(e){var t=qe&&qe.__createBinding||(Object.create?function(P,j,z,X){X===void 0&&(X=z);var se=Object.getOwnPropertyDescriptor(j,z);(!se||("get"in se?!j.__esModule:se.writable||se.configurable))&&(se={enumerable:!0,get:function(){return j[z]}}),Object.defineProperty(P,X,se)}:function(P,j,z,X){X===void 0&&(X=z),P[X]=j[z]}),n=qe&&qe.__setModuleDefault||(Object.create?function(P,j){Object.defineProperty(P,"default",{enumerable:!0,value:j})}:function(P,j){P.default=j}),r=qe&&qe.__importStar||function(P){if(P&&P.__esModule)return P;var j={};if(P!=null)for(var z in P)z!=="default"&&Object.prototype.hasOwnProperty.call(P,z)&&t(j,P,z);return n(j,P),j},i=qe&&qe.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};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 o=r(Cu),s=Ru,a=ly,c=Nu,u=i(wd),h=hn;e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;var m;(function(P){async function j(le,be,Xe,oe=Date.now()){let Be="";if(!P.isValidAuthChain(be))return{ok:!1,message:"ERROR: Malformed authChain"};for(const vt of be){const en=ae(vt.type);try{const{nextAuthority:tn}=await en(Be,vt,{provider:Xe,dateToValidateExpirationInMillis:oe});Be=tn||""}catch(tn){return{ok:!1,message:`ERROR. Link type: ${vt.type}. ${tn.message}.`}}}const bt=Be===le;return{ok:bt,message:bt?void 0:`ERROR: Invalid final authority. Expected: ${le}. Current ${Be}.`}}P.validateSignature=j;function z(le){for(const[be,Xe]of le.entries())if(be===0&&Xe.type!==a.AuthLinkType.SIGNER||Xe.type===a.AuthLinkType.SIGNER&&be!==0)return!1;return!0}P.isValidAuthChain=z;function X(le){return(0,o.hexToBytes)((0,o.sha3)((0,o.stringToUtf8Bytes)(le)))}P.createEIP1271MessageHash=X;function se(le,be,Xe){return[{type:a.AuthLinkType.SIGNER,payload:be,signature:""},{type:F(Xe),payload:le,signature:Xe}]}P.createSimpleAuthChain=se;function we(le,be,Xe,oe){const Be=(0,c.moveMinutes)(Xe),bt=P.getEphemeralMessage(be.address,Be),vt=P.createSignature(le,bt),en=P.createSignature(be,oe);return[{type:a.AuthLinkType.SIGNER,payload:le.address,signature:""},{type:a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:bt,signature:vt},{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:oe,signature:en}]}P.createAuthChain=we;async function fe(le,be,Xe,oe){const Be=new Date;Be.setMinutes(Be.getMinutes()+Xe);const bt=P.getEphemeralMessage(be.address,Be),vt=await oe(bt),en=[{type:a.AuthLinkType.SIGNER,payload:le,signature:""},{type:V(vt),payload:bt,signature:vt}];return{ephemeralIdentity:be,expiration:Be,authChain:en}}P.initializeAuthChain=fe;function ce(le,be){const Xe=P.createSignature(le.ephemeralIdentity,be);return[...le.authChain,{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:be,signature:Xe}]}P.signPayload=ce,P.createEthereumMessageHash=h.createEthereumMessageHash;function Q(le,be){return(0,h.ethSign)((0,o.hexToBytes)(le.privateKey),be)}P.createSignature=Q;function _e(le){return le.length>0&&le[0].type===a.AuthLinkType.SIGNER?le[0].payload:"Invalid-Owner-Address"}P.ownerAddress=_e;function pe(le,be){return`Decentraland Login
15
+ Ephemeral address: ${le}
16
+ Expiration: ${be.toISOString()}`}P.getEphemeralMessage=pe})(m=e.Authenticator||(e.Authenticator={}));const g=async(P,j)=>({nextAuthority:j.payload});e.SIGNER_VALIDATOR=g;const w=async(P,j)=>{if(!j.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const z=(0,h.recoverAddressFromEthSignature)(j.signature,j.payload),X=P.toLocaleLowerCase(),se=z.toLocaleLowerCase();if(X===se)return{nextAuthority:j.payload};throw new Error(`Invalid signer address. Expected: ${X}. Actual: ${se}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=w;const T=async(P,j,z)=>{if(!j.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:X,ephemeralAddress:se,expiration:we}=Y(j.payload),fe=z.dateToValidateExpirationInMillis?z.dateToValidateExpirationInMillis:Date.now();if(we>fe){const ce=(0,h.recoverAddressFromEthSignature)(j.signature,X),Q=P.toLocaleLowerCase(),_e=ce.toLocaleLowerCase();if(Q===_e)return{nextAuthority:se};throw new Error(`Invalid signer address. Expected: ${Q}. Actual: ${_e}`)}throw new Error(`Ephemeral key expired. Expiration: ${we}. Test: ${fe}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=T;const L=async(P,j,z)=>{if(!j.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:X,ephemeralAddress:se,expiration:we}=Y(j.payload),fe=z?.dateToValidateExpirationInMillis?z?.dateToValidateExpirationInMillis:Date.now();if(we>fe&&await G(z.provider,P,X,j.signature,fe))return{nextAuthority:se};throw new Error(`Ephemeral key expired. Expiration: ${we}. Test: ${fe}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=L;const U=async(P,j,z)=>{if(!j.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await G(z.provider,P,j.payload,j.signature,z.dateToValidateExpirationInMillis))return{nextAuthority:j.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=U;const K=async(P,j)=>({error:"Error Validator."});function V(P){return P.length===d?a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:a.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=V;function F(P){return P.length===d?a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:a.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=F;function Y(P){const j=P.replace(/\r/g,""),z=j.split(`
17
+ `),X=z[1].substring(19),se=z[2].substring(12),we=Date.parse(se);return{message:j,ephemeralAddress:X,expiration:we}}e.parseEmphemeralPayload=Y;async function D(P,j,z,X){const se=m.createEIP1271MessageHash(j),we=(0,o.hexToBytes)(z);let fe;try{fe=(0,o.bytesToHex)(await P.isValidSignature(se,we,X))}catch{}if(fe===e.ERC1654_MAGIC_VALUE)return!0;const ce=(0,h.createEthereumMessageHash)(j);try{fe=(0,o.bytesToHex)(await P.isValidSignature(ce,we,X))}catch{}return fe===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=D;async function G(P,j,z,X,se){if(!P)throw new Error("Missing provider");const we=new o.default(P),fe=await(0,s.SignatureValidator)(we,j);let ce=await D(fe,z,X);if(ce)return!0;const Q=new u.default(we);try{const{block:_e}=await Q.getDate(se,!1);if(ce=await D(fe,z,X,_e),ce)return!0}catch(_e){throw new Error(`Invalid validation. Error: ${_e.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${ce}`)}function ae(P){switch(P){case a.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return K}}})(uy);var js={},ms=function(e){return e&&e.Math===Math&&e},lr=ms(typeof globalThis=="object"&&globalThis)||ms(typeof window=="object"&&window)||ms(typeof self=="object"&&self)||ms(typeof qe=="object"&&qe)||ms(typeof qe=="object"&&qe)||function(){return this}()||Function("return this")(),qi=function(e){try{return!!e()}catch{return!0}},tS=qi,Lu=!tS(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),nS=Lu,Ey=Function.prototype,Xh=Ey.apply,Yh=Ey.call,rS=typeof Reflect=="object"&&Reflect.apply||(nS?Yh.bind(Xh):function(){return Yh.apply(Xh,arguments)}),Ty=Lu,Iy=Function.prototype,wf=Iy.call,iS=Ty&&Iy.bind.bind(wf,wf),Zo=Ty?iS:function(e){return function(){return wf.apply(e,arguments)}},xy=Zo,oS=xy({}.toString),sS=xy("".slice),Ay=function(e){return sS(oS(e),8,-1)},aS=Ay,cS=Zo,ky=function(e){if(aS(e)==="Function")return cS(e)},pl=typeof document=="object"&&document.all,Xi=typeof pl>"u"&&pl!==void 0?function(e){return typeof e=="function"||e===pl}:function(e){return typeof e=="function"},Cy={},uS=qi,Gs=!uS(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),lS=Lu,Qa=Function.prototype.call,xd=lS?Qa.bind(Qa):function(){return Qa.apply(Qa,arguments)},Ry={},Ny={}.propertyIsEnumerable,Oy=Object.getOwnPropertyDescriptor,fS=Oy&&!Ny.call({1:2},1);Ry.f=fS?function(t){var n=Oy(this,t);return!!n&&n.enumerable}:Ny;var My=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},dS=Zo,hS=qi,pS=Ay,ml=Object,mS=dS("".split),gS=hS(function(){return!ml("z").propertyIsEnumerable(0)})?function(e){return pS(e)==="String"?mS(e,""):ml(e)}:ml,Py=function(e){return e==null},yS=Py,_S=TypeError,Ly=function(e){if(yS(e))throw new _S("Can't call method on "+e);return e},bS=gS,vS=Ly,wS=function(e){return bS(vS(e))},SS=Xi,Du=function(e){return typeof e=="object"?e!==null:SS(e)},Dy={},gl=Dy,yl=lr,ES=Xi,Kh=function(e){return ES(e)?e:void 0},TS=function(e,t){return arguments.length<2?Kh(gl[e])||Kh(yl[e]):gl[e]&&gl[e][t]||yl[e]&&yl[e][t]},IS=Zo,xS=IS({}.isPrototypeOf),AS=lr,Jh=AS.navigator,Zh=Jh&&Jh.userAgent,kS=Zh?String(Zh):"",By=lr,_l=kS,Qh=By.process,ep=By.Deno,tp=Qh&&Qh.versions||ep&&ep.version,np=tp&&tp.v8,er,Kc;np&&(er=np.split("."),Kc=er[0]>0&&er[0]<4?1:+(er[0]+er[1]));!Kc&&_l&&(er=_l.match(/Edge\/(\d+)/),(!er||er[1]>=74)&&(er=_l.match(/Chrome\/(\d+)/),er&&(Kc=+er[1])));var CS=Kc,rp=CS,RS=qi,NS=lr,OS=NS.String,Fy=!!Object.getOwnPropertySymbols&&!RS(function(){var e=Symbol("symbol detection");return!OS(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rp&&rp<41}),MS=Fy,Hy=MS&&!Symbol.sham&&typeof Symbol.iterator=="symbol",PS=TS,LS=Xi,DS=xS,BS=Hy,FS=Object,Uy=BS?function(e){return typeof e=="symbol"}:function(e){var t=PS("Symbol");return LS(t)&&DS(t.prototype,FS(e))},HS=String,US=function(e){try{return HS(e)}catch{return"Object"}},$S=Xi,jS=US,GS=TypeError,$y=function(e){if($S(e))return e;throw new GS(jS(e)+" is not a function")},WS=$y,zS=Py,VS=function(e,t){var n=e[t];return zS(n)?void 0:WS(n)},bl=xd,vl=Xi,wl=Du,qS=TypeError,XS=function(e,t){var n,r;if(t==="string"&&vl(n=e.toString)&&!wl(r=bl(n,e))||vl(n=e.valueOf)&&!wl(r=bl(n,e))||t!=="string"&&vl(n=e.toString)&&!wl(r=bl(n,e)))return r;throw new qS("Can't convert object to primitive value")},jy={exports:{}},ip=lr,YS=Object.defineProperty,KS=function(e,t){try{YS(ip,e,{value:t,configurable:!0,writable:!0})}catch{ip[e]=t}return t},JS=lr,ZS=KS,op="__core-js_shared__",sp=jy.exports=JS[op]||ZS(op,{});(sp.versions||(sp.versions=[])).push({version:"3.49.0",mode:"pure",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var QS=jy.exports,ap=QS,eE=function(e,t){return ap[e]||(ap[e]=t||{})},tE=Ly,nE=Object,rE=function(e){return nE(tE(e))},iE=Zo,oE=rE,sE=iE({}.hasOwnProperty),Ad=Object.hasOwn||function(t,n){return sE(oE(t),n)},aE=Zo,cE=0,uE=Math.random(),lE=aE(1.1.toString),fE=function(e){return"Symbol("+(e===void 0?"":e)+")_"+lE(++cE+uE,36)},dE=lr,hE=eE,cp=Ad,pE=fE,mE=Fy,gE=Hy,So=dE.Symbol,Sl=hE("wks"),yE=gE?So.for||So:So&&So.withoutSetter||pE,_E=function(e){return cp(Sl,e)||(Sl[e]=mE&&cp(So,e)?So[e]:yE("Symbol."+e)),Sl[e]},bE=xd,up=Du,lp=Uy,vE=VS,wE=XS,SE=_E,EE=TypeError,TE=SE("toPrimitive"),IE=function(e,t){if(!up(e)||lp(e))return e;var n=vE(e,TE),r;if(n){if(t===void 0&&(t="default"),r=bE(n,e,t),!up(r)||lp(r))return r;throw new EE("Can't convert object to primitive value")}return t===void 0&&(t="number"),wE(e,t)},xE=IE,AE=Uy,Gy=function(e){var t=xE(e,"string");return AE(t)?t:t+""},kE=lr,fp=Du,Sf=kE.document,CE=fp(Sf)&&fp(Sf.createElement),RE=function(e){return CE?Sf.createElement(e):{}},NE=Gs,OE=qi,ME=RE,Wy=!NE&&!OE(function(){return Object.defineProperty(ME("div"),"a",{get:function(){return 7}}).a!==7}),PE=Gs,LE=xd,DE=Ry,BE=My,FE=wS,HE=Gy,UE=Ad,$E=Wy,dp=Object.getOwnPropertyDescriptor;Cy.f=PE?dp:function(t,n){if(t=FE(t),n=HE(n),$E)try{return dp(t,n)}catch{}if(UE(t,n))return BE(!LE(DE.f,t,n),t[n])};var jE=qi,GE=Xi,WE=/#|\.prototype\./,Ws=function(e,t){var n=VE[zE(e)];return n===XE?!0:n===qE?!1:GE(t)?jE(t):!!t},zE=Ws.normalize=function(e){return String(e).replace(WE,".").toLowerCase()},VE=Ws.data={},qE=Ws.NATIVE="N",XE=Ws.POLYFILL="P",YE=Ws,hp=ky,KE=$y,JE=Lu,ZE=hp(hp.bind),QE=function(e,t){return KE(e),t===void 0?e:JE?ZE(e,t):function(){return e.apply(t,arguments)}},zy={},e1=Gs,t1=qi,n1=e1&&t1(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),r1=Du,i1=String,o1=TypeError,s1=function(e){if(r1(e))return e;throw new o1(i1(e)+" is not an object")},a1=Gs,c1=Wy,u1=n1,ec=s1,pp=Gy,l1=TypeError,El=Object.defineProperty,f1=Object.getOwnPropertyDescriptor,Tl="enumerable",Il="configurable",xl="writable";zy.f=a1?u1?function(t,n,r){if(ec(t),n=pp(n),ec(r),typeof t=="function"&&n==="prototype"&&"value"in r&&xl in r&&!r[xl]){var i=f1(t,n);i&&i[xl]&&(t[n]=r.value,r={configurable:Il in r?r[Il]:i[Il],enumerable:Tl in r?r[Tl]:i[Tl],writable:!1})}return El(t,n,r)}:El:function(t,n,r){if(ec(t),n=pp(n),ec(r),c1)try{return El(t,n,r)}catch{}if("get"in r||"set"in r)throw new l1("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var d1=Gs,h1=zy,p1=My,m1=d1?function(e,t,n){return h1.f(e,t,p1(1,n))}:function(e,t,n){return e[t]=n,e},gs=lr,g1=rS,y1=ky,_1=Xi,b1=Cy.f,v1=YE,co=Dy,w1=QE,uo=m1,mp=Ad,S1=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return g1(e,this,arguments)};return t.prototype=e.prototype,t},E1=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,s=r?gs:i?gs[n]:gs[n]&&gs[n].prototype,a=r?co:co[n]||uo(co,n,{})[n],c=a.prototype,u,h,d,m,g,w,T,L,U;for(m in t)u=v1(r?m:n+(i?".":"#")+m,e.forced),h=!u&&s&&mp(s,m),w=a[m],h&&(e.dontCallGetSet?(U=b1(s,m),T=U&&U.value):T=s[m]),g=h&&T?T:t[m],!(!u&&!o&&typeof w==typeof g)&&(e.bind&&h?L=w1(g,gs):e.wrap&&h?L=S1(g):o&&_1(g)?L=y1(g):L=g,(e.sham||g&&g.sham||w&&w.sham)&&uo(L,"sham",!0),uo(a,m,L),o&&(d=n+"Prototype",mp(co,d)||uo(co,d,{}),uo(co[d],m,g),e.real&&c&&(u||!c[m])&&uo(c,m,g)))},T1=E1,Al=lr;T1({global:!0,forced:Al.globalThis!==Al},{globalThis:Al});var I1=lr,x1=I1,A1=x1,k1=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});js.getImplementation=void 0;var C1=k1(A1);function R1(e,t){var n,r=(n=e[t])!==null&&n!==void 0?n:C1.default[t];if(!r)throw new ReferenceError('"'+t+'" is not defined');return r}js.getImplementation=R1;var N1=qe&&qe.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ku,"__esModule",{value:!0});var O1=uy,M1=js,P1="x-identity-auth-chain-",L1="x-identity-timestamp",D1="x-identity-metadata";function B1(e){e===void 0&&(e={});var t=(0,M1.getImplementation)(e,"Headers");return function(r,i,o,s,a){var c,u,h=new t(a),d=String(Date.now()),m=JSON.stringify(s),g=[i,o,d,m].join(":").toLowerCase(),w=0,T=O1.Authenticator.signPayload(r,g);try{for(var L=N1(T),U=L.next();!U.done;U=L.next()){var K=U.value;h.set(P1+w,JSON.stringify(K)),w++}}catch(V){c={error:V}}finally{try{U&&!U.done&&(u=L.return)&&u.call(L)}finally{if(c)throw c.error}}return h.set(L1,d),h.set(D1,m),h}}ku.default=B1;var Jc=qe&&qe.__assign||function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jc.apply(this,arguments)},F1=qe&&qe.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},H1=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Au,"__esModule",{value:!0});var U1=H1(ku),kl=js;function $1(e){e===void 0&&(e={});var t=(0,U1.default)(e),n=(0,kl.getImplementation)(e,"URL"),r=(0,kl.getImplementation)(e,"Request"),i=(0,kl.getImplementation)(e,"fetch");return function(s,a){if(a&&a.identity){var c=a.identity,u=a.metadata,h=F1(a,["identity","metadata"]);if(typeof s=="string"||s instanceof n||globalThis.URL&&s instanceof globalThis.URL){var d=typeof s=="string"?new n(s):s,m=new r(d.toString(),Jc(Jc({},h),{headers:t(c,a.method||"GET",d.pathname,u||{},h?.headers)}));return i(m)}var g=new n(s.url),w=new r(s),T=t(c,s.method||"GET",g.pathname,u||{});return T.forEach(function(L,U){w.headers.set(U,L)}),i(w)}return i(s,a)}}Au.default=$1;(function(e){var t=qe&&qe.__createBinding||(Object.create?function(s,a,c,u){u===void 0&&(u=c),Object.defineProperty(s,u,{enumerable:!0,get:function(){return a[c]}})}:function(s,a,c,u){u===void 0&&(u=c),s[u]=a[c]}),n=qe&&qe.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&t(a,s,c)},r=qe&&qe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,n(vd,e);var i=Au;Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return r(i).default}});var o=ku;Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return r(o).default}})})(cy);(function(e){var t=qe&&qe.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a),Object.defineProperty(o,c,{enumerable:!0,get:function(){return s[a]}})}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),n=qe&&qe.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,o,a)},r=qe&&qe.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),n(vd,e),n(cy,e);var i=r(Au);e.default=(0,i.default)()})(ay);const j1=50,G1=e=>({...e,timestamp:Number(e.timestamp)}),W1=(e,t)=>{const n=e,{url:r,limit:i=j1}=t,o=ay.signedFetchFactory();return{getNotifications:async()=>{const c=new URLSearchParams;c.append("limit",String(i));const u=`${r}/notifications?${c.toString()}`,h=await o(u,{identity:n,headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to fetch notifications: ${h.status}`);return((await h.json()).notifications??[]).map(G1)},markNotificationsAsRead:async c=>{const u=`${r}/notifications/read`,h=await o(u,{method:"PUT",identity:n,body:JSON.stringify({notificationIds:c}),headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to mark notifications as read: ${h.status}`)}}};var z1=" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\b\\w+\\.ai|\\bmanus-user/|\\bort/|\\bperl\\b|\\bsecurityheaders\\b|\\btime/|\\||^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\W|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^\\w+/\\d\\.\\d\\s\\([\\w@]+\\)$|^active|^ad muncher|^amaya|^apache/|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\((?:compatible;)?(?:\\s?[\\w\\d-.]+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|advisor|agent\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|monitor\\b|neustar wpm|node\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",V1=/bot|crawl|http|lighthouse|scan|search|spider/i,ys;function q1(){if(ys instanceof RegExp)return ys;try{ys=new RegExp(z1,"i")}catch{ys=V1}return ys}function X1(e){return!!e&&q1().test(e)}const ve=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$e=globalThis,Br="9.47.1";function Xr(){return zs($e),$e}function zs(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Br,t[Br]=t[Br]||{}}function Vs(e,t,n=$e){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[Br]=r[Br]||{};return i[e]||(i[e]=t())}const kd=["debug","info","warn","error","log","assert","trace"],Y1="Sentry Logger ",Zc={};function bi(e){if(!("console"in $e))return e();const t=$e.console,n={},r=Object.keys(Zc);r.forEach(i=>{const o=Zc[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function K1(){Rd().enabled=!0}function J1(){Rd().enabled=!1}function Vy(){return Rd().enabled}function Z1(...e){Cd("log",...e)}function Q1(...e){Cd("warn",...e)}function eT(...e){Cd("error",...e)}function Cd(e,...t){ve&&Vy()&&bi(()=>{$e.console[e](`${Y1}[${e}]:`,...t)})}function Rd(){return ve?Vs("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const q={enable:K1,disable:J1,isEnabled:Vy,log:Z1,warn:Q1,error:eT},qy=50,Sr="?",gp=/\(error: (.*)\)/,yp=/captureMessage|captureException/;function Xy(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
18
+ `);for(let a=r;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const u=gp.test(c)?c.replace(gp,"$1"):c;if(!u.match(/\S*Error: /)){for(const h of t){const d=h(u);if(d){o.push(d);break}}if(o.length>=qy+i)break}}return nT(o.slice(i))}}function tT(e){return Array.isArray(e)?Xy(...e):e}function nT(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(tc(t).function||"")&&t.pop(),t.reverse(),yp.test(tc(t).function||"")&&(t.pop(),yp.test(tc(t).function||"")&&t.pop()),t.slice(0,qy).map(n=>({...n,filename:n.filename||tc(t).filename,function:n.function||Sr}))}function tc(e){return e[e.length-1]||{}}const Cl="<anonymous>";function Ur(e){try{return!e||typeof e!="function"?Cl:e.name||Cl}catch{return Cl}}function Ef(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Cc={},_p={};function vi(e,t){Cc[e]=Cc[e]||[],Cc[e].push(t)}function wi(e,t){if(!_p[e]){_p[e]=!0;try{t()}catch(n){ve&&q.error(`Error while instrumenting ${e}`,n)}}}function zn(e,t){const n=e&&Cc[e];if(n)for(const r of n)try{r(t)}catch(i){ve&&q.error(`Error while triggering instrumentation handler.
19
+ Type: ${e}
20
+ Name: ${Ur(r)}
21
+ Error:`,i)}}let Rl=null;function Yy(e){const t="error";vi(t,e),wi(t,rT)}function rT(){Rl=$e.onerror,$e.onerror=function(e,t,n,r,i){return zn("error",{column:r,error:i,line:n,msg:e,url:t}),Rl?Rl.apply(this,arguments):!1},$e.onerror.__SENTRY_INSTRUMENTED__=!0}let Nl=null;function Ky(e){const t="unhandledrejection";vi(t,e),wi(t,iT)}function iT(){Nl=$e.onunhandledrejection,$e.onunhandledrejection=function(e){return zn("unhandledrejection",e),Nl?Nl.apply(this,arguments):!0},$e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Jy=Object.prototype.toString;function di(e){switch(Jy.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return jr(e,Error)}}function Qo(e,t){return Jy.call(e)===`[object ${t}]`}function Zy(e){return Qo(e,"ErrorEvent")}function bp(e){return Qo(e,"DOMError")}function oT(e){return Qo(e,"DOMException")}function ir(e){return Qo(e,"String")}function Bu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ro(e){return e===null||Bu(e)||typeof e!="object"&&typeof e!="function"}function $r(e){return Qo(e,"Object")}function Fu(e){return typeof Event<"u"&&jr(e,Event)}function sT(e){return typeof Element<"u"&&jr(e,Element)}function aT(e){return Qo(e,"RegExp")}function qs(e){return!!(e?.then&&typeof e.then=="function")}function cT(e){return $r(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function jr(e,t){try{return e instanceof t}catch{return!1}}function Qy(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function e0(e){return typeof Request<"u"&&jr(e,Request)}const Nd=$e,uT=80;function qn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=a.length;let u;const h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||uT;for(;n&&o++<r&&(u=lT(n,h),!(u==="html"||o>1&&s+i.length*c+u.length>=d));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function lT(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Nd.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const s=n.className;if(s&&ir(s)){const a=s.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function Yi(){try{return Nd.document.location.href}catch{return""}}function t0(e){if(!Nd.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function No(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ol(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function Qc(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{Qy(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function fT(e,t,n=!1){return ir(e)?aT(t)?t.test(e):ir(t)?n?e===t:e.includes(t):!1:!1}function or(e,t=[],n=!1){return t.some(r=>fT(e,r,n))}function Sn(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&n0(i,r);try{e[t]=i}catch{ve&&q.log(`Failed to replace method "${t}" in object`,e)}}function Rn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ve&&q.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function n0(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Rn(e,"__sentry_original__",t)}catch{}}function Od(e){return e.__sentry_original__}function r0(e){if(di(e))return{message:e.message,name:e.name,stack:e.stack,...wp(e)};if(Fu(e)){const t={type:e.type,target:vp(e.target),currentTarget:vp(e.currentTarget),...wp(e)};return typeof CustomEvent<"u"&&jr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function vp(e){try{return sT(e)?qn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function wp(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dT(e,t=40){const n=Object.keys(r0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return No(r,t);for(let i=n.length;i>0;i--){const o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:No(o,t)}return""}function hT(){const e=$e;return e.crypto||e.msCrypto}function En(e=hT()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function i0(e){return e.exception?.values?.[0]}function Ri(e){const{message:t,event_id:n}=e;if(t)return t;const r=i0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tf(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function mi(e,t){const n=i0(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function pT(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>Ol(s,0));const o=Math.min(r-1,i);t.context_line=Ol(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>Ol(s,0))}function Sp(e){if(mT(e))return!0;try{Rn(e,"__sentry_captured__",!0)}catch{}return!1}function mT(e){try{return e.__sentry_captured__}catch{}}const o0=1e3;function Ki(){return Date.now()/o0}function gT(){const{performance:e}=$e;if(!e?.now||!e.timeOrigin)return Ki;const t=e.timeOrigin;return()=>(t+e.now())/o0}let Ep;function qt(){return(Ep??(Ep=gT()))()}let Ml;function yT(){const{performance:e}=$e;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing?.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return o||u?i<=c?[e.timeOrigin,"timeOrigin"]:[s,"navigationStart"]:[r,"dateNow"]}function pn(){return Ml||(Ml=yT()),Ml[0]}function _T(e){const t=qt(),n={sid:En(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>vT(n)};return e&&Oo(n,e),n}function Oo(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||qt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:En()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function bT(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Oo(e,n)}function vT(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Xs(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Xs(r[i],t[i],n-1));return r}function Gr(){return En()}function Ys(){return En().substring(16)}const If="_sentrySpan";function $i(e,t){t?Rn(e,If,t):delete e[If]}function Ms(e){return e[If]}const wT=100;class sr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gr(),sampleRand:Math.random()}}clone(){const t=new sr;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,$i(t,Ms(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Oo(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof sr?n.getScopeData():$r(n)?t:void 0,{tags:i,extra:o,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:h}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),h&&(this._propagationContext=h),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,$i(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gr(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:wT;if(r<=0)return this;const i={timestamp:Ki(),...t,message:t.message?No(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ms(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Xs(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||En();if(!this._client)return ve&&q.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||En();if(!this._client)return ve&&q.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n?.event_id||En();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ve&&q.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function ST(){return Vs("defaultCurrentScope",()=>new sr)}function ET(){return Vs("defaultIsolationScope",()=>new sr)}class TT{constructor(t,n){let r;t?r=t:r=new sr;let i;n?i=n:i=new sr,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return qs(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Mo(){const e=Xr(),t=zs(e);return t.stack=t.stack||new TT(ST(),ET())}function IT(e){return Mo().withScope(e)}function xT(e,t){const n=Mo();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Tp(e){return Mo().withScope(()=>e(Mo().getIsolationScope()))}function AT(){return{withIsolationScope:Tp,withScope:IT,withSetScope:xT,withSetIsolationScope:(e,t)=>Tp(t),getCurrentScope:()=>Mo().getScope(),getIsolationScope:()=>Mo().getIsolationScope()}}function Si(e){const t=zs(e);return t.acs?t.acs:AT()}function et(){const e=Xr();return Si(e).getCurrentScope()}function Zt(){const e=Xr();return Si(e).getIsolationScope()}function Hu(){return Vs("globalScope",()=>new sr)}function Xn(...e){const t=Xr(),n=Si(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function kT(...e){const t=Xr(),n=Si(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function Ae(){return et().getClient()}function s0(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||Ys()};return r&&(o.parent_span_id=r),o}const Fn="sentry.source",Uu="sentry.sample_rate",a0="sentry.previous_trace_sample_rate",Un="sentry.op",Bt="sentry.origin",eu="sentry.idle_span_finish_reason",Ks="sentry.measurement_unit",Js="sentry.measurement_value",xf="sentry.custom_span_name",Md="sentry.profile_id",es="sentry.exclusive_time",CT="http.request.method",RT="url.full",NT="sentry.link.type",OT=0,Pd=1,Gt=2;function c0(e){if(e<400&&e>=100)return{code:Pd};if(e>=400&&e<500)switch(e){case 401:return{code:Gt,message:"unauthenticated"};case 403:return{code:Gt,message:"permission_denied"};case 404:return{code:Gt,message:"not_found"};case 409:return{code:Gt,message:"already_exists"};case 413:return{code:Gt,message:"failed_precondition"};case 429:return{code:Gt,message:"resource_exhausted"};case 499:return{code:Gt,message:"cancelled"};default:return{code:Gt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Gt,message:"unimplemented"};case 503:return{code:Gt,message:"unavailable"};case 504:return{code:Gt,message:"deadline_exceeded"};default:return{code:Gt,message:"internal_error"}}return{code:Gt,message:"unknown_error"}}function Ps(e,t){e.setAttribute("http.response.status_code",t);const n=c0(t);n.message!=="unknown_error"&&e.setStatus(n)}const u0="_sentryScope",l0="_sentryIsolationScope";function MT(e,t,n){e&&(Rn(e,l0,n),Rn(e,u0,t))}function tu(e){return{scope:e[u0],isolationScope:e[l0]}}const Ld="sentry-",PT=/^sentry-/,LT=8192;function f0(e){const t=DT(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(PT)){const s=i.slice(Ld.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function d0(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Ld}${r}`]=i),n),{});return BT(t)}function DT(e){if(!(!e||!ir(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Ip(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):Ip(e)}function Ip(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function BT(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>LT?(ve&&q.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}function ji(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const h0=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function FT(e){if(!e)return;const t=e.match(h0);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function p0(e,t){const n=FT(e),r=f0(t);if(!n?.traceId)return{traceId:Gr(),sampleRand:Math.random()};const i=HT(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function m0(e=Gr(),t=Ys(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function HT(e,t){const n=ji(t?.sample_rand);if(n!==void 0)return n;const r=ji(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const g0=0,Dd=1;let xp=!1;function UT(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:c}=Ze(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:c}}function y0(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Ze(e).parent_span_id,o=tu(e).scope,s=r?o?.getPropagationContext().propagationSpanId||Ys():t;return{parent_span_id:i,span_id:s,trace_id:n}}function _0(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ji(e);return m0(t,n,r)}function b0(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Dd,attributes:o,...i}))}function Bi(e){return typeof e=="number"?Ap(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ap(e.getTime()):qt()}function Ap(e){return e>9999999999?e/1e3:e}function Ze(e){if(jT(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if($T(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:u,start_timestamp:Bi(i),timestamp:Bi(s)||void 0,status:v0(a),op:r[Un],origin:r[Bt],links:b0(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function $T(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function jT(e){return typeof e.getSpanJSON=="function"}function Ji(e){const{traceFlags:t}=e.spanContext();return t===Dd}function v0(e){if(!(!e||e.code===OT))return e.code===Pd?"ok":e.message||"unknown_error"}const Fi="_sentryChildSpans",Af="_sentryRootSpan";function w0(e,t){const n=e[Af]||e;Rn(t,Af,n),e[Fi]?e[Fi].add(t):Rn(e,Fi,new Set([t]))}function GT(e,t){e[Fi]&&e[Fi].delete(t)}function xs(e){const t=new Set;function n(r){if(!t.has(r)&&Ji(r)){t.add(r);const i=r[Fi]?Array.from(r[Fi]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}function Jt(e){return e[Af]||e}function Qt(){const e=Xr(),t=Si(e);return t.getActiveSpan?t.getActiveSpan():Ms(et())}function kf(){xp||(bi(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),xp=!0)}function WT(e,t){e.updateName(t),e.setAttributes({[Fn]:"custom",[xf]:t})}let kp=!1;function S0(){if(kp)return;function e(){const t=Qt(),n=t&&Jt(t);if(n){const r="internal_error";ve&&q.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Gt,message:r})}}e.tag="sentry_tracingErrorCallback",kp=!0,Yy(e),Ky(e)}function gi(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Ae()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const $u="production",zT=/^o(\d+)\./,VT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function qT(e){return e==="http"||e==="https"}function Zi(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function E0(e){const t=VT.exec(e);if(!t){bi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let c="",u=a;const h=u.split("/");if(h.length>1&&(c=h.slice(0,-1).join("/"),u=h.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return T0({host:o,pass:i,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function T0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function XT(e){if(!ve)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(q.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?qT(r)?t&&isNaN(parseInt(t,10))?(q.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(q.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(q.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function YT(e){return e.match(zT)?.[1]}function I0(e){const t=typeof e=="string"?E0(e):T0(e);if(!(!t||!XT(t)))return t}const x0="_frozenDsc";function Rc(e,t){Rn(e,x0,t)}function A0(e,t){const n=t.getOptions(),{publicKey:r,host:i}=t.getDsn()||{};let o;n.orgId?o=String(n.orgId):i&&(o=YT(i));const s={environment:n.environment||$u,release:n.release,public_key:r,trace_id:e,org_id:o};return t.emit("createDsc",s),s}function Bd(e,t){const n=t.getPropagationContext();return n.dsc||A0(n.traceId,e)}function ar(e){const t=Ae();if(!t)return{};const n=Jt(e),r=Ze(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[Uu]??i[a0];function a(w){return(typeof s=="number"||typeof s=="string")&&(w.sample_rate=`${s}`),w}const c=n[x0];if(c)return a(c);const u=o?.get("sentry.dsc"),h=u&&f0(u);if(h)return a(h);const d=A0(e.spanContext().traceId,t),m=i[Fn],g=r.description;return m!=="url"&&g&&(d.transaction=g),gi()&&(d.sampled=String(Ji(n)),d.sample_rand=o?.get("sentry.sample_rand")??tu(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function KT(e){const t=ar(e);return d0(t)}class Wr{constructor(t={}){this._traceId=t.traceId||Gr(),this._spanId=t.spanId||Ys()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:g0}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Pn(e,t=100,n=1/0){try{return Cf("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function k0(e,t=3,n=100*1024){const r=Pn(e,t);return eI(r)>n?k0(e,t-1,n):r}function Cf(e,t,n=1/0,r=1/0,i=tI()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=JT(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return Cf("",g,c-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const m=r0(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(d>=r){h[g]="[MaxProperties ~]";break}const w=m[g];h[g]=Cf(g,w,c-1,r,i),d++}return s(t),h}function JT(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Qy(t))return"[VueViewModel]";if(cT(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ur(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=ZT(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ZT(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function QT(e){return~-encodeURI(e).split(/%..|./).length}function eI(e){return QT(JSON.stringify(e))}function tI(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Yr(e,t=[]){return[e,t]}function nI(e,t){const[n,r]=e;return[n,[...r,t]]}function Gi(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function Cp(e,t){return Gi(e,(n,r)=>t.includes(r))}function nu(e){const t=zs($e);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function rI(e){const t=zs($e);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function ru(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[nu(r),o]:r.push(typeof o=="string"?nu(o):o)}for(const o of n){const[s,a]=o;if(i(`
22
+ ${JSON.stringify(s)}
23
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Pn(a))}i(c)}}return typeof r=="string"?r:iI(r)}function iI(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function oI(e){let t=typeof e=="string"?nu(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(rI(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function sI(e){return[{type:"span"},e]}function aI(e){const t=typeof e.data=="string"?nu(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const cI={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Rp(e){return cI[e]}function Fd(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function C0(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Zi(r)},...i&&{trace:i}}}function uI(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function lI(e,t,n,r){const i=Fd(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Zi(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Yr(o,[s])}function fI(e,t,n,r){const i=Fd(n),o=e.type&&e.type!=="replay_event"?e.type:"event";uI(e,n?.sdk);const s=C0(e,i,r,t);return delete e.sdkProcessingMetadata,Yr(s,[[{type:o},e]])}function dI(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=ar(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:Zi(i)}},a=t?.getOptions().beforeSendSpan,c=a?h=>{const d=Ze(h),m=a(d);return m||(kf(),d)}:Ze,u=[];for(const h of e){const d=c(h);d&&u.push(sI(d))}return Yr(s,u)}function hI(e){if(!ve)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Ze(e),{spanId:i}=e.spanContext(),o=Ji(e),s=Jt(e),a=s===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:h,description:d}=Ze(s);u.push(`root ID: ${s.spanContext().spanId}`),h&&u.push(`root op: ${h}`),d&&u.push(`root description: ${d}`)}q.log(`${c}
24
+ ${u.join(`
25
+ `)}`)}function pI(e){if(!ve)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Ze(e),{spanId:r}=e.spanContext(),o=Jt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;q.log(s)}function R0(e,t,n,r=Qt()){const i=r&&Jt(r);i&&(ve&&q.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[Js]:t,[Ks]:n}))}function Np(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[Ks],o=r[Js];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}const Op=1e3;class ju{constructor(t={}){this._traceId=t.traceId||Gr(),this._spanId=t.spanId||Ys(),this._startTime=t.startTimestamp||qt(),this._links=t.links,this._attributes={},this.setAttributes({[Bt]:"manual",[Un]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Dd:g0}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Bi(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Fn,"custom"),this}end(t){this._endTime||(this._endTime=Bi(t),pI(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Un],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:v0(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Bt],profile_id:this._attributes[Md],exclusive_time:this._attributes[es],measurements:Np(this._events),is_segment:this._isStandaloneSpan&&Jt(this)===this||void 0,segment_id:this._isStandaloneSpan?Jt(this).spanContext().spanId:void 0,links:b0(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){ve&&q.log("[Tracing] Adding an event to span:",t);const i=Mp(n)?n:r||qt(),o=Mp(n)?{}:n||{},s={name:t,time:Bi(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Ae();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Jt(this)))return;if(this._isStandaloneSpan){this._sampled?gI(dI([this],t)):(ve&&q.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(tu(this).scope||et()).captureEvent(r)}_convertSpanToTransaction(){if(!Pp(Ze(this)))return;this._name||(ve&&q.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=tu(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=xs(this).filter(h=>h!==this&&!mI(h)).map(h=>Ze(h)).filter(Pp),s=this._attributes[Fn];delete this._attributes[xf],o.forEach(h=>{delete h.data[xf]});const a={contexts:{trace:UT(this)},spans:o.length>Op?o.sort((h,d)=>h.start_timestamp-d.start_timestamp).slice(0,Op):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ar(this)},request:r,...s&&{transaction_info:{source:s}}},c=Np(this._events);return c&&Object.keys(c).length&&(ve&&q.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Mp(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Pp(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function mI(e){return e instanceof ju&&e.isStandaloneSpan()}function gI(e){const t=Ae();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function N0(e,t,n=()=>{}){let r;try{r=e()}catch(i){throw t(i),n(),i}return yI(r,t,n)}function yI(e,t,n){return qs(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function _I(e,t,n){if(!gi(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=ji(i);if(o===void 0)return ve&&q.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return ve&&q.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const s=n<o;return s||ve&&q.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const iu="__SENTRY_SUPPRESS_TRACING__";function Gu(e,t){const n=Qs();if(n.startSpan)return n.startSpan(e,t);const r=Ud(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Xn(a,()=>O0(o)(()=>{const u=et(),h=$d(u,o),m=e.onlyIfParent&&!h?new Wr:Hd({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return $i(u,m),N0(()=>t(m),()=>{const{status:g}=Ze(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:Gt,message:"internal_error"})},()=>{m.end()})}))}function bI(e,t){const n=Qs();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Ud(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Xn(a,()=>O0(o)(()=>{const u=et(),h=$d(u,o),m=e.onlyIfParent&&!h?new Wr:Hd({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return $i(u,m),N0(()=>t(m,()=>m.end()),()=>{const{status:g}=Ze(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:Gt,message:"internal_error"})})}))}function Qi(e){const t=Qs();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ud(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>Xn(e.scope,s):i!==void 0?s=>Zs(i,s):s=>s())(()=>{const s=et(),a=$d(s,i);return e.onlyIfParent&&!a?new Wr:Hd({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}const vI=(e,t)=>{const n=Xr(),r=Si(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e;return Xn(s=>{const a=p0(i,o);return s.setPropagationContext(a),t()})};function Zs(e,t){const n=Qs();return n.withActiveSpan?n.withActiveSpan(e,t):Xn(r=>($i(r,e||void 0),t(r)))}function wI(e){const t=Qs();return t.suppressTracing?t.suppressTracing(e):Xn(n=>{n.setSDKProcessingMetadata({[iu]:!0});const r=e();return n.setSDKProcessingMetadata({[iu]:void 0}),r})}function SI(e){return Xn(t=>(t.setPropagationContext({traceId:Gr(),sampleRand:Math.random()}),ve&&q.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Zs(null,e)))}function Hd({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!gi()){const s=new Wr;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ar(s)};Rc(s,a)}return s}const i=Zt();let o;if(e&&!n)o=EI(e,r,t),w0(e,o);else if(e){const s=ar(e),{traceId:a,spanId:c}=e.spanContext(),u=Ji(e);o=Lp({traceId:a,parentSpanId:c,...t},r,u),Rc(o,s)}else{const{traceId:s,dsc:a,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...r.getPropagationContext()};o=Lp({traceId:s,parentSpanId:c,...t},r,u),a&&Rc(o,a)}return hI(o),MT(o,r,i),o}function Ud(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Bi(e.startTime),delete r.startTime,r}return n}function Qs(){const e=Xr();return Si(e)}function Lp(e,t,n){const r=Ae(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[h,d,m]=t.getScopeData().sdkProcessingMetadata[iu]?[!1]:_I(i,{name:o,parentSampled:a,attributes:c,parentSampleRate:ji(u.dsc?.sample_rate)},u.sampleRand),g=new ju({...e,attributes:{[Fn]:"custom",[Uu]:d!==void 0&&m?d:void 0,...c},sampled:h});return!h&&r&&(ve&&q.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",g),g}function EI(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[iu]?!1:Ji(e),s=o?new ju({...n,parentSpanId:r,traceId:i,sampled:o}):new Wr({traceId:i});w0(e,s);const a=Ae();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function $d(e,t){if(t)return t;if(t===null)return;const n=Ms(e);if(!n)return;const r=Ae();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Jt(n):n}function O0(e){return e!==void 0?t=>Zs(e,t):t=>t()}const Nc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},TI="heartbeatFailed",II="idleTimeout",xI="finalTimeout",AI="externalFinish";function M0(e,t={}){const n=new Map;let r=!1,i,o=AI,s=!t.disableAutoFinish;const a=[],{idleTimeout:c=Nc.idleTimeout,finalTimeout:u=Nc.finalTimeout,childSpanTimeout:h=Nc.childSpanTimeout,beforeSpanEnd:d}=t,m=Ae();if(!m||!gi()){const D=new Wr,G={sample_rate:"0",sampled:"false",...ar(D)};return Rc(D,G),D}const g=et(),w=Qt(),T=kI(e);T.end=new Proxy(T.end,{apply(D,G,ae){if(d&&d(T),G instanceof Wr)return;const[P,...j]=ae,z=P||qt(),X=Bi(z),se=xs(T).filter(_e=>_e!==T);if(!se.length)return Y(X),Reflect.apply(D,G,[X,...j]);const we=se.map(_e=>Ze(_e).timestamp).filter(_e=>!!_e),fe=we.length?Math.max(...we):void 0,ce=Ze(T).start_timestamp,Q=Math.min(ce?ce+u/1e3:1/0,Math.max(ce||-1/0,Math.min(X,fe||1/0)));return Y(Q),Reflect.apply(D,G,[Q,...j])}});function L(){i&&(clearTimeout(i),i=void 0)}function U(D){L(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=II,T.end(D))},c)}function K(D){i=setTimeout(()=>{!r&&s&&(o=TI,T.end(D))},h)}function V(D){L(),n.set(D,!0);const G=qt();K(G+h/1e3)}function F(D){if(n.has(D)&&n.delete(D),n.size===0){const G=qt();U(G+c/1e3)}}function Y(D){r=!0,n.clear(),a.forEach(X=>X()),$i(g,w);const G=Ze(T),{start_timestamp:ae}=G;if(!ae)return;G.data[eu]||T.setAttribute(eu,o),q.log(`[Tracing] Idle span "${G.op}" finished`);const j=xs(T).filter(X=>X!==T);let z=0;j.forEach(X=>{X.isRecording()&&(X.setStatus({code:Gt,message:"cancelled"}),X.end(D),ve&&q.log("[Tracing] Cancelling span since span ended early",JSON.stringify(X,void 0,2)));const se=Ze(X),{timestamp:we=0,start_timestamp:fe=0}=se,ce=fe<=D,Q=(u+c)/1e3,_e=we-fe<=Q;if(ve){const pe=JSON.stringify(X,void 0,2);ce?_e||q.log("[Tracing] Discarding span since it finished after idle span final timeout",pe):q.log("[Tracing] Discarding span since it happened after idle span was finished",pe)}(!_e||!ce)&&(GT(T,X),z++)}),z>0&&T.setAttribute("sentry.idle_span_discarded_spans",z)}return a.push(m.on("spanStart",D=>{if(r||D===T||Ze(D).timestamp||D instanceof ju&&D.isStandaloneSpan())return;xs(T).includes(D)&&V(D.spanContext().spanId)})),a.push(m.on("spanEnd",D=>{r||F(D.spanContext().spanId)})),a.push(m.on("idleSpanEnableAutoFinish",D=>{D===T&&(s=!0,U(),n.size&&K())})),t.disableAutoFinish||U(),setTimeout(()=>{r||(T.setStatus({code:Gt,message:"deadline_exceeded"}),o=xI,T.end())},u),T}function kI(e){const t=Qi(e);return $i(et(),t),ve&&q.log("[Tracing] Started span is an idle span"),t}const Pl=0,Dp=1,Bp=2;function zr(e){return new yi(t=>{t(e)})}function ou(e){return new yi((t,n)=>{n(e)})}class yi{constructor(t){this._state=Pl,this._handlers=[],this._runExecutor(t)}then(t,n){return new yi((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new yi((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Pl)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Dp&&n[1](this._value),this._state===Bp&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===Pl){if(qs(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Dp,o)},i=o=>{n(Bp,o)};try{t(r,i)}catch(o){i(o)}}}function Rf(e,t,n,r=0){return new yi((i,o)=>{const s=e[r];if(t===null||typeof s!="function")i(t);else{const a=s({...t},n);ve&&s.id&&a===null&&q.log(`Event processor "${s.id}" dropped event`),qs(a)?a.then(c=>Rf(e,c,n,r+1).then(i)).then(null,o):Rf(e,a,n,r+1).then(i).then(null,o)}})}function CI(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;RI(e,t),r&&MI(e,r),PI(e,n),NI(e,i),OI(e,o)}function su(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:h,attachments:d,propagationContext:m,transactionName:g,span:w}=t;nc(e,"extra",n),nc(e,"tags",r),nc(e,"user",i),nc(e,"contexts",o),e.sdkProcessingMetadata=Xs(e.sdkProcessingMetadata,a,2),s&&(e.level=s),g&&(e.transactionName=g),w&&(e.span=w),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function nc(e,t,n){e[t]=Xs(e[t],n,1)}function RI(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function NI(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function OI(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function MI(e,t){e.contexts={trace:y0(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ar(t),...e.sdkProcessingMetadata};const n=Jt(t),r=Ze(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function PI(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let rc,Fp,ic;function P0(e){const t=$e._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return ic&&n.length===Fp||(Fp=n.length,ic=n.reduce((r,i)=>{rc||(rc={});const o=rc[i];if(o)r[o[0]]=o[1];else{const s=e(i);for(let a=s.length-1;a>=0;a--){const u=s[a]?.filename,h=t[i];if(u&&h){r[u]=h,rc[i]=[u,h];break}}}return r},{})),ic}function LI(e,t){const n=P0(e);if(!n)return[];const r=[];for(const i of t)i&&n[i]&&r.push({type:"sourcemap",code_file:i,debug_id:n[i]});return r}function L0(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||En(),timestamp:t.timestamp||Ki()},u=n.integrations||e.integrations.map(L=>L.name);DI(c,e),HI(c,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&BI(c,e.stackParser);const h=$I(r,n.captureContext);n.mechanism&&mi(c,n.mechanism);const d=i?i.getEventProcessors():[],m=Hu().getScopeData();if(o){const L=o.getScopeData();su(m,L)}if(h){const L=h.getScopeData();su(m,L)}const g=[...n.attachments||[],...m.attachments];g.length&&(n.attachments=g),CI(c,m);const w=[...d,...m.eventProcessors];return Rf(w,c,n).then(L=>(L&&FI(L),typeof s=="number"&&s>0?UI(L,s,a):L))}function DI(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||$u,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&(s.url=No(s.url,o))}function BI(e,t){const n=P0(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function FI(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function HI(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function UI(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Pn(i.data,t,n)}}))},...e.user&&{user:Pn(e.user,t,n)},...e.contexts&&{contexts:Pn(e.contexts,t,n)},...e.extra&&{extra:Pn(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Pn(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Pn(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Pn(e.contexts.flags,3,n)),r}function $I(e,t){if(!t)return e;const n=e?e.clone():new sr;return n.update(t),n}function jI(e){if(e)return GI(e)?{captureContext:e}:zI(e)?{captureContext:e}:e}function GI(e){return e instanceof sr||typeof e=="function"}const WI=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function zI(e){return Object.keys(e).some(t=>WI.includes(t))}function Wi(e,t){return et().captureException(e,jI(t))}function au(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return et().captureMessage(e,n,r)}function ea(e,t){return et().captureEvent(e,t)}function D0(e,t){Zt().setContext(e,t)}function VI(e){Zt().setExtras(e)}function qI(e,t){Zt().setExtra(e,t)}function XI(e){Zt().setTags(e)}function YI(e,t){Zt().setTag(e,t)}function KI(e){Zt().setUser(e)}function B0(){return Zt().lastEventId()}async function JI(e){const t=Ae();return t?t.flush(e):(ve&&q.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function ZI(e){const t=Ae();return t?t.close(e):(ve&&q.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function QI(){return!!Ae()}function F0(){const e=Ae();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function H0(e){Zt().addEventProcessor(e)}function Nf(e){const t=Zt(),n=et(),{userAgent:r}=$e.navigator||{},i=_T({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Oo(o,{status:"exited"}),jd(),t.setSession(i),i}function jd(){const e=Zt(),n=et().getSession()||e.getSession();n&&bT(n),U0(),e.setSession()}function U0(){const e=Zt(),t=Ae(),n=e.getSession();n&&t&&t.captureSession(n)}function Of(e=!1){if(e){jd();return}U0()}const ex="7";function $0(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function tx(e){return`${$0(e)}${e.projectId}/envelope/`}function nx(e,t){const n={sentry_version:ex};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function j0(e,t,n){return t||`${tx(e)}?${nx(e,n)}`}function rx(e,t){const n=I0(e);if(!n)return"";const r=`${$0(n)}embed/error-page/`;let i=`dsn=${Zi(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}const Hp=[];function ix(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function ox(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return ix(r)}function sx(e,t){const n={};return t.forEach(r=>{r&&G0(e,r,n)}),n}function Up(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function G0(e,t,n){if(n[t.name]){ve&&q.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Hp.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Hp.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}ve&&q.log(`Integration installed: ${t.name}`)}function Mf(e){const t=Ae();if(!t){ve&&q.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function ax(e,t,n){const r=[{type:"client_report"},{timestamp:Ki(),discarded_events:e}];return Yr(t?{dsn:t}:{},[r])}function W0(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function cx(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[Md],exclusive_time:s?.[es],measurements:e.measurements,is_segment:!0}}function ux(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Md]:e.profile_id},...e.exclusive_time&&{[es]:e.exclusive_time}}}},measurements:e.measurements}}const $p="Not capturing exception because it's already been captured.",jp="Discarded session because of missing or non-string release",z0=Symbol.for("SentryInternalError"),V0=Symbol.for("SentryDoNotSendEventError");function Oc(e){return{message:e,[z0]:!0}}function Ll(e){return{message:e,[V0]:!0}}function Gp(e){return!!e&&typeof e=="object"&&z0 in e}function Wp(e){return!!e&&typeof e=="object"&&V0 in e}class lx{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=I0(t.dsn):ve&&q.warn("No DSN provided, client will not send events."),this._dsn){const n=j0(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const i=En();if(Sp(t))return ve&&q.log($p),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(t,n,r,i){const o={event_id:En(),...r},s=Bu(t)?t:String(t),a=Ro(t)?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(t,n,r){const i=En();if(n?.originalException&&Sp(n.originalException))return ve&&q.log($p),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),Oo(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):zr(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];G0(this,t,this._integrations),n||Up(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=fI(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=nI(r,aI(o));const i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const{release:n,environment:r=$u}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){ve&&q.warn(jp);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){ve&&q.warn(jp);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=lI(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;ve&&q.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(ve&&q.error("Error while sending envelope:",n),n)):(ve&&q.error("Transport disabled"),zr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=sx(this,t),Up(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception?.values;if(o){i=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Oo(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new yi(n=>{let r=0;const i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,t&&r>=t&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),L0(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:s0(r),...a.contexts};const c=Bd(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=et(),i=Zt()){return ve&&Pf(t)&&q.log(`Captured error event \`${W0(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{ve&&(Wp(o)?q.log(o.message):Gp(o)?q.warn(o.message):q.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=q0(t),c=Pf(t),u=t.type||"error",h=`before send for type \`${u}\``,d=typeof s>"u"?void 0:ji(s);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),ou(Ll(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const m=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,i).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",m),Ll("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return g;const T=dx(this,o,g,n);return fx(T,h)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",m),a){const U=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",U)}throw Ll(`${h} returned \`null\`, will not send event.`)}const w=r.getSession()||i.getSession();if(c&&w&&this._updateSessionFromEvent(w,g),a){const L=g.sdkProcessingMetadata?.spanCountBeforeProcessing||0,U=g.spans?g.spans.length:0,K=L-U;K>0&&this.recordDroppedEvent("before_send","span",K)}const T=g.transaction_info;if(a&&T&&g.transaction!==t.transaction){const L="custom";g.transaction_info={...T,source:L}}return this.sendEvent(g,n),g}).then(null,g=>{throw Wp(g)||Gp(g)?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),Oc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
26
+ Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){ve&&q.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){ve&&q.log("No outcomes to send");return}if(!this._dsn){ve&&q.log("No dsn provided, will not send outcomes");return}ve&&q.log("Sending outcomes:",t);const n=ax(t,this._options.tunnel&&Zi(this._dsn));this.sendEnvelope(n)}}function fx(e,t){const n=`${t} must return \`null\` or a valid event.`;if(qs(e))return e.then(r=>{if(!$r(r)&&r!==null)throw Oc(n);return r},r=>{throw Oc(`${t} rejected with ${r}`)});if(!$r(e)&&e!==null)throw Oc(n);return e}function dx(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;let a=n;if(Pf(a)&&i)return i(a,r);if(q0(a)){if(s){const c=s(cx(a));if(c?a=Xs(n,ux(c)):kf(),a.spans){const u=[];for(const h of a.spans){const d=s(h);d?u.push(d):(kf(),u.push(h))}a.spans=u}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function Pf(e){return e.type===void 0}function q0(e){return e.type==="transaction"}function hx(e,t){return t?Xn(t,()=>{const n=Qt(),r=n?y0(n):s0(t);return[n?ar(n):Bd(e,t),r]}):[void 0,void 0]}const px={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function mx(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function gx(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Zi(r)),Yr(i,[mx(e)])}const yx=100;function _x(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function oi(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function bx(e,t){const n=Gd(),r=X0(e);r===void 0?n.set(e,[t]):r.length>=yx?(Mc(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Lf(e,t=Ae(),n=et(),r=bx){if(!t){ve&&q.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s,beforeSendLog:a,_experiments:c}=t.getOptions();if(!(s??c?.enableLogs)){ve&&q.warn("logging option not enabled, log will not be captured.");return}const h=a??c?.beforeSendLog,[,d]=hx(t,n),m={...e.attributes},{user:{id:g,email:w,username:T}}=vx(n);oi(m,"user.id",g,!1),oi(m,"user.email",w,!1),oi(m,"user.name",T,!1),oi(m,"sentry.release",i),oi(m,"sentry.environment",o);const{name:L,version:U}=t.getSdkMetadata()?.sdk??{};oi(m,"sentry.sdk.name",L),oi(m,"sentry.sdk.version",U);const K=e.message;if(Bu(K)){const{__sentry_template_string__:z,__sentry_template_values__:X=[]}=K;m["sentry.message.template"]=z,X.forEach((se,we)=>{m[`sentry.message.parameter.${we}`]=se})}const V=Ms(n);oi(m,"sentry.trace.parent_span_id",V?.spanContext().spanId);const F={...e,attributes:m};t.emit("beforeCaptureLog",F);const Y=h?bi(()=>h(F)):F;if(!Y){t.recordDroppedEvent("before_send","log_item",1),ve&&q.warn("beforeSendLog returned null, log will not be captured.");return}const{level:D,message:G,attributes:ae={},severityNumber:P}=Y,j={timestamp:qt(),level:D,body:G,trace_id:d?.trace_id,severity_number:P??px[D],attributes:Object.keys(ae).reduce((z,X)=>(z[X]=_x(ae[X]),z),{})};r(t,j),t.emit("afterCaptureLog",Y)}function Mc(e,t){const n=t??X0(e)??[];if(n.length===0)return;const r=e.getOptions(),i=gx(n,r._metadata,r.tunnel,e.getDsn());Gd().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function X0(e){return Gd().get(e)}function vx(e){const t=Hu().getScopeData();return su(t,Zt().getScopeData()),su(t,e.getScopeData()),t}function Gd(){return Vs("clientToLogBufferMap",()=>new WeakMap)}function wx(e,t){t.debug===!0&&(ve?q.enable():bi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),et().update(t.initialScope);const r=new e(t);return Y0(r),r.init(),r}function Y0(e){et().setClient(e)}const K0=Symbol.for("SentryBufferFullError");function Sx(e){const t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return ou(K0);const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new yi((a,c)=>{let u=t.length;if(!u)return a(!0);const h=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{zr(d).then(()=>{--u||(clearTimeout(h),a(!0))},c)})})}return{$:t,add:i,drain:o}}const Ex=60*1e3;function J0(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Ex:r-t}function Tx(e,t){return e[t]||e.all||0}function Z0(e,t,n=Date.now()){return Tx(e,t)>n}function Q0(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,h]=a.split(":",5),d=parseInt(c,10),m=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+m;else for(const g of u.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+m):i[g]=r+m}else s?i.all=r+J0(s,r):t===429&&(i.all=r+60*1e3);return i}const Ix=64;function e_(e,t,n=Sx(e.bufferSize||Ix)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(Gi(s,(d,m)=>{const g=Rp(m);Z0(r,g)?e.recordDroppedEvent("ratelimit_backoff",g):a.push(d)}),a.length===0)return zr({});const c=Yr(s[0],a),u=d=>{Gi(c,(m,g)=>{e.recordDroppedEvent(d,Rp(g))})},h=()=>t({body:ru(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&ve&&q.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Q0(r,d),d),d=>{throw u("network_error"),ve&&q.error("Encountered error running transport request:",d),d});return n.add(h).then(d=>d,d=>{if(d===K0)return ve&&q.error("Skipped sending event because buffer is full."),u("queue_overflow"),zr({});throw d})}return{send:o,flush:i}}const Dl=100,Bl=5e3,xx=36e5;function Ax(e){function t(...n){ve&&q.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=Bl,s;function a(d,m,g){return Cp(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,m,g):!0}function c(d){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const m=await i.shift();m&&(t("Attempting to send previously queued event"),m[0].sent_at=new Date().toISOString(),h(m,!0).catch(g=>{t("Failed to retry sending",g)}))},d),typeof s!="number"&&s.unref&&s.unref()}function u(){s||(c(o),o=Math.min(o*2,xx))}async function h(d,m=!1){if(!m&&Cp(d,["replay_event","replay_recording"]))return await i.push(d),c(Dl),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const g=await r.send(d);let w=Dl;if(g){if(g.headers?.["retry-after"])w=J0(g.headers["retry-after"]);else if(g.headers?.["x-sentry-rate-limits"])w=6e4;else if((g.statusCode||0)>=400)return g}return c(w),o=Bl,g}catch(g){if(await a(d,g,o))return m?await i.unshift(d):await i.push(d),u(),t("Error sending. Event queued.",g),{};throw g}}return n.flushAtStartup&&u(),{send:h,flush:d=>(d===void 0&&(o=Bl,c(Dl)),r.flush(d))}}}function t_(e,t){let n;return Gi(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function kx(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=t_(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function Cx(e,t){return Yr(t?{...e[0],dsn:t}:e[0],e[1])}function Rx(e,t){return n=>{const r=e(n),i=new Map;function o(c,u){const h=u?`${c}:${u}`:c;let d=i.get(h);if(!d){const m=E0(c);if(!m)return;const g=j0(m,n.tunnel);d=u?kx(e,u)({...n,url:g}):e({...n,url:g}),i.set(h,d)}return[c,d]}async function s(c){function u(g){const w=g?.length?g:["event"];return t_(c,w)}const h=t({envelope:c,getEvent:u}).map(g=>typeof g=="string"?o(g,void 0):o(g.dsn,g.release)).filter(g=>!!g),d=h.length?h:[["",r]];return(await Promise.all(d.map(([g,w])=>w.send(Cx(c,g)))))[0]}async function a(c){const u=[...i.values(),r];return(await Promise.all(u.map(d=>d.flush(c)))).every(d=>d)}return{send:s,flush:a}}}function n_(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Ox(e,n)||Nx(e,r)}function Nx(e,t){return t?zp(e)===zp(t):!1}function Ox(e,t){return t?e.includes(t.host):!1}function zp(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function r_(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const Mx=r_;function Px(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function Lx(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Dx(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Br})),version:Br}),e._metadata=i}function Wd(e={}){const t=e.client||Ae();if(!F0()||!t)return{};const n=Xr(),r=Si(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||et(),o=e.span||Qt(),s=o?_0(o):Bx(i),a=o?ar(o):Bd(t,i),c=d0(a);return h0.test(s)?{"sentry-trace":s,baggage:c}:(q.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function Bx(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return m0(t,r,n)}function Fx(e,t,n){let r,i,o;const s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function h(){return i!==void 0||o!==void 0?c():r}function d(){return i&&clearTimeout(i),i=a(c,t),s&&o===void 0&&(o=a(c,s)),r}return d.cancel=u,d.flush=h,d}const Hx=100;function Er(e,t){const n=Ae(),r=Zt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Hx}=n.getOptions();if(o<=0)return;const a={timestamp:Ki(),...e},c=i?bi(()=>i(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Vp;const Ux="FunctionToString",qp=new WeakMap,$x=()=>({name:Ux,setupOnce(){Vp=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Od(this),n=qp.has(Ae())&&t!==void 0?t:this;return Vp.apply(n,e)}}catch{}},setup(e){qp.set(e,!0)}}),i_=$x,jx=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Gx="EventFilters",o_=(e={})=>{let t;return{name:Gx,setup(n){const r=n.getOptions();t=Xp(e,r)},processEvent(n,r,i){if(!t){const o=i.getOptions();t=Xp(e,o)}return Wx(n,t)?null:n}}},s_=(e={})=>({...o_(e),name:"InboundFilters"});function Xp(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:jx],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Wx(e,t){if(e.type){if(e.type==="transaction"&&Vx(e,t.ignoreTransactions))return ve&&q.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
27
+ Event: ${Ri(e)}`),!0}else{if(zx(e,t.ignoreErrors))return ve&&q.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
28
+ Event: ${Ri(e)}`),!0;if(Kx(e))return ve&&q.warn(`Event dropped due to not having an error message, error type or stacktrace.
29
+ Event: ${Ri(e)}`),!0;if(qx(e,t.denyUrls))return ve&&q.warn(`Event dropped due to being matched by \`denyUrls\` option.
30
+ Event: ${Ri(e)}.
31
+ Url: ${cu(e)}`),!0;if(!Xx(e,t.allowUrls))return ve&&q.warn(`Event dropped due to not being matched by \`allowUrls\` option.
32
+ Event: ${Ri(e)}.
33
+ Url: ${cu(e)}`),!0}return!1}function zx(e,t){return t?.length?W0(e).some(n=>or(n,t)):!1}function Vx(e,t){if(!t?.length)return!1;const n=e.transaction;return n?or(n,t):!1}function qx(e,t){if(!t?.length)return!1;const n=cu(e);return n?or(n,t):!1}function Xx(e,t){if(!t?.length)return!0;const n=cu(e);return n?or(n,t):!0}function Yx(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function cu(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Yx(n):null}catch{return ve&&q.error(`Cannot extract url for event ${Ri(e)}`),null}}function Kx(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Jx(e,t,n,r,i,o){if(!i.exception?.values||!o||!jr(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Df(e,t,r,o.originalException,n,i.exception.values,s,0))}function Df(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(jr(r[i],Error)){Yp(s,a);const u=e(t,r[i]),h=c.length;Kp(u,i,h,a),c=Df(e,t,n,r[i],i,[u,...c],u,h)}return Array.isArray(r.errors)&&r.errors.forEach((u,h)=>{if(jr(u,Error)){Yp(s,a);const d=e(t,u),m=c.length;Kp(d,`errors[${h}]`,m,a),c=Df(e,t,n,u,i,[d,...c],d,m)}}),c}function Yp(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Kp(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const a_=new Map,Jp=new Set;function Zx(e){if($e._sentryModuleMetadata)for(const t of Object.keys($e._sentryModuleMetadata)){const n=$e._sentryModuleMetadata[t];if(Jp.has(t))continue;Jp.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){a_.set(i.filename,n);break}}}function Qx(e,t){return Zx(e),a_.get(t)}function c_(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;const i=Qx(e,r.filename);i&&(r.module_metadata=i)}})}catch{}}function u_(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const eA=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Gi(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(u_(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;c_(n,t)})}});function zd(e){const t="console";vi(t,e),wi(t,tA)}function tA(){"console"in $e&&kd.forEach(function(e){e in $e.console&&Sn($e.console,e,function(t){return Zc[e]=t,function(...n){zn("console",{args:n,level:e}),Zc[e]?.apply($e.console,n)}})})}function Vd(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const nA="CaptureConsole",rA=(e={})=>{const t=e.levels||kd,n=e.handled??!0;return{name:nA,setup(r){"console"in $e&&zd(({args:i,level:o})=>{Ae()!==r||!t.includes(o)||oA(i,o,n)})}}},iA=rA;function oA(e,t,n){const r={level:Vd(t),extra:{arguments:e}};Xn(i=>{if(i.addEventProcessor(a=>(a.logger="console",mi(a,{handled:n,type:"console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${Qc(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),au(a,r)}return}const o=e.find(a=>a instanceof Error);if(o){Wi(o,r);return}const s=Qc(e," ");au(s,r)})}const sA="Dedupe",aA=()=>{let e;return{name:sA,processEvent(t){if(t.type)return t;try{if(cA(t,e))return ve&&q.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},l_=aA;function cA(e,t){return t?!!(uA(e,t)||lA(e,t)):!1}function uA(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!d_(e,t)||!f_(e,t))}function lA(e,t){const n=Zp(t),r=Zp(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!d_(e,t)||!f_(e,t))}function f_(e,t){let n=Ef(e),r=Ef(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function d_(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Zp(e){return e.exception?.values?.[0]}const fA="ExtraErrorData",dA=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:fA,processEvent(r,i,o){const{maxValueLength:s=250}=o.getOptions();return pA(r,i,t,n,s)}}},hA=dA;function pA(e,t={},n,r,i){if(!t.originalException||!di(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,s=mA(t.originalException,r,i);if(s){const a={...e.contexts},c=Pn(s,n);return $r(c)&&(Rn(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function mA(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const s=e[o];i[o]=di(s)||typeof s=="string"?No(`${s}`,n):s}if(t&&e.cause!==void 0&&(i.cause=di(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const o=e.toJSON();for(const s of Object.keys(o)){const a=o[s];i[s]=di(a)?a.toString():a}}return i}catch(r){ve&&q.error("Unable to extract extra data from the Error object:",r)}return null}function gA(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const yA=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function _A(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=yA.exec(t);return n?n.slice(1):[]}function Qp(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=gA(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function em(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function bA(e,t){e=Qp(e).slice(1),t=Qp(t).slice(1);const n=em(e.split("/")),r=em(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function vA(e,t){return _A(e)[2]||""}const wA="RewriteFrames",SA=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $e&&!!$e.window,i=e.iteratee||EA({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>i(c))}}return{name:wA,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function EA({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){const s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?bA(t,s):vA(s);r.filename=`${n}${a}`}return r}}const TA=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],IA=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],xA={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},h_=["select","insert","upsert","update","delete"];function Wu(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function zu(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function AA(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function kA(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&xA[n]||"filter",`${i}(${e}, ${r.join(".")})`}function tm(e,t=!1){return new Proxy(e,{apply(n,r,i){return Gu({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Bt]:"auto.db.supabase",[Un]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(o.setStatus({code:Gt}),Wi(s.error,{mechanism:{handled:!1}})):o.setStatus({code:Pd}),o.end(),s)).catch(s=>{throw o.setStatus({code:Gt}),o.end(),Wi(s,{mechanism:{handled:!1}}),s}).then(...i))}})}function CA(e){const t=e.auth;if(!(!t||zu(e.auth))){for(const n of TA){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=tm(r))}for(const n of IA){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=tm(r,!0))}Wu(e.auth)}}function RA(e){zu(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const i=Reflect.apply(t,n,r),o=i.constructor;return OA(o),i}}),Wu(e.prototype.from))}function NA(e){zu(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const i=h_,o=n,s=AA(o.method,o.headers);if(!i.includes(s)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[g,w]of o.url.searchParams.entries())u.push(kA(g,w));const h=Object.create(null);if($r(o.body))for(const[g,w]of Object.entries(o.body))h[g]=w;const d=`${s==="select"?"":`${s}${h?"(...) ":""}`}${u.join(" ")} from(${c})`,m={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[Bt]:"auto.db.supabase",[Un]:"db"};return u.length&&(m["db.query"]=u),Object.keys(h).length&&(m["db.body"]=h),Gu({name:d,attributes:m},g=>Reflect.apply(t,n,[]).then(w=>{if(g&&(w&&typeof w=="object"&&"status"in w&&Ps(g,w.status||500),g.end()),w.error){const U=new Error(w.error.message);w.error.code&&(U.code=w.error.code),w.error.details&&(U.details=w.error.details);const K={};u.length&&(K.query=u),Object.keys(h).length&&(K.body=h),Wi(U,{contexts:{supabase:K}})}const T={type:"supabase",category:`db.${s}`,message:d},L={};return u.length&&(L.query=u),Object.keys(h).length&&(L.body=h),Object.keys(L).length&&(T.data=L),Er(T),w},w=>{throw g&&(Ps(g,500),g.end()),w}).then(...r))}}),Wu(e.prototype.then))}function OA(e){for(const t of h_)zu(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,i){const o=Reflect.apply(n,r,i),s=o.constructor;return ve&&q.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),NA(s),o}}),Wu(e.prototype[t]))}const p_=e=>{if(!e){ve&&q.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;RA(t),CA(e)},MA="Supabase",PA=e=>({setupOnce(){p_(e)},name:MA}),LA=e=>PA(e.supabaseClient),DA=10,BA="ZodErrors";function FA(e){return di(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function HA(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function UA(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function $A(e){const t=new Set;for(const r of e.issues){const i=UA(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${No(n.join(", "),100)}`}function jA(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!FA(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(HA);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:$A(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
34
+ ${i.stack}`:"unknown"}}}}}const GA=(e={})=>{const t=e.limit??DA;return{name:BA,processEvent(n,r){return jA(t,e.saveZodIssuesAsAttachment,n,r)}}},WA=GA,zA=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Gi(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(u_(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;c_(r,n)})},processEvent(t){const n=VA(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function VA(e){const t=Ef(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(nm)).map(r=>r.slice(nm.length)):[])}const nm="_sentryBundlerPluginAppKey:",qA=100,XA=10,oc="flag.evaluation.";function ta(e){const n=et().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Po(e,t,n=qA){const r=et().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;YA(i,e,t,n)}function YA(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){ve&&q.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Lo(e,t,n=XA){if(typeof t!="boolean")return;const r=Qt();if(!r)return;const i=Ze(r).data;if(`${oc}${e}`in i){r.setAttribute(`${oc}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(oc)).length<n&&r.setAttribute(`${oc}${e}`,t)}const KA=()=>({name:"FeatureFlags",processEvent(e,t,n){return ta(e)},addFeatureFlag(e,t){Po(e,t),Lo(e,t)}}),JA="thismessage:/";function m_(e){return"isRelative"in e}function g_(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?JA:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function ZA(e){if(m_(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Hi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function y_(e){return e.split(/[?#]/,1)[0]}function QA(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=gi()&&t(s);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const m=r[d];m&&(tk(m,e),delete r[d]);return}const c=!!Qt(),u=a&&c?Qi(rk(s,o,i)):new Wr;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],m=e.args[1]||{},g=ek(d,m,gi()&&c?u:void 0);g&&(e.args[1]=m,m.headers=g)}const h=Ae();if(h){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};h.emit("beforeOutgoingRequestSpan",u,d)}return u}function ek(e,t,n){const r=Wd({span:n}),i=r["sentry-trace"],o=r.baggage;if(!i)return;const s=t.headers||(e0(e)?e.headers:void 0);if(s)if(nk(s)){const a=new Headers(s);if(a.get("sentry-trace")||a.set("sentry-trace",i),o){const c=a.get("baggage");c?sc(c)||a.set("baggage",`${c},${o}`):a.set("baggage",o)}return a}else if(Array.isArray(s)){const a=[...s];s.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",i]);const c=s.find(u=>u[0]==="baggage"&&sc(u[1]));return o&&!c&&a.push(["baggage",o]),a}else{const a="sentry-trace"in s?s["sentry-trace"]:void 0,c="baggage"in s?s.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],h=c&&(Array.isArray(c)?c.find(d=>sc(d)):sc(c));return o&&!h&&u.push(o),{...s,"sentry-trace":a??i,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function tk(e,t){if(t.response){Ps(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Gt,message:"internal_error"});e.end()}function sc(e){return e.split(",").some(t=>t.trim().startsWith(Ld))}function nk(e){return typeof Headers<"u"&&jr(e,Headers)}function rk(e,t,n){const r=g_(e);return{name:r?`${t} ${ZA(r)}`:t,attributes:ik(e,r,t,n)}}function ik(e,t,n,r){const i={url:e,type:"fetch","http.method":n,[Bt]:r,[Un]:"http.client"};return t&&(m_(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function __(e,t={},n=et()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:c,tags:u}=e,h={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||Ae();return d&&d.emit("beforeSendFeedback",h,t),n.captureEvent(h,t)}const ok="ConsoleLogs",rm={[Bt]:"auto.console.logging"},sk=(e={})=>{const t=e.levels||kd;return{name:ok,setup(n){const{enableLogs:r,_experiments:i,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!(r??i?.enableLogs)){ve&&q.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}zd(({args:c,level:u})=>{if(Ae()!==n||!t.includes(u))return;if(u==="assert"){if(!c[0]){const d=c.slice(1),m=d.length>0?`Assertion failed: ${im(d,o,s)}`:"Assertion failed";Lf({level:"error",message:m,attributes:rm})}return}const h=u==="log";Lf({level:h?"info":u,message:im(c,o,s),severityNumber:h?10:void 0,attributes:rm})})}}},ak=sk;function im(e,t,n){return"util"in $e&&typeof $e.util.format=="function"?$e.util.format(...e):ck(e,t,n)}function ck(e,t,n){return e.map(r=>Ro(r)?String(r):JSON.stringify(Pn(r,t,n))).join(" ")}function b_(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Do=$e;function uk(){return"history"in Do&&!!Do.history}function lk(){if(!("fetch"in Do))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Bf(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function v_(){if(typeof EdgeRuntime=="string")return!0;if(!lk())return!1;if(Bf(Do.fetch))return!0;let e=!1;const t=Do.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Bf(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ve&&q.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function fk(){return"ReportingObserver"in Do}function qd(e,t){const n="fetch";vi(n,e),wi(n,()=>w_(void 0,t))}function dk(e){const t="fetch-body-resolved";vi(t,e),wi(t,()=>w_(pk))}function w_(e,t=!1){t&&!v_()||Sn($e,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=mk(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:qt()*1e3,virtualError:i,headers:gk(r)};return e||zn("fetch",{...a}),n.apply($e,r).then(async c=>(e?e(c):zn("fetch",{...a,endTimestamp:qt()*1e3,response:c}),c),c=>{if(zn("fetch",{...a,endTimestamp:qt()*1e3,error:c}),di(c)&&c.stack===void 0&&(c.stack=i.stack,Rn(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function hk(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function pk(e){let t;try{t=e.clone()}catch{return}hk(t,()=>{zn("fetch-body-resolved",{endTimestamp:qt()*1e3,response:e})})}function Ff(e,t){return!!e&&typeof e=="object"&&!!e[t]}function om(e){return typeof e=="string"?e:e?Ff(e,"url")?e.url:e.toString?e.toString():"":""}function mk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:om(n),method:Ff(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:om(t),method:Ff(t,"method")?String(t.method).toUpperCase():"GET"}}function gk(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(e0(t))return new Headers(t.headers)}catch{}}function yk(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function _k(){return"npm"}function bk(){return!yk()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Hf(){return typeof window<"u"&&(!bk()||vk())}function vk(){return $e.process?.type==="renderer"}const tr=$e,Et=tr.document,Ts=tr.navigator,S_="Report a Bug",wk="Cancel",Sk="Send Bug Report",Ek="Confirm",Tk="Report a Bug",Ik="your.email@example.org",xk="Email",Ak="What's the bug? What did you expect?",kk="Description",Ck="Your Name",Rk="Name",Nk="Thank you for your report!",Ok="(required)",Mk="Add a screenshot",Pk="Remove screenshot",Lk="widget",Dk="api",Bk=5e3,E_=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Ae();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&et().setTags(e.tags);const r=__({source:Dk,url:Yi(),...e},t);return new Promise((i,o)=>{const s=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?i(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?o("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?o("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},Pc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Fk(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ts.userAgent)||/Macintosh/i.test(Ts.userAgent)&&Ts.maxTouchPoints&&Ts.maxTouchPoints>1||!isSecureContext)}function ac(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Hk(e){const t=Et.createElement("style");return t.textContent=`
35
+ .widget__actor {
36
+ position: fixed;
37
+ z-index: var(--z-index);
38
+ margin: var(--page-margin);
39
+ inset: var(--actor-inset);
40
+
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 8px;
44
+ padding: 16px;
45
+
46
+ font-family: inherit;
47
+ font-size: var(--font-size);
48
+ font-weight: 600;
49
+ line-height: 1.14em;
50
+ text-decoration: none;
51
+
52
+ background: var(--actor-background, var(--background));
53
+ border-radius: var(--actor-border-radius, 1.7em/50%);
54
+ border: var(--actor-border, var(--border));
55
+ box-shadow: var(--actor-box-shadow, var(--box-shadow));
56
+ color: var(--actor-color, var(--foreground));
57
+ fill: var(--actor-color, var(--foreground));
58
+ cursor: pointer;
59
+ opacity: 1;
60
+ transition: transform 0.2s ease-in-out;
61
+ transform: translate(0, 0) scale(1);
62
+ }
63
+ .widget__actor[aria-hidden="true"] {
64
+ opacity: 0;
65
+ pointer-events: none;
66
+ visibility: hidden;
67
+ transform: translate(0, 16px) scale(0.98);
68
+ }
69
+
70
+ .widget__actor:hover {
71
+ background: var(--actor-hover-background, var(--background));
72
+ filter: var(--interactive-filter);
73
+ }
74
+
75
+ .widget__actor svg {
76
+ width: 1.14em;
77
+ height: 1.14em;
78
+ }
79
+
80
+ @media (max-width: 600px) {
81
+ .widget__actor span {
82
+ display: none;
83
+ }
84
+ }
85
+ `,e&&t.setAttribute("nonce",e),t}function Bn(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const lo=20,Uk="http://www.w3.org/2000/svg";function $k(){const e=a=>tr.document.createElementNS(Uk,a),t=Bn(e("svg"),{width:`${lo}`,height:`${lo}`,viewBox:`0 0 ${lo} ${lo}`,fill:"var(--actor-color, var(--foreground))"}),n=Bn(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Bn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const i=e("defs"),o=Bn(e("clipPath"),{id:"clip0_57_80"}),s=Bn(e("rect"),{width:`${lo}`,height:`${lo}`,fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}function jk({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const i=Et.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||S_,i.appendChild($k()),e){const s=Et.createElement("span");s.appendChild(Et.createTextNode(e)),i.appendChild(s)}const o=Hk(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const T_="rgba(88, 74, 192, 1)",Gk={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:T_,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},sm={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:T_,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function am(e){return`
86
+ --foreground: ${e.foreground};
87
+ --background: ${e.background};
88
+ --accent-foreground: ${e.accentForeground};
89
+ --accent-background: ${e.accentBackground};
90
+ --success-color: ${e.successColor};
91
+ --error-color: ${e.errorColor};
92
+ --border: ${e.border};
93
+ --box-shadow: ${e.boxShadow};
94
+ --outline: ${e.outline};
95
+ --interactive-filter: ${e.interactiveFilter};
96
+ `}function Wk({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const i=Et.createElement("style");return i.textContent=`
97
+ :host {
98
+ --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
99
+ --font-size: 14px;
100
+ --z-index: 100000;
101
+
102
+ --page-margin: 16px;
103
+ --inset: auto 0 0 auto;
104
+ --actor-inset: var(--inset);
105
+
106
+ font-family: var(--font-family);
107
+ font-size: var(--font-size);
108
+
109
+ ${e!=="system"?"color-scheme: only light;":""}
110
+
111
+ ${am(e==="dark"?{...sm,...t}:{...Gk,...n})}
112
+ }
113
+
114
+ ${e==="system"?`
115
+ @media (prefers-color-scheme: dark) {
116
+ :host {
117
+ ${am({...sm,...t})}
118
+ }
119
+ }`:""}
120
+ }
121
+ `,r&&i.setAttribute("nonce",r),i}const I_=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:i="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:h=!0,enableScreenshot:d=!0,useSentryUser:m={email:"email",name:"username"},tags:g,styleNonce:w,scriptNonce:T,colorScheme:L="system",themeLight:U={},themeDark:K={},addScreenshotButtonLabel:V=Mk,cancelButtonLabel:F=wk,confirmButtonLabel:Y=Ek,emailLabel:D=xk,emailPlaceholder:G=Ik,formTitle:ae=Tk,isRequiredLabel:P=Ok,messageLabel:j=kk,messagePlaceholder:z=Ak,nameLabel:X=Rk,namePlaceholder:se=Ck,removeScreenshotButtonLabel:we=Pk,submitButtonLabel:fe=Sk,successMessageText:ce=Nk,triggerLabel:Q=S_,triggerAriaLabel:_e="",onFormOpen:pe,onFormClose:le,onSubmitSuccess:be,onSubmitError:Xe,onFormSubmitted:oe}={})=>{const Be={id:i,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:h,enableScreenshot:d,useSentryUser:m,tags:g,styleNonce:w,scriptNonce:T,colorScheme:L,themeDark:K,themeLight:U,triggerLabel:Q,triggerAriaLabel:_e,cancelButtonLabel:F,submitButtonLabel:fe,confirmButtonLabel:Y,formTitle:ae,emailLabel:D,emailPlaceholder:G,messageLabel:j,messagePlaceholder:z,nameLabel:X,namePlaceholder:se,successMessageText:ce,isRequiredLabel:P,addScreenshotButtonLabel:V,removeScreenshotButtonLabel:we,onFormClose:le,onFormOpen:pe,onSubmitError:Xe,onSubmitSuccess:be,onFormSubmitted:oe};let bt=null,vt=[];const en=dt=>{if(!bt){const mt=Et.createElement("div");mt.id=String(dt.id),Et.body.appendChild(mt),bt=mt.attachShadow({mode:"open"}),bt.appendChild(Wk(dt))}return bt},tn=async dt=>{const mt=dt.enableScreenshot&&Fk();let Wt,tt;try{Wt=(t?t():await e("feedbackModalIntegration",T))(),Mf(Wt)}catch{throw Pc&&q.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Ye=mt?n?n():await e("feedbackScreenshotIntegration",T):void 0;Ye&&(tt=Ye(),Mf(tt))}catch{Pc&&q.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const nt=Wt.createDialog({options:{...dt,onFormClose:()=>{nt?.close(),dt.onFormClose?.()},onFormSubmitted:()=>{nt?.close(),dt.onFormSubmitted?.()}},screenshotIntegration:tt,sendFeedback:E_,shadow:en(dt)});return nt},$n=(dt,mt={})=>{const Wt=ac(Be,mt),tt=typeof dt=="string"?Et.querySelector(dt):typeof dt.addEventListener=="function"?dt:null;if(!tt)throw Pc&&q.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let nt=null;const Ye=async()=>{nt||(nt=await tn({...Wt,onFormSubmitted:()=>{nt?.removeFromDom(),Wt.onFormSubmitted?.()}})),nt.appendToDom(),nt.open()};tt.addEventListener("click",Ye);const mn=()=>{vt=vt.filter(Mt=>Mt!==mn),nt?.removeFromDom(),nt=null,tt.removeEventListener("click",Ye)};return vt.push(mn),mn},ke=(dt={})=>{const mt=ac(Be,dt),Wt=en(mt),tt=jk({triggerLabel:mt.triggerLabel,triggerAriaLabel:mt.triggerAriaLabel,shadow:Wt,styleNonce:w});return $n(tt.el,{...mt,onFormOpen(){tt.hide()},onFormClose(){tt.show()},onFormSubmitted(){tt.show()}}),tt};return{name:"Feedback",setupOnce(){!Hf()||!Be.autoInject||(Et.readyState==="loading"?Et.addEventListener("DOMContentLoaded",()=>ke().appendToDom()):ke().appendToDom())},attachTo:$n,createWidget(dt={}){const mt=ke(ac(Be,dt));return mt.appendToDom(),mt},async createForm(dt={}){return tn(ac(Be,dt))},remove(){bt&&(bt.parentElement?.remove(),bt=null),vt.forEach(dt=>dt()),vt=[]}}};function zk(){return Ae()?.getIntegrationByName("Feedback")}var Vu,It,x_,Ni,cm,A_,Uf,Ls={},Xd=[],Vk=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Yd=Array.isArray;function li(e,t){for(var n in t)e[n]=t[n];return e}function k_(e){var t=e.parentNode;t&&t.removeChild(e)}function it(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Vu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Lc(e,s,r,i,null)}function Lc(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++x_,__i:-1,__u:0};return i==null&&It.vnode!=null&&It.vnode(o),o}function na(e){return e.children}function Dc(e,t){this.props=e,this.context=t}function Bo(e,t){if(t==null)return e.__?Bo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Bo(e):null}function qk(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=li({},i)).__v=i.__v+1,It.vnode&&It.vnode(r),Kd(s,r,i,e.__n,s.ownerSVGElement!==void 0,32&i.__u?[o]:null,t,o??Bo(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&C_(r),r}function C_(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return C_(e)}}function um(e){(!e.__d&&(e.__d=!0)&&Ni.push(e)&&!uu.__r++||cm!==It.debounceRendering)&&((cm=It.debounceRendering)||A_)(uu)}function uu(){var e,t,n,r=[],i=[];for(Ni.sort(Uf);e=Ni.shift();)e.__d&&(n=Ni.length,t=qk(e,r,i)||t,n===0||Ni.length>n?($f(r,t,i),i.length=r.length=0,t=void 0,Ni.sort(Uf)):t&&It.__c&&It.__c(t,Xd));t&&$f(r,t,i),uu.__r=0}function R_(e,t,n,r,i,o,s,a,c,u,h){var d,m,g,w,T,L=r&&r.__k||Xd,U=t.length;for(n.__d=c,Xk(n,t,L),c=n.__d,d=0;d<U;d++)(g=n.__k[d])!=null&&typeof g!="boolean"&&typeof g!="function"&&(m=g.__i===-1?Ls:L[g.__i]||Ls,g.__i=d,Kd(e,g,m,i,o,s,a,c,u,h),w=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Jd(m.ref,null,g),h.push(g.ref,g.__c||w,g)),T==null&&w!=null&&(T=w),65536&g.__u||m.__k===g.__k?c=N_(g,c,e):typeof g.type=="function"&&g.__d!==void 0?c=g.__d:w&&(c=w.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=c,n.__e=T}function Xk(e,t,n){var r,i,o,s,a,c=t.length,u=n.length,h=u,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Lc(null,i,null,null,i):Yd(i)?Lc(na,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Lc(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,a=Yk(i,n,s=r+d,h),i.__i=a,o=null,a!==-1&&(h--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?h>c-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=Bo(o)),jf(o,o,!1),n[r]=null,h--);if(h)for(r=0;r<u;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Bo(o)),jf(o,o))}function N_(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=N_(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Yk(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&i==c.key&&o===c.type)return a;a++}}return-1}function lm(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Vk.test(t)?n:n+"px"}function cc(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||lm(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||lm(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?dm:fm,o)):e.removeEventListener(t,o?dm:fm,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function fm(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(It.event?It.event(e):e)}}function dm(e){if(this.l)return this.l[e.type+!0](It.event?It.event(e):e)}function Kd(e,t,n,r,i,o,s,a,c,u){var h,d,m,g,w,T,L,U,K,V,F,Y,D,G,ae,P=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(h=It.__b)&&h(t);e:if(typeof P=="function")try{if(U=t.props,K=(h=P.contextType)&&r[h.__c],V=h?K?K.props.value:h.__:r,n.__c?L=(d=t.__c=n.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(U,V):(t.__c=d=new Dc(U,V),d.constructor=P,d.render=Jk),K&&K.sub(d),d.props=U,d.state||(d.state={}),d.context=V,d.__n=r,m=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=li({},d.__s)),li(d.__s,P.getDerivedStateFromProps(U,d.__s))),g=d.props,w=d.state,d.__v=t,m)P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(P.getDerivedStateFromProps==null&&U!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(U,V),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(U,d.__s,V)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=U,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(j){j&&(j.__=t)}),F=0;F<d._sb.length;F++)d.__h.push(d._sb[F]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(U,d.__s,V),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,w,T)})}if(d.context=V,d.props=U,d.__P=e,d.__e=!1,Y=It.__r,D=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,Y&&Y(t),h=d.render(d.props,d.state,d.context),G=0;G<d._sb.length;G++)d.__h.push(d._sb[G]);d._sb=[]}else do d.__d=!1,Y&&Y(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++D<25);d.state=d.__s,d.getChildContext!=null&&(r=li(li({},r),d.getChildContext())),m||d.getSnapshotBeforeUpdate==null||(T=d.getSnapshotBeforeUpdate(g,w)),R_(e,Yd(ae=h!=null&&h.type===na&&h.key==null?h.props.children:h)?ae:[ae],t,n,r,i,o,s,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),L&&(d.__E=d.__=null)}catch(j){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),It.__e(j,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Kk(n.__e,t,n,r,i,o,s,c,u);(h=It.diffed)&&h(t)}function $f(e,t,n){for(var r=0;r<n.length;r++)Jd(n[r],n[++r],n[++r]);It.__c&&It.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){It.__e(o,i.__v)}})}function Kk(e,t,n,r,i,o,s,a,c){var u,h,d,m,g,w,T,L=n.props,U=t.props,K=t.type;if(K==="svg"&&(i=!0),o!=null){for(u=0;u<o.length;u++)if((g=o[u])&&"setAttribute"in g==!!K&&(K?g.localName===K:g.nodeType===3)){e=g,o[u]=null;break}}if(e==null){if(K===null)return document.createTextNode(U);e=i?document.createElementNS("http://www.w3.org/2000/svg",K):document.createElement(K,U.is&&U),o=null,a=!1}if(K===null)L===U||a&&e.data===U||(e.data=U);else{if(o=o&&Vu.call(e.childNodes),L=n.props||Ls,!a&&o!=null)for(L={},u=0;u<e.attributes.length;u++)L[(g=e.attributes[u]).name]=g.value;for(u in L)g=L[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=g:u==="key"||u in U||cc(e,u,null,g,i));for(u in U)g=U[u],u=="children"?m=g:u=="dangerouslySetInnerHTML"?h=g:u=="value"?w=g:u=="checked"?T=g:u==="key"||a&&typeof g!="function"||L[u]===g||cc(e,u,g,L[u],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),R_(e,Yd(m)?m:[m],t,n,r,i&&K!=="foreignObject",o,s,o?o[0]:n.__k&&Bo(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&k_(o[u]);a||(u="value",w!==void 0&&(w!==e[u]||K==="progress"&&!w||K==="option"&&w!==L[u])&&cc(e,u,w,L[u],!1),u="checked",T!==void 0&&T!==e[u]&&cc(e,u,T,L[u],!1))}return e}function Jd(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){It.__e(r,n)}}function jf(e,t,n){var r,i;if(It.unmount&&It.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Jd(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){It.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&jf(r[i],t,n||typeof e.type!="function");n||e.__e==null||k_(e.__e),e.__=e.__e=e.__d=void 0}function Jk(e,t,n){return this.constructor(e,n)}function Zk(e,t,n){var r,i,o,s;It.__&&It.__(e,t),i=(r=!1)?null:t.__k,o=[],s=[],Kd(t,e=t.__k=it(na,null,[e]),i||Ls,Ls,t.ownerSVGElement!==void 0,i?null:t.firstChild?Vu.call(t.childNodes):null,o,i?i.__e:t.firstChild,r,s),e.__d=void 0,$f(o,e,s)}Vu=Xd.slice,It={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},x_=0,Dc.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=li({},this.state),typeof e=="function"&&(e=e(li({},n),this.props)),e&&li(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),um(this))},Dc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),um(this))},Dc.prototype.render=na,Ni=[],A_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Uf=function(e,t){return e.__v.__b-t.__v.__b},uu.__r=0;var Vr,Tt,Fl,hm,Fo=0,O_=[],Bc=[],Ut=It,pm=Ut.__b,mm=Ut.__r,gm=Ut.diffed,ym=Ut.__c,_m=Ut.unmount,bm=Ut.__;function eo(e,t){Ut.__h&&Ut.__h(Tt,e,Fo||t),Fo=0;var n=Tt.__H||(Tt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Bc}),n.__[e]}function Pi(e){return Fo=1,M_(L_,e)}function M_(e,t,n){var r=eo(Vr++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):L_(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Tt,!Tt.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return!!m.__c});if(h.every(function(m){return!m.__N}))return!o||o.call(this,a,c,u);var d=!1;return h.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(d=!0)}}),!(!d&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};Tt.u=!0;var o=Tt.shouldComponentUpdate,s=Tt.componentWillUpdate;Tt.componentWillUpdate=function(a,c,u){if(this.__e){var h=o;o=void 0,i(a,c,u),o=h}s&&s.call(this,a,c,u)},Tt.shouldComponentUpdate=i}return r.__N||r.__}function Qk(e,t){var n=eo(Vr++,3);!Ut.__s&&Zd(n.__H,t)&&(n.__=e,n.i=t,Tt.__H.__h.push(n))}function P_(e,t){var n=eo(Vr++,4);!Ut.__s&&Zd(n.__H,t)&&(n.__=e,n.i=t,Tt.__h.push(n))}function eC(e){return Fo=5,ra(function(){return{current:e}},[])}function tC(e,t,n){Fo=6,P_(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ra(e,t){var n=eo(Vr++,7);return Zd(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ko(e,t){return Fo=8,ra(function(){return e},t)}function nC(e){var t=Tt.context[e.__c],n=eo(Vr++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Tt)),t.props.value):e.__}function rC(e,t){Ut.useDebugValue&&Ut.useDebugValue(t?t(e):e)}function iC(e){var t=eo(Vr++,10),n=Pi();return t.__=e,Tt.componentDidCatch||(Tt.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function oC(){var e=eo(Vr++,11);if(!e.__){for(var t=Tt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function sC(){for(var e;e=O_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fc),e.__H.__h.forEach(Gf),e.__H.__h=[]}catch(t){e.__H.__h=[],Ut.__e(t,e.__v)}}Ut.__b=function(e){Tt=null,pm&&pm(e)},Ut.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),bm&&bm(e,t)},Ut.__r=function(e){mm&&mm(e),Vr=0;var t=(Tt=e.__c).__H;t&&(Fl===Tt?(t.__h=[],Tt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Bc,n.__N=n.i=void 0})):(t.__h.forEach(Fc),t.__h.forEach(Gf),t.__h=[],Vr=0)),Fl=Tt},Ut.diffed=function(e){gm&&gm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(O_.push(t)!==1&&hm===Ut.requestAnimationFrame||((hm=Ut.requestAnimationFrame)||aC)(sC)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Bc&&(n.__=n.__V),n.i=void 0,n.__V=Bc})),Fl=Tt=null},Ut.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fc),n.__h=n.__h.filter(function(r){return!r.__||Gf(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Ut.__e(r,n.__v)}}),ym&&ym(e,t)},Ut.unmount=function(e){_m&&_m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fc(r)}catch(i){t=i}}),n.__H=void 0,t&&Ut.__e(t,n.__v))};var vm=typeof requestAnimationFrame=="function";function aC(e){var t,n=function(){clearTimeout(r),vm&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);vm&&(t=requestAnimationFrame(n))}function Fc(e){var t=Tt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Tt=t}function Gf(e){var t=Tt;e.__c=e.__(),Tt=t}function Zd(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function L_(e,t){return typeof t=="function"?t(e):t}const cC=Object.defineProperty({__proto__:null,useCallback:ko,useContext:nC,useDebugValue:rC,useEffect:Qk,useErrorBoundary:iC,useId:oC,useImperativeHandle:tC,useLayoutEffect:P_,useMemo:ra,useReducer:M_,useRef:eC,useState:Pi},Symbol.toStringTag,{value:"Module"}),uC="http://www.w3.org/2000/svg";function lC(){const e=r=>Et.createElementNS(uC,r),t=Bn(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Bn(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function fC({options:e}){const t=ra(()=>({__html:lC().outerHTML}),[]);return it("h2",{class:"dialog__header"},it("span",{class:"dialog__title"},e.formTitle),e.showBranding?it("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function dC(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Hl(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function hC({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){const{tags:h,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:m,cancelButtonLabel:g,emailLabel:w,emailPlaceholder:T,isEmailRequired:L,isNameRequired:U,messageLabel:K,messagePlaceholder:V,nameLabel:F,namePlaceholder:Y,submitButtonLabel:D,isRequiredLabel:G}=e,[ae,P]=Pi(!1),[j,z]=Pi(null),[X,se]=Pi(!1),we=u?.input,[fe,ce]=Pi(null),Q=ko(le=>{ce(le),se(!1)},[]),_e=ko(le=>{const be=dC(le,{emailLabel:w,isEmailRequired:L,isNameRequired:U,messageLabel:K,nameLabel:F});return be.length>0?z(`Please enter in the following required fields: ${be.join(", ")}`):z(null),be.length===0},[w,L,U,K,F]),pe=ko(async le=>{P(!0);try{if(le.preventDefault(),!(le.target instanceof HTMLFormElement))return;const be=new FormData(le.target),Xe=await(u&&X?u.value():void 0),oe={name:Hl(be,"name"),email:Hl(be,"email"),message:Hl(be,"message"),attachments:Xe?[Xe]:void 0};if(!_e(oe))return;try{const Be=await i({name:oe.name,email:oe.email,message:oe.message,source:Lk,tags:h},{attachments:oe.attachments});o(oe,Be)}catch(Be){Pc&&q.error(Be),z(Be),s(Be)}}finally{P(!1)}},[u&&X,o,s]);return it("form",{class:"form",onSubmit:pe},we&&X?it(we,{onError:Q}):null,it("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:ae},it("div",{class:"form__top"},j?it("div",{class:"form__error-container"},j):null,c?it("label",{for:"name",class:"form__label"},it(Ul,{label:F,isRequiredLabel:G,isRequired:U}),it("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:Y,required:U,type:"text"})):it("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?it("label",{for:"email",class:"form__label"},it(Ul,{label:w,isRequiredLabel:G,isRequired:L}),it("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:T,required:L,type:"email"})):it("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),it("label",{for:"message",class:"form__label"},it(Ul,{label:K,isRequiredLabel:G,isRequired:!0}),it("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:V,required:!0,rows:5})),we?it("label",{for:"screenshot",class:"form__label"},it("button",{class:"btn btn--default",disabled:ae,type:"button",onClick:()=>{ce(null),se(le=>!le)}},X?m:d),fe?it("div",{class:"form__error-container"},fe.message):null):null),it("div",{class:"btn-group"},it("button",{class:"btn btn--primary",disabled:ae,type:"submit"},D),it("button",{class:"btn btn--default",disabled:ae,type:"button",onClick:r},g))))}function Ul({label:e,isRequired:t,isRequiredLabel:n}){return it("span",{class:"form__label__text"},e,t&&it("span",{class:"form__label__text--required"},n))}const uc=16,wm=17,pC="http://www.w3.org/2000/svg";function mC(){const e=c=>tr.document.createElementNS(pC,c),t=Bn(e("svg"),{width:`${uc}`,height:`${wm}`,viewBox:`0 0 ${uc} ${wm}`,fill:"inherit"}),n=Bn(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Bn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),i=Bn(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(i,r);const o=e("defs"),s=Bn(e("clipPath"),{id:"clip0_57_156"}),a=Bn(e("rect"),{width:`${uc}`,height:`${uc}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}function gC({open:e,onFormSubmitted:t,...n}){const r=n.options,i=ra(()=>({__html:mC().outerHTML}),[]),[o,s]=Pi(null),a=ko(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),c=ko((u,h)=>{n.onSubmitSuccess(u,h),s(setTimeout(()=>{t(),s(null)},Bk))},[t]);return it(na,null,o?it("div",{class:"success__position",onClick:a},it("div",{class:"success__content"},r.successMessageText,it("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):it("dialog",{class:"dialog",onClick:r.onFormClose,open:e},it("div",{class:"dialog__position"},it("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},it(fC,{options:r}),it(hC,{...n,onSubmitSuccess:c})))))}const yC=`
122
+ .dialog {
123
+ position: fixed;
124
+ z-index: var(--z-index);
125
+ margin: 0;
126
+ inset: 0;
127
+
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ padding: 0;
132
+ height: 100vh;
133
+ width: 100vw;
134
+
135
+ color: var(--dialog-color, var(--foreground));
136
+ fill: var(--dialog-color, var(--foreground));
137
+ line-height: 1.75em;
138
+
139
+ background-color: rgba(0, 0, 0, 0.05);
140
+ border: none;
141
+ inset: 0;
142
+ opacity: 1;
143
+ transition: opacity 0.2s ease-in-out;
144
+ }
145
+
146
+ .dialog__position {
147
+ position: fixed;
148
+ z-index: var(--z-index);
149
+ inset: var(--dialog-inset);
150
+ padding: var(--page-margin);
151
+ display: flex;
152
+ max-height: calc(100vh - (2 * var(--page-margin)));
153
+ }
154
+ @media (max-width: 600px) {
155
+ .dialog__position {
156
+ inset: var(--page-margin);
157
+ padding: 0;
158
+ }
159
+ }
160
+
161
+ .dialog__position:has(.editor) {
162
+ inset: var(--page-margin);
163
+ padding: 0;
164
+ }
165
+
166
+ .dialog:not([open]) {
167
+ opacity: 0;
168
+ pointer-events: none;
169
+ visibility: hidden;
170
+ }
171
+ .dialog:not([open]) .dialog__content {
172
+ transform: translate(0, -16px) scale(0.98);
173
+ }
174
+
175
+ .dialog__content {
176
+ display: flex;
177
+ flex-direction: column;
178
+ gap: 16px;
179
+ padding: var(--dialog-padding, 24px);
180
+ max-width: 100%;
181
+ width: 100%;
182
+ max-height: 100%;
183
+ overflow: auto;
184
+
185
+ background: var(--dialog-background, var(--background));
186
+ border-radius: var(--dialog-border-radius, 20px);
187
+ border: var(--dialog-border, var(--border));
188
+ box-shadow: var(--dialog-box-shadow, var(--box-shadow));
189
+ transform: translate(0, 0) scale(1);
190
+ transition: transform 0.2s ease-in-out;
191
+ }
192
+
193
+ `,_C=`
194
+ .dialog__header {
195
+ display: flex;
196
+ gap: 4px;
197
+ justify-content: space-between;
198
+ font-weight: var(--dialog-header-weight, 600);
199
+ margin: 0;
200
+ }
201
+ .dialog__title {
202
+ align-self: center;
203
+ width: var(--form-width, 272px);
204
+ }
205
+
206
+ @media (max-width: 600px) {
207
+ .dialog__title {
208
+ width: auto;
209
+ }
210
+ }
211
+
212
+ .dialog__position:has(.editor) .dialog__title {
213
+ width: auto;
214
+ }
215
+
216
+
217
+ .brand-link {
218
+ display: inline-flex;
219
+ }
220
+ .brand-link:focus-visible {
221
+ outline: var(--outline);
222
+ }
223
+ `,bC=`
224
+ .form {
225
+ display: flex;
226
+ overflow: auto;
227
+ flex-direction: row;
228
+ gap: 16px;
229
+ flex: 1 0;
230
+ }
231
+
232
+ .form fieldset {
233
+ border: none;
234
+ margin: 0;
235
+ padding: 0;
236
+ }
237
+
238
+ .form__right {
239
+ flex: 0 0 auto;
240
+ display: flex;
241
+ overflow: auto;
242
+ flex-direction: column;
243
+ justify-content: space-between;
244
+ gap: 20px;
245
+ width: var(--form-width, 100%);
246
+ }
247
+
248
+ .dialog__position:has(.editor) .form__right {
249
+ width: var(--form-width, 272px);
250
+ }
251
+
252
+ .form__top {
253
+ display: flex;
254
+ flex-direction: column;
255
+ gap: 8px;
256
+ }
257
+
258
+ .form__error-container {
259
+ color: var(--error-color);
260
+ fill: var(--error-color);
261
+ }
262
+
263
+ .form__label {
264
+ display: flex;
265
+ flex-direction: column;
266
+ gap: 4px;
267
+ margin: 0px;
268
+ }
269
+
270
+ .form__label__text {
271
+ display: flex;
272
+ gap: 4px;
273
+ align-items: center;
274
+ }
275
+
276
+ .form__label__text--required {
277
+ font-size: 0.85em;
278
+ }
279
+
280
+ .form__input {
281
+ font-family: inherit;
282
+ line-height: inherit;
283
+ background: transparent;
284
+ box-sizing: border-box;
285
+ border: var(--input-border, var(--border));
286
+ border-radius: var(--input-border-radius, 6px);
287
+ color: var(--input-color, inherit);
288
+ fill: var(--input-color, inherit);
289
+ font-size: var(--input-font-size, inherit);
290
+ font-weight: var(--input-font-weight, 500);
291
+ padding: 6px 12px;
292
+ }
293
+
294
+ .form__input::placeholder {
295
+ opacity: 0.65;
296
+ color: var(--input-placeholder-color, inherit);
297
+ filter: var(--interactive-filter);
298
+ }
299
+
300
+ .form__input:focus-visible {
301
+ outline: var(--input-focus-outline, var(--outline));
302
+ }
303
+
304
+ .form__input--textarea {
305
+ font-family: inherit;
306
+ resize: vertical;
307
+ }
308
+
309
+ .error {
310
+ color: var(--error-color);
311
+ fill: var(--error-color);
312
+ }
313
+ `,vC=`
314
+ .btn-group {
315
+ display: grid;
316
+ gap: 8px;
317
+ }
318
+
319
+ .btn {
320
+ line-height: inherit;
321
+ border: var(--button-border, var(--border));
322
+ border-radius: var(--button-border-radius, 6px);
323
+ cursor: pointer;
324
+ font-family: inherit;
325
+ font-size: var(--button-font-size, inherit);
326
+ font-weight: var(--button-font-weight, 600);
327
+ padding: var(--button-padding, 6px 16px);
328
+ }
329
+ .btn[disabled] {
330
+ opacity: 0.6;
331
+ pointer-events: none;
332
+ }
333
+
334
+ .btn--primary {
335
+ color: var(--button-primary-color, var(--accent-foreground));
336
+ fill: var(--button-primary-color, var(--accent-foreground));
337
+ background: var(--button-primary-background, var(--accent-background));
338
+ border: var(--button-primary-border, var(--border));
339
+ border-radius: var(--button-primary-border-radius, 6px);
340
+ font-weight: var(--button-primary-font-weight, 500);
341
+ }
342
+ .btn--primary:hover {
343
+ color: var(--button-primary-hover-color, var(--accent-foreground));
344
+ fill: var(--button-primary-hover-color, var(--accent-foreground));
345
+ background: var(--button-primary-hover-background, var(--accent-background));
346
+ filter: var(--interactive-filter);
347
+ }
348
+ .btn--primary:focus-visible {
349
+ background: var(--button-primary-hover-background, var(--accent-background));
350
+ filter: var(--interactive-filter);
351
+ outline: var(--button-primary-focus-outline, var(--outline));
352
+ }
353
+
354
+ .btn--default {
355
+ color: var(--button-color, var(--foreground));
356
+ fill: var(--button-color, var(--foreground));
357
+ background: var(--button-background, var(--background));
358
+ border: var(--button-border, var(--border));
359
+ border-radius: var(--button-border-radius, 6px);
360
+ font-weight: var(--button-font-weight, 500);
361
+ }
362
+ .btn--default:hover {
363
+ color: var(--button-color, var(--foreground));
364
+ fill: var(--button-color, var(--foreground));
365
+ background: var(--button-hover-background, var(--background));
366
+ filter: var(--interactive-filter);
367
+ }
368
+ .btn--default:focus-visible {
369
+ background: var(--button-hover-background, var(--background));
370
+ filter: var(--interactive-filter);
371
+ outline: var(--button-focus-outline, var(--outline));
372
+ }
373
+ `,wC=`
374
+ .success__position {
375
+ position: fixed;
376
+ inset: var(--dialog-inset);
377
+ padding: var(--page-margin);
378
+ z-index: var(--z-index);
379
+ }
380
+ .success__content {
381
+ background: var(--success-background, var(--background));
382
+ border: var(--success-border, var(--border));
383
+ border-radius: var(--success-border-radius, 1.7em/50%);
384
+ box-shadow: var(--success-box-shadow, var(--box-shadow));
385
+ font-weight: var(--success-font-weight, 600);
386
+ color: var(--success-color);
387
+ fill: var(--success-color);
388
+ padding: 12px 24px;
389
+ line-height: 1.75em;
390
+
391
+ display: grid;
392
+ align-items: center;
393
+ grid-auto-flow: column;
394
+ gap: 6px;
395
+ cursor: default;
396
+ }
397
+
398
+ .success__icon {
399
+ display: flex;
400
+ }
401
+ `;function SC(e){const t=Et.createElement("style");return t.textContent=`
402
+ :host {
403
+ --dialog-inset: var(--inset);
404
+ }
405
+
406
+ ${yC}
407
+ ${_C}
408
+ ${bC}
409
+ ${vC}
410
+ ${wC}
411
+ `,e&&t.setAttribute("nonce",e),t}function EC(){const e=et().getUser(),t=Zt().getUser(),n=Hu().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const TC=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const i=r,o=e.useSentryUser,s=EC(),a=Et.createElement("div"),c=SC(e.styleNonce);let u="";const h={get el(){return a},appendToDom(){!i.contains(c)&&!i.contains(a)&&(i.appendChild(c),i.appendChild(a))},removeFromDom(){a.remove(),c.remove(),Et.body.style.overflow=u},open(){m(!0),e.onFormOpen?.(),Ae()?.emit("openFeedbackWidget"),u=Et.body.style.overflow,Et.body.style.overflow="hidden"},close(){m(!1),Et.body.style.overflow=u}},d=t?.createInput({h:it,hooks:cC,dialog:h,options:e}),m=g=>{Zk(it(gC,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&s?.[o.name]||"",defaultEmail:o&&s?.[o.email]||"",onFormClose:()=>{m(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(w,T)=>{m(!1),e.onSubmitSuccess?.(w,T)},onSubmitError:w=>{e.onSubmitError?.(w)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:g}),a)};return h}});function IC({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function xC(e){const t=Et.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
412
+ .editor {
413
+ display: flex;
414
+ flex-grow: 1;
415
+ flex-direction: column;
416
+ }
417
+
418
+ .editor__image-container {
419
+ justify-items: center;
420
+ padding: 15px;
421
+ position: relative;
422
+ height: 100%;
423
+ border-radius: var(--menu-border-radius, 6px);
424
+
425
+ background-color: ${n};
426
+ background-image: repeating-linear-gradient(
427
+ -145deg,
428
+ transparent,
429
+ transparent 8px,
430
+ ${n} 8px,
431
+ ${n} 11px
432
+ ),
433
+ repeating-linear-gradient(
434
+ -45deg,
435
+ transparent,
436
+ transparent 15px,
437
+ ${r} 15px,
438
+ ${r} 16px
439
+ );
440
+ }
441
+
442
+ .editor__canvas-container {
443
+ width: 100%;
444
+ height: 100%;
445
+ position: relative;
446
+ display: flex;
447
+ align-items: center;
448
+ justify-content: center;
449
+ }
450
+
451
+ .editor__canvas-container > * {
452
+ object-fit: contain;
453
+ position: absolute;
454
+ }
455
+
456
+ .editor__tool-container {
457
+ padding-top: 8px;
458
+ display: flex;
459
+ justify-content: center;
460
+ }
461
+
462
+ .editor__tool-bar {
463
+ display: flex;
464
+ gap: 8px;
465
+ }
466
+
467
+ .editor__tool {
468
+ display: flex;
469
+ padding: 8px 12px;
470
+ justify-content: center;
471
+ align-items: center;
472
+ border: var(--button-border, var(--border));
473
+ border-radius: var(--button-border-radius, 6px);
474
+ background: var(--button-background, var(--background));
475
+ color: var(--button-color, var(--foreground));
476
+ }
477
+
478
+ .editor__tool--active {
479
+ background: var(--button-primary-background, var(--accent-background));
480
+ color: var(--button-primary-color, var(--accent-foreground));
481
+ }
482
+
483
+ .editor__rect {
484
+ position: absolute;
485
+ z-index: 2;
486
+ }
487
+
488
+ .editor__rect button {
489
+ opacity: 0;
490
+ position: absolute;
491
+ top: -12px;
492
+ right: -12px;
493
+ cursor: pointer;
494
+ padding: 0;
495
+ z-index: 3;
496
+ border: none;
497
+ background: none;
498
+ }
499
+
500
+ .editor__rect:hover button {
501
+ opacity: 1;
502
+ }
503
+ `,e&&t.setAttribute("nonce",e),t}function AC({h:e}){return function({action:n,setAction:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},"Highlight"),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},"Hide")))}}function kC({hooks:e}){function t(){const[n,r]=e.useState(tr.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(tr.devicePixelRatio)},o=matchMedia(`(resolution: ${tr.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Ts.mediaDevices.getDisplayMedia({video:{width:tr.innerWidth*a,height:tr.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),h=Et.createElement("video");await new Promise((d,m)=>{h.srcObject=u,h.onloadedmetadata=()=>{i(h,a),u.getTracks().forEach(g=>g.stop()),d()},h.play().catch(m)}),o()})().catch(s)},[])}}function CC(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function ai(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function $l(e,t){ai(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function jl(e,t,n){ai(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{CC(o,i,t)})})}function RC({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=kC({hooks:t}),s=AC({h:e}),a=IC({h:e}),c={__html:xC(i.styleNonce).innerText},u=r.el.style,h=({screenshot:d})=>{const[m,g]=t.useState("highlight"),[w,T]=t.useState([]),L=t.useRef(null),U=t.useRef(null),K=t.useRef(null),V=t.useRef(null),[F,Y]=t.useState(1),D=t.useMemo(()=>{const X=Et.getElementById(i.id);if(!X)return"white";const se=getComputedStyle(X);return se.getPropertyValue("--button-primary-background")||se.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const X=()=>{const se=L.current;se&&(ai(d.canvas,{alpha:!1},we=>{const fe=Math.min(se.clientWidth/we.width,se.clientHeight/we.height);Y(fe)}),(se.clientHeight===0||se.clientWidth===0)&&setTimeout(X,0))};return X(),tr.addEventListener("resize",X),()=>{tr.removeEventListener("resize",X)}},[d]);const G=t.useCallback((X,se)=>{ai(X,{alpha:!0},(we,fe)=>{fe.scale(se,se),we.width=d.canvas.width,we.height=d.canvas.height})},[d]);t.useEffect(()=>{G(U.current,d.dpi),$l(U.current,d.canvas)},[d]),t.useEffect(()=>{G(K.current,d.dpi),ai(K.current,{alpha:!0},(X,se)=>{se.clearRect(0,0,X.width,X.height)}),jl(K.current,D,w)},[w,D]),t.useEffect(()=>{G(n,d.dpi),$l(n,d.canvas),ai(Et.createElement("canvas"),{alpha:!0},(X,se)=>{se.scale(d.dpi,d.dpi),X.width=d.canvas.width,X.height=d.canvas.height,jl(X,D,w),$l(n,X)})},[w,d,D]);const ae=X=>{if(!m||!V.current)return;const se=V.current.getBoundingClientRect(),we={type:m,x:X.offsetX/F,y:X.offsetY/F},fe=(_e,pe)=>{const le=(pe.clientX-se.x)/F,be=(pe.clientY-se.y)/F;return{type:_e.type,x:Math.min(_e.x,le),y:Math.min(_e.y,be),w:Math.abs(le-_e.x),h:Math.abs(be-_e.y)}},ce=_e=>{ai(K.current,{alpha:!0},(pe,le)=>{le.clearRect(0,0,pe.width,pe.height)}),jl(K.current,D,[...w,fe(we,_e)])},Q=_e=>{const pe=fe(we,_e);pe.w*F>=1&&pe.h*F>=1&&T(le=>[...le,pe]),Et.removeEventListener("mousemove",ce),Et.removeEventListener("mouseup",Q)};Et.addEventListener("mousemove",ce),Et.addEventListener("mouseup",Q)},P=t.useCallback(X=>se=>{se.preventDefault(),se.stopPropagation(),T(we=>{const fe=[...we];return fe.splice(X,1),fe})},[]),j={width:`${d.canvas.width*F}px`,height:`${d.canvas.height*F}px`},z=X=>{X.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:L},e("canvas",{ref:U,id:"background",style:j}),e("canvas",{ref:K,id:"foreground",style:j}),e("div",{ref:V,onMouseDown:ae,style:j},w.map((X,se)=>e("div",{key:se,class:"editor__rect",style:{top:`${X.y*F}px`,left:`${X.x*F}px`,width:`${X.w*F}px`,height:`${X.h*F}px`}},e("button",{"aria-label":"Remove",onClick:P(se),onMouseDown:z,onMouseUp:z,type:"button"},e(a,null))))))),e(s,{action:m,setAction:g}))};return function({onError:m}){const[g,w]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((T,L)=>{ai(Et.createElement("canvas"),{alpha:!1},(U,K)=>{K.scale(L,L),U.width=T.videoWidth,U.height=T.videoHeight,K.drawImage(T,0,0,U.width,U.height),w({canvas:U,dpi:L})}),n.width=T.videoWidth,n.height=T.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(T=>{u.display="block",m(T)},[])}),g?e(h,{screenshot:g}):e("div",null)}}const NC=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=Et.createElement("canvas");return{input:RC({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),De=$e;let Wf=0;function D_(){return Wf>0}function OC(){Wf++,setTimeout(()=>{Wf--})}function Ho(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Od(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>Ho(s,t));return e.apply(this,o)}catch(o){throw OC(),Xn(s=>{s.addEventProcessor(a=>(t.mechanism&&(Tf(a,void 0),mi(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),Wi(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}n0(r,e),Rn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Qd(){const e=Yi(),{referrer:t}=De.document||{},{userAgent:n}=De.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const MC={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},Sm=De;async function B_(e,t){const n=MC[e],r=Sm.Sentry=Sm.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=PC(n),s=De.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((d,m)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",m)}),c=De.document.currentScript,u=De.document.body||De.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const h=r[e];if(typeof h!="function")throw new Error(`Could not load integration: ${e}`);return h}function PC(e){const n=Ae()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Br}/${e}.min.js`,n).toString()}const LC=I_({lazyLoadIntegration:B_}),Em=I_({getModalIntegration:()=>TC,getScreenshotIntegration:()=>NC});function ts(e,t,n,r){Lf({level:e,message:t,attributes:n,severityNumber:r})}function DC(e,t){ts("trace",e,t)}function BC(e,t){ts("debug",e,t)}function FC(e,t){ts("info",e,t)}function HC(e,t){ts("warn",e,t)}function UC(e,t){ts("error",e,t)}function $C(e,t){ts("fatal",e,t)}const jC=Object.freeze(Object.defineProperty({__proto__:null,debug:BC,error:UC,fatal:$C,fmt:Mx,info:FC,trace:DC,warn:HC},Symbol.toStringTag,{value:"Module"}));function qu(e,t){const n=eh(e,t),r={type:qC(t),value:XC(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function GC(e,t,n,r){const o=Ae()?.getOptions().normalizeDepth,s=JC(t),a={__serialized__:k0(t,o)};if(s)return{exception:{values:[qu(e,s)]},extra:a};const c={exception:{values:[{type:Fu(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:YC(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=eh(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Gl(e,t){return{exception:{values:[qu(e,t)]}}}function eh(e,t){const n=t.stacktrace||t.stack||"",r=zC(t),i=VC(t);try{return e(n,r,i)}catch{}return[]}const WC=/Minified React error #\d+;/i;function zC(e){return e&&WC.test(e.message)?1:0}function VC(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function F_(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function qC(e){const t=e?.name;return!t&&F_(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function XC(e){const t=e?.message;return F_(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function H_(e,t,n,r){const i=n?.syntheticException||void 0,o=th(e,t,i,r);return mi(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),zr(o)}function U_(e,t,n="info",r,i){const o=r?.syntheticException||void 0,s=zf(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),zr(s)}function th(e,t,n,r,i){let o;if(Zy(t)&&t.error)return Gl(e,t.error);if(bp(t)||oT(t)){const s=t;if("stack"in t)o=Gl(e,t);else{const a=s.name||(bp(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=zf(e,c,n,r),Tf(o,c)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return di(t)?Gl(e,t):$r(t)||Fu(t)?(o=GC(e,t,n,i),mi(o,{synthetic:!0}),o):(o=zf(e,t,n,r),Tf(o,`${t}`),mi(o,{synthetic:!0}),o)}function zf(e,t,n,r){const i={};if(r&&n){const o=eh(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),mi(i,{synthetic:!0})}if(Bu(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function YC(e,{isUnhandledRejection:t}){const n=dT(e),r=t?"promise rejection":"exception";return Zy(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fu(e)?`Event \`${KC(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function KC(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function JC(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const ZC=5e3;class $_ extends lx{constructor(t){const n=QC(t),r=De.SENTRY_SDK_SOURCE||_k();Dx(n,"browser",["browser"],r),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a}=this._options,c=s??a?.enableLogs;De.document&&(o||c)&&De.document.addEventListener("visibilitychange",()=>{De.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&Mc(this))}),c&&(this.on("flush",()=>{Mc(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Mc(this)},ZC)})),i&&(this.on("postprocessEvent",Px),this.on("beforeSendSession",Lx))}eventFromException(t,n){return H_(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return U_(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function QC(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:De.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Uo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ke=$e,eR=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ns=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=eR(t.value,n),e(t)))}},tR=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ia=(e=!0)=>{const t=Ke.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},rs=()=>ia()?.activationStart??0,is=(e,t=-1)=>{const n=ia();let r="navigate";return n&&(Ke.document?.prerendering||rs()>0?r="prerender":Ke.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:tR(),navigationType:r}},Wl=new WeakMap;function nh(e,t){return Wl.get(e)||Wl.set(e,new t),Wl.get(e)}class lu{constructor(){lu.prototype.__init.call(this),lu.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const to=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Xu=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let As=-1;const nR=()=>Ke.document?.visibilityState==="hidden"&&!Ke.document?.prerendering?0:1/0,fu=e=>{Ke.document.visibilityState==="hidden"&&As>-1&&(As=e.type==="visibilitychange"?e.timeStamp:0,iR())},rR=()=>{addEventListener("visibilitychange",fu,!0),addEventListener("prerenderingchange",fu,!0)},iR=()=>{removeEventListener("visibilitychange",fu,!0),removeEventListener("prerenderingchange",fu,!0)},Yu=()=>{if(Ke.document&&As<0){const e=rs();As=(Ke.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??nR(),rR()}return{get firstHiddenTime(){return As}}},oa=e=>{Ke.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},oR=[1800,3e3],sR=(e,t={})=>{oa(()=>{const n=Yu(),r=is("FCP");let i;const s=to("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-rs(),0),r.entries.push(c),i(!0)))});s&&(i=ns(e,r,oR,t.reportAllChanges))})},aR=[.1,.25],cR=(e,t={})=>{sR(Xu(()=>{const n=is("CLS",0);let r;const i=nh(t,lu),o=a=>{for(const c of a)i._processEntry(c);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},s=to("layout-shift",o);s&&(r=ns(e,n,aR,t.reportAllChanges),Ke.document?.addEventListener("visibilitychange",()=>{Ke.document?.visibilityState==="hidden"&&(o(s.takeRecords()),r(!0))}),Ke?.setTimeout?.(r))}))},Ku=e=>{const t=n=>{(n.type==="pagehide"||Ke.document?.visibilityState==="hidden")&&e(n)};Ke.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},uR=[100,300],lR=(e,t={})=>{oa(()=>{const n=Yu(),r=is("FID");let i;const o=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),i(!0))},s=c=>{c.forEach(o)},a=to("first-input",s);i=ns(e,r,uR,t.reportAllChanges),a&&Ku(Xu(()=>{s(a.takeRecords()),a.disconnect()}))})};let j_=0,zl=1/0,lc=0;const fR=e=>{e.forEach(t=>{t.interactionId&&(zl=Math.min(zl,t.interactionId),lc=Math.max(lc,t.interactionId),j_=lc?(lc-zl)/7+1:0)})};let Vf;const G_=()=>Vf?j_:performance.interactionCount||0,dR=()=>{"interactionCount"in performance||Vf||(Vf=to("event",fR,{type:"event",buffered:!0,durationThreshold:0}))},Vl=10;let W_=0;const hR=()=>G_()-W_;class du{constructor(){du.prototype.__init.call(this),du.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){W_=G_(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(hR()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Vl||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>Vl){const i=this._longestInteractionList.splice(Vl);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const z_=e=>{const t=Ke.requestIdleCallback||Ke.setTimeout;Ke.document?.visibilityState==="hidden"?e():(e=Xu(e),t(e),Ku(e))},pR=[200,500],mR=40,gR=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&oa(()=>{dR();const n=is("INP");let r;const i=nh(t,du),o=a=>{z_(()=>{for(const u of a)i._processEntry(u);const c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},s=to("event",o,{durationThreshold:t.durationThreshold??mR});r=ns(e,n,pR,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Ku(()=>{o(s.takeRecords()),r(!0)}))})};class yR{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const _R=[2500,4e3],bR=(e,t={})=>{oa(()=>{const n=Yu(),r=is("LCP");let i;const o=nh(t,yR),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-rs(),0),r.entries=[u],i())},a=to("largest-contentful-paint",s);if(a){i=ns(e,r,_R,t.reportAllChanges);const c=Xu(()=>{s(a.takeRecords()),a.disconnect(),i(!0)});for(const u of["keydown","click","visibilitychange"])Ke.document&&addEventListener(u,()=>z_(c),{capture:!0,once:!0})}})},vR=[800,1800],qf=e=>{Ke.document?.prerendering?oa(()=>qf(e)):Ke.document?.readyState!=="complete"?addEventListener("load",()=>qf(e),!0):setTimeout(e)},wR=(e,t={})=>{const n=is("TTFB"),r=ns(e,n,vR,t.reportAllChanges);qf(()=>{const i=ia();i&&(n.value=Math.max(i.responseStart-rs(),0),n.entries=[i],r(!0))})},ks={},hu={};let V_,q_,X_,Y_,K_;function rh(e,t=!1){return sa("cls",e,ER,V_,t)}function ih(e,t=!1){return sa("lcp",e,IR,X_,t)}function J_(e){return sa("fid",e,TR,q_)}function SR(e){return sa("ttfb",e,xR,Y_)}function Z_(e){return sa("inp",e,AR,K_)}function zi(e,t){return Q_(e,t),hu[e]||(kR(e),hu[e]=!0),eb(e,t)}function os(e,t){const n=ks[e];if(n?.length)for(const r of n)try{r(t)}catch(i){Uo&&q.error(`Error while triggering instrumentation handler.
504
+ Type: ${e}
505
+ Name: ${Ur(r)}
506
+ Error:`,i)}}function ER(){return cR(e=>{os("cls",{metric:e}),V_=e},{reportAllChanges:!0})}function TR(){return lR(e=>{os("fid",{metric:e}),q_=e})}function IR(){return bR(e=>{os("lcp",{metric:e}),X_=e},{reportAllChanges:!0})}function xR(){return wR(e=>{os("ttfb",{metric:e}),Y_=e})}function AR(){return gR(e=>{os("inp",{metric:e}),K_=e})}function sa(e,t,n,r,i=!1){Q_(e,t);let o;return hu[e]||(o=n(),hu[e]=!0),r&&t({metric:r}),eb(e,t,i?o:void 0)}function kR(e){const t={};e==="event"&&(t.durationThreshold=0),to(e,n=>{os(e,{entries:n})},t)}function Q_(e,t){ks[e]=ks[e]||[],ks[e].push(t)}function eb(e,t,n){return()=>{n&&n();const r=ks[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function CR(e){return"duration"in e}function ql(e){return typeof e=="number"&&isFinite(e)}function qr(e,t,n,{...r}){const i=Ze(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Zs(e,()=>{const o=Qi({startTime:t,...r});return o&&o.end(n),o})}function oh(e){const t=Ae();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),h=t.getIntegrationByName("Replay")?.getReplayId(),d=et(),m=d.getUser(),g=m!==void 0?m.email||m.id||m.ip_address:void 0;let w;try{w=d.getScopeData().contexts.profile.profile_id}catch{}const T={release:s,environment:a,user:g||void 0,profile_id:w||void 0,replay_id:h||void 0,transaction:r,"user_agent.original":Ke.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i};return Qi({name:n,attributes:T,startTime:o,experimental:{standalone:!0}})}function Ju(){return Ke.addEventListener&&Ke.performance}function Ot(e){return e/1e3}function tb(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function nb(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function rb(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n),r=!0}Ku(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),o?.(),s?.())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s?.()})}function RR(e){let t=0,n;if(!nb("layout-shift"))return;const r=rh(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);rb(e,(i,o)=>{NR(t,n,o,i),r()})}function NR(e,t,n,r){Uo&&q.log(`Sending CLS span (${e})`);const i=Ot((pn()||0)+(t?.startTime||0)),o=et().getScopeData().transactionName,s=t?qn(t.sources[0]?.node):"Layout shift",a={[Bt]:"auto.http.browser.cls",[Un]:"ui.webvital.cls",[es]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,h)=>{a[`cls.source.${h+1}`]=qn(u.node)});const c=oh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("cls",{[Ks]:"",[Js]:e}),c.end(i))}function OR(e){let t=0,n;if(!nb("largest-contentful-paint"))return;const r=ih(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);rb(e,(i,o)=>{MR(t,n,o,i),r()})}function MR(e,t,n,r){Uo&&q.log(`Sending LCP span (${e})`);const i=Ot((pn()||0)+(t?.startTime||0)),o=et().getScopeData().transactionName,s=t?qn(t.element):"Largest contentful paint",a={[Bt]:"auto.http.browser.lcp",[Un]:"ui.webvital.lcp",[es]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=qn(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=oh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[Ks]:"millisecond",[Js]:e}),c.end(i))}const PR=2147483647;let Tm=0,cn={},An,pu;function LR({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Ju();if(r&&pn()){r.mark&&Ke.performance.mark("sentry-tracing-init");const i=$R(),o=t?OR(n):UR(),s=jR(),a=e?RR(n):HR();return()=>{i(),o?.(),s(),a?.()}}return()=>{}}function DR(){zi("longtask",({entries:e})=>{const t=Qt();if(!t)return;const{op:n,start_timestamp:r}=Ze(t);for(const i of e){const o=Ot(pn()+i.startTime),s=Ot(i.duration);n==="navigation"&&r&&o<r||qr(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Bt]:"auto.ui.browser.metrics"}})}})}function BR(){new PerformanceObserver(t=>{const n=Qt();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Ot(pn()+r.startTime),{start_timestamp:o,op:s}=Ze(n);if(s==="navigation"&&o&&i<o)continue;const a=Ot(r.duration),c={[Bt]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:h,invokerType:d,sourceURL:m,sourceFunctionName:g,sourceCharPosition:w}=u;c["browser.script.invoker"]=h,c["browser.script.invoker_type"]=d,m&&(c["code.filepath"]=m),g&&(c["code.function"]=g),w!==-1&&(c["browser.script.source_char_position"]=w),qr(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function FR(){zi("event",({entries:e})=>{const t=Qt();if(t){for(const n of e)if(n.name==="click"){const r=Ot(pn()+n.startTime),i=Ot(n.duration),o={name:qn(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Bt]:"auto.ui.browser.metrics"}},s=t0(n.target);s&&(o.attributes["ui.component_name"]=s),qr(t,r,r+i,o)}}})}function HR(){return rh(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(cn.cls={value:e.value,unit:""},pu=t)},!0)}function UR(){return ih(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(cn.lcp={value:e.value,unit:"millisecond"},An=t)},!0)}function $R(){return J_(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Ot(pn()),r=Ot(t.startTime);cn.fid={value:e.value,unit:"millisecond"},cn["mark.fid"]={value:n+r,unit:"second"}})}function jR(){return SR(({metric:e})=>{e.entries[e.entries.length-1]&&(cn.ttfb={value:e.value,unit:"millisecond"})})}function GR(e,t){const n=Ju(),r=pn();if(!n?.getEntries||!r)return;const i=Ot(r),o=n.getEntries(),{op:s,start_timestamp:a}=Ze(e);if(o.slice(Tm).forEach(c=>{const u=Ot(c.startTime),h=Ot(Math.max(0,c.duration));if(!(s==="navigation"&&a&&i+u<a))switch(c.entryType){case"navigation":{VR(e,c,i);break}case"mark":case"paint":case"measure":{WR(e,c,u,h,i,t.ignorePerformanceApiSpans);const d=Yu(),m=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&m&&(cn.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&m&&(cn.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{YR(e,c,c.name,u,h,i,t.ignoreResourceSpans);break}}}),Tm=Math.max(o.length-1,0),KR(e),s==="pageload"){ZR(cn);const c=cn["mark.fid"];c&&cn.fid&&(qr(e,c.value,c.value+Ot(cn.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Bt]:"auto.ui.browser.metrics"}}),delete cn["mark.fid"]),t.recordClsOnPageloadSpan||delete cn.cls,t.recordLcpOnPageloadSpan||delete cn.lcp,Object.entries(cn).forEach(([u,h])=>{R0(u,h.value,h.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",rs()),JR(e,t)}An=void 0,pu=void 0,cn={}}function WR(e,t,n,r,i,o){if(["mark","measure"].includes(t.entryType)&&or(t.name,o))return;const s=ia(!1),a=Ot(s?s.requestStart:0),c=i+Math.max(n,a),u=i+n,h=u+r,d={[Bt]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),zR(d,t),c<=h&&qr(e,c,h,{name:t.name,op:t.entryType,attributes:d})}function zR(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&Ro(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Ro(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function VR(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{fc(e,t,r,n)}),fc(e,t,"secureConnection",n,"TLS/SSL"),fc(e,t,"fetch",n,"cache"),fc(e,t,"domainLookup",n,"DNS"),XR(e,t,n)}function fc(e,t,n,r,i=n){const o=qR(n),s=t[o],a=t[`${n}Start`];!a||!s||qr(e,r+Ot(a),r+Ot(s),{op:`browser.${i}`,name:t.name,attributes:{[Bt]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function qR(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function XR(e,t,n){const r=n+Ot(t.requestStart),i=n+Ot(t.responseEnd),o=n+Ot(t.responseStart);t.responseEnd&&(qr(e,r,i,{op:"browser.request",name:t.name,attributes:{[Bt]:"auto.ui.browser.metrics"}}),qr(e,o,i,{op:"browser.response",name:t.name,attributes:{[Bt]:"auto.ui.browser.metrics"}}))}function YR(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const c=Hi(n),u={[Bt]:"auto.resource.browser.metrics"};Xl(u,t,"transferSize","http.response_transfer_size"),Xl(u,t,"encodedBodySize","http.response_content_length"),Xl(u,t,"decodedBodySize","http.decoded_response_content_length");const h=t.deliveryType;h!=null&&(u["http.response_delivery_type"]=h);const d=t.renderBlockingStatus;if(d&&(u["resource.render_blocking_status"]=d),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(Ke.location.origin),t.nextHopProtocol!=null){const{name:w,version:T}=tb(t.nextHopProtocol);u["network.protocol.name"]=w,u["network.protocol.version"]=T}const m=o+r,g=m+i;qr(e,m,g,{name:n.replace(Ke.location.origin,""),op:a,attributes:u})}function KR(e){const t=Ke.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),ql(n.rtt)&&(cn["connection.rtt"]={value:n.rtt,unit:"millisecond"})),ql(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),ql(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function JR(e,t){An&&t.recordLcpOnPageloadSpan&&(An.element&&e.setAttribute("lcp.element",qn(An.element)),An.id&&e.setAttribute("lcp.id",An.id),An.url&&e.setAttribute("lcp.url",An.url.trim().slice(0,200)),An.loadTime!=null&&e.setAttribute("lcp.loadTime",An.loadTime),An.renderTime!=null&&e.setAttribute("lcp.renderTime",An.renderTime),e.setAttribute("lcp.size",An.size)),pu?.sources&&t.recordClsOnPageloadSpan&&pu.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,qn(n.node)))}function Xl(e,t,n,r){const i=t[n];i!=null&&i<PR&&(e[r]=i)}function ZR(e){const t=ia(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function QR(){return Ju()&&pn()?zi("element",eN):()=>{}}const eN=({entries:e})=>{const t=Qt(),n=t?Jt(t):void 0,r=n?Ze(n).description:et().getScopeData().transactionName;e.forEach(i=>{const o=i;if(!o.identifier)return;const s=o.name,a=o.renderTime,c=o.loadTime,[u,h]=c?[Ot(c),"load-time"]:a?[Ot(a),"render-time"]:[qt(),"entry-emission"],d=s==="image-paint"?Ot(Math.max(0,(a??0)-(c??0))):0,m={[Bt]:"auto.ui.browser.elementtiming",[Un]:"ui.elementtiming",[Fn]:"component","sentry.span_start_time_source":h,"sentry.transaction_name":r,"element.id":o.id,"element.type":o.element?.tagName?.toLowerCase()||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":s};Gu({name:`element[${o.identifier}]`,attributes:m,startTime:u,onlyIfParent:!0},g=>{g.end(u+d)})})},tN=1e3;let Im,Xf,Yf;function ib(e){const t="dom";vi(t,e),wi(t,nN)}function nN(){if(!Ke.document)return;const e=zn.bind(null,"dom"),t=xm(e,!0);Ke.document.addEventListener("click",t,!1),Ke.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Ke[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(Sn(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},h=u[s]=u[s]||{refCount:0};if(!h.handler){const d=xm(e);h.handler=d,o.call(this,s,d,c)}h.refCount++}catch{}return o.call(this,s,a,c)}}),Sn(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},h=u[s];h&&(h.refCount--,h.refCount<=0&&(o.call(this,s,h.handler,c),h.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function rN(e){if(e.type!==Xf)return!1;try{if(!e.target||e.target._sentryId!==Yf)return!1}catch{}return!0}function iN(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function xm(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=oN(n);if(iN(n.type,r))return;Rn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Rn(r,"_sentryId",En());const i=n.type==="keypress"?"input":n.type;rN(n)||(e({event:n,name:i,global:t}),Xf=n.type,Yf=r?r._sentryId:void 0),clearTimeout(Im),Im=Ke.setTimeout(()=>{Yf=void 0,Xf=void 0},tN)}}function oN(e){try{return e.target}catch{return null}}let dc;function Zu(e){const t="history";vi(t,e),wi(t,sN)}function sN(){if(Ke.addEventListener("popstate",()=>{const t=Ke.location.href,n=dc;if(dc=t,n===t)return;zn("history",{from:n,to:t})}),!uk())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=dc,o=aN(String(r));if(dc=o,i===o)return t.apply(this,n);zn("history",{from:i,to:o})}return t.apply(this,n)}}Sn(Ke.history,"pushState",e),Sn(Ke.history,"replaceState",e)}function aN(e){try{return new URL(e,Ke.location.origin).toString()}catch{return e}}const Hc={};function sh(e){const t=Hc[e];if(t)return t;let n=Ke[e];if(Bf(n))return Hc[e]=n.bind(Ke);const r=Ke.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){Uo&&q.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Hc[e]=n.bind(Ke))}function Am(e){Hc[e]=void 0}function aa(...e){return sh("setTimeout")(...e)}const Lr="__sentry_xhr_v3__";function ah(e){const t="xhr";vi(t,e),wi(t,cN)}function cN(){if(!Ke.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=qt()*1e3,s=ir(r[0])?r[0].toUpperCase():void 0,a=uN(r[1]);if(!s||!a)return t.apply(n,r);n[Lr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Lr];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const h={endTimestamp:qt()*1e3,startTimestamp:o,xhr:n,virtualError:i};zn("xhr",h)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,h,d){return c(),u.apply(h,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,h,d){const[m,g]=d,w=h[Lr];return w&&ir(m)&&ir(g)&&(w.request_headers[m.toLowerCase()]=g),u.apply(h,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Lr];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:qt()*1e3,xhr:n};return zn("xhr",o),t.apply(n,r)}})}function uN(e){if(ir(e))return e;try{return e.toString()}catch{}}function ob(e){return new URLSearchParams(e).toString()}function mu(e,t=q){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ob(e)];if(!e)return[void 0]}catch(n){return Uo&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Uo&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ch(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const Yl=[],Uc=new Map,lN=60;function fN(){if(Ju()&&pn()){const t=dN();return()=>{t()}}return()=>{}}const km={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function dN(){return Z_(hN)}const hN=({metric:e})=>{if(e.value==null)return;const t=Ot(e.value);if(t>lN)return;const n=e.entries.find(w=>w.duration===e.value&&km[w.name]);if(!n)return;const{interactionId:r}=n,i=km[n.name],o=Ot(pn()+n.startTime),s=Qt(),a=s?Jt(s):void 0,u=(r!=null?Uc.get(r):void 0)||a,h=u?Ze(u).description:et().getScopeData().transactionName,d=qn(n.target),m={[Bt]:"auto.http.browser.inp",[Un]:`ui.interaction.${i}`,[es]:n.duration},g=oh({name:d,transaction:h,attributes:m,startTime:o});g&&(g.addEvent("inp",{[Ks]:"millisecond",[Js]:e.value}),g.end(o+t))};function pN(){const e=({entries:t})=>{const n=Qt(),r=n&&Jt(n);t.forEach(i=>{if(!CR(i)||!r)return;const o=i.interactionId;if(o!=null&&!Uc.has(o)){if(Yl.length>10){const s=Yl.shift();Uc.delete(s)}Yl.push(o),Uc.set(o,r)}})};zi("event",e),zi("first-input",e)}function uh(e,t=sh("fetch")){let n=0,r=0;function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Am("fetch"),ou("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Am("fetch"),n-=s,r--,ou(c)}}return e_(e,i)}const mN=10,gN=20,yN=30,_N=40,bN=50;function $o(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?Sr:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const vN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,wN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,SN=/\((\S*)(?::(\d+))(?::(\d+))\)/,EN=e=>{const t=vN.exec(e);if(t){const[,r,i,o]=t;return $o(r,Sr,+i,+o)}const n=wN.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=SN.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[i,o]=lb(n[1]||Sr,n[2]);return $o(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},sb=[yN,EN],TN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,IN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xN=e=>{const t=TN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=IN.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||Sr;return[i,r]=lb(i,r),$o(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ab=[bN,xN],AN=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,kN=e=>{const t=AN.exec(e);return t?$o(t[2],t[1]||Sr,+t[3],t[4]?+t[4]:void 0):void 0},CN=[_N,kN],RN=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,NN=e=>{const t=RN.exec(e);return t?$o(t[2],t[3]||Sr,+t[1]):void 0},ON=[mN,NN],MN=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,PN=e=>{const t=MN.exec(e);return t?$o(t[5],t[3]||t[4]||Sr,+t[1],+t[2]):void 0},LN=[gN,PN],cb=[sb,ab],ub=Xy(...cb),lb=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Sr,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function DN(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Zi(r)}},o=BN(e);return Yr(i,[o])}function BN(e){return[{type:"user_report"},e]}const ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hc=1024,FN="Breadcrumbs",HN=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:FN,setup(n){t.console&&zd(jN(n)),t.dom&&ib($N(n,t.dom)),t.xhr&&ah(GN(n)),t.fetch&&qd(WN(n)),t.history&&Zu(zN(n)),t.sentry&&n.on("beforeSendEvent",UN(n))}}},fb=HN;function UN(e){return function(n){Ae()===e&&Er({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ri(n)},{event:n})}}function $N(e,t){return function(r){if(Ae()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>hc&&(ot&&q.warn(`\`dom.maxStringLength\` cannot exceed ${hc}, but a value of ${a} was configured. Sentry will use ${hc} instead.`),a=hc),typeof s=="string"&&(s=[s]);try{const u=r.event,h=VN(u)?u.target:u;i=qn(h,{keyAttrs:s,maxStringLength:a}),o=t0(h)}catch{i="<unknown>"}if(i.length===0)return;const c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),Er(c,{event:r.event,name:r.name,global:r.global})}}function jN(e){return function(n){if(Ae()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Vd(n.level),message:Qc(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Qc(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Er(r,{input:n.args,level:n.level})}}function GN(e){return function(n){if(Ae()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Lr];if(!r||!i||!o)return;const{method:s,url:a,status_code:c,body:u}=o,h={method:s,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},m={category:"xhr",data:h,type:"http",level:b_(c)};e.emit("beforeOutgoingRequestBreadcrumb",m,d),Er(m,d)}}function WN(e){return function(n){if(Ae()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Er(a,s)}else{const o=n.response,s={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:s,type:"http",level:b_(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Er(c,a)}}}function zN(e){return function(n){if(Ae()!==e)return;let r=n.from,i=n.to;const o=Hi(De.location.href);let s=r?Hi(r):void 0;const a=Hi(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Er({category:"navigation",data:{from:r,to:i}})}}function VN(e){return!!e&&!!e.target}const qN=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],XN="BrowserApiErrors",YN=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:XN,setupOnce(){t.setTimeout&&Sn(De,"setTimeout",Cm),t.setInterval&&Sn(De,"setInterval",Cm),t.requestAnimationFrame&&Sn(De,"requestAnimationFrame",KN),t.XMLHttpRequest&&"XMLHttpRequest"in De&&Sn(XMLHttpRequest.prototype,"send",JN);const n=t.eventTarget;n&&(Array.isArray(n)?n:qN).forEach(i=>ZN(i,t))}}},db=YN;function Cm(e){return function(...t){const n=t[0];return t[0]=Ho(n,{mechanism:{data:{function:Ur(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function KN(e){return function(t){return e.apply(this,[Ho(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ur(e)},handled:!1,type:"instrument"}})])}}function JN(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Sn(n,i,function(o){const s={mechanism:{data:{function:i,handler:Ur(o)},handled:!1,type:"instrument"}},a=Od(o);return a&&(s.mechanism.data.handler=Ur(a)),Ho(o,s)})}),e.apply(this,t)}}function ZN(e,t){const r=De[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Sn(r,"addEventListener",function(i){return function(o,s,a){try{QN(s)&&(s.handleEvent=Ho(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ur(s),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&eO(this,o,s),i.apply(this,[o,Ho(s,{mechanism:{data:{function:"addEventListener",handler:Ur(s),target:e},handled:!1,type:"instrument"}}),a])}}),Sn(r,"removeEventListener",function(i){return function(o,s,a){try{const c=s.__sentry_wrapped__;c&&i.call(this,o,c,a)}catch{}return i.call(this,o,s,a)}}))}function QN(e){return typeof e.handleEvent=="function"}function eO(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const hb=()=>({name:"BrowserSession",setupOnce(){if(typeof De.document>"u"){ot&&q.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Nf({ignoreDuration:!0}),Of(),Zu(({from:e,to:t})=>{e!==void 0&&e!==t&&(Nf({ignoreDuration:!0}),Of())})}}),tO="GlobalHandlers",nO=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:tO,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(rO(n),Rm("onerror")),t.onunhandledrejection&&(iO(n),Rm("onunhandledrejection"))}}},pb=nO;function rO(e){Yy(t=>{const{stackParser:n,attachStacktrace:r}=mb();if(Ae()!==e||D_())return;const{msg:i,url:o,line:s,column:a,error:c}=t,u=aO(th(n,c||i,void 0,r,!1),o,s,a);u.level="error",ea(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function iO(e){Ky(t=>{const{stackParser:n,attachStacktrace:r}=mb();if(Ae()!==e||D_())return;const i=oO(t),o=Ro(i)?sO(i):th(n,i,void 0,r,!0);o.level="error",ea(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function oO(e){if(Ro(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function sO(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function aO(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,h=n,d=ir(t)&&t.length>0?t:Yi();return c.length===0&&c.push({colno:u,filename:d,function:Sr,in_app:!0,lineno:h}),e}function Rm(e){ot&&q.log(`Global Handler attached: ${e}`)}function mb(){return Ae()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const gb=()=>({name:"HttpContext",preprocessEvent(e){if(!De.navigator&&!De.location&&!De.document)return;const t=Qd(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),cO="cause",uO=5,lO="LinkedErrors",fO=(e={})=>{const t=e.limit||uO,n=e.key||cO;return{name:lO,preprocessEvent(r,i,o){const s=o.getOptions();Jx(qu,s.stackParser,n,t,r,i)}}},yb=fO;function dO(){return hO()?(ot&&bi(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function hO(){if(typeof De.window>"u")return!1;const e=De;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Yi(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(De===De.top&&r.some(o=>n.startsWith(`${o}://`)))}function _b(e){return[s_(),i_(),db(),fb(),pb(),yb(),l_(),gb(),hb()]}function pO(e={}){const t=!e.skipBrowserExtensionCheck&&dO(),n={...e,enabled:t?!1:e.enabled,stackParser:tT(e.stackParser||ub),integrations:ox({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?_b():e.defaultIntegrations}),transport:e.transport||uh};return wx($_,n)}function mO(){}function gO(e){e()}function yO(e={}){const t=De.document,n=t?.head||t?.body;if(!n){ot&&q.error("[showReportDialog] Global document not defined");return}const r=et(),o=Ae()?.getDsn();if(!o){ot&&q.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||B0()},a=De.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=rx(o,s);const{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){const h=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{De.removeEventListener("message",h)}};De.addEventListener("message",h)}n.appendChild(a)}const _O=$e,bO="ReportingObserver",Nm=new WeakMap,vO=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Nm.has(Ae()))for(const i of r)Xn(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const c={};for(const u in i.body)c[u]=i.body[u];if(o.setExtra("body",c),i.type==="crash"){const u=i.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=i.body.message||a}au(`${s}: ${a}`)})}return{name:bO,setupOnce(){if(!fk())return;new _O.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Nm.set(r,!0)}}},wO=vO,SO="HttpClient",EO=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:SO,setup(n){OO(n,t),MO(n,t)}}},TO=EO;function IO(e,t,n,r,i){if(vb(e,n.status,n.url)){const o=PO(t,r);let s,a,c,u;Sb()&&([s,c]=Om("Cookie",o),[a,u]=Om("Set-Cookie",n));const h=wb({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:i});ea(h)}}function Om(e,t){const n=kO(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=bb(i))}catch{}return[n,r]}function xO(e,t,n,r,i){if(vb(e,t.status,t.responseURL)){let o,s,a;if(Sb()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=bb(u))}catch{}try{a=CO(t)}catch{}o=r}const c=wb({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i});ea(c)}}function AO(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function bb(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function kO(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function CO(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
507
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function RO(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function NO(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function OO(e,t){v_()&&qd(n=>{if(Ae()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,c]=i;r&&IO(t,a,r,c,o||s)},!1)}function MO(e,t){"XMLHttpRequest"in $e&&ah(n=>{if(Ae()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[Lr];if(!s)return;const{method:a,request_headers:c}=s;try{xO(t,o,a,c,r||i)}catch(u){ot&&q.warn("Error while extracting response event form XHR response",u)}})}function vb(e,t,n){return NO(e.failedRequestStatusCodes,t)&&RO(e.failedRequestTargets,n)&&!n_(n,Ae())}function wb(e){const t=Ae(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:AO(e.responseHeaders)}}};return mi(o,{type:"http.client",handled:!1}),o}function PO(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Sb(){const e=Ae();return e?!!e.getOptions().sendDefaultPii:!1}const Kl=$e,LO=7,DO="ContextLines",BO=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:LO;return{name:DO,processEvent(n){return HO(n,t)}}},FO=BO;function HO(e,t){const n=Kl.document,r=Kl.location&&y_(Kl.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const s=["<!DOCTYPE html>","<html>",...o.split(`
508
+ `),"</html>"];return i.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>UO(u,s,r,t)))}),e}function UO(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||pT(t,e,r),e}const $O="GraphQLClient",jO=e=>({name:$O,setup(t){GO(t,e),WO(t,e)}});function GO(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=Ze(n).data||{};if(!(o[Un]==="http.client"))return;const c=o[RT]||o["http.url"],u=o[CT]||o["http.method"];if(!ir(c)||!ir(u))return;const{endpoints:h}=t,d=or(c,h),m=Tb(r);if(d&&m){const g=Ib(m);if(g){const w=Eb(g);n.updateName(`${u} ${c} (${w})`),n.setAttribute("graphql.document",m)}}})}function WO(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const h=s?.url,{endpoints:d}=t,m=or(h,d),g=Tb(r);if(m&&s&&g){const w=Ib(g);if(!s.graphql&&w){const T=Eb(w);s["graphql.document"]=w.query,s["graphql.operation"]=T}}}})}function Eb(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=zO(t);return r?`${i} ${r}`:`${i}`}function Tb(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Lr];n=r&&mu(r.body)[0]}else{const r=ch(e.input);n=mu(r)[0]}return n}function zO(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Ib(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const VO=jO,Rt=$e,lh="sentryReplaySession",qO="replay_event",fh="Unable to send Replay",XO=3e5,YO=9e5,KO=5e3,JO=5500,ZO=6e4,QO=5e3,e2=3,Mm=15e4,pc=5e3,t2=3e3,n2=300,dh=2e7,r2=4999,i2=15e3,Pm=36e5;var o2=Object.defineProperty,s2=(e,t,n)=>t in e?o2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lm=(e,t,n)=>s2(e,typeof t!="symbol"?t+"":t,n),Kt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Kt||{});function a2(e){return e.nodeType===e.ELEMENT_NODE}function Cs(e){return e?.host?.shadowRoot===e}function Rs(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function c2(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function u2(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function gu(e){try{const t=e.rules||e.cssRules;return t?c2(Array.from(t,xb).join("")):null}catch{return null}}function l2(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function xb(e){let t;if(d2(e))try{t=gu(e.styleSheet)||u2(e)}catch{}else if(h2(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=l2(e)),r&&(n=f2(n)),r||i)return n}return t||e.cssText}function f2(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function d2(e){return"styleSheet"in e}function h2(e){return"selectorText"in e}let Ab=class{constructor(){Lm(this,"idNodeMap",new Map),Lm(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 p2(){return new Ab}function Qu({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ds({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function jo(e){return e.toLowerCase()}function Kf(e){return e.toUpperCase()}const Dm="__rrweb_original__";function m2(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=Dm in o?o[Dm]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function hh(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?jo(t):null}function yu(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function kb(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Bm={};function Cb(e){const t=Bm[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 o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Bm[e]=r.bind(window)}function Jf(...e){return Cb("setTimeout")(...e)}function Rb(...e){return Cb("clearTimeout")(...e)}function Nb(e){try{return e.contentDocument}catch{}}let g2=1;const y2=new RegExp("[^a-z0-9-_:]"),Bs=-2;function ph(){return g2++}function _2(e){if(e instanceof HTMLFormElement)return"form";const t=jo(e.tagName);return y2.test(t)?"div":t}function b2(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let fo,Fm;const v2=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w2=/^(?:[a-z+]+:)?\/\//i,S2=/^www\..*/i,E2=/^(data:)([^,]*),(.*)/i;function _u(e,t){return(e||"").replace(v2,(n,r,i,o,s,a)=>{const c=i||s||a,u=r||o||"";if(!c)return n;if(w2.test(c)||S2.test(c))return`url(${u}${c}${u})`;if(E2.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${b2(t)+c}${u})`;const h=t.split("/"),d=c.split("/");h.pop();for(const m of d)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${u}${h.join("/")}${u})`})}const T2=/^[^ \t\n\r\u000c]+/,I2=/^[, \t\n\r\u000c]+/;function x2(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(I2),!(n>=t.length);){let o=r(T2);if(o.slice(-1)===",")o=Eo(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Eo(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}const Hm=new WeakMap;function Eo(e,t){return!t||t.trim()===""?t:el(e,t)}function A2(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function el(e,t){let n=Hm.get(e);if(n||(n=e.createElement("a"),Hm.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Ob(e,t,n,r,i,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Eo(e,r):n==="srcset"?x2(e,r):n==="style"?_u(r,el(e)):t==="object"&&n==="data"?Eo(e,r):typeof o=="function"?o(n,r,i):r)}function Mb(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function k2(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function C2(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Li(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Li(e.parentNode,t,n,r+1)}function To(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(C2(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Go(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=Li(s,To(r,i)),c<0)return!0;a=Li(s,To(t,n),c>=0?c:1/0)}else{if(a=Li(s,To(t,n)),a<0)return!1;c=Li(s,To(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function R2(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=Jf(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{Rb(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return Jf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function N2(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=Jf(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Rb(o),r=!0,t()})}function O2(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:w={},maskTextFn:T,maskInputFn:L,dataURLOptions:U={},inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:Y=!1}=t,D=M2(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Kt.Document,childNodes:[],compatMode:e.compatMode}:{type:Kt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Kt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:D};case e.ELEMENT_NODE:return L2(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:g,maskAttributeFn:c,maskInputOptions:w,maskInputFn:L,dataURLOptions:U,inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:Y,rootId:D,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m});case e.TEXT_NODE:return P2(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,maskTextFn:T,maskInputOptions:w,maskInputFn:L,rootId:D});case e.CDATA_SECTION_NODE:return{type:Kt.CDATA,textContent:"",rootId:D};case e.COMMENT_NODE:return{type:Kt.Comment,textContent:e.textContent||"",rootId:D};default:return!1}}function M2(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function P2(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:h}=t,d=e.parentNode&&e.parentNode.tagName;let m=e.textContent;const g=d==="STYLE"?!0:void 0,w=d==="SCRIPT"?!0:void 0,T=d==="TEXTAREA"?!0:void 0;if(g&&m){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(m=gu(e.parentNode.sheet))}catch(U){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${U}`,e)}m=_u(m,el(t.doc))}w&&(m="SCRIPT_PLACEHOLDER");const L=Go(e,r,o,i,s,n);if(!g&&!w&&!T&&m&&L&&(m=a?a(m,e.parentElement):m.replace(/[\S]/g,"*")),T&&m&&(c.textarea||L)&&(m=u?u(m,e.parentNode):m.replace(/[\S]/g,"*")),d==="OPTION"&&m){const U=Qu({type:null,tagName:d,maskInputOptions:c});m=Ds({isMasked:Go(e,r,o,i,s,U),element:e,value:m,maskInputFn:u})}return{type:Kt.Text,textContent:m||"",isStyle:g,rootId:h}}function L2(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:w=!1,rootId:T,maskTextClass:L,unmaskTextClass:U,maskTextSelector:K,unmaskTextSelector:V}=t,F=k2(e,r,i,o),Y=_2(e);let D={};const G=e.attributes.length;for(let P=0;P<G;P++){const j=e.attributes[P];j.name&&!Mb(Y,j.name,j.value)&&(D[j.name]=Ob(n,Y,jo(j.name),j.value,e,c))}if(Y==="link"&&s){const P=Array.from(n.styleSheets).find(z=>z.href===e.href);let j=null;P&&(j=gu(P)),j&&(D.rel=null,D.href=null,D.crossorigin=null,D._cssText=_u(j,P.href))}if(Y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const P=gu(e.sheet);P&&(D._cssText=_u(P,el(n)))}if(Y==="input"||Y==="textarea"||Y==="select"||Y==="option"){const P=e,j=hh(P),z=yu(P,Kf(Y),j),X=P.checked;if(j!=="submit"&&j!=="button"&&z){const se=Go(P,L,K,U,V,Qu({type:j,tagName:Kf(Y),maskInputOptions:a}));D.value=Ds({isMasked:se,element:P,value:z,maskInputFn:u})}X&&(D.checked=X)}if(Y==="option"&&(e.selected&&!a.select?D.selected=!0:delete D.selected),Y==="canvas"&&m){if(e.__context==="2d")m2(e)||(D.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){const P=e.toDataURL(h.type,h.quality),j=n.createElement("canvas");j.width=e.width,j.height=e.height;const z=j.toDataURL(h.type,h.quality);P!==z&&(D.rr_dataURL=P)}}if(Y==="img"&&d){fo||(fo=n.createElement("canvas"),Fm=fo.getContext("2d"));const P=e,j=P.currentSrc||P.getAttribute("src")||"<unknown-src>",z=P.crossOrigin,X=()=>{P.removeEventListener("load",X);try{fo.width=P.naturalWidth,fo.height=P.naturalHeight,Fm.drawImage(P,0,0),D.rr_dataURL=fo.toDataURL(h.type,h.quality)}catch(se){if(P.crossOrigin!=="anonymous"){P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0?X():P.addEventListener("load",X);return}else console.warn(`Cannot inline img src=${j}! Error: ${se}`)}P.crossOrigin==="anonymous"&&(z?D.crossOrigin=z:P.removeAttribute("crossorigin"))};P.complete&&P.naturalWidth!==0?X():P.addEventListener("load",X)}if((Y==="audio"||Y==="video")&&(D.rr_mediaState=e.paused?"paused":"played",D.rr_mediaCurrentTime=e.currentTime),w||(e.scrollLeft&&(D.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(D.rr_scrollTop=e.scrollTop)),F){const{width:P,height:j}=e.getBoundingClientRect();D={class:D.class,rr_width:`${P}px`,rr_height:`${j}px`}}Y==="iframe"&&!g(D.src)&&(!F&&!Nb(e)&&(D.rr_src=D.src),delete D.src);let ae;try{customElements.get(Y)&&(ae=!0)}catch{}return{type:Kt.Element,tagName:Y,attributes:D,childNodes:[],isSVG:A2(e)||void 0,needBlock:F,rootId:T,isCustom:ae}}function Ct(e){return e==null?"":e.toLowerCase()}function D2(e,t){if(t.comment&&e.type===Kt.Comment)return!0;if(e.type===Kt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&kb(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ct(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ct(e.attributes.name)==="application-name"||Ct(e.attributes.rel)==="icon"||Ct(e.attributes.rel)==="apple-touch-icon"||Ct(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ct(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ct(e.attributes.property).match(/^(og|twitter|fb):/)||Ct(e.attributes.name).match(/^(og|twitter):/)||Ct(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ct(e.attributes.name)==="robots"||Ct(e.attributes.name)==="googlebot"||Ct(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ct(e.attributes.name)==="author"||Ct(e.attributes.name)==="generator"||Ct(e.attributes.name)==="framework"||Ct(e.attributes.name)==="publisher"||Ct(e.attributes.name)==="progid"||Ct(e.attributes.property).match(/^article:/)||Ct(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ct(e.attributes.name)==="google-site-verification"||Ct(e.attributes.name)==="yandex-verification"||Ct(e.attributes.name)==="csrf-token"||Ct(e.attributes.name)==="p:domain_verify"||Ct(e.attributes.name)==="verify-v1"||Ct(e.attributes.name)==="verification"||Ct(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Io(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:w={},maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOMOptions:K,dataURLOptions:V={},inlineImages:F=!1,recordCanvas:Y=!1,onSerialize:D,onIframeLoad:G,iframeLoadTimeout:ae=5e3,onBlockedImageLoad:P,onStylesheetLoad:j,stylesheetLoadTimeout:z=5e3,keepIframeSrcFn:X=()=>!1,newlyAddedElement:se=!1}=t;let{preserveWhiteSpace:we=!0}=t;const fe=O2(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:g,maskInputOptions:w,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,dataURLOptions:V,inlineImages:F,recordCanvas:Y,keepIframeSrcFn:X,newlyAddedElement:se});if(!fe)return console.warn(e,"not serialized"),null;let ce;r.hasNode(e)?ce=r.getId(e):D2(fe,K)||!we&&fe.type===Kt.Text&&!fe.isStyle&&!fe.textContent.replace(/^\s+|\s+$/gm,"").length?ce=Bs:ce=ph();const Q=Object.assign(fe,{id:ce});if(r.add(e,Q),ce===Bs)return null;D&&D(e);let _e=!m;if(Q.type===Kt.Element){_e=_e&&!Q.needBlock;const pe=e.shadowRoot;pe&&Rs(pe)&&(Q.isShadowHost=!0)}if((Q.type===Kt.Document||Q.type===Kt.Element)&&_e){K.headWhitespace&&Q.type===Kt.Element&&Q.tagName==="head"&&(we=!1);const pe={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m,inlineStylesheet:g,maskInputOptions:w,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:Y,preserveWhiteSpace:we,onSerialize:D,onIframeLoad:G,iframeLoadTimeout:ae,onBlockedImageLoad:P,onStylesheetLoad:j,stylesheetLoadTimeout:z,keepIframeSrcFn:X},le=e.childNodes?Array.from(e.childNodes):[];for(const be of le){const Xe=Io(be,pe);Xe&&Q.childNodes.push(Xe)}if(a2(e)&&e.shadowRoot)for(const be of Array.from(e.shadowRoot.childNodes)){const Xe=Io(be,pe);Xe&&(Rs(e.shadowRoot)&&(Xe.isShadow=!0),Q.childNodes.push(Xe))}}if(e.parentNode&&Cs(e.parentNode)&&Rs(e.parentNode)&&(Q.isShadow=!0),Q.type===Kt.Element&&Q.tagName==="iframe"&&!Q.needBlock&&R2(e,()=>{const pe=Nb(e);if(pe&&G){const le=Io(pe,{doc:pe,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:w,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:Y,preserveWhiteSpace:we,onSerialize:D,onIframeLoad:G,iframeLoadTimeout:ae,onStylesheetLoad:j,stylesheetLoadTimeout:z,keepIframeSrcFn:X});le&&G(e,le)}},ae),Q.type===Kt.Element&&Q.tagName==="img"&&!e.complete&&Q.needBlock){const pe=e,le=()=>{if(pe.isConnected&&!pe.complete&&P)try{const be=pe.getBoundingClientRect();be.width>0&&be.height>0&&P(pe,Q,be)}catch{}pe.removeEventListener("load",le)};pe.isConnected&&pe.addEventListener("load",le)}return Q.type===Kt.Element&&Q.tagName==="link"&&typeof Q.attributes.rel=="string"&&(Q.attributes.rel==="stylesheet"||Q.attributes.rel==="preload"&&typeof Q.attributes.href=="string"&&kb(Q.attributes.href)==="css")&&N2(e,()=>{if(j){const pe=Io(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:w,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:Y,preserveWhiteSpace:we,onSerialize:D,onIframeLoad:G,iframeLoadTimeout:ae,onStylesheetLoad:j,stylesheetLoadTimeout:z,keepIframeSrcFn:X});pe&&j(e,pe)}},z),Q.type===Kt.Element&&delete Q.needBlock,Q}function B2(e,t){const{mirror:n=new Ab,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:h=null,inlineStylesheet:d=!0,inlineImages:m=!1,recordCanvas:g=!1,maskAllInputs:w=!1,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOM:K=!1,dataURLOptions:V,preserveWhiteSpace:F,onSerialize:Y,onIframeLoad:D,iframeLoadTimeout:G,onBlockedImageLoad:ae,onStylesheetLoad:P,stylesheetLoadTimeout:j,keepIframeSrcFn:z=()=>!1}=t||{};return Io(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:w===!1?{}:w,maskAttributeFn:T,maskTextFn:L,maskInputFn:U,slimDOMOptions:K===!0||K==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:K==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:K===!1?{}:K,dataURLOptions:V,inlineImages:m,recordCanvas:g,preserveWhiteSpace:F,onSerialize:Y,onIframeLoad:D,iframeLoadTimeout:G,onBlockedImageLoad:ae,onStylesheetLoad:P,stylesheetLoadTimeout:j,keepIframeSrcFn:z,newlyAddedElement:!1})}function wn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const bo=`Please stop import mirror directly. Instead of that,\r
509
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
510
+ or you can use record.mirror to access the mirror instance during recording.`;let Um={map:{},getId(){return console.error(bo),-1},getNode(){return console.error(bo),null},removeNodeFromMap(){console.error(bo)},has(){return console.error(bo),!1},reset(){console.error(bo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Um=new Proxy(Um,{get(e,t,n){return t==="map"&&console.error(bo),Reflect.get(e,t,n)}}));function Fs(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),c=this;a<=0||a>t?(r&&(W2(r),r=null),i=s,e.apply(c,o)):!r&&n.trailing!==!1&&(r=tl(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function Pb(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){tl(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Pb(e,t,o||{},!0)}function mh(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()=>{}}}let bu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(bu=()=>new Date().getTime());function Lb(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Db(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Bb(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fb(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ln(e,t,n,r,i){if(!e)return!1;const o=Fb(e);if(!o)return!1;const s=To(t,n);if(!i){const u=r&&o.matches(r);return s(o)&&!u}const a=Li(o,s);let c=-1;return a<0?!1:(r&&(c=Li(o,To(null,r))),a>-1&&c<0?!0:a<c)}function F2(e,t){return t.getId(e)!==-1}function Jl(e,t){return t.getId(e)===Bs}function Hb(e,t){if(Cs(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Hb(e.parentNode,t):!0:!0}function Zf(e){return!!e.changedTouches}function H2(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Ub(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $b(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Qf(e){return!!e?.shadowRoot}class U2{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jb(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function $2(e){let t=e,n;for(;n=jb(t);)t=n;return t}function j2(e){const t=e.ownerDocument;if(!t)return!1;const n=$2(e);return t.contains(n)}function Gb(e){const t=e.ownerDocument;return t?t.contains(e)||j2(e):!1}const $m={};function gh(e){const t=$m[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 o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return $m[e]=r.bind(window)}function G2(...e){return gh("requestAnimationFrame")(...e)}function tl(...e){return gh("setTimeout")(...e)}function W2(...e){return gh("clearTimeout")(...e)}var rt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(rt||{}),je=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(je||{}),_n=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(_n||{}),Mr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Mr||{}),vo=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(vo||{});function yh(e){try{return e.contentDocument}catch{}}function z2(e){try{return e.contentWindow}catch{}}function jm(e){return"__ln"in e}class V2{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&jm(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&jm(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Gm=(e,t)=>`${e}@${t}`;class q2{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new V2,i=c=>{let u=c,h=Bs;for(;h===Bs;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},o=c=>{if(!c.parentNode||!Gb(c))return;const u=Cs(c.parentNode)?this.mirror.getId(jb(c)):this.mirror.getId(c.parentNode),h=i(c);if(u===-1||h===-1)return r.addNode(c);const d=Io(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ub(m,this.mirror)&&!Ln(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(m),$b(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Qf(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(m,g)=>{Ln(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(m,g),m.contentWindow&&this.canvasManager.addWindow(m.contentWindow),this.shadowDomManager.observeAttachShadow(m))},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},onBlockedImageLoad:(m,g,{width:w,height:T})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:g.id,attributes:{style:{width:`${w}px`,height:`${T}px`}}}]})}});d&&(t.push({parentId:u,nextId:h,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Wm(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!zm(this.droppedSet,c)&&!Wm(this.removes,c,this.mirror)||zm(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){const u=this.mirror.getId(s.value.parentNode),h=i(s.value);u!==-1&&h!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const d=this.mirror.getId(h.value.parentNode);if(i(h.value)===-1)continue;if(d!==-1){c=h;break}else{const g=h.value;if(g.parentNode&&g.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const w=g.parentNode.host;if(this.mirror.getId(w)!==-1){c=h;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const h=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);h.length<u.style.length&&(h+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Jl(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ln(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Go(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Fb(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=hh(n),a=n.tagName;i=yu(n,a,s);const c=Qu({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=Go(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=Ds({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(Ln(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!yh(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Mb(n.tagName,r)&&(o.attributes[r]=Ob(this.doc,jo(n.tagName),jo(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Ln(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=Cs(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ln(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Jl(n,this.mirror)||!F2(n,this.mirror)||(this.addedSet.has(n)?(ed(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Hb(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Gm(r,i)]?ed(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:Cs(t.target)&&Rs(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Jl(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Gm(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ln(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Qf(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ed(e,t){e.delete(t),t.childNodes?.forEach(n=>ed(e,n))}function Wm(e,t,n){return e.length===0?!1:X2(e,t,n)}function X2(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function zm(e,t){return e.size===0?!1:Wb(e,t)}function Wb(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Wb(e,n):!1}let Ns;function Y2(e){Ns=e}function K2(){Ns=void 0}const pt=e=>Ns?(...n)=>{try{return e(...n)}catch(r){if(Ns&&Ns(r)===!0)return()=>{};throw r}}:e,xo=[];function ca(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function zb(e,t){const n=new q2;xo.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(pt(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function J2({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const c=Fs(pt(d=>{const m=Date.now()-a;e(s.map(g=>(g.timeOffset-=m,g)),d),s=[],a=null}),o),u=pt(Fs(pt(d=>{const m=ca(d),{clientX:g,clientY:w}=Zf(d)?d.changedTouches[0]:d;a||(a=bu()),s.push({x:g,y:w,id:r.getId(m),timeOffset:bu()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?je.Drag:d instanceof MouseEvent?je.MouseMove:je.TouchMove)}),i,{trailing:!1})),h=[wn("mousemove",u,n),wn("touchmove",u,n),wn("drag",u,n)];return pt(()=>{h.forEach(d=>d())})}function Z2({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const h=d=>m=>{const g=ca(m);if(Ln(g,r,i,o,!0))return;let w=null,T=d;if("pointerType"in m){switch(m.pointerType){case"mouse":w=Mr.Mouse;break;case"touch":w=Mr.Touch;break;case"pen":w=Mr.Pen;break}w===Mr.Touch?_n[d]===_n.MouseDown?T="TouchStart":_n[d]===_n.MouseUp&&(T="TouchEnd"):Mr.Pen}else Zf(m)&&(w=Mr.Touch);w!==null?(u=w,(T.startsWith("Touch")&&w===Mr.Touch||T.startsWith("Mouse")&&w===Mr.Mouse)&&(w=null)):_n[d]===_n.Click&&(w=u,u=null);const L=Zf(m)?m.changedTouches[0]:m;if(!L)return;const U=n.getId(g),{clientX:K,clientY:V}=L;pt(e)({type:_n[T],id:U,x:K,y:V,...w!==null&&{pointerType:w}})};return Object.keys(_n).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let m=jo(d);const g=h(d);if(window.PointerEvent)switch(_n[d]){case _n.MouseDown:case _n.MouseUp:m=m.replace("mouse","pointer");break;case _n.TouchStart:case _n.TouchEnd:return}c.push(wn(m,g,t))}),pt(()=>{c.forEach(d=>d())})}function Vb({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=pt(Fs(pt(c=>{const u=ca(c);if(!u||Ln(u,r,i,o,!0))return;const h=n.getId(u);if(u===t&&t.defaultView){const d=Lb(t.defaultView);e({id:h,x:d.left,y:d.top})}else e({id:h,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return wn("scroll",a,t)}function Q2({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=pt(Fs(pt(()=>{const o=Db(),s=Bb();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return wn("resize",i,t)}const eM=["INPUT","TEXTAREA","SELECT"],Vm=new WeakMap;function tM({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:h,userTriggeredOnInput:d,maskTextClass:m,unmaskTextClass:g,maskTextSelector:w,unmaskTextSelector:T}){function L(G){let ae=ca(G);const P=G.isTrusted,j=ae&&Kf(ae.tagName);if(j==="OPTION"&&(ae=ae.parentElement),!ae||!j||eM.indexOf(j)<0||Ln(ae,r,i,o,!0))return;const z=ae;if(z.classList.contains(s)||a&&z.matches(a))return;const X=hh(ae);let se=yu(z,j,X),we=!1;const fe=Qu({maskInputOptions:c,tagName:j,type:X}),ce=Go(ae,m,w,g,T,fe);(X==="radio"||X==="checkbox")&&(we=ae.checked),se=Ds({isMasked:ce,element:ae,value:se,maskInputFn:u}),U(ae,d?{text:se,isChecked:we,userTriggered:P}:{text:se,isChecked:we});const Q=ae.name;X==="radio"&&Q&&we&&t.querySelectorAll(`input[type="radio"][name="${Q}"]`).forEach(_e=>{if(_e!==ae){const pe=Ds({isMasked:ce,element:_e,value:yu(_e,j,X),maskInputFn:u});U(_e,d?{text:pe,isChecked:!we,userTriggered:!1}:{text:pe,isChecked:!we})}})}function U(G,ae){const P=Vm.get(G);if(!P||P.text!==ae.text||P.isChecked!==ae.isChecked){Vm.set(G,ae);const j=n.getId(G);pt(e)({...ae,id:j})}}const V=(h.input==="last"?["change"]:["input","change"]).map(G=>wn(G,pt(L),t)),F=t.defaultView;if(!F)return()=>{V.forEach(G=>G())};const Y=F.Object.getOwnPropertyDescriptor(F.HTMLInputElement.prototype,"value"),D=[[F.HTMLInputElement.prototype,"value"],[F.HTMLInputElement.prototype,"checked"],[F.HTMLSelectElement.prototype,"value"],[F.HTMLTextAreaElement.prototype,"value"],[F.HTMLSelectElement.prototype,"selectedIndex"],[F.HTMLOptionElement.prototype,"selected"]];return Y&&Y.set&&V.push(...D.map(G=>Pb(G[0],G[1],{set(){pt(L)({target:this,isTrusted:!1})}},!1,F))),pt(()=>{V.forEach(G=>G())})}function vu(e){const t=[];function n(r,i){if(mc("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||mc("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||mc("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||mc("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function ci(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function nM({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:pt((h,d,m)=>{const[g,w]=m,{id:T,styleId:L}=ci(d,t,n.styleMirror);return(T&&T!==-1||L&&L!==-1)&&e({id:T,styleId:L,adds:[{rule:g,index:w}]}),h.apply(d,m)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:pt((h,d,m)=>{const[g]=m,{id:w,styleId:T}=ci(d,t,n.styleMirror);return(w&&w!==-1||T&&T!==-1)&&e({id:w,styleId:T,removes:[{index:g}]}),h.apply(d,m)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:pt((h,d,m)=>{const[g]=m,{id:w,styleId:T}=ci(d,t,n.styleMirror);return(w&&w!==-1||T&&T!==-1)&&e({id:w,styleId:T,replace:g}),h.apply(d,m)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:pt((h,d,m)=>{const[g]=m,{id:w,styleId:T}=ci(d,t,n.styleMirror);return(w&&w!==-1||T&&T!==-1)&&e({id:w,styleId:T,replaceSync:g}),h.apply(d,m)})}));const c={};gc("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(gc("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),gc("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),gc("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([h,d])=>{u[h]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[h].insertRule,{apply:pt((m,g,w)=>{const[T,L]=w,{id:U,styleId:K}=ci(g.parentStyleSheet,t,n.styleMirror);return(U&&U!==-1||K&&K!==-1)&&e({id:U,styleId:K,adds:[{rule:T,index:[...vu(g),L||0]}]}),m.apply(g,w)})}),d.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:pt((m,g,w)=>{const[T]=w,{id:L,styleId:U}=ci(g.parentStyleSheet,t,n.styleMirror);return(L&&L!==-1||U&&U!==-1)&&e({id:L,styleId:U,removes:[{index:[...vu(g),T]}]}),m.apply(g,w)})})}),pt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([h,d])=>{d.prototype.insertRule=u[h].insertRule,d.prototype.deleteRule=u[h].deleteRule})})}function qb({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),pt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function rM({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:pt((a,c,u)=>{const[h,d,m]=u;if(n.has(h))return o.apply(c,[h,d,m]);const{id:g,styleId:w}=ci(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||w&&w!==-1)&&e({id:g,styleId:w,set:{property:h,value:d,priority:m},index:vu(c.parentRule)}),a.apply(c,u)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:pt((a,c,u)=>{const[h]=u;if(n.has(h))return s.apply(c,[h]);const{id:d,styleId:m}=ci(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,remove:{property:h},index:vu(c.parentRule)}),a.apply(c,u)})}),pt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function iM({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=pt(u=>Fs(pt(h=>{const d=ca(h);if(!d||Ln(d,t,n,r,!0))return;const{currentTime:m,volume:g,muted:w,playbackRate:T}=d;e({type:u,id:i.getId(d),currentTime:m,volume:g,muted:w,playbackRate:T})}),o.media||500)),c=[wn("play",a(vo.Play),s),wn("pause",a(vo.Pause),s),wn("seeked",a(vo.Seeked),s),wn("volumechange",a(vo.VolumeChange),s),wn("ratechange",a(vo.RateChange),s)];return pt(()=>{c.forEach(u=>u())})}function oM({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,h){const d=new o(c,u,h);return i.set(d,{family:c,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const s=mh(t.fonts,"add",function(a){return function(c){return tl(pt(()=>{const u=i.get(c);u&&(e(u),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),pt(()=>{r.forEach(a=>a())})}function sM(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const c=pt(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const h=[],d=u.rangeCount||0;for(let m=0;m<d;m++){const g=u.getRangeAt(m),{startContainer:w,startOffset:T,endContainer:L,endOffset:U}=g;Ln(w,r,i,o,!0)||Ln(L,r,i,o,!0)||h.push({start:n.getId(w),startOffset:T,end:n.getId(L),endOffset:U})}s({ranges:h})});return c(),wn("selectionchange",c)}function aM({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:mh(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}return i.apply(this,[o,s,a])}})}function cM(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=zb(e,e.doc));const i=J2(e),o=Z2(e),s=Vb(e),a=Q2(e,{win:n}),c=tM(e),u=iM(e);let h=()=>{},d=()=>{},m=()=>{},g=()=>{};e.recordDOM&&(h=nM(e,{win:n}),d=qb(e,e.doc),m=rM(e,{win:n}),e.collectFonts&&(g=oM(e)));const w=sM(e),T=aM(e),L=[];for(const U of e.plugins)L.push(U.observer(U.callback,n,U.options));return pt(()=>{xo.forEach(U=>U.reset()),r?.disconnect(),i(),o(),s(),a(),c(),u(),h(),d(),m(),g(),w(),T(),L.forEach(U=>U())})}function mc(e){return typeof window[e]<"u"}function gc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class td{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class uM{constructor(){this.crossOriginIframeMirror=new td(ph),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class lM{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new td(ph),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new td(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=yh(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:je.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case je.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case je.Drag:case je.TouchMove:case je.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case je.ViewportResize:return!1;case je.MediaInteraction:case je.MouseInteraction:case je.Scroll:case je.CanvasMutation:case je.Input:return this.replaceIds(n.data,t,["id"]),n;case je.StyleSheetRule:case je.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case je.Font:return n;case je.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case je.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Kt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class fM{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class dM{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Rs(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=zb({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Vb({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),tl(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(qb({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=yh(t),r=z2(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(mh(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&Gb(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var qm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var yc=0;yc<qm.length;yc++)hM[qm.charCodeAt(yc)]=yc;class Xm{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class pM{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new U2,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:xb(a),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class mM{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,G2(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let jt,wu;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)}const Zn=p2();function Fr(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:h="rr-mask",unmaskTextClass:d=null,maskTextSelector:m=null,unmaskTextSelector:g=null,inlineStylesheet:w=!0,maskAllInputs:T,maskInputOptions:L,slimDOMOptions:U,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,maxCanvasSize:Y=null,packFn:D,sampling:G={},dataURLOptions:ae={},mousemoveWait:P,recordDOM:j=!0,recordCanvas:z=!1,recordCrossOriginIframes:X=!1,recordAfter:se=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:we=!1,collectFonts:fe=!1,inlineImages:ce=!1,plugins:Q,keepIframeSrcFn:_e=()=>!1,ignoreCSSAttributes:pe=new Set([]),errorHandler:le,onMutation:be,getCanvasManager:Xe}=e;Y2(le);const oe=X?window.parent===window:!0;let Be=!1;if(!oe)try{window.parent.document&&(Be=!1)}catch{Be=!0}if(oe&&!t)throw new Error("emit function is required");if(!oe&&!Be)return()=>{};P!==void 0&&G.mousemove===void 0&&(G.mousemove=P),Zn.reset();const bt=T===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:L!==void 0?L:{},vt=U===!0||U==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:U==="all",headMetaDescKeywords:U==="all"}:U||{};H2();let en,tn=0;const $n=Je=>{for(const nn of Q||[])nn.eventProcessor&&(Je=nn.eventProcessor(Je));return D&&!Be&&(Je=D(Je)),Je};jt=(Je,nn)=>{const Qe=Je;if(Qe.timestamp=bu(),xo[0]?.isFrozen()&&Qe.type!==rt.FullSnapshot&&!(Qe.type===rt.IncrementalSnapshot&&Qe.data.source===je.Mutation)&&xo.forEach(Pt=>Pt.unfreeze()),oe)t?.($n(Qe),nn);else if(Be){const Pt={type:"rrweb",event:$n(Qe),origin:window.location.origin,isCheckout:nn};window.parent.postMessage(Pt,"*")}if(Qe.type===rt.FullSnapshot)en=Qe,tn=0;else if(Qe.type===rt.IncrementalSnapshot){if(Qe.data.source===je.Mutation&&Qe.data.isAttachIframe)return;tn++;const Pt=r&&tn>=r,st=n&&en&&Qe.timestamp-en.timestamp>n;(Pt||st)&&Kr(!0)}};const ke=Je=>{jt({type:rt.IncrementalSnapshot,data:{source:je.Mutation,...Je}})},dt=Je=>jt({type:rt.IncrementalSnapshot,data:{source:je.Scroll,...Je}}),mt=Je=>jt({type:rt.IncrementalSnapshot,data:{source:je.CanvasMutation,...Je}}),Wt=Je=>jt({type:rt.IncrementalSnapshot,data:{source:je.AdoptedStyleSheet,...Je}}),tt=new pM({mutationCb:ke,adoptedStyleSheetCb:Wt}),nt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new uM:new lM({mirror:Zn,mutationCb:ke,stylesheetManager:tt,recordCrossOriginIframes:X,wrappedEmit:jt});for(const Je of Q||[])Je.getMirror&&Je.getMirror({nodeMirror:Zn,crossOriginIframeMirror:nt.crossOriginIframeMirror,crossOriginIframeStyleMirror:nt.crossOriginIframeStyleMirror});const Ye=new mM,mn=yM(Xe,{mirror:Zn,win:window,mutationCb:Je=>jt({type:rt.IncrementalSnapshot,data:{source:je.CanvasMutation,...Je}}),recordCanvas:z,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:Y,sampling:G.canvas,dataURLOptions:ae,errorHandler:le}),Mt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new fM:new dM({mutationCb:ke,scrollCb:dt,bypassOptions:{onMutation:be,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:w,maskInputOptions:bt,dataURLOptions:ae,maskAttributeFn:K,maskTextFn:F,maskInputFn:V,recordCanvas:z,inlineImages:ce,sampling:G,slimDOMOptions:vt,iframeManager:nt,stylesheetManager:tt,canvasManager:mn,keepIframeSrcFn:_e,processedNodeManager:Ye},mirror:Zn}),Kr=(Je=!1)=>{if(!j)return;jt({type:rt.Meta,data:{href:window.location.href,width:Bb(),height:Db()}},Je),tt.reset(),Mt.init(),xo.forEach(Qe=>Qe.lock());const nn=B2(document,{mirror:Zn,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:w,maskAllInputs:bt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,slimDOM:vt,dataURLOptions:ae,recordCanvas:z,inlineImages:ce,onSerialize:Qe=>{Ub(Qe,Zn)&&nt.addIframe(Qe),$b(Qe,Zn)&&tt.trackLinkElement(Qe),Qf(Qe)&&Mt.addShadowRoot(Qe.shadowRoot,document)},onIframeLoad:(Qe,Pt)=>{nt.attachIframe(Qe,Pt),Qe.contentWindow&&mn.addWindow(Qe.contentWindow),Mt.observeAttachShadow(Qe)},onStylesheetLoad:(Qe,Pt)=>{tt.attachLinkElement(Qe,Pt)},onBlockedImageLoad:(Qe,Pt,{width:st,height:On})=>{ke({adds:[],removes:[],texts:[],attributes:[{id:Pt.id,attributes:{style:{width:`${st}px`,height:`${On}px`}}}]})},keepIframeSrcFn:_e});if(!nn)return console.warn("Failed to snapshot the document");jt({type:rt.FullSnapshot,data:{node:nn,initialOffset:Lb(window)}}),xo.forEach(Qe=>Qe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&tt.adoptStyleSheets(document.adoptedStyleSheets,Zn.getId(document))};wu=Kr;try{const Je=[],nn=Pt=>pt(cM)({onMutation:be,mutationCb:ke,mousemoveCb:(st,On)=>jt({type:rt.IncrementalSnapshot,data:{source:On,positions:st}}),mouseInteractionCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.MouseInteraction,...st}}),scrollCb:dt,viewportResizeCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.ViewportResize,...st}}),inputCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.Input,...st}}),mediaInteractionCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.MediaInteraction,...st}}),styleSheetRuleCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.StyleSheetRule,...st}}),styleDeclarationCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.StyleDeclaration,...st}}),canvasMutationCb:mt,fontCb:st=>jt({type:rt.IncrementalSnapshot,data:{source:je.Font,...st}}),selectionCb:st=>{jt({type:rt.IncrementalSnapshot,data:{source:je.Selection,...st}})},customElementCb:st=>{jt({type:rt.IncrementalSnapshot,data:{source:je.CustomElement,...st}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,maskInputOptions:bt,inlineStylesheet:w,sampling:G,recordDOM:j,recordCanvas:z,inlineImages:ce,userTriggeredOnInput:we,collectFonts:fe,doc:Pt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,keepIframeSrcFn:_e,blockSelector:o,unblockSelector:s,slimDOMOptions:vt,dataURLOptions:ae,mirror:Zn,iframeManager:nt,stylesheetManager:tt,shadowDomManager:Mt,processedNodeManager:Ye,canvasManager:mn,ignoreCSSAttributes:pe,plugins:Q?.filter(st=>st.observer)?.map(st=>({observer:st.observer,options:st.options,callback:On=>jt({type:rt.Plugin,data:{plugin:st.name,payload:On}})}))||[]},{});nt.addLoadListener(Pt=>{try{Je.push(nn(Pt.contentDocument))}catch(st){console.warn(st)}});const Qe=()=>{Kr(),Je.push(nn(document))};return document.readyState==="interactive"||document.readyState==="complete"?Qe():(Je.push(wn("DOMContentLoaded",()=>{jt({type:rt.DomContentLoaded,data:{}}),se==="DOMContentLoaded"&&Qe()})),Je.push(wn("load",()=>{jt({type:rt.Load,data:{}}),se==="load"&&Qe()},window))),()=>{Je.forEach(Pt=>Pt()),Ye.destroy(),wu=void 0,K2()}}catch(Je){console.warn(Je)}}function gM(e){if(!wu)throw new Error("please take full snapshot after start recording");wu(e)}Fr.mirror=Zn;Fr.takeFullSnapshot=gM;function yM(e,t){try{return e?e(t):new Xm}catch{return console.warn("Unable to initialize CanvasManager"),new Xm}}var Ym;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ym||(Ym={}));const _M=3,bM=5;function _h(e){return e>9999999999?e:e*1e3}function Zl(e){return e>9999999999?e/1e3:e}function ua(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:rt.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Pn(t,10,1e3)}}),t.category==="console")))}const vM="button,a";function Xb(e){return e.closest(vM)||e}function Yb(e){const t=Kb(e);return!t||!(t instanceof Element)?t:Xb(t)}function Kb(e){return wM(e)?e.target:e}function wM(e){return typeof e=="object"&&!!e&&"target"in e}let ui;function SM(e){return ui||(ui=[],EM()),ui.push(e),()=>{const t=ui?ui.indexOf(e):-1;t>-1&&ui.splice(t,1)}}function EM(){Sn(Rt,"open",function(e){return function(...t){if(ui)try{ui.forEach(n=>n())}catch{}return e.apply(Rt,t)}})}const TM=new Set([je.Mutation,je.StyleSheetRule,je.StyleDeclaration,je.AdoptedStyleSheet,je.CanvasMutation,je.Selection,je.MediaInteraction]);function IM(e,t,n){e.handleClick(t,n)}class xM{constructor(t,n,r=ua){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=SM(()=>{this._lastMutation=Km()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(kM(n,this._ignoreSelector)||!CM(t))return;const r={timestamp:Zl(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Zl(t)}registerScroll(t=Date.now()){this._lastScroll=Zl(t)}registerClick(t){const n=Xb(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Km();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",h={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Rt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(n,h);return}if(s>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Rt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=aa(()=>this._checkClicks(),1e3)}}const AM=["A","BUTTON","INPUT"];function kM(e,t){return!!(!AM.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function CM(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Km(){return Date.now()/1e3}function RM(e,t){try{if(!NM(t))return;const{source:n}=t.data;if(TM.has(n)&&e.registerMutation(t.timestamp),n===je.Scroll&&e.registerScroll(t.timestamp),OM(t)){const{type:r,id:i}=t.data,o=Fr.mirror.getNode(i);o instanceof HTMLElement&&r===_n.Click&&e.registerClick(o)}}catch{}}function NM(e){return e.type===_M}function OM(e){return e.data.source===je.MouseInteraction}function vr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var bh=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(bh||{});const MM=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function PM(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(MM.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const LM=e=>t=>{if(!e.isEnabled())return;const n=DM(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&IM(e.clickDetector,n,Yb(t.event)),ua(e,n)};function Jb(e,t){const n=Fr.mirror.getId(e),r=n&&Fr.mirror.getNode(n),i=r&&Fr.mirror.getMeta(r),o=i&&FM(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===bh.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:PM(o.attributes)}}:{}}}function DM(e){const{target:t,message:n}=BM(e);return vr({category:`ui.${e.name}`,...Jb(t,n)})}function BM(e){const t=e.name==="click";let n,r=null;try{r=t?Yb(e.event):Kb(e.event),n=qn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function FM(e){return e.type===bh.Element}function HM(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=UM(t);n&&ua(e,n)}function UM(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||$M(s)||!o)return null;const a=t||r||i,c=o.length===1;if(!a&&c)return null;const u=qn(s,{maxStringLength:200})||"<unknown>",h=Jb(s,u);return vr({category:"ui.keyDown",message:u,data:{...h.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function $M(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const jM={resource:qM,paint:zM,navigation:VM};function _c(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function GM(e){return e.map(WM).filter(Boolean)}function WM(e){const t=jM[e.entryType];return t?t(e):null}function Wo(e){return((pn()||Rt.performance.timeOrigin)+e)/1e3}function zM(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Wo(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function VM(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:h,loadEventEnd:d,redirectCount:m,startTime:g,transferSize:w,type:T}=e;return i===0?null:{type:`${t}.${T}`,start:Wo(g),end:Wo(o),name:n,data:{size:w,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:h,loadEventEnd:d,domComplete:o,redirectCount:m}}}function qM(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Wo(o),end:Wo(i),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function XM(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return nl(e,"largest-contentful-paint",n)}function YM(e){return e.sources!==void 0}function KM(e){const t=[],n=[];for(const r of e.entries)if(YM(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=Fr.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return nl(e,"cumulative-layout-shift",n,t)}function JM(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return nl(e,"first-input-delay",n)}function ZM(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return nl(e,"interaction-to-next-paint",n)}function nl(e,t,n,r){const i=e.value,o=e.rating,s=Wo(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>Fr.mirror.getId(a)):void 0,attributions:r}}}function QM(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(zi(i,n))}),r.push(ih(_c(XM,e)),rh(_c(KM,e)),J_(_c(JM,e)),Z_(_c(ZM,e))),()=>{r.forEach(i=>i())}}const He=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,eP='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function tP(){const e=new Blob([eP]);return URL.createObjectURL(e)}const Jm=["log","warn","error"],$c="[Replay] ";function Ql(e,t="info"){Er({category:"console",data:{logger:"replay"},level:t,message:`${$c}${e}`},{level:t})}function nP(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return He?(Jm.forEach(r=>{n[r]=(...i)=>{q[r]($c,...i),t&&Ql(i.join(""),Vd(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),q.error($c,r),e?Wi(r):t&&Ql(r,"error")},n.infoTick=(...r)=>{q.log($c,...r),t&&setTimeout(()=>Ql(r[0]),0)}):Jm.forEach(r=>{n[r]=()=>{}}),n}const Ue=nP();class vh extends Error{constructor(){super(`Event buffer exceeded maximum size of ${dh}.`)}}class Zb{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>dh)throw new vh;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?_h(t):null}}class rP{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){He&&Ue.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{const s=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){He&&Ue.error("Error in compression worker: ",c.response),o(new Error("Error in compression worker"));return}i(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class iP{constructor(t){this._worker=new rP(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=_h(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>dh?Promise.reject(new vh):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{He&&Ue.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class oP{constructor(t){this._fallback=new Zb,this._compression=new iP(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){He&&Ue.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){He&&Ue.exception(o,"Failed to add events when switching buffers.")}}}function sP({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=aP(t);if(n)return n}return He&&Ue.log("Using simple buffer"),new Zb}function aP(e){try{const t=e||cP();if(!t)return;He&&Ue.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new oP(n)}catch(t){He&&Ue.exception(t,"Failed to create compression worker")}}function cP(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?tP():""}function wh(){try{return"sessionStorage"in Rt&&!!Rt.sessionStorage}catch{return!1}}function uP(e){lP(),e.session=void 0}function lP(){if(wh())try{Rt.sessionStorage.removeItem(lh)}catch{}}function Qb(e){return e===void 0?!1:Math.random()<e}function Sh(e){if(wh())try{Rt.sessionStorage.setItem(lh,JSON.stringify(e))}catch{}}function ev(e){const t=Date.now(),n=e.id||En(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a}}function fP(e,t){return Qb(e)?"session":t?"buffer":!1}function Zm({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=fP(e,t),o=ev({sampled:i,previousSessionId:r});return n&&Sh(o),o}function dP(){if(!wh())return null;try{const e=Rt.sessionStorage.getItem(lh);if(!e)return null;const t=JSON.parse(e);return He&&Ue.infoTick("Loading existing session"),ev(t)}catch{return null}}function nd(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function tv(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return nd(e.started,t,r)||nd(e.lastActivity,n,r)}function nv(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!tv(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&dP();return i?nv(i,{sessionIdleExpire:e,maxReplayDuration:t})?(He&&Ue.infoTick("Session in sessionStorage is expired, creating new one..."),Zm(r,{previousSessionId:i.id})):i:(He&&Ue.infoTick("Creating new session"),Zm(r,{previousSessionId:n}))}function hP(e){return e.type===rt.Custom}function Eh(e,t,n){return iv(e,t)?(rv(e,t,n),!0):!1}function pP(e,t,n){return iv(e,t)?rv(e,t,n):Promise.resolve(null)}async function rv(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=mP(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof vh,a=s?"addEventSizeExceeded":"addEvent";if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a});const c=Ae();c&&c.recordDroppedEvent("internal_sdk_error","replay")}}function iv(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=_h(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(He&&Ue.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function mP(e,t){try{if(typeof t=="function"&&hP(e))return t(e)}catch(n){return He&&Ue.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Th(e){return!e.type}function rd(e){return e.type==="transaction"}function gP(e){return e.type==="replay_event"}function Qm(e){return e.type==="feedback"}function yP(e){return(t,n)=>{if(!e.isEnabled()||!Th(t)&&!rd(t))return;const r=n?.statusCode;if(!(!r||r<200||r>=300)){if(rd(t)){_P(e,t);return}bP(e,t)}}}function _P(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function bP(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||aa(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function vP(e){return t=>{!e.isEnabled()||!Th(t)||wP(e,t)}}function wP(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=vr({category:"replay.hydrate-error",data:{url:Yi()}});ua(e,r)}}function SP(e){const t=Ae();t&&t.on("beforeAddBreadcrumb",n=>EP(e,n))}function EP(e,t){if(!e.isEnabled()||!ov(t))return;const n=TP(t);n&&ua(e,n)}function TP(e){return!ov(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?IP(e):vr(e)}function IP(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return vr(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>pc?(n=!0,`${i.slice(0,pc)}…`):i;if(typeof i=="object")try{const o=Pn(i,7);return JSON.stringify(o).length>pc?(n=!0,`${JSON.stringify(o,null,2).slice(0,pc)}…`):o}catch{}return i});return vr({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ov(e){return!!e.category}function xP(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function sv(){const e=et().getPropagationContext().dsc;e&&delete e.replay_id;const t=Qt();if(t){const n=ar(t);delete n.replay_id}}function AP(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:rt.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function kP(e,t){return e.recordingMode!=="buffer"||t.message===fh||!t.exception||t.type?!1:Qb(e.getOptions().errorSampleRate)}function CP(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:gP(t)?(delete t.breadcrumbs,t):!Th(t)&&!rd(t)&&!Qm(t)?t:e.checkAndHandleExpiredSession()?Qm(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),AP(e,t),t):xP(t,n)&&!e.getOptions()._experiments.captureExceptions?(He&&Ue.log("Ignoring error from rrweb internals",t),null):((kP(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(sv(),t),{id:"Replay"})}function rl(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:rt.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function RP(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function NP(e){return t=>{if(!e.isEnabled())return;const n=RP(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(rl(e,[n]),!1)))}}function OP(e,t){return He&&e.getOptions()._experiments.traceInternals?!1:n_(t,Ae())}function av(e,t){e.isEnabled()&&t!==null&&(OP(e,t.name)||e.addUpdate(()=>(rl(e,[t]),!0)))}function il(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=ob(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function cv(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Su(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function uv(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:c}}}function Hs(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function hi(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=MP(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function id(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function MP(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Mm,n=PP(e);if(t){const r=e.slice(0,Mm);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function PP(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Eu(e,t){const n=LP(e);return or(n,t)}function LP(e,t=Rt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Rt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function DP(e,t,n){try{const r=await FP(e,t,n),i=uv("resource.fetch",r);av(n.replay,i)}catch(r){He&&Ue.exception(r,"Failed to capture fetch breadcrumb")}}function BP(e,t){const{input:n,response:r}=t,i=n?ch(n):void 0,o=il(i),s=r?cv(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function FP(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:h}=e.data,d=Eu(s,n.networkDetailAllowUrls)&&!Eu(s,n.networkDetailDenyUrls),m=d?HP(n,t.input,u):Hs(u),g=await UP(d,n,t.response,h);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:c,request:m,response:g}}function HP({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?GP(n,t):{};if(!e)return hi(i,r,void 0);const o=ch(n),[s,a]=mu(o,Ue),c=hi(i,r,s);return a?Su(c,a):c}async function UP(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Hs(i);const o=r?lv(r.headers,n):{};if(!r||!t&&i!==void 0)return hi(o,i,void 0);const[s,a]=await jP(r),c=$P(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?Su(c,a):c}function $P(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?il(e):n;return r?t?hi(i,o,e):hi(i,o,void 0):Hs(o)}catch(o){return He&&Ue.exception(o,"Failed to serialize response body"),hi(i,n,void 0)}}async function jP(e){const t=WP(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await zP(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(He&&Ue.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(He&&Ue.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function lv(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function GP(e,t){return e.length===1&&typeof e[0]!="string"?eg(e[0],t):e.length===2?eg(e[1],t):{}}function eg(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?lv(n,t):Array.isArray(n)?{}:id(n,t):{}}function WP(e){try{return e.clone()}catch(t){He&&Ue.exception(t,"Failed to clone response body")}}function zP(e){return new Promise((t,n)=>{const r=aa(()=>n(new Error("Timeout while trying to read response body")),500);VP(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function VP(e){return await e.text()}async function qP(e,t,n){try{const r=YP(e,t,n),i=uv("resource.xhr",r);av(n.replay,i)}catch(r){He&&Ue.exception(r,"Failed to capture xhr breadcrumb")}}function XP(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=il(r),o=n.getResponseHeader("content-length")?cv(n.getResponseHeader("content-length")):QP(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function YP(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:c,method:u,status_code:h=0,request_body_size:d,response_body_size:m}=e.data;if(!c)return null;if(!a||!Eu(c,n.networkDetailAllowUrls)||Eu(c,n.networkDetailDenyUrls)){const D=Hs(d),G=Hs(m);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:D,response:G}}const g=a[Lr],w=g?id(g.request_headers,n.networkRequestHeaders):{},T=id(KP(a),n.networkResponseHeaders),[L,U]=n.networkCaptureBodies?mu(s,Ue):[void 0],[K,V]=n.networkCaptureBodies?JP(a):[void 0],F=hi(w,d,L),Y=hi(T,m,K);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:U?Su(F,U):F,response:V?Su(Y,V):Y}}function KP(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
511
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}function JP(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return ZP(e.response,e.responseType)}catch(n){t.push(n)}return He&&Ue.warn("Failed to get xhr response body",...t),[void 0]}function ZP(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 He&&Ue.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return He&&Ue.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function QP(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return il(n)}catch{return}}function eL(e){const t=Ae();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>tL(a,c,u))}catch{}}function tL(e,t,n){if(t.data)try{nL(t)&&iL(n)&&(XP(t,n),qP(t,n,e)),rL(t)&&oL(n)&&(BP(t,n),DP(t,n,e))}catch(r){He&&Ue.exception(r,"Error when enriching network breadcrumb")}}function nL(e){return e.category==="xhr"}function rL(e){return e.category==="fetch"}function iL(e){return e?.xhr}function oL(e){return e?.response}function sL(e){const t=Ae();ib(LM(e)),Zu(NP(e)),SP(e),eL(e);const n=CP(e);H0(n),t&&(t.on("beforeSendEvent",vP(e)),t.on("afterSendEvent",yP(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 o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function aL(e){try{return Promise.all(rl(e,[cL(Rt.performance.memory)]))}catch{return[]}}function cL(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 uL(e,t,n){return Fx(e,t,{...n,setTimeoutImpl:aa})}const bc=$e.navigator;function lL(){return/iPhone|iPad|iPod/i.test(bc?.userAgent??"")||/Macintosh/i.test(bc?.userAgent??"")&&bc?.maxTouchPoints&&bc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function fL(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){He&&Ue.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&RM(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Eh(e,n,i))return!0;if(!i)return!1;const o=e.session;if(hL(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(He&&Ue.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&Sh(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function dL(e){const t=e.getOptions();return{type:rt.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 hL(e,t){!t||!e.session||e.session.segmentId!==0||Eh(e,dL(e),!1)}function pL(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function mL(e,t,n,r){return Yr(C0(e,Fd(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function gL({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
512
+ `;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function yL({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,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await L0(e.getOptions(),r,o,t,e,Zt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function _L({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=gL({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:h}=r,d=Ae(),m=et(),g=d?.getTransport(),w=d?.getDsn();if(!d||!g||!w||!o.sampled)return zr({});const T={type:qO,replay_start_timestamp:h/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},L=await yL({scope:m,client:d,replayId:t,event:T});if(!L)return d.recordDroppedEvent("event_processor","replay"),He&&Ue.log("An event processor returned `null`, will not send event."),zr({});delete L.sdkProcessingMetadata;const U=mL(L,s,w,d.getOptions().tunnel);let K;try{K=await g.send(U)}catch(F){const Y=new Error(fh);try{Y.cause=F}catch{}throw Y}if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new fv(K.statusCode);const V=Q0({},K);if(Z0(V,"replay"))throw new Ih(V);return K}class fv extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ih extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function dv(e,t={count:0,interval:QO}){const{recordingData:n,onError:r}=e;if(n.length)try{return await _L(e),!0}catch(i){if(i instanceof fv||i instanceof Ih)throw i;if(D0("Replays",{_retryCount:t.count}),r&&r(i),t.count>=e2){const o=new Error(`${fh} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{aa(async()=>{try{await dv(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const hv="__THROTTLED",bL="__SKIPPED";function vL(e,t,n){const r=new Map,i=a=>{const c=a-n;r.forEach((u,h)=>{h<c&&r.delete(h)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let s=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(i(c),o()>=t){const h=s;return s=!0,h?bL:hv}s=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class wL{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:XO,sessionIdleExpire:YO},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=uL(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=vL((s,a)=>pP(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(t2,r),timeout:r,scrollTimeout:n2,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new xM(this,o)),He){const s=t._experiments;Ue.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Rt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=vr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=vr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{HM(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){He&&Ue.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){He&&Ue.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",He&&Ue.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){He&&Ue.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){He&&Ue.log("Buffering is in progress, call `flush()` to save the replay");return}He&&Ue.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ef({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){He&&Ue.log("Buffering is in progress, call `flush()` to save the replay");return}He&&Ue.infoTick("Starting replay in buffer mode");const t=ef({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=Fr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:ZO}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:fL(this),...lL(),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{He&&Ue.log(`Stopping Replay${n?` triggered by ${n}`:""}`),sv(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,uP(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),He&&Ue.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),He&&Ue.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();He&&Ue.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&&nd(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Rt.location.pathname}${Rt.location.hash}${Rt.location.search}`,n=`${Rt.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===hv){const i=vr({category:"replay.throttled"});this.addUpdate(()=>!Eh(this,{type:bM,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Qt(),n=t&&Jt(t),i=(n&&Ze(n).data||{})[Fn];if(!(!n||!i||!["route","custom"].includes(i)))return Ze(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=sP({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=ef({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 nv(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{Rt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Rt.addEventListener("blur",this._handleWindowBlur),Rt.addEventListener("focus",this._handleWindowFocus),Rt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(sL(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=QM(this)}_removeListeners(){try{Rt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Rt.removeEventListener("blur",this._handleWindowBlur),Rt.removeEventListener("focus",this._handleWindowFocus),Rt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||tv(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()){He&&Ue.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:rt.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=GM(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(rl(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){He&&Ue.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await aL(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 o=await this.eventBuffer.finish();await dv({replayId:t,recordingData:o,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=Ae();if(r){const i=n instanceof Ih?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){He&&Ue.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 o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){He&&Ue.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&He&&Ue.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&&Sh(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=pL(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=vr({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function _s(e,t){return[...e,...t].join(",")}function SL({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=_s(e,[".sentry-mask","[data-sentry-mask]"]),a=_s(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:_s(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:_s(r,[]),ignoreSelector:_s(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function EL({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const tg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',TL=["content-length","content-type","accept"];let ng=!1;const IL=e=>new xL(e);class xL{constructor({flushMinDelay:t=KO,flushMaxDelay:n=JO,minReplayDuration:r=r2,maxReplayDuration:i=Pm,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:h=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:m=750,mutationLimit:g=1e4,slowClickTimeout:w=7e3,slowClickIgnoreSelectors:T=[],networkDetailAllowUrls:L=[],networkDetailDenyUrls:U=[],networkCaptureBodies:K=!0,networkRequestHeaders:V=[],networkResponseHeaders:F=[],mask:Y=[],maskAttributes:D=["title","placeholder","aria-label"],unmask:G=[],block:ae=[],unblock:P=[],ignore:j=[],maskFn:z,beforeAddRecordingEvent:X,beforeErrorSampling:se,onError:we}={}){this.name="Replay";const fe=SL({mask:Y,unmask:G,block:ae,unblock:P,ignore:j});if(this._recordingOptions={maskAllInputs:h,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:z,maskInputFn:z,maskAttributeFn:(ce,Q,_e)=>EL({maskAttributes:D,maskAllText:u,privacyOptions:fe,key:ce,value:Q,el:_e}),...fe,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ce=>{try{ce.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,i2),maxReplayDuration:Math.min(i,Pm),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:h,maskAllText:u,mutationBreadcrumbLimit:m,mutationLimit:g,slowClickTimeout:w,slowClickIgnoreSelectors:T,networkDetailAllowUrls:L,networkDetailDenyUrls:U,networkCaptureBodies:K,networkRequestHeaders:rg(V),networkResponseHeaders:rg(F),beforeAddRecordingEvent:X,beforeErrorSampling:se,onError:we,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${tg}`:tg),this._isInitialized&&Hf())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ng}set _isInitialized(t){ng=t}afterAllSetup(t){!Hf()||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=AL(this._initialOptions,t);this._replay=new wL({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function AL(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=ji(n.replaysSessionSampleRate),o=ji(n.replaysOnErrorSampleRate);return i==null&&o==null&&bi(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function rg(e){return[...TL,...e.map(t=>t.toLowerCase())]}function kL(){return Ae()?.getIntegrationByName("Replay")}var CL=Object.defineProperty,RL=(e,t,n)=>t in e?CL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ig=(e,t,n)=>RL(e,typeof t!="symbol"?t+"":t,n);class NL{constructor(){ig(this,"idNodeMap",new Map),ig(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 OL(){return new NL}function ML(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function od(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:od(e.parentNode,t,n,r+1)}function og(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(ML(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const wo=`Please stop import mirror directly. Instead of that,\r
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 sg={map:{},getId(){return console.error(wo),-1},getNode(){return console.error(wo),null},removeNodeFromMap(){console.error(wo)},has(){return console.error(wo),!1},reset(){console.error(wo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(sg=new Proxy(sg,{get(e,t,n){return t==="map"&&console.error(wo),Reflect.get(e,t,n)}}));function xh(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){mv(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>xh(e,t,o||{},!0)}function Ah(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 PL(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function ol(e,t,n,r,i){if(!e)return!1;const o=PL(e);if(!o)return!1;const s=og(t,n),a=od(o,s);let c=-1;return a<0?!1:(r&&(c=od(o,og(null,r))),a>-1&&c<0?!0:a<c)}const ag={};function pv(e){const t=ag[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 o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return ag[e]=r.bind(window)}function Ai(...e){return pv("requestAnimationFrame")(...e)}function mv(...e){return pv("setTimeout")(...e)}var zo=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(zo||{});let jc;function LL(e){jc=e}const tf=e=>jc?(...n)=>{try{return e(...n)}catch(r){if(jc&&jc(r)===!0)return()=>{};throw r}}:e;var Ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",DL=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var vc=0;vc<Ao.length;vc++)DL[Ao.charCodeAt(vc)]=vc;var BL=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Ao[t[n]>>2],i+=Ao[(t[n]&3)<<4|t[n+1]>>4],i+=Ao[(t[n+1]&15)<<2|t[n+2]>>6],i+=Ao[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 cg=new Map;function FL(e,t){let n=cg.get(e);return n||(n=new Map,cg.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const gv=(e,t,n)=>{if(!e||!(_v(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=FL(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Gc(e,t,n){if(e instanceof Array)return e.map(r=>Gc(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=BL(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Gc(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:[Gc(e.data,t,n),e.width,e.height]};if(_v(e,t)||typeof e=="object"){const r=e.constructor.name,i=gv(e,t,n);return{rr_type:r,index:i}}}}return e}const yv=(e,t,n)=>e.map(r=>Gc(r,t,n)),_v=(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 HL(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Ah(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...h){return ol(this.canvas,n,r,i,!0)||mv(()=>{const d=yv(h,t,this);e(this.canvas,{type:zo["2D"],property:a,args:d})},0),u.apply(this,h)}});o.push(c)}catch{const c=xh(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:zo["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function UL(e){return e==="experimental-webgl"?"webgl":e}function ug(e,t,n,r,i){const o=[];try{const s=Ah(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!ol(this,t,n,r,!0)){const h=UL(c);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function lg(e,t,n,r,i,o,s,a){const c=[],u=Object.getOwnPropertyNames(e);for(const h of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const d=Ah(e,h,function(m){return function(...g){const w=m.apply(this,g);if(gv(w,a,this),"tagName"in this.canvas&&!ol(this.canvas,r,i,o,!0)){const T=yv(g,a,this),L={type:t,property:h,args:T};n(this.canvas,L)}return w}});c.push(d)}catch{const d=xh(e,h,{set(m){n(this.canvas,{type:t,property:h,args:[m],setter:!0})}});c.push(d)}return c}function $L(e,t,n,r,i,o){const s=[];return s.push(...lg(t.WebGLRenderingContext.prototype,zo.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...lg(t.WebGL2RenderingContext.prototype,zo.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}const jL='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 GL(){const e=new Blob([jL]);return URL.createObjectURL(e)}class WL{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=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&LL(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&tf(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&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:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}tf(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){const c=ug(t,r,i,o,!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}Ai(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(GL());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:o,type:s,width:a,height:c}=r;this.mutationCb({id:i,type:zo["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Ai(n)};t=Ai(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const o=ug(t,n,r,i,!1),s=HL(this.processMutation.bind(this),t,n,r,i),a=$L(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){const i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{ol(a,t,n,r)||i.push(a)})};for(const s of this.windows){const a=s.deref();let c;try{c=a&&a.document}catch{}c&&o(c)}for(const s of this.shadowDoms){const a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,d=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEach(w=>{const T=this.mirror.getId(w);if(!(!this.mirror.hasNode(w)||!w.width||!w.height||this.snapshotInProgressMap.get(T))){if(this.snapshotInProgressMap.set(T,!0),!n&&["webgl","webgl2"].includes(w.__context)){const L=w.getContext(w.__context);L?.getContextAttributes()?.preserveDrawingBuffer===!1&&L.clear(L.COLOR_BUFFER_BIT)}createImageBitmap(w).then(L=>{this.worker?.postMessage({id:T,bitmap:L,width:w.width,height:w.height,dataURLOptions:c,maxCanvasSize:u},[L])}).catch(L=>{tf(()=>{throw this.snapshotInProgressMap.delete(T),L})()})}}),!0)}startPendingCanvasMutationFlusher(){Ai(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Ai(t)};Ai(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ai(()=>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:a,...c}=s;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,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)}OL();var fg;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(fg||(fg={}));const dg={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}}},zL="ReplayCanvas",wc=1280,VL=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,wc):wc,n?Math.min(n,wc):wc]};let i;const o=new Promise(s=>i=s);return{name:zL,getOptions(){const{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const h=new WL({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return i(h),h},...dg[s]||dg.medium}},async snapshot(s,a){(await o).snapshot(s,a)}}},qL=VL;function gr(e=0){return((pn()||performance.timeOrigin)+e)/1e3}function XL(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=tb(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return pn()?[...t,["http.request.redirect_start",gr(e.redirectStart)],["http.request.fetch_start",gr(e.fetchStart)],["http.request.domain_lookup_start",gr(e.domainLookupStart)],["http.request.domain_lookup_end",gr(e.domainLookupEnd)],["http.request.connect_start",gr(e.connectStart)],["http.request.secure_connection_start",gr(e.secureConnectionStart)],["http.request.connection_end",gr(e.connectEnd)],["http.request.request_start",gr(e.requestStart)],["http.request.response_start",gr(e.responseStart)],["http.request.response_end",gr(e.responseEnd)]]:t}const hg=new WeakMap,nf=new Map,kh={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function bv(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c}={...kh,...t},u=typeof o=="function"?o:m=>!0,h=m=>KL(m,a),d={};n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(g=>{if(g.op==="http.client"){const w=nf.get(g.span_id);w&&(g.timestamp=w/1e3,nf.delete(g.span_id))}}),m)),i&&dk(m=>{if(m.response){const g=hg.get(m.response);g&&m.endTimestamp&&nf.set(g,m.endTimestamp)}}),qd(m=>{const g=QA(m,u,h,d);if(m.response&&m.fetchData.__span&&hg.set(m.response,m.fetchData.__span),g){const w=vv(m.fetchData.url),T=w?Hi(w).host:void 0;g.setAttributes({"http.url":w,"server.address":T}),s&&pg(g),c?.(g,{headers:m.headers})}})),r&&ah(m=>{const g=JL(m,u,h,d);if(g){s&&pg(g);let w;try{w=new Headers(m.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(g,{headers:w})}})}function YL(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function pg(e){const{url:t}=Ze(e).data;if(!t||typeof t!="string")return;const n=zi("resource",({entries:r})=>{r.forEach(i=>{YL(i)&&i.name.endsWith(t)&&(XL(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function KL(e,t){const n=Yi();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?or(r.toString(),t)||o&&or(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?or(e,t):r}}function JL(e,t,n,r){const i=e.xhr,o=i?.[Lr];if(!i||i.__sentry_own_request__||!o)return;const{url:s,method:a}=o,c=gi()&&t(s);if(e.endTimestamp&&c){const T=i.__sentry_xhr_span_id__;if(!T)return;const L=r[T];L&&o.status_code!==void 0&&(Ps(L,o.status_code),L.end(),delete r[T]);return}const u=vv(s),h=Hi(u||s),d=y_(s),m=!!Qt(),g=c&&m?Qi({name:`${a} ${d}`,attributes:{url:s,type:"xhr","http.method":a,"http.url":u,"server.address":h?.host,[Bt]:"auto.http.browser",[Un]:"http.client",...h?.search&&{"http.query":h?.search},...h?.hash&&{"http.fragment":h?.hash}}}):new Wr;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(s)&&ZL(i,gi()&&m?g:void 0);const w=Ae();return w&&w.emit("beforeOutgoingRequestSpan",g,e),g}function ZL(e,t){const{"sentry-trace":n,baggage:r}=Wd({span:t});n&&QL(e,n,r)}function QL(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||!eD(i))&&e.setRequestHeader("baggage",n)}}catch{}}function eD(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function vv(e){try{return new URL(e,De.location.origin).href}catch{return}}function tD(){De.document?De.document.addEventListener("visibilitychange",()=>{const e=Qt();if(!e)return;const t=Jt(e);if(De.document.hidden&&t){const n="cancelled",{op:r,status:i}=Ze(t);ot&&q.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:Gt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ot&&q.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const nD=3600,wv="sentry_previous_trace",rD="sentry.previous_trace";function iD(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?aD():void 0;e.on("spanStart",s=>{if(Jt(s)!==s)return;const a=et().getPropagationContext();i=oD(i,s,a),r&&sD(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=et(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(sd(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=sd(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[a0]:i.sampleRate}})}function oD(e,t,n){const r=Ze(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Uu])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=nD&&(ot&&q.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[NT]:"previous_trace"}}),t.setAttribute(rD,`${s.traceId}-${s.spanId}-${sd(s)?1:0}`)),o)}function sD(e){try{De.sessionStorage.setItem(wv,JSON.stringify(e))}catch(t){ot&&q.warn("Could not store previous trace in sessionStorage",t)}}function aD(){try{const e=De.sessionStorage?.getItem(wv);return JSON.parse(e)}catch{return}}function sd(e){return e.traceFlags===1}const cD="BrowserTracing",uD={...Nc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...kh},lD=(e={})=>{const t={name:void 0,source:void 0},n=De.document,{enableInp:r,enableElementTiming:i,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:h,idleTimeout:d,finalTimeout:m,childSpanTimeout:g,markBackgroundSpan:w,traceFetch:T,traceXHR:L,trackFetchStreamPerformance:U,shouldCreateSpanForRequest:K,enableHTTPTimings:V,ignoreResourceSpans:F,ignorePerformanceApiSpans:Y,instrumentPageLoad:D,instrumentNavigation:G,detectRedirects:ae,linkPreviousTrace:P,consistentTraceSampling:j,onRequestSpanStart:z}={...uD,...e};let X,se;function we(fe,ce,Q=!0){const _e=ce.op==="pageload",pe=h?h(ce):ce,le=pe.attributes||{};if(ce.name!==pe.name&&(le[Fn]="custom",pe.attributes=le),!Q){const oe=Ki();Qi({...pe,startTime:oe}).end(oe);return}t.name=pe.name,t.source=le[Fn];const be=M0(pe,{idleTimeout:d,finalTimeout:m,childSpanTimeout:g,disableAutoFinish:_e,beforeSpanEnd:oe=>{X?.(),GR(oe,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:F,ignorePerformanceApiSpans:Y}),gg(fe,void 0);const Be=et(),bt=Be.getPropagationContext();Be.setPropagationContext({...bt,traceId:be.spanContext().traceId,sampled:Ji(be),dsc:ar(oe)})}});gg(fe,be);function Xe(){n&&["interactive","complete"].includes(n.readyState)&&fe.emit("idleSpanEnableAutoFinish",be)}_e&&n&&(n.addEventListener("readystatechange",()=>{Xe()}),Xe())}return{name:cD,setup(fe){if(S0(),X=LR({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:fe}),r&&fN(),i&&QR(),s&&$e.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?BR():o&&DR(),a&&FR(),ae&&n){const Q=()=>{se=qt()};addEventListener("click",Q,{capture:!0}),addEventListener("keydown",Q,{capture:!0,passive:!0})}function ce(){const Q=Us(fe);Q&&!Ze(Q).timestamp&&(ot&&q.log(`[Tracing] Finishing current active span with op: ${Ze(Q).op}`),Q.setAttribute(eu,"cancelled"),Q.end())}fe.on("startNavigationSpan",(Q,_e)=>{if(Ae()!==fe)return;if(_e?.isRedirect){ot&&q.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),we(fe,{op:"navigation.redirect",...Q},!1);return}ce(),Zt().setPropagationContext({traceId:Gr(),sampleRand:Math.random()});const pe=et();pe.setPropagationContext({traceId:Gr(),sampleRand:Math.random()}),pe.setSDKProcessingMetadata({normalizedRequest:void 0}),we(fe,{op:"navigation",...Q})}),fe.on("startPageLoadSpan",(Q,_e={})=>{if(Ae()!==fe)return;ce();const pe=_e.sentryTrace||mg("sentry-trace"),le=_e.baggage||mg("baggage"),be=p0(pe,le),Xe=et();Xe.setPropagationContext(be),Xe.setSDKProcessingMetadata({normalizedRequest:Qd()}),we(fe,{op:"pageload",...Q})})},afterAllSetup(fe){let ce=Yi();if(P!=="off"&&iD(fe,{linkPreviousTrace:P,consistentTraceSampling:j}),De.location){if(D){const Q=pn();Sv(fe,{name:De.location.pathname,startTime:Q?Q/1e3:void 0,attributes:{[Fn]:"url",[Bt]:"auto.pageload.browser"}})}G&&Zu(({to:Q,from:_e})=>{if(_e===void 0&&ce?.indexOf(Q)!==-1){ce=void 0;return}ce=void 0;const pe=g_(Q),le=Us(fe),be=le&&ae&&dD(le,se);Ev(fe,{name:pe?.pathname||De.location.pathname,attributes:{[Fn]:"url",[Bt]:"auto.navigation.browser"}},{url:Q,isRedirect:be})})}w&&tD(),a&&fD(fe,d,m,g,t),r&&pN(),bv(fe,{traceFetch:T,traceXHR:L,trackFetchStreamPerformance:U,tracePropagationTargets:fe.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:K,enableHTTPTimings:V,onRequestSpanStart:z})}}};function Sv(e,t,n){e.emit("startPageLoadSpan",t,n),et().setTransactionName(t.name);const r=Us(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Ev(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=et();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...Qd(),url:r}}),Us(e)}function mg(e){return De.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function fD(e,t,n,r,i){const o=De.document;let s;const a=()=>{const c="ui.action.click",u=Us(e);if(u){const h=Ze(u).op;if(["navigation","pageload"].includes(h)){ot&&q.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(eu,"interactionInterrupted"),s.end(),s=void 0),!i.name){ot&&q.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=M0({name:i.name,op:c,attributes:{[Fn]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const Tv="_sentry_idleSpan";function Us(e){return e[Tv]}function gg(e,t){Rn(e,Tv,t)}const yg=.3;function dD(e,t){const n=Ze(e),r=Ki(),i=n.start_timestamp;return!(r-i>yg||t&&r-t<=yg)}function Vo(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function hD(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Vo(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function Ch(e){return Vo(e.getAllKeys())}function pD(e,t,n){return e(r=>Ch(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Vo(r.transaction)}))}function mD(e,t,n){return e(r=>Ch(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Vo(r.transaction)}))}function gD(e){return e(t=>Ch(t).then(n=>{const r=n[0];if(r!=null)return Vo(t.get(r)).then(i=>(t.delete(r),Vo(t.transaction).then(()=>i)))}))}function yD(e){let t;function n(){return t==null&&(t=hD(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=await ru(r);await pD(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=await ru(r);await mD(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await gD(n());if(r)return oI(r)}catch{}}}}function _D(e){return t=>{const n=e({...t,createStore:yD});return De.addEventListener("online",async r=>{await n.flush()}),n}}function bD(e=uh){return _D(Ax(e))}const _g=1e6,Wc=String(0),vD="main",Tu=De.navigator;let Iv="",xv="",Av="",ad=Tu?.userAgent||"",kv="";const wD=Tu?.language||Tu?.languages?.[0]||"";function SD(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const bg=Tu?.userAgentData;SD(bg)&&bg.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Iv=e.platform||"",Av=e.architecture||"",kv=e.model||"",xv=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];ad=`${t.brand} ${t.version}`}}).catch(e=>{});function ED(e){return!("thread_metadata"in e)}function TD(e){return ED(e)?AD(e):e}function ID(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&ot&&q.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function xD(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=ID(r),o=TD(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:qt()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:qt()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||$u,runtime:{name:"javascript",version:De.navigator.userAgent},os:{name:Iv,version:xv,build_number:ad},device:{locale:wD,model:kv,manufacturer:ad,architecture:Av,is_emulator:!1},debug_meta:{images:RD(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||En(),trace_id:i,active_thread_id:Wc,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function Cv(e){return Ze(e).op==="pageload"}function AD(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Wc]:{name:vD}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=pn(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,h)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[h]={elapsed_since_start_ns:((u.timestamp+c-o)*_g).toFixed(0),stack_id:t,thread_id:Wc};return}let d=e.stacks[u.stackId];const m=[];for(;d;){m.push(d.frameId);const w=e.frames[d.frameId];w&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:w.name,abs_path:typeof w.resourceId=="number"?e.resources[w.resourceId]:void 0,lineno:w.line,colno:w.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const g={elapsed_since_start_ns:((u.timestamp+c-o)*_g).toFixed(0),stack_id:n,thread_id:Wc};r.stacks[n]=m,r.samples[h]=g,n++}),r}function kD(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function CD(e){const t=[];return Gi(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 RD(e){const r=Ae()?.getOptions()?.stackParser;return r?LI(r,e):[]}function ND(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(ot&&q.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?(ot&&q.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function OD(e){return e.samples.length<2?(ot&&q.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(ot&&q.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Rv=!1;const Nv=3e4;function MD(e){return typeof e=="function"}function PD(){const e=De.Profiler;if(!MD(e)){ot&&q.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(Nv/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{ot&&(q.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),q.log("[Profiling] Disabling profiling for current user session.")),Rv=!0}}function vg(e){if(Rv)return ot&&q.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return ot&&q.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=Ae()?.getOptions();if(!n)return ot&&q.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return ND(r)?r?(r===!0?!0:Math.random()<r)?!0:(ot&&q.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(ot&&q.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(ot&&q.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function LD(e,t,n,r){return OD(n)?xD(e,t,n,r):null}const Di=new Map;function DD(){return Di.size}function BD(e){const t=Di.get(e);return t&&Di.delete(e),t}function FD(e,t){if(Di.set(e,t),Di.size>30){const n=Di.keys().next().value;Di.delete(n)}}function wg(e){let t;Cv(e)&&(t=qt()*1e3);const n=PD();if(!n)return;ot&&q.log(`[Profiling] started profiling span: ${Ze(e).description}`);const r=En();et().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n)return n.stop().then(c=>{if(o&&(De.clearTimeout(o),o=void 0),ot&&q.log(`[Profiling] stopped profiling of span: ${Ze(e).description}`),!c){ot&&q.log(`[Profiling] profiler returned null profile for: ${Ze(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}FD(r,c)}).catch(c=>{ot&&q.log("[Profiling] error while stopping profiler:",c)})}let o=De.setTimeout(()=>{ot&&q.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ze(e).description),i()},Nv);const s=e.end.bind(e);function a(){return e?(i().then(()=>{s()},()=>{s()}),e):s()}e.end=a}const HD="BrowserProfiling",UD=()=>({name:HD,setup(e){const t=Qt(),n=t&&Jt(t);n&&Cv(n)&&vg(n)&&wg(n),e.on("spanStart",r=>{r===Jt(r)&&vg(r)&&wg(r)}),e.on("beforeEnvelope",r=>{if(!DD())return;const i=CD(r);if(!i.length)return;const o=[];for(const s of i){const a=s?.contexts,c=a?.profile?.profile_id,u=a?.profile?.start_timestamp;if(typeof c!="string"){ot&&q.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){ot&&q.log("[Profiling] cannot find profile for a span without a profile context");continue}a?.profile&&delete a.profile;const h=BD(c);if(!h){ot&&q.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const d=LD(c,u,h,s);d&&o.push(d)}kD(r,o)})}}),$D=UD,jD="SpotlightBrowser",GD=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:jD,setup:()=>{ot&&q.log("Using Sidecar URL",t)},processEvent:n=>VD(n)?null:n,afterAllSetup:n=>{WD(n,t)}}};function WD(e,t){const n=sh("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){q.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:ru(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,q.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const zD=GD;function VD(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 qD=()=>({name:"LaunchDarkly",processEvent(e,t,n){return ta(e)}});function XD(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Po(e,t.value),Lo(e,t.value)}}}const YD=()=>({name:"OpenFeature",processEvent(e,t,n){return ta(e)}});class KD{after(t,n){Po(n.flagKey,n.value),Lo(n.flagKey,n.value)}error(t,n,r){Po(t.flagKey,t.defaultValue),Lo(t.flagKey,t.defaultValue)}}const JD=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Sn(t,"isEnabled",ZD)},processEvent(t,n,r){return ta(t)}});function ZD(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Po(n,r),Lo(n,r)):ot&&q.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const QD=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Po(n.gate.name,n.gate.value),Lo(n.gate.name,n.gate.value)})},processEvent(t,n,r){return ta(t)}});async function eB(){const e=Ae();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 tB="WebWorker",nB=({worker:e})=>({name:tB,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Sg(t))},addWorker:t=>Sg(t)});function Sg(e){e.addEventListener("message",t=>{iB(t.data)&&(t.stopImmediatePropagation(),ot&&q.log("Sentry debugId web worker message received",t.data),De._sentryDebugIds={...t.data._sentryDebugIds,...De._sentryDebugIds})})}function rB({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function iB(e){return $r(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&($r(e._sentryDebugIds)||e._sentryDebugIds===void 0)}const oB=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:$_,OpenFeatureIntegrationHook:KD,SDK_VERSION:Br,SEMANTIC_ATTRIBUTE_SENTRY_OP:Un,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:Bt,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:Uu,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Fn,Scope:sr,WINDOW:De,addBreadcrumb:Er,addEventProcessor:H0,addIntegration:Mf,breadcrumbsIntegration:fb,browserApiErrorsIntegration:db,browserProfilingIntegration:$D,browserSessionIntegration:hb,browserTracingIntegration:lD,buildLaunchDarklyFlagUsedHandler:XD,captureConsoleIntegration:iA,captureEvent:ea,captureException:Wi,captureFeedback:__,captureMessage:au,captureSession:Of,chromeStackLineParser:sb,close:ZI,consoleLoggingIntegration:ak,contextLinesIntegration:FO,continueTrace:vI,createTransport:e_,createUserFeedbackEnvelope:DN,dedupeIntegration:l_,defaultRequestInstrumentationOptions:kh,defaultStackLineParsers:cb,defaultStackParser:ub,diagnoseSdkConnectivity:eB,endSession:jd,eventFiltersIntegration:o_,eventFromException:H_,eventFromMessage:U_,exceptionFromError:qu,extraErrorDataIntegration:hA,featureFlagsIntegration:KA,feedbackAsyncIntegration:LC,feedbackIntegration:Em,feedbackSyncIntegration:Em,flush:JI,forceLoad:mO,functionToStringIntegration:i_,geckoStackLineParser:ab,getActiveSpan:Qt,getClient:Ae,getCurrentScope:et,getDefaultIntegrations:_b,getFeedback:zk,getGlobalScope:Hu,getIsolationScope:Zt,getReplay:kL,getRootSpan:Jt,getSpanDescendants:xs,getSpanStatusFromHttpCode:c0,getTraceData:Wd,globalHandlersIntegration:pb,graphqlClientIntegration:VO,httpClientIntegration:TO,httpContextIntegration:gb,inboundFiltersIntegration:s_,init:pO,instrumentOutgoingRequests:bv,instrumentSupabaseClient:p_,isEnabled:F0,isInitialized:QI,lastEventId:B0,launchDarklyIntegration:qD,lazyLoadIntegration:B_,linkedErrorsIntegration:yb,logger:jC,makeBrowserOfflineTransport:bD,makeFetchTransport:uh,makeMultiplexedTransport:Rx,moduleMetadataIntegration:eA,onLoad:gO,openFeatureIntegration:YD,opera10StackLineParser:ON,opera11StackLineParser:LN,parameterize:r_,registerSpanErrorInstrumentation:S0,registerWebWorker:rB,replayCanvasIntegration:qL,replayIntegration:IL,reportingObserverIntegration:wO,rewriteFramesIntegration:SA,sendFeedback:E_,setContext:D0,setCurrentClient:Y0,setExtra:qI,setExtras:VI,setHttpStatus:Ps,setMeasurement:R0,setTag:YI,setTags:XI,setUser:KI,showReportDialog:yO,spanToBaggageHeader:KT,spanToJSON:Ze,spanToTraceHeader:_0,spotlightBrowserIntegration:zD,startBrowserTracingNavigationSpan:Ev,startBrowserTracingPageLoadSpan:Sv,startInactiveSpan:Qi,startNewTrace:SI,startSession:Nf,startSpan:Gu,startSpanManual:bI,statsigIntegration:QD,supabaseIntegration:LA,suppressTracing:wI,thirdPartyErrorFilterIntegration:zA,unleashIntegration:JD,updateSpanName:WT,webWorkerIntegration:nB,winjsStackLineParser:CN,withActiveSpan:Zs,withIsolationScope:kT,withScope:Xn,zodErrorsIntegration:WA},Symbol.toStringTag,{value:"Module"})),sl=e=>{typeof window<"u"&&window.Sentry&&e(oB)},{useEffect:sB}=await Nn("react"),Ov=(e,t)=>sB(()=>{const n=e().catch(r=>{console.error("AsyncEffect error: ",r),sl(i=>i.captureException("AsyncEffect error: "+r.message,{extra:r}))});return function(){n.then(r=>{typeof r=="function"&&r()})}},t),{createContext:aB,useMemo:cB,useRef:uB,useState:lB}=await Nn("react"),Mv=aB(null),T3=e=>{const{writeKey:t,userId:n,traits:r,children:i}=e,o=uB(null),[s,a]=lB(!1);Ov(async()=>{if(!t){console.log("[Analytics] No writeKey provided");return}const u=navigator.userAgent;if(X1(u)){console.log("[Analytics] Skipping load: bot detected");return}try{const{AnalyticsBrowser:d}=await dw(async()=>{const{AnalyticsBrowser:m}=await import("../index-DEyuwX6T.js").then(g=>g.q);return{AnalyticsBrowser:m}},__vite__mapDeps([0,1,2,3,4]));o.current=d.load({writeKey:t}),n&&o.current.identify(n,r),a(!0)}catch(d){console.error("[Analytics] Failed to initialize:",d),o.current=null}},[t,n,r]);const c=cB(()=>!o.current||!s?{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}:{isInitialized:!0,track:(u,h)=>{o.current?.track(u,h)},identify:(u,h)=>{o.current?.identify(u,h)},page:(u,h)=>{o.current?.page(u,h)}},[s]);return sy.jsx(Mv.Provider,{value:c,children:i})},{createContext:fB}=await Nn("react"),Pv=fB(null);function _r(e,t){var n=t&&t.cache?t.cache:_B,r=t&&t.serializer?t.serializer:gB,i=t&&t.strategy?t.strategy:pB;return i(e,{cache:n,serializer:r})}function dB(e){return e==null||typeof e=="number"||typeof e=="boolean"}function hB(e,t,n,r){var i=dB(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function Lv(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function Dv(e,t,n,r,i){return n.bind(t,e,r,i)}function pB(e,t){var n=e.length===1?hB:Lv;return Dv(e,this,n,t.cache.create(),t.serializer)}function mB(e,t){return Dv(e,this,Lv,t.cache.create(),t.serializer)}var gB=function(){return JSON.stringify(arguments)},yB=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}(),_B={create:function(){return new yB}},br={variadic:mB},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 Nt;(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"})(Nt||(Nt={}));var qo;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(qo||(qo={}));function Eg(e){return e.type===Nt.literal}function bB(e){return e.type===Nt.argument}function Bv(e){return e.type===Nt.number}function Fv(e){return e.type===Nt.date}function Hv(e){return e.type===Nt.time}function Uv(e){return e.type===Nt.select}function $v(e){return e.type===Nt.plural}function vB(e){return e.type===Nt.pound}function jv(e){return e.type===Nt.tag}function Gv(e){return!!(e&&typeof e=="object"&&e.type===qo.number)}function cd(e){return!!(e&&typeof e=="object"&&e.type===qo.dateTime)}var Wv=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,wB=/(?:[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 SB(e){var t={};return e.replace(wB,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 EB=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function TB(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(EB).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),u=0,h=c;u<h.length;u++){var d=h[u];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:c})}return n}function IB(e){return e.replace(/^(.*?)-/,"")}var Tg=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,zv=/^(@+)?(\+|#+)?[rs]?$/g,xB=/(\*)(0+)|(#+)(0+)|(0+)/g,Vv=/^(0+)$/;function Ig(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(zv,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 qv(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 AB(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)),!Vv.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function xg(e){var t={},n=qv(e);return n||t}function kB(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=IB(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=Le(Le(Le({},t),{notation:"scientific"}),i.options.reduce(function(c,u){return Le(Le({},c),xg(u))},{}));continue;case"engineering":t=Le(Le(Le({},t),{notation:"engineering"}),i.options.reduce(function(c,u){return Le(Le({},c),xg(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(xB,function(c,u,h,d,m,g){if(u)t.minimumIntegerDigits=h.length;else{if(d&&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(Vv.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Tg.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Tg,function(c,u,h,d,m,g){return h==="*"?t.minimumFractionDigits=u.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&g?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+g.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=Le(Le({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Le(Le({},t),Ig(o)));continue}if(zv.test(i.stem)){t=Le(Le({},t),Ig(i.stem));continue}var s=qv(i.stem);s&&(t=Le(Le({},t),s));var a=AB(i.stem);a&&(t=Le(Le({},t),a))}return t}var Sc={"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 CB(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",u=RB(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function RB(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=Sc[r||""]||Sc[n||""]||Sc["".concat(n,"-001")]||Sc["001"];return i[0]}var rf,NB=new RegExp("^".concat(Wv.source,"*")),OB=new RegExp("".concat(Wv.source,"*$"));function ht(e,t){return{start:e,end:t}}var MB=!!String.prototype.startsWith&&"_a".startsWith("a",1),PB=!!String.fromCodePoint,LB=!!Object.fromEntries,DB=!!String.prototype.codePointAt,BB=!!String.prototype.trimStart,FB=!!String.prototype.trimEnd,HB=!!Number.isSafeInteger,UB=HB?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ud=!0;try{var $B=Yv("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ud=((rf=$B.exec("a"))===null||rf===void 0?void 0:rf[0])==="a"}catch{ud=!1}var Ag=MB?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},ld=PB?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,s;i>o;){if(s=t[o++],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},kg=LB?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],s=o[0],a=o[1];n[s]=a}return n},Xv=DB?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},jB=BB?function(t){return t.trimStart()}:function(t){return t.replace(NB,"")},GB=FB?function(t){return t.trimEnd()}:function(t){return t.replace(OB,"")};function Yv(e,t){return new RegExp(e,t)}var fd;if(ud){var Cg=Yv("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");fd=function(t,n){var r;Cg.lastIndex=n;var i=Cg.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else fd=function(t,n){for(var r=[];;){var i=Xv(t,n);if(i===void 0||Kv(i)||qB(i))break;r.push(i),n+=i>=65536?2:1}return ld.apply(void 0,r)};var WB=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 o=this.char();if(o===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:Nt.pound,location:ht(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,ht(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&dd(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:Nt.literal,value:"<".concat(i,"/>"),location:ht(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!dd(this.char()))return this.error(ft.INVALID_TAG,ht(a,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:Nt.tag,value:i,children:s,location:ht(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,ht(a,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()&&VB(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=ht(r,this.clonePosition());return{val:{type:Nt.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!zB(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 ld.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(),ld(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:Nt.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=fd(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=ht(t,o);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){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 h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var m=GB(d.val);if(m.length===0)return this.error(ft.EXPECT_ARGUMENT_STYLE,ht(this.clonePosition(),this.clonePosition()));var g=ht(h,this.clonePosition());u={style:m,styleLocation:g}}var w=this.tryParseArgumentClose(i);if(w.err)return w;var T=ht(i,this.clonePosition());if(u&&Ag(u?.style,"::",0)){var L=jB(u.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(L,u.styleLocation);return d.err?d:{val:{type:Nt.number,value:r,location:T,style:d.val},err:null}}else{if(L.length===0)return this.error(ft.EXPECT_DATE_TIME_SKELETON,T);var U=L;this.locale&&(U=CB(L,this.locale));var m={type:qo.dateTime,pattern:U,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?SB(U):{}},K=a==="date"?Nt.date:Nt.time;return{val:{type:K,value:r,location:T,style:m},err:null}}}return{val:{type:a==="number"?Nt.number:a==="date"?Nt.date:Nt.time,value:r,location:T,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var V=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,ht(V,Le({},V)));this.bumpSpace();var F=this.parseIdentifierIfPossible(),Y=0;if(a!=="select"&&F.value==="offset"){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ht(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),F=this.parseIdentifierIfPossible(),Y=d.val}var D=this.tryParsePluralOrSelectOptions(t,a,n,F);if(D.err)return D;var w=this.tryParseArgumentClose(i);if(w.err)return w;var G=ht(i,this.clonePosition());return a==="select"?{val:{type:Nt.select,value:r,options:kg(D.val),location:G},err:null}:{val:{type:Nt.plural,value:r,options:kg(D.val),offset:Y,pluralType:a==="plural"?"cardinal":"ordinal",location:G},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=TB(t)}catch{return this.error(ft.INVALID_NUMBER_SKELETON,n)}return{val:{type:qo.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?kB(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,s=!1,a=[],c=new Set,u=i.value,h=i.location;;){if(u.length===0){var d=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;h=ht(d,this.clonePosition()),u=this.message.slice(d.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);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 w=this.parseMessage(t+1,n,r);if(w.err)return w;var T=this.tryParseArgumentClose(g);if(T.err)return T;a.push([u,{value:w.val,location:ht(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return a.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:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=ht(i,this.clonePosition());return o?(s*=r,UB(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=Xv(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(Ag(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()&&Kv(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 dd(e){return e>=97&&e<=122||e>=65&&e<=90}function zB(e){return dd(e)||e===47}function VB(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 Kv(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function qB(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 hd(e){e.forEach(function(t){if(delete t.location,Uv(t)||$v(t))for(var n in t.options)delete t.options[n].location,hd(t.options[n].value);else Bv(t)&&Gv(t.style)||(Fv(t)||Hv(t))&&cd(t.style)?delete t.style.location:jv(t)&&hd(t.children)})}function XB(e,t){t===void 0&&(t={}),t=Le({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new WB(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||hd(n.val),n.val}var Tr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Tr||(Tr={}));var Ei=function(e){ur(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Rg=function(e){ur(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Tr.INVALID_VALUE,o)||this}return t}(Ei),YB=function(e){ur(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Tr.INVALID_VALUE,i)||this}return t}(Ei),KB=function(e){ur(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,'"'),Tr.MISSING_VALUE,r)||this}return t}(Ei),bn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(bn||(bn={}));function JB(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==bn.literal||n.type!==bn.literal?t.push(n):r.value+=n.value,t},[])}function ZB(e){return typeof e=="function"}function zc(e,t,n,r,i,o,s){if(e.length===1&&Eg(e[0]))return[{type:bn.literal,value:e[0].value}];for(var a=[],c=0,u=e;c<u.length;c++){var h=u[c];if(Eg(h)){a.push({type:bn.literal,value:h.value});continue}if(vB(h)){typeof o=="number"&&a.push({type:bn.literal,value:n.getNumberFormat(t).format(o)});continue}var d=h.value;if(!(i&&d in i))throw new KB(d,s);var m=i[d];if(bB(h)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?bn.literal:bn.object,value:m});continue}if(Fv(h)){var g=typeof h.style=="string"?r.date[h.style]:cd(h.style)?h.style.parsedOptions:void 0;a.push({type:bn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Hv(h)){var g=typeof h.style=="string"?r.time[h.style]:cd(h.style)?h.style.parsedOptions:r.time.medium;a.push({type:bn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(Bv(h)){var g=typeof h.style=="string"?r.number[h.style]:Gv(h.style)?h.style.parsedOptions:void 0;g&&g.scale&&(m=m*(g.scale||1)),a.push({type:bn.literal,value:n.getNumberFormat(t,g).format(m)});continue}if(jv(h)){var w=h.children,T=h.value,L=i[T];if(!ZB(L))throw new YB(T,"function",s);var U=zc(w,t,n,r,i,o),K=L(U.map(function(Y){return Y.value}));Array.isArray(K)||(K=[K]),a.push.apply(a,K.map(function(Y){return{type:typeof Y=="string"?bn.literal:bn.object,value:Y}}))}if(Uv(h)){var V=h.options[m]||h.options.other;if(!V)throw new Rg(h.value,m,Object.keys(h.options),s);a.push.apply(a,zc(V.value,t,n,r,i));continue}if($v(h)){var V=h.options["=".concat(m)];if(!V){if(!Intl.PluralRules)throw new Ei(`Intl.PluralRules is not available in this environment.
515
+ Try polyfilling it using "@formatjs/intl-pluralrules"
516
+ `,Tr.MISSING_INTL_API,s);var F=n.getPluralRules(t,{type:h.pluralType}).select(m-(h.offset||0));V=h.options[F]||h.options.other}if(!V)throw new Rg(h.value,m,Object.keys(h.options),s);a.push.apply(a,zc(V.value,t,n,r,i,m-(h.offset||0)));continue}}return JB(a)}function QB(e,t){return t?Le(Le(Le({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Le(Le({},e[r]),t[r]||{}),n},{})):e}function eF(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=QB(e[r],t[r]),n},Le({},e)):e}function of(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function tF(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:_r(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Pr([void 0],n,!1)))},{cache:of(e.number),strategy:br.variadic}),getDateTimeFormat:_r(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Pr([void 0],n,!1)))},{cache:of(e.dateTime),strategy:br.variadic}),getPluralRules:_r(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Pr([void 0],n,!1)))},{cache:of(e.pluralRules),strategy:br.variadic})}}var Jv=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=o.formatToParts(c);if(u.length===1)return u[0].value;var h=u.reduce(function(d,m){return!d.length||m.type!==bn.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(c){return zc(o.ast,o.locales,o.formatters,o.formats,c,void 0,o.message)},this.resolvedOptions=function(){var c;return{locale:((c=o.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.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 a=hw(s,["formatters"]);this.ast=e.__parse(t,Le(Le({},a),{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=eF(e.formats,r),this.formatters=i&&i.formatters||tF(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=XB,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}(),Vi;(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"})(Vi||(Vi={}));var la=function(e){ur(t,e);function t(n,r,i){var o=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return o=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
517
+ `).concat(s?`
518
+ `.concat(s.message,`
519
+ `).concat(s.stack):""))||this,o.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,t),o}return t}(Error),nF=function(e){ur(t,e);function t(n,r){return e.call(this,Vi.UNSUPPORTED_FORMATTER,n,r)||this}return t}(la),rF=function(e){ur(t,e);function t(n,r){return e.call(this,Vi.INVALID_CONFIG,n,r)||this}return t}(la),Ng=function(e){ur(t,e);function t(n,r){return e.call(this,Vi.MISSING_DATA,n,r)||this}return t}(la),Yn=function(e){ur(t,e);function t(n,r,i){var o=e.call(this,Vi.FORMAT_ERROR,"".concat(n,`
520
+ Locale: `).concat(r,`
521
+ `),i)||this;return o.locale=r,o}return t}(la),sf=function(e){ur(t,e);function t(n,r,i,o){var s=e.call(this,"".concat(n,`
522
+ MessageID: `).concat(i?.id,`
523
+ Default Message: `).concat(i?.defaultMessage,`
524
+ Description: `).concat(i?.description,`
525
+ `),r,o)||this;return s.descriptor=i,s.locale=r,s}return t}(Yn),iF=function(e){ur(t,e);function t(n,r){var i=e.call(this,Vi.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t}(la);function oF(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function ss(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var sF=function(e){},aF=function(e){},cF={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:sF,onWarn:aF};function Zv(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function ki(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function uF(e){e===void 0&&(e=Zv());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=_r(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.DateTimeFormat).bind.apply(a,Pr([void 0],c,!1)))},{cache:ki(e.dateTime),strategy:br.variadic}),o=_r(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.NumberFormat).bind.apply(a,Pr([void 0],c,!1)))},{cache:ki(e.number),strategy:br.variadic}),s=_r(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.PluralRules).bind.apply(a,Pr([void 0],c,!1)))},{cache:ki(e.pluralRules),strategy:br.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:_r(function(a,c,u,h){return new Jv(a,c,u,Le({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:s}},h||{}))},{cache:ki(e.message),strategy:br.variadic}),getRelativeTimeFormat:_r(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(t.bind.apply(t,Pr([void 0],a,!1)))},{cache:ki(e.relativeTime),strategy:br.variadic}),getPluralRules:s,getListFormat:_r(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(n.bind.apply(n,Pr([void 0],a,!1)))},{cache:ki(e.list),strategy:br.variadic}),getDisplayNames:_r(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(r.bind.apply(r,Pr([void 0],a,!1)))},{cache:ki(e.displayNames),strategy:br.variadic})}}function Rh(e,t,n,r){var i=e&&e[t],o;if(i&&(o=i[n]),o)return o;r(new nF("No ".concat(t," format named: ").concat(n)))}function Ec(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Le({timeZone:t},e[r]),n},{})}function Og(e,t){var n=Object.keys(Le(Le({},e),t));return n.reduce(function(r,i){return r[i]=Le(Le({},e[i]||{}),t[i]||{}),r},{})}function Mg(e,t){if(!t)return e;var n=Jv.formats;return Le(Le(Le({},n),e),{date:Og(Ec(n.date,t),Ec(e.date||{},t)),time:Og(Ec(n.time,t),Ec(e.time||{},t))})}var Pg=function(e,t,n,r,i){var o=e.locale,s=e.formats,a=e.messages,c=e.defaultLocale,u=e.defaultFormats,h=e.fallbackOnEmptyString,d=e.onError,m=e.timeZone,g=e.defaultRichTextElements;n===void 0&&(n={id:""});var w=n.id,T=n.defaultMessage;oF(!!w,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var L=String(w),U=a&&Object.prototype.hasOwnProperty.call(a,L)&&a[L];if(Array.isArray(U)&&U.length===1&&U[0].type===Nt.literal)return U[0].value;if(!r&&U&&typeof U=="string"&&!g)return U.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=Le(Le({},g),r||{}),s=Mg(s,m),u=Mg(u,m),!U){if(h===!1&&U==="")return U;if((!T||o&&o.toLowerCase()!==c.toLowerCase())&&d(new iF(n,o)),T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){return d(new sf('Error formatting default message for: "'.concat(L,'", rendering default message verbatim'),o,n,V)),typeof T=="string"?T:L}return L}try{var K=t.getMessageFormat(U,o,s,Le({formatters:t},i||{}));return K.format(r)}catch(V){d(new sf('Error formatting message: "'.concat(L,'", using ').concat(T?"default message":"id"," as fallback."),o,n,V))}if(T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){d(new sf('Error formatting the default message for: "'.concat(L,'", rendering message verbatim'),o,n,V))}return typeof U=="string"?U:typeof T=="string"?T:L},lF=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function fa(e,t,n,r){var i=e.locale,o=e.formats,s=e.onError,a=e.timeZone;r===void 0&&(r={});var c=r.format,u=Le(Le({},a&&{timeZone:a}),c&&Rh(o,t,c,s)),h=ss(r,lF,u);return t==="time"&&!h.hour&&!h.minute&&!h.second&&!h.timeStyle&&!h.dateStyle&&(h=Le(Le({},h),{hour:"numeric",minute:"numeric"})),n(i,h)}function fF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return fa(e,"date",t,s).format(a)}catch(c){e.onError(new Yn("Error formatting date.",e.locale,c))}return String(a)}function dF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return fa(e,"time",t,s).format(a)}catch(c){e.onError(new Yn("Error formatting time.",e.locale,c))}return String(a)}function hF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=n[2],a=s===void 0?{}:s,c=typeof i=="string"?new Date(i||0):i,u=typeof o=="string"?new Date(o||0):o;try{return fa(e,"dateTimeRange",t,a).formatRange(c,u)}catch(h){e.onError(new Yn("Error formatting date time range.",e.locale,h))}return String(c)}function pF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return fa(e,"date",t,s).formatToParts(a)}catch(c){e.onError(new Yn("Error formatting date.",e.locale,c))}return[]}function mF(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return fa(e,"time",t,s).formatToParts(a)}catch(c){e.onError(new Yn("Error formatting time.",e.locale,c))}return[]}var gF=["style","type","fallback","languageDisplay"];function yF(e,t,n,r){var i=e.locale,o=e.onError,s=Intl.DisplayNames;s||o(new Ei(`Intl.DisplayNames is not available in this environment.
526
+ Try polyfilling it using "@formatjs/intl-displaynames"
527
+ `,Tr.MISSING_INTL_API));var a=ss(r,gF);try{return t(i,a).of(n)}catch(c){o(new Yn("Error formatting display name.",i,c))}}var _F=["type","style"],Lg=Date.now();function bF(e){return"".concat(Lg,"_").concat(e,"_").concat(Lg)}function vF(e,t,n,r){r===void 0&&(r={});var i=Qv(e,t,n,r).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return i.length===1?i[0]:i.length===0?"":i}function Qv(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||o(new Ei(`Intl.ListFormat is not available in this environment.
528
+ Try polyfilling it using "@formatjs/intl-listformat"
529
+ `,Tr.MISSING_INTL_API));var a=ss(r,_F);try{var c={},u=Array.from(n).map(function(h,d){if(typeof h=="object"&&h!==null){var m=bF(d);return c[m]=h,m}return String(h)});return t(i,a).formatToParts(u).map(function(h){return h.type==="literal"?h:Le(Le({},h),{value:c[h.value]||h.value})})}catch(h){o(new Yn("Error formatting list.",i,h))}return n}var wF=["type"];function SF(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={}),Intl.PluralRules||o(new Ei(`Intl.PluralRules is not available in this environment.
530
+ Try polyfilling it using "@formatjs/intl-pluralrules"
531
+ `,Tr.MISSING_INTL_API));var s=ss(r,wF);try{return t(i,s).select(n)}catch(a){o(new Yn("Error formatting plural.",i,a))}return"other"}var EF=["numeric","style"];function TF(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=!!s&&Rh(i,"relative",s,o)||{},c=ss(n,EF,a);return t(r,c)}function IF(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var o=Intl.RelativeTimeFormat;o||e.onError(new Ei(`Intl.RelativeTimeFormat is not available in this environment.
532
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
533
+ `,Tr.MISSING_INTL_API));try{return TF(e,t,i).format(n,r)}catch(s){e.onError(new Yn("Error formatting relative time.",e.locale,s))}return String(n)}var xF=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function ew(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=s&&Rh(i,"number",s,o)||{},c=ss(n,xF,a);return t(r,c)}function AF(e,t,n,r){r===void 0&&(r={});try{return ew(e,t,r).format(n)}catch(i){e.onError(new Yn("Error formatting number.",e.locale,i))}return String(n)}function kF(e,t,n,r){r===void 0&&(r={});try{return ew(e,t,r).formatToParts(n)}catch(i){e.onError(new Yn("Error formatting number.",e.locale,i))}return[]}function CF(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function RF(e){e.onWarn&&e.defaultRichTextElements&&CF(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
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 af(e,t){var n=uF(t),r=Le(Le({},cF),e),i=r.locale,o=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Ng('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Ng('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new rF('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),RF(r),Le(Le({},r),{formatters:n,formatNumber:AF.bind(null,r,n.getNumberFormat),formatNumberToParts:kF.bind(null,r,n.getNumberFormat),formatRelativeTime:IF.bind(null,r,n.getRelativeTimeFormat),formatDate:fF.bind(null,r,n.getDateTimeFormat),formatDateToParts:pF.bind(null,r,n.getDateTimeFormat),formatTime:dF.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:hF.bind(null,r,n.getDateTimeFormat),formatTimeToParts:mF.bind(null,r,n.getDateTimeFormat),formatPlural:SF.bind(null,r,n.getPluralRules),formatMessage:Pg.bind(null,r,n),$t:Pg.bind(null,r,n),formatList:vF.bind(null,r,n.getListFormat),formatListToParts:Qv.bind(null,r,n.getListFormat),formatDisplayName:yF.bind(null,r,n.getDisplayNames)})}const{useCallback:Dg,useContext:NF,useMemo:Bg,useState:OF}=await Nn("react"),cf=Zv(),tw=(e,t="",n={})=>(Object.entries(e).forEach(([r,i])=>{const o=t?`${t}.${r}`:r;if(typeof i=="string"){n[o]=i;return}if(i&&typeof i=="object"&&!Array.isArray(i)){tw(i,o,n);return}console.error(`Invalid translation value for key "${o}". Expected string or nested object.`)}),n),MF=e=>{const t=NF(Pv);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]=OF({locale:n.locale,translations:n.translations,error:null}),o=Bg(()=>{const u={};return Object.entries(r.translations).forEach(([h,d])=>{u[h]=tw(d)}),u},[r.translations]),s=Bg(()=>{const u=o[r.locale],h=n.fallbackLocale&&o[n.fallbackLocale];if(!u&&h)return console.error(`No translations found for locale "${r.locale}". Using fallback locale "${n.fallbackLocale}".`),af({locale:r.locale,messages:h},cf);if(!u)return console.error(`No translations found for locale "${r.locale}". Using empty translations.`),af({locale:r.locale,messages:{}},cf);const m=n.fallbackLocale&&r.locale!==n.fallbackLocale&&h?{...h,...u}:u;return af({locale:r.locale,messages:m},cf)},[r.locale,o,n.fallbackLocale]),a=Dg((u,h)=>s.formatMessage({id:u},h),[s]),c=Dg(u=>{if(!r.translations[u]){console.error(`Locale "${u}" not found in translations. Available locales: ${Object.keys(r.translations).join(", ")}`),i(h=>({...h,error:`Locale "${u}" not found`}));return}i(h=>({...h,locale:u,error:null}))},[r.translations]);return{t:a,intl:s,locale:r.locale,setLocale:c,error:r.error}},{useMemo:PF}=await Nn("react"),I3=e=>{const{locale:t,translations:n,fallbackLocale:r,children:i}=e,o=MF({locale:t,translations:n,fallbackLocale:r}),s=PF(()=>o,[o]);return sy.jsx(Pv.Provider,{value:s,children:i})};var LF="2.0.9",DF=500,Fg="user-agent",Xo="",Hg="?",Vt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Cn="browser",Hr="cpu",wr="device",nr="engine",Hn="os",Yo="result",ne="name",J="type",ie="vendor",re="version",vn="architecture",$s="major",te="model",Vc="console",ze="mobile",wt="tablet",Yt="smarttv",yr="wearable",Tc="xr",Is="embedded",BF="fetcher",ho="inapp",Nh="brands",Oi="formFactors",Oh="fullVersionList",Ko="platform",Mh="platformVersion",al="bitness",Ti="sec-ch-ua",FF=Ti+"-full-version-list",HF=Ti+"-arch",UF=Ti+"-"+al,$F=Ti+"-form-factors",jF=Ti+"-"+ze,GF=Ti+"-"+te,nw=Ti+"-"+Ko,WF=nw+"-version",rw=[Nh,Oh,ze,te,Ko,Mh,vn,Oi,al],Ic="Amazon",po="Apple",Ug="ASUS",$g="BlackBerry",Ci="Google",jg="Huawei",uf="Lenovo",Gg="Honor",xc="LG",lf="Microsoft",ff="Motorola",Wg="Nvidia",zg="OnePlus",df="OPPO",bs="Samsung",Vg="Sharp",vs="Sony",hf="Xiaomi",pf="Zebra",qg="Chrome",Xg="Chromium",si="Chromecast",qc="Edge",ws="Firefox",mo="Opera",mf="Facebook",Yg="Sogou",go="Mobile ",yo=" Browser",pd="Windows",zF=typeof window!==Vt.UNDEFINED,kn=zF&&window.navigator?window.navigator:void 0,Mi=kn&&kn.userAgentData?kn.userAgentData:void 0,VF=function(e,t){var n={},r=t;if(!Iu(t)){r={};for(var i in t)for(var o in t[i])r[o]=t[i][o].concat(r[o]?r[o]:[])}for(var s in e)n[s]=r[s]&&r[s].length%2===0?r[s].concat(e[s]):e[s];return n},cl=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},md=function(e,t){if(typeof e===Vt.OBJECT&&e.length>0){for(var n in e)if(fi(t)==fi(e[n]))return!0;return!1}return da(e)?fi(t)==fi(e):!1},Iu=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?Iu(e[n]):!1)},da=function(e){return typeof e===Vt.STRING},gf=function(e){if(e){for(var t=[],n=Jo(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=xu(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=xu(n[r]);return t}},fi=function(e){return da(e)?e.toLowerCase():e},gd=function(e){return da(e)?Jo(/[^\d\.]/g,e).split(".")[0]:void 0},Dr=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==Vt.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},Jo=function(e,t){return da(t)?t.replace(e,Xo):t},Ss=function(e){return Jo(/\\?\"/g,e)},xu=function(e,t){return e=Jo(/^\s\s*/,String(e)),typeof t===Vt.UNDEFINED?e:e.substring(0,t)},yd=function(e,t){if(!(!e||!t))for(var n=0,r,i,o,s,a,c;n<t.length&&!a;){var u=t[n],h=t[n+1];for(r=i=0;r<u.length&&!a&&u[r];)if(a=u[r++].exec(e),a)for(o=0;o<h.length;o++)c=a[++i],s=h[o],typeof s===Vt.OBJECT&&s.length>0?s.length===2?typeof s[1]==Vt.FUNCTION?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Vt.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}},Qn=function(e,t){for(var n in t)if(typeof t[n]===Vt.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(md(t[n][r],e))return n===Hg?void 0:n}else if(md(t[n],e))return n===Hg?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},Kg={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:""},Jg={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},qF={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"},Zg={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[re,[ne,go+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[re,[ne,qc+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[re,[ne,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ne,re],[/opios[\/ ]+([\w\.]+)/i],[re,[ne,mo+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[re,[ne,mo+" GX"]],[/\bopr\/([\w\.]+)/i],[re,[ne,mo]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[re,[ne,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[re,[ne,"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],[ne,re],[/quark(?:pc)?\/([-\w\.]+)/i],[re,[ne,"Quark"]],[/\bddg\/([\w\.]+)/i],[re,[ne,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[re,[ne,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[re,[ne,"WeChat"]],[/konqueror\/([\w\.]+)/i],[re,[ne,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[re,[ne,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[re,[ne,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[re,[ne,"Smart "+uf+yo]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[ne,/(.+)/,"$1 Secure"+yo],re],[/norton\/([\w\.]+)/i],[re,[ne,"Norton Private"+yo]],[/\bfocus\/([\w\.]+)/i],[re,[ne,ws+" Focus"]],[/ mms\/([\w\.]+)$/i],[re,[ne,mo+" Neon"]],[/ opt\/([\w\.]+)$/i],[re,[ne,mo+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[re,[ne,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[re,[ne,"Dolphin"]],[/coast\/([\w\.]+)/i],[re,[ne,mo+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[re,[ne,"MIUI"+yo]],[/fxios\/([\w\.-]+)/i],[re,[ne,go+ws]],[/\bqihoobrowser\/?([\w\.]*)/i],[re,[ne,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ne,/(.+)/,"$1Browser"],re],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ne,/(.+)/,"$1"+yo],re],[/samsungbrowser\/([\w\.]+)/i],[re,[ne,bs+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[re,[ne,Yg+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ne,Yg+" Mobile"],re],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ne,re],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[ne],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[re,ne],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ne,mf],re,[J,ho]],[/(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],[ne,re,[J,ho]],[/\bgsa\/([\w\.]+) .*safari\//i],[re,[ne,"GSA"],[J,ho]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[re,[ne,"TikTok"],[J,ho]],[/\[(linkedin)app\]/i],[ne,[J,ho]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[ne,/(.+)/,"Zalo"],re,[J,ho]],[/(chromium)[\/ ]([-\w\.]+)/i],[ne,re],[/ome-(lighthouse)$/i],[ne,[J,BF]],[/headlesschrome(?:\/([\w\.]+)| )/i],[re,[ne,qg+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[re,[ne,qc+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ne,qg+" WebView"],re],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[re,[ne,"Android"+yo]],[/chrome\/([\w\.]+) mobile/i],[re,[ne,go+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ne,re],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[re,[ne,go+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ne,go+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[re,ne],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ne,[re,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ne,re],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ne,go+ws],re],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ne,"Netscape"],re],[/(wolvic|librewolf)\/([\w\.]+)/i],[ne,re],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[re,[ne,ws+" 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],[ne,[re,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ne,[re,/[^\d\.]+./,Xo]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[vn,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[vn,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[vn,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[vn,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[vn,"arm"]],[/ sun4\w[;\)]/i],[[vn,"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],[[vn,/ower/,Xo,fi]],[/mc680.0/i],[[vn,"68k"]],[/winnt.+\[axp/i],[[vn,"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],[te,[ie,bs],[J,wt]],[/\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],[te,[ie,bs],[J,ze]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[te,[ie,po],[J,ze]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[te,[ie,po],[J,wt]],[/(macintosh);/i],[te,[ie,po]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[te,[ie,Vg],[J,ze]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[te,[ie,Gg],[J,wt]],[/honor([-\w ]+)[;\)]/i],[te,[ie,Gg],[J,ze]],[/\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],[te,[ie,jg],[J,wt]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[te,[ie,jg],[J,ze]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[te,/_/g," "],[ie,hf],[J,wt]],[/\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],[[te,/_/g," "],[ie,hf],[J,ze]],[/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],[te,[ie,zg],[J,ze]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[te,[ie,df],[J,ze]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[te,[ie,Qn,{OnePlus:["203","304","403","404","413","415"],"*":df}],[J,wt]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[te,[ie,"BLU"],[J,ze]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[te,[ie,"Vivo"],[J,ze]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[te,[ie,"Realme"],[J,ze]],[/(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],[te,[ie,uf],[J,wt]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[te,[ie,uf],[J,ze]],[/\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],[te,[ie,ff],[J,ze]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[te,[ie,ff],[J,wt]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[te,[ie,xc],[J,wt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[te,[ie,xc],[J,ze]],[/(nokia) (t[12][01])/i],[ie,te,[J,wt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[te,/_/g," "],[J,ze],[ie,"Nokia"]],[/(pixel (c|tablet))\b/i],[te,[ie,Ci],[J,wt]],[/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],[te,[ie,Ci],[J,ze]],[/(google) (pixelbook( go)?)/i],[ie,te],[/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],[te,[ie,vs],[J,ze]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[te,"Xperia Tablet"],[ie,vs],[J,wt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[te,[ie,Ic],[J,wt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[te,/(.+)/g,"Fire Phone $1"],[ie,Ic],[J,ze]],[/(playbook);[-\w\),; ]+(rim)/i],[te,ie,[J,wt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[te,[ie,$g],[J,ze]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[te,[ie,Ug],[J,wt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[te,[ie,Ug],[J,ze]],[/(nexus 9)/i],[te,[ie,"HTC"],[J,wt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[ie,[te,/_/g," "],[J,ze]],[/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],[te,[ie,"TCL"],[J,wt]],[/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],[te,[ie,"TCL"],[J,ze]],[/(itel) ((\w+))/i],[[ie,fi],te,[J,Qn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[te,[ie,"Acer"],[J,wt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[te,[ie,"Meizu"],[J,ze]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[te,[ie,"Ulefone"],[J,ze]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[te,[ie,"Energizer"],[J,ze]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[te,[ie,"Cat"],[J,ze]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[te,[ie,"Smartfren"],[J,ze]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[te,[ie,"Nothing"],[J,ze]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[te,[ie,"Archos"],[J,wt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[te,[ie,"Archos"],[J,ze]],[/; (n159v)/i],[te,[ie,"HMD"],[J,ze]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[ie,te,[J,wt]],[/(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],[ie,te,[J,ze]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[ie,te,[J,wt]],[/(surface duo)/i],[te,[ie,lf],[J,wt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[te,[ie,"Fairphone"],[J,ze]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[te,[ie,Wg],[J,wt]],[/(sprint) (\w+)/i],[ie,te,[J,ze]],[/(kin\.[onetw]{3})/i],[[te,/\./g," "],[ie,lf],[J,ze]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[te,[ie,pf],[J,wt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[te,[ie,pf],[J,ze]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[ie,[J,Yt]],[/hbbtv.+maple;(\d+)/i],[[te,/^/,"SmartTV"],[ie,bs],[J,Yt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[ie,te,[J,Yt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[ie,xc],[J,Yt]],[/(apple) ?tv/i],[ie,[te,po+" TV"],[J,Yt]],[/crkey.*devicetype\/chromecast/i],[[te,si+" Third Generation"],[ie,Ci],[J,Yt]],[/crkey.*devicetype\/([^/]*)/i],[[te,/^/,"Chromecast "],[ie,Ci],[J,Yt]],[/fuchsia.*crkey/i],[[te,si+" Nest Hub"],[ie,Ci],[J,Yt]],[/crkey/i],[[te,si],[ie,Ci],[J,Yt]],[/(portaltv)/i],[te,[ie,mf],[J,Yt]],[/droid.+aft(\w+)( bui|\))/i],[te,[ie,Ic],[J,Yt]],[/(shield \w+ tv)/i],[te,[ie,Wg],[J,Yt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[te,[ie,Vg],[J,Yt]],[/(bravia[\w ]+)( bui|\))/i],[te,[ie,vs],[J,Yt]],[/(mi(tv|box)-?\w+) bui/i],[te,[ie,hf],[J,Yt]],[/Hbbtv.*(technisat) (.*);/i],[ie,te,[J,Yt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[ie,/.+\/(\w+)/,"$1",Qn,{LG:"lge"}],[te,xu],[J,Yt]],[/(playstation \w+)/i],[te,[ie,vs],[J,Vc]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[te,[ie,lf],[J,Vc]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[ie,Qn,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],te,[J,Vc]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[te,[ie,bs],[J,yr]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[ie,te,[J,yr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[te,[ie,df],[J,yr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[te,[ie,po],[J,yr]],[/(opwwe\d{3})/i],[te,[ie,zg],[J,yr]],[/(moto 360)/i],[te,[ie,ff],[J,yr]],[/(smartwatch 3)/i],[te,[ie,vs],[J,yr]],[/(g watch r)/i],[te,[ie,xc],[J,yr]],[/droid.+; (wt63?0{2,3})\)/i],[te,[ie,pf],[J,yr]],[/droid.+; (glass) \d/i],[te,[ie,Ci],[J,Tc]],[/(pico) ([\w ]+) os\d/i],[ie,te,[J,Tc]],[/(quest( \d| pro)?s?).+vr/i],[te,[ie,mf],[J,Tc]],[/mobile vr; rv.+firefox/i],[[J,Tc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[ie,[J,Is]],[/(aeobc)\b/i],[te,[ie,Ic],[J,Is]],[/(homepod).+mac os/i],[te,[ie,po],[J,Is]],[/windows iot/i],[[J,Is]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[te,[J,Yt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[J,Yt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[te,[J,Qn,{mobile:"Mobile",xr:"VR","*":wt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[J,wt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[J,ze]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[te,[ie,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[re,[ne,qc+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ne,re],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[re,[ne,"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],[ne,re],[/ladybird\//i],[[ne,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[re,ne]],os:[[/(windows nt) (6\.[23]); arm/i],[[ne,/N/,"R"],[re,Qn,Kg]],[/(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],[ne,re],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[re,/(;|\))/g,"",Qn,Kg],[ne,pd]],[/(windows ce)\/?([\d\.]*)/i],[ne,re],[/[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],[[re,/_/g,"."],[ne,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[ne,"macOS"],[re,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[re,[ne,si+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[re,[ne,si+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[re,[ne,si+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[re,[ne,si+" Linux"]],[/crkey\/([\d\.]+)/i],[re,[ne,si]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[re,ne],[/(ubuntu) ([\w\.]+) like android/i],[[ne,/(.+)/,"$1 Touch"],re],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[ne,re],[/\(bb(10);/i],[re,[ne,$g]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[re,[ne,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[re,[ne,ws+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[re,[ne,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[re,Qn,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[ne,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[re,[ne,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[re,[ne,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[re,[ne,"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],[ne,re],[/(sunos) ?([\d\.]*)/i],[[ne,"Solaris"],re],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ne,re]]},Ac=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Dr.call(e.init,[[Cn,[ne,re,$s,J]],[Hr,[vn]],[wr,[J,te,ie]],[nr,[ne,re]],[Hn,[ne,re]]]),Dr.call(e.isIgnore,[[Cn,[re,$s]],[nr,[re]],[Hn,[re]]]),Dr.call(e.isIgnoreRgx,[[Cn,/ ?browser$/i],[Hn,/ ?os$/i]]),Dr.call(e.toString,[[Cn,[ne,re]],[Hr,[vn]],[wr,[ie,te]],[nr,[ne,re]],[Hn,[ne,re]]]),e}(),XF=function(e,t){var n=Ac.init[t],r=Ac.isIgnore[t]||0,i=Ac.isIgnoreRgx[t]||0,o=Ac.toString[t]||0;function s(){Dr.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Mi?Mi.getHighEntropyValues(rw).then(function(a){return e.setCH(new iw(a,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Yo&&(s.prototype.is=function(a){var c=!1;for(var u in this)if(this.hasOwnProperty(u)&&!md(r,u)&&fi(i?Jo(i,this[u]):this[u])==fi(i?Jo(i,a):a)){if(c=!0,a!=Vt.UNDEFINED)break}else if(a==Vt.UNDEFINED&&c){c=!c;break}return c},s.prototype.toString=function(){var a=Xo;for(var c in o)typeof this[o[c]]!==Vt.UNDEFINED&&(a+=(a?" ":Xo)+this[o[c]]);return a||Vt.UNDEFINED}),s.prototype.then=function(a){var c=this,u=function(){for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d])};u.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var h=new u;return a(h),h},new s};function iw(e,t){if(e=e||{},Dr.call(this,rw),t)Dr.call(this,[[Nh,gf(e[Ti])],[Oh,gf(e[FF])],[ze,/\?1/.test(e[jF])],[te,Ss(e[GF])],[Ko,Ss(e[nw])],[Mh,Ss(e[WF])],[vn,Ss(e[HF])],[Oi,gf(e[$F])],[al,Ss(e[UF])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==Vt.UNDEFINED&&(this[n]=e[n])}function _i(e,t,n,r){return Dr.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",XF(this,e)]]),this}_i.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};_i.prototype.set=function(e,t){return this.data[e]=t,this};_i.prototype.setCH=function(e){return this.uaCH=e,this};_i.prototype.detectFeature=function(){if(kn&&kn.userAgent==this.ua)switch(this.itemType){case Cn:kn.brave&&typeof kn.brave.isBrave==Vt.FUNCTION&&this.set(ne,"Brave");break;case wr:!this.get(J)&&Mi&&Mi[ze]&&this.set(J,ze),this.get(te)=="Macintosh"&&kn&&typeof kn.standalone!==Vt.UNDEFINED&&kn.maxTouchPoints&&kn.maxTouchPoints>2&&this.set(te,"iPad").set(J,wt);break;case Hn:!this.get(ne)&&Mi&&Mi[Ko]&&this.set(ne,Mi[Ko]);break;case Yo:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(Cn,t(Cn)).set(Hr,t(Hr)).set(wr,t(wr)).set(nr,t(nr)).set(Hn,t(Hn))}return this};_i.prototype.parseUA=function(){switch(this.itemType!=Yo&&yd.call(this.data,this.ua,this.rgxMap),this.itemType){case Cn:this.set($s,gd(this.get(re)));break;case Hn:if(this.get(ne)=="iOS"&&this.get(re)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(re,e[1])}break}return this};_i.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case Cn:case nr:var n=e[Oh]||e[Nh],r;if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],s=n[i].version;this.itemType==Cn&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=Xg||r==qc&&/WebView2/.test(o))&&(o=Qn(o,qF),r=this.get(ne),r&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(ne,o).set(re,s).set($s,gd(s)),r=o),this.itemType==nr&&o==Xg&&this.set(re,s)}break;case Hr:var a=e[vn];a&&(a&&e[al]=="64"&&(a+="64"),yd.call(this.data,a+";",t));break;case wr:if(e[ze]&&this.set(J,ze),e[te]&&(this.set(te,e[te]),!this.get(J)||!this.get(ie))){var c={};yd.call(c,"droid 9; "+e[te]+")",t),!this.get(J)&&c.type&&this.set(J,c.type),!this.get(ie)&&c.vendor&&this.set(ie,c.vendor)}if(e[Oi]){var u;if(typeof e[Oi]!="string")for(var h=0;!u&&h<e[Oi].length;)u=Qn(e[Oi][h++],Jg);else u=Qn(e[Oi],Jg);this.set(J,u)}break;case Hn:var d=e[Ko];if(d){var m=e[Mh];d==pd&&(m=parseInt(gd(m),10)>=13?"11":"10"),this.set(ne,d).set(re,m)}this.get(ne)==pd&&e[te]=="Xbox"&&this.set(ne,"Xbox").set(re,void 0);break;case Yo:var g=this.data,w=function(T){return g[T].getItem().setCH(e).parseCH().get()};this.set(Cn,w(Cn)).set(Hr,w(Hr)).set(wr,w(wr)).set(nr,w(nr)).set(Hn,w(Hn))}return this};function cr(e,t,n){if(typeof e===Vt.OBJECT?(Iu(e,!0)?(typeof t===Vt.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===Vt.STRING&&!Iu(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===Vt.FUNCTION){var r={};n.forEach(function(h,d){r[String(d).toLowerCase()]=h}),n=r}else{var i={};for(var o in n)n.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=n[o]);n=i}if(!(this instanceof cr))return new cr(e,t,n).getResult();var s=typeof e===Vt.STRING?e:n&&n[Fg]?n[Fg]:kn&&kn.userAgent?kn.userAgent:Xo,a=new iw(n,!0),c=t?VF(Zg,t):Zg,u=function(h){return h==Yo?function(){return new _i(h,s,c,a).set("ua",s).set(Cn,this.getBrowser()).set(Hr,this.getCPU()).set(wr,this.getDevice()).set(nr,this.getEngine()).set(Hn,this.getOS()).get()}:function(){return new _i(h,s,c[h],a).parseUA().get()}};return Dr.call(this,[["getBrowser",u(Cn)],["getCPU",u(Hr)],["getDevice",u(wr)],["getEngine",u(nr)],["getOS",u(Hn)],["getResult",u(Yo)],["getUA",function(){return s}],["setUA",function(h){return da(h)&&(s=xu(h,DF)),this}]]).setUA(s),this}cr.VERSION=LF;cr.BROWSER=cl([ne,re,$s,J]);cr.CPU=cl([vn]);cr.DEVICE=cl([te,ie,J,Vc,ze,Yt,wt,yr,Is]);cr.ENGINE=cr.OS=cl([ne,re]);const YF=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"}),KF=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"}),JF=e=>{const{os:t,cpu:n}=typeof e!="string"?e:{os:new cr(e).getOS(),cpu:new cr(e).getCPU()};if(t.is(KF.MACOS)){if(n.is(YF.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:Qg}=await Nn("react"),_o="Unknown";function x3(){const[e,t]=Qg(!0),[n,r]=Qg();return Ov(async()=>{t(!0);const i=new cr(navigator.userAgent),o=i.getResult(),s={name:o.browser.name??_o,version:o.browser.version??_o},a={name:o.engine.name??_o,version:o.engine.version??_o},[c,u,h]=await Promise.all([o.withClientHints(),i.getOS().withClientHints(),i.getCPU().withClientHints()]),d={name:u.name??_o,version:u.version??_o};let m;h.architecture?m=h.architecture:m=d.name==="macOS"&&JF(c)?"arm64":"Unknown",r({browser:s,engine:a,os:d,cpu:{architecture:m},mobile:i.getDevice().is("mobile"),tablet:i.getDevice().is("tablet")}),t(!1)},[]),[e,n]}const{useContext:ZF}=await Nn("react"),QF=()=>{const e=ZF(Mv);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:ey,useEffect:ty,useMemo:e3,useState:t3}=await Nn("react"),A3=()=>({version:0,loading:!1,time:0,error:null,loaded:!1,reload:()=>{},set:()=>{}}),n3=(e,t=[],n={})=>{const[r,i]=t3({version:0,loading:!1,value:n.initialValue??null,time:0,error:null}),o=ey(()=>{n.callWithTruthyDeps&&t.some(c=>!c)||i(c=>({...c,loading:!0,version:c.version+1}))},[r,n.callWithTruthyDeps,...t]);ty(()=>{o()},t),ty(()=>{if(!r.loading)return;let c=!1;const u=!1,h=Date.now();return Promise.resolve().then(()=>e()).then(d=>{c||i(m=>({...m,value:d,error:null,loading:u,time:Date.now()-h}))}).catch(d=>{console.error(d),sl(m=>m.captureException(d)),!c&&i(m=>({...m,value:m.value,error:d,loading:u,time:Date.now()-h}))}),()=>{c=!0}},[r]);const s=ey(c=>{const u=typeof c=="function"?c(r.value):c;i(h=>({...h,value:u}))},[r]),a=e3(()=>({version:r.version,loading:r.loading,error:r.error,time:r.time,loaded:r.version!==0,reload:o,set:s}),[r,o,s]);return[r.value,a]},k3=n3,{useCallback:r3,useEffect:i3,useState:o3}=await Nn("react"),C3=(e,t)=>{const[{loading:n,args:r},i]=o3({loading:!1,args:null});i3(()=>{if(!n||r===null)return;let s=!1;return Promise.resolve().then(()=>e(...r)).then(()=>{s||i({loading:!1,args:null})}).catch(a=>{console.error(a),sl(c=>c.captureException(a)),!s&&i({loading:!1,args:null})}),()=>{s=!0}},[n]);const o=r3((...s)=>{i({loading:!0,args:s})},[n,r,...t]);return[n,o]},{useCallback:s3,useMemo:a3,useState:c3}=await Nn("react"),R3=(e,t)=>{const[n,r]=c3([]),i=a3(()=>n.map(([s])=>s),[n]),o=s3((s,...a)=>{if(n.find(([u])=>u===s))return;const c=Promise.resolve().then(()=>e(s,...a)).then(()=>{r(u=>u.filter(([h])=>h!==s))}).catch(u=>{console.error(u),sl(h=>h.captureException(u)),r(h=>h.filter(([d])=>d!==s))});r(u=>[...u,[s,c]])},[n,...t]);return[i,o]},{useEffect:ny,useRef:ry}=await Nn("react"),N3=({onLoadMore:e,hasMore:t,isLoading:n,threshold:r=500,debounceMs:i=500})=>{const o=ry(e),s=ry(0);ny(()=>{o.current=e},[e]),ny(()=>{const a=()=>{const u=Date.now();if(u-s.current<i)return;const h=document.documentElement.scrollHeight,d=document.documentElement.scrollTop,m=document.documentElement.clientHeight;h-(d+m)<r&&t&&!n&&(s.current=u,o.current())};window.addEventListener("scroll",a,{passive:!0});const c=setTimeout(a,500);return()=>{window.removeEventListener("scroll",a),clearTimeout(c)}},[t,n,r,i])};var _d;(function(e){e.NEWEST="newest",e.READ="read"})(_d||(_d={}));const u3=(e,t)=>{try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},ow=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},O3=e=>{try{localStorage.removeItem(e)}catch{}},{useCallback:Es,useEffect:kc,useMemo:l3,useRef:iy,useState:yf}=await Nn("react"),f3=6e4,bd="dcl_notifications_onboarding",d3=()=>{const e=u3(bd,null);return e===null?(ow(bd,!0),!0):e},oy=()=>{ow(bd,!1)},M3=e=>{const{identity:t,isNotificationsEnabled:n,notificationsUrl:r,availableNotificationTypes:i,queryIntervalMs:o=f3,initialActiveTab:s=_d.NEWEST,onError:a,renderProfile:c}=e,[u,h]=yf({isLoading:!1,notifications:[]}),[d,m]=yf(()=>({activeTab:s,isOnboarding:d3(),isOpen:!1})),[g,w]=yf(null),T=iy([]),L=iy(null);kc(()=>{T.current=u.notifications},[u.notifications]),kc(()=>{L.current=g},[g]);const U=l3(()=>i?new Set(i):null,[i]),K=Es(G=>Promise.resolve().then(()=>G.getNotifications()).then(ae=>{const P=U?ae.filter(z=>U.has(z.type)):ae,j=P.some(z=>z.read);h(z=>({...z,isLoading:!1,notifications:P})),j&&(oy(),m(z=>z.isOnboarding?{...z,isOnboarding:!1}:z))}).catch(ae=>{const P=ae instanceof Error?ae:new Error("Unknown error");console.error("Error fetching notifications:",P),a&&a(P),h(j=>({...j,isLoading:!1}))}),[U,a]);kc(()=>{if(!t){w(null);return}if(!r){const z=new Error("notificationsUrl is required");console.error("Notifications URL missing:",z),a&&a(z),w(null);return}const G=W1(t,{url:r});if(w(G),!n)return;let ae=!1;h(z=>({...z,isLoading:!0}));const P=()=>{ae||K(G)};P();const j=setInterval(P,o);return()=>{ae=!0,clearInterval(j)}},[t,n,r,a,K,o]),kc(()=>{if(!!d.isOpen)return;const ae=T.current,P=L.current;if(!P)return;const j=ae.filter(X=>!X.read).map(X=>X.id);if(j.length===0)return;let z=!1;return Promise.resolve().then(()=>P.markNotificationsAsRead(j)).then(()=>{z||h(X=>({...X,notifications:X.notifications.map(se=>({...se,read:j.includes(se.id)?!0:se.read}))}))}).catch(X=>{if(z)return;const se=X instanceof Error?X:new Error("Unknown error");console.error("Error marking notifications as read:",se),a&&a(se)}),()=>{z=!0}},[d.isOpen,a]);const V=Es(()=>{oy(),m(G=>({...G,isOnboarding:!1}))},[]),F=Es(()=>{m(G=>({...G,isOpen:!G.isOpen}))},[]),Y=Es(G=>{m(ae=>({...ae,activeTab:G}))},[]),D=Es(G=>c?c(G):null,[c]);return{notifications:u.notifications,isLoading:u.isLoading,isModalOpen:d.isOpen,modalActiveTab:d.activeTab,isNotificationsOnboarding:d.isOnboarding,handleOnBegin:V,handleNotificationsOpen:F,handleOnChangeModalTab:Y,handleRenderProfile:D}},{useEffect:h3}=await Nn("react"),P3=e=>{const{page:t}=QF();h3(()=>{t(e)},[t,e])},{useCallback:p3,useState:m3}=await Nn("react"),L3=e=>{const[t,n]=m3(e),r=p3(i=>n(o=>({...o,...i})),[]);return[t,r]};export{Mv as AnalyticsContext,T3 as AnalyticsProvider,Pv as TranslationContext,I3 as TranslationProvider,d3 as checkIsOnboarding,A3 as createAsyncMemoState,A3 as createAsyncStateState,W1 as createNotificationsClient,u3 as getStorageItem,O3 as removeStorageItem,oy as setOnboardingDone,ow as setStorageItem,x3 as useAdvancedUserAgentData,QF as useAnalytics,Ov as useAsyncEffect,k3 as useAsyncMemo,n3 as useAsyncState,C3 as useAsyncTask,R3 as useAsyncTasks,N3 as useInfiniteScroll,M3 as useNotifications,P3 as usePageTracking,L3 as usePatchState,MF as useTranslation};