@abtnode/blocklet-services 1.16.43 → 1.16.44-beta-20250513-030435-c2d99062

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 (182) hide show
  1. package/api/emails/_components/activity.js +2 -1
  2. package/api/index.js +5 -1
  3. package/api/libs/email.js +1 -1
  4. package/dist/assets/{AdapterDayjs-BiPHzcUP.js → AdapterDayjs-BD9H1lZ-.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-Dghek9CI.js → ArrowDropDown-BrO-zDlb.js} +1 -1
  6. package/dist/assets/{CheckCircle-Dvhgeo9j.js → CheckCircle-Ds4QI0ey.js} +1 -1
  7. package/dist/assets/{ChevronLeft-DE33N57i.js → ChevronLeft-CnQaQ-rc.js} +1 -1
  8. package/dist/assets/{ChevronRight-BfbPIE2b.js → ChevronRight-a_2_x6Ew.js} +1 -1
  9. package/dist/assets/{Community-2MKVAbIk.js → Community-DW6DJTIs.js} +1 -1
  10. package/dist/assets/{DeleteOutline-B6efX_Fy.js → DeleteOutline-CFN4r-OG.js} +1 -1
  11. package/dist/assets/{Done-Ct5slWpT.js → Done-DqSE6KPe.js} +1 -1
  12. package/dist/assets/{Download-DKQGRFHf.js → Download-C_LRKzbG.js} +1 -1
  13. package/dist/assets/{Edit-BLsIdIOp.js → Edit-CbR4eoK8.js} +1 -1
  14. package/dist/assets/{EditIcon-CwTCQzs9.js → EditIcon-DxUWMw59.js} +1 -1
  15. package/dist/assets/{Email-DOy8vL0N.js → Email-DWueGk7t.js} +1 -1
  16. package/dist/assets/{Error-wpqrAfUT.js → Error-jEHdDLNk.js} +1 -1
  17. package/dist/assets/{ExpandLess-CJXkgMMr.js → ExpandLess-CkoEHpgk.js} +1 -1
  18. package/dist/assets/{Google-BbAgcDQ_.js → Google-DHEolkW-.js} +1 -1
  19. package/dist/assets/{Holiday-DT-VjgQP.js → Holiday-Dwvo6QkZ.js} +1 -1
  20. package/dist/assets/{InfoOutlined-Dy7jTc7H.js → InfoOutlined-DkG0jjos.js} +1 -1
  21. package/dist/assets/{Launch-DBKe0gh0.js → Launch-B-2Jomi6.js} +1 -1
  22. package/dist/assets/{LaunchOutlined-BIq6YUU8.js → LaunchOutlined-CXNijfqX.js} +1 -1
  23. package/dist/assets/{Location-C__VfR4D.js → Location-DUEOr9J2.js} +1 -1
  24. package/dist/assets/{LockIcon-DIGiHKHl.js → LockIcon-Cjg8jV1E.js} +1 -1
  25. package/dist/assets/{Meeting-Cn2X2Ix7.js → Meeting-CJaI_cKm.js} +1 -1
  26. package/dist/assets/{MoreHoriz-BxJelL2A.js → MoreHoriz-B6KdR0Y8.js} +1 -1
  27. package/dist/assets/{OffSick-Cnicwu8x.js → OffSick-C9VqqjrN.js} +1 -1
  28. package/dist/assets/{Phone-CoX1qzAs.js → Phone-DcHUzCa-.js} +1 -1
  29. package/dist/assets/{PlayArrow-C9IFmc-j.js → PlayArrow-BToG9L6q.js} +1 -1
  30. package/dist/assets/{QuestionMarkCircle-DCM9zW3a.js → QuestionMarkCircle-BPVDAm8U.js} +1 -1
  31. package/dist/assets/{ServerLogo-CfbYjQbP.js → ServerLogo-s6cfhx92.js} +1 -1
  32. package/dist/assets/{Timezone-CCdgxxpv.js → Timezone-B-Ho_Uno.js} +1 -1
  33. package/dist/assets/{TuneOutlined-CB7t_nGq.js → TuneOutlined-BR2H7Mxj.js} +1 -1
  34. package/dist/assets/{ViewList-B4hmqizo.js → ViewList-D8vtMKQz.js} +1 -1
  35. package/dist/assets/{WorkingRemotely-DWT54kH1.js → WorkingRemotely-lJ6DUMCR.js} +1 -1
  36. package/dist/assets/{access-control-RJu7xYI3.js → access-control-Din7doVd.js} +1 -1
  37. package/dist/assets/{actions-BCWb2ez1.js → actions-BjTeIzgS.js} +1 -1
  38. package/dist/assets/{add-component-core-DRAzXCeg.js → add-component-core-5x4gTem5.js} +15 -15
  39. package/dist/assets/{add-resource-BDJuVU8K.js → add-resource-BrZnm53f.js} +1 -1
  40. package/dist/assets/{addon-ygDS7Fug.js → addon--u4EErgw.js} +1 -1
  41. package/dist/assets/{advanced-CFME3Vrl.js → advanced-CN6mCSES.js} +1 -1
  42. package/dist/assets/{appearance-BqJwEmtt.js → appearance-Bowm1Shj.js} +1 -1
  43. package/dist/assets/audit-logs-DczjqamJ.js +35 -0
  44. package/dist/assets/{authorize-WekjQ3_M.js → authorize-D2LCmekq.js} +1 -1
  45. package/dist/assets/{base32-BbrXtXL6.js → base32-_zEVBJUg.js} +1 -1
  46. package/dist/assets/{branding-CS-f1gMT.js → branding-B6AmOMI6.js} +6 -6
  47. package/dist/assets/{branding-BTfb8_b4.js → branding-CwhhJRKu.js} +2 -2
  48. package/dist/assets/{bundle-avatar-Db5l8MQ4.js → bundle-avatar-CDJRatFg.js} +1 -1
  49. package/dist/assets/button-D8hoY4xw.js +1 -0
  50. package/dist/assets/click-to-copy-CFiGx48J.js +1 -0
  51. package/dist/assets/{collapse-Bn_BDlF9.js → collapse-QV_2gdtM.js} +1 -1
  52. package/dist/assets/{complete-BRApuFsV.js → complete-CKhw9u_z.js} +2 -2
  53. package/dist/assets/{component-C7g4FGFm.js → component-Cb3m5qUw.js} +2 -2
  54. package/dist/assets/{config-qG8JCIJ_.js → config-LE_EJolF.js} +1 -1
  55. package/dist/assets/{config-C8AXD1JH.js → config-kGXJEkFJ.js} +2 -2
  56. package/dist/assets/{config-navigation-B7r4dV5S.js → config-navigation-CKVyFhfH.js} +4 -4
  57. package/dist/assets/{config-space-CSKkMgqX.js → config-space-CogRdhoQ.js} +1 -1
  58. package/dist/assets/{confirm-BvUfAlkx.js → confirm-SdqBW-ti.js} +1 -1
  59. package/dist/assets/{connect-B2HOOYzS.js → connect-BMn4CxDk.js} +1 -1
  60. package/dist/assets/{connect-DGPdKMcu.js → connect-HAC-YfHh.js} +1 -1
  61. package/dist/assets/{connect-to-BBtnljQ-.js → connect-to-eNQDY2rc.js} +1 -1
  62. package/dist/assets/{content-layout-DzqMXifY.js → content-layout-BzF-fNQz.js} +1 -1
  63. package/dist/assets/dashboard-BYxl5V9e.js +239 -0
  64. package/dist/assets/{delete-confirm-BBaXcAXg.js → delete-confirm-CKF_eljP.js} +1 -1
  65. package/dist/assets/{did-address-BKBBjFqv.js → did-address-DjwPl1uy.js} +1 -1
  66. package/dist/assets/{domain-DTrwCkop.js → domain-DotN6lCb.js} +1 -1
  67. package/dist/assets/{domain-action-card-D-WETV-f.js → domain-action-card-DHH9PLRG.js} +1 -1
  68. package/dist/assets/domains-BV2pykxi.js +1 -0
  69. package/dist/assets/{dot-C05enzim.js → dot-BA3EvSrh.js} +1 -1
  70. package/dist/assets/{email-Bc5KLu5Q.js → email-CHR0EOis.js} +1 -1
  71. package/dist/assets/{empty-spinner-BZlBh4vA.js → empty-spinner-n0_Ehns5.js} +1 -1
  72. package/dist/assets/{exchange-passport-DbNEDTaa.js → exchange-passport-D0iIXJxD.js} +1 -1
  73. package/dist/assets/{fuel-DzWcrU-I.js → fuel-nMTHNcy-.js} +1 -1
  74. package/dist/assets/{gen-access-key-D-ftFU9F.js → gen-access-key-DH4wNzRm.js} +1 -1
  75. package/dist/assets/get-safe-url-B5RJTMjC.js +1 -0
  76. package/dist/assets/get-safe-url-Bk6PlU7n.js +1 -0
  77. package/dist/assets/{home-DXj5oFeO.js → home-DzCwBE8F.js} +1 -1
  78. package/dist/assets/{iframe-CIVgAJuH.js → iframe-DW7zzzTG.js} +1 -1
  79. package/dist/assets/{index-BemEiFHE.js → index-8CHxrfFP.js} +1 -1
  80. package/dist/assets/{index-D64RNKdt.js → index-B54lTbup.js} +6 -6
  81. package/dist/assets/{index-CKheO_aT.js → index-B8r-LrrM.js} +1 -1
  82. package/dist/assets/{index-Bxd86KLJ.js → index-BA8C83iz.js} +4 -4
  83. package/dist/assets/index-BCNchyGN.js +141 -0
  84. package/dist/assets/{index-g0L_1foA.js → index-BCtmnJeV.js} +11 -11
  85. package/dist/assets/{index-BMD-pSqT.js → index-BDYaw77z.js} +1 -1
  86. package/dist/assets/{index-Ce2NSVmU.js → index-BIPRCLBG.js} +1 -1
  87. package/dist/assets/{index-BMPpz8ni.js → index-BJxv6GA4.js} +1 -1
  88. package/dist/assets/index-BLGGjT7N.js +284 -0
  89. package/dist/assets/{index-DjLLC6N3.js → index-BYCeMwoO.js} +1 -1
  90. package/dist/assets/{index-BVU8_1Ed.js → index-B_-kynzD.js} +3 -3
  91. package/dist/assets/{index-D09AfnR1.js → index-BuXc3Oag.js} +1 -1
  92. package/dist/assets/{index-u-w3iMC9.js → index-CIkPfxzG.js} +4 -4
  93. package/dist/assets/{index-CHDiquXf.js → index-CPfvVvHv.js} +11 -11
  94. package/dist/assets/index-CYeNo51G.js +113 -0
  95. package/dist/assets/{index-CUfP1M2j.js → index-CfxcUIhC.js} +1 -1
  96. package/dist/assets/index-Ctzl9JDw.js +55 -0
  97. package/dist/assets/{index-BmWVfEGP.js → index-CxwBhS0_.js} +1 -1
  98. package/dist/assets/{index--HbH1n1_.js → index-D7eC9ptO.js} +1 -1
  99. package/dist/assets/{index-DF3gHUuW.js → index-D9KfgDPN.js} +4 -4
  100. package/dist/assets/{index-wXCx8TFU.js → index-DcUhenm6.js} +1 -1
  101. package/dist/assets/{index-C0SLCehH.js → index-enM9Y412.js} +1 -1
  102. package/dist/assets/{invitation-CKfllvl5.js → invitation-DzT9Qa0A.js} +1 -1
  103. package/dist/assets/{invite-CCCSmPiy.js → invite-CQPeUOT4.js} +1 -1
  104. package/dist/assets/{issue-passport-C3zUptls.js → issue-passport-BYhvmLsl.js} +1 -1
  105. package/dist/assets/{item-CkcpHBHM.js → item-D942q-4T.js} +1 -1
  106. package/dist/assets/{landing-page-q-KgqE9Q.js → landing-page-Due4o1uF.js} +1 -1
  107. package/dist/assets/{launch-result-message-BaU6oEsi.js → launch-result-message-DIYoykBK.js} +1 -1
  108. package/dist/assets/{layout-CyCulQBn.js → layout-BcLfVSqs.js} +1 -1
  109. package/dist/assets/list-BiJWMg_P.js +236 -0
  110. package/dist/assets/list-DKUSPdB6.js +2 -0
  111. package/dist/assets/{list-header-CU9W30JD.js → list-header-HqBQs1yn.js} +1 -1
  112. package/dist/assets/localization-BUDtnbyU.js +1 -0
  113. package/dist/assets/{log-DNpJdgp3.js → log-Iko0jLNA.js} +1 -1
  114. package/dist/assets/{logger-CQ50TnpL.js → logger-BLZgTs_U.js} +1 -1
  115. package/dist/assets/{login-BKaJnfFX.js → login-4Yq_pPSw.js} +1 -1
  116. package/dist/assets/{login-oauth-callback-LJsgXC8E.js → login-oauth-callback-DZaPZfnA.js} +1 -1
  117. package/dist/assets/{logo-uploader-BYnd80uu.js → logo-uploader-Cnkdgyfv.js} +3 -3
  118. package/dist/assets/{lost-passport-Bk0k4I4s.js → lost-passport-D5jMtgH_.js} +1 -1
  119. package/dist/assets/{open-window-DV0D-Mov.js → open-window--2G6Qjbq.js} +1 -1
  120. package/dist/assets/overview-CaQ-tV1t.js +85 -0
  121. package/dist/assets/{page-header-CpNMTtn_.js → page-header-xyZktwBS.js} +1 -1
  122. package/dist/assets/{passport-item-BxfGrDcE.js → passport-item-DH3_49G1.js} +1 -1
  123. package/dist/assets/{permission-BkNXA8B5.js → permission-BH1TY_tz.js} +1 -1
  124. package/dist/assets/{preferences-_jTjKHvU.js → preferences-CfmnTXfl.js} +1 -1
  125. package/dist/assets/{profile-embed-8w4_vg5a.js → profile-embed-ZtzRYgXv.js} +1 -1
  126. package/dist/assets/publish-resource-BtFRgv4P.js +1 -0
  127. package/dist/assets/{react-beautiful-dnd.esm-Cq_dOQ2z.js → react-beautiful-dnd.esm-7PS2VwOi.js} +1 -1
  128. package/dist/assets/runtime-B0207zk1.js +1 -0
  129. package/dist/assets/sdk-9eXJSWHG.js +1 -0
  130. package/dist/assets/section-Cv4udilp.js +41 -0
  131. package/dist/assets/{security-BQbSLSOe.js → security-CX01lhxW.js} +3 -3
  132. package/dist/assets/{session-6XaVDQaE.js → session-CHdTc1We.js} +1 -1
  133. package/dist/assets/{setup-CifjXQIf.js → setup-DIAgbS7c.js} +3 -3
  134. package/dist/assets/{shorten-label-Dq7bVuNa.js → shorten-label-Cng55547.js} +1 -1
  135. package/dist/assets/{simple-select-C-wGUGQR.js → simple-select-CP_Svi_D.js} +1 -1
  136. package/dist/assets/{slicedToArray-vWe02CJE.js → slicedToArray-C7EPqaHf.js} +1 -1
  137. package/dist/assets/{spaces-Cp7TgoZP.js → spaces-BVG-t3ND.js} +1 -1
  138. package/dist/assets/{start-CHmWCQE9.js → start-CMRQU8Px.js} +1 -1
  139. package/dist/assets/{starting-progress-CdpkXOrK.js → starting-progress-CiLZpNpg.js} +1 -1
  140. package/dist/assets/{status-46dMQnxA.js → status-DSQPLYSp.js} +1 -1
  141. package/dist/assets/{step-actions-Bu3Q5M4V.js → step-actions-BfGTFkaB.js} +1 -1
  142. package/dist/assets/{studio-BbeHx14I.js → studio-DikseKRr.js} +1 -1
  143. package/dist/assets/{switch-control-D6CqAlDY.js → switch-control-C5i52ixk.js} +1 -1
  144. package/dist/assets/{traffic-CY9Vj6w7.js → traffic-ClE631in.js} +2 -2
  145. package/dist/assets/{transfer-CSeo2FaW.js → transfer-BnR8fjLW.js} +1 -1
  146. package/dist/assets/{unsubscribe-BLaMmgbM.js → unsubscribe-rUE2LcLN.js} +1 -1
  147. package/dist/assets/{use-blocklet-logo-sEJnYyNL.js → use-blocklet-logo-Phq7jasP.js} +2 -2
  148. package/dist/assets/{use-mobile-BAjFH6d8.js → use-mobile-Boa_xu9A.js} +1 -1
  149. package/dist/assets/{use-mobile-Bh8CHBbH.js → use-mobile-DyX6Fl8Z.js} +1 -1
  150. package/dist/assets/{useLocalStorage-C6U1Aqya.js → useLocalStorage-DVnkpneF.js} +1 -1
  151. package/dist/assets/user-center-D25Vw-wP.js +76 -0
  152. package/dist/assets/{util-RWes6RwK.js → util-Btd7aQEC.js} +1 -1
  153. package/dist/assets/{util-Bg0WSJ-t.js → util-CEAObyfj.js} +1 -1
  154. package/dist/assets/{vendor-arcblock-CN2B_oTr.js → vendor-arcblock-uz9DVywv.js} +45 -45
  155. package/dist/assets/{vendor-mui-core-UZpb7wT7.js → vendor-mui-core-D_bnq77o.js} +1 -1
  156. package/dist/assets/{vendor-mui-x-whuSO90H.js → vendor-mui-x-R-0SFz4c.js} +1 -1
  157. package/dist/assets/{vendor-ux-did-connect-TEE6cGq6.js → vendor-ux-did-connect-DHrruicZ.js} +136 -136
  158. package/dist/assets/{wrap-locale-DZ79GW_G.js → wrap-locale-CPW6a0PM.js} +1 -1
  159. package/dist/index.html +4 -4
  160. package/dist/service-worker.js +1 -1
  161. package/dist/share/shared-bridge.html +4 -4
  162. package/package.json +32 -32
  163. package/dist/assets/audit-logs-CtFZQHby.js +0 -35
  164. package/dist/assets/button-DotKXyjc.js +0 -1
  165. package/dist/assets/click-to-copy-BxhgzyYL.js +0 -1
  166. package/dist/assets/dashboard-C124DXmc.js +0 -279
  167. package/dist/assets/domains-BxkmGeZE.js +0 -1
  168. package/dist/assets/get-safe-url-2RcRY8gU.js +0 -1
  169. package/dist/assets/get-safe-url-CEvgWyL5.js +0 -1
  170. package/dist/assets/index-9ixwCOkw.js +0 -113
  171. package/dist/assets/index-B_fwtN9z.js +0 -55
  172. package/dist/assets/index-CyUXddLG.js +0 -284
  173. package/dist/assets/index-DsT9i24r.js +0 -141
  174. package/dist/assets/list-D1dIr8Je.js +0 -2
  175. package/dist/assets/list-TP-VNuzL.js +0 -236
  176. package/dist/assets/localization-BXLZxF1J.js +0 -1
  177. package/dist/assets/overview-UIMGVO1S.js +0 -85
  178. package/dist/assets/publish-resource-CcM3RwPR.js +0 -1
  179. package/dist/assets/relative-time-Cl7lOTkO.js +0 -1
  180. package/dist/assets/runtime-BVDdcpyT.js +0 -1
  181. package/dist/assets/sdk-7yPC_DtN.js +0 -1
  182. package/dist/assets/user-center-BHyd-rRF.js +0 -76
@@ -1,9 +1,9 @@
1
- import{v as de,B as Br}from"./vendor-utils-rHXShPKm.js";import{bA as De,bB as Dr,bC as Mr,bD as Pr,bE as Cr,bF as Lr,bG as Vr,bH as Rr,bI as Fr,bJ as ar,bK as $r,bL as Gr,bM as zr,bN as Yr,aJ as Hr,bz as Zr,aA as Wr}from"./vendor-ux-did-connect-TEE6cGq6.js";var ze={exports:{}},Ye={},fr;function Ir(){if(fr)return Ye;fr=1;function r(p){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(p)}function e(p,l,m){return Object.defineProperty(p,"prototype",{writable:!1}),p}function t(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function n(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),l&&f(p,l)}function f(p,l){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,L){return j.__proto__=L,j},f(p,l)}function s(p){var l=q();return function(){var j=S(p),L;if(l){var P=S(this).constructor;L=Reflect.construct(j,arguments,P)}else L=j.apply(this,arguments);return d(this,L)}}function d(p,l){if(l&&(r(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(p)}function x(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function S(p){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},S(p)}var K={},C,T;function N(p,l,m){m||(m=Error);function j(P,te,$){return typeof l=="string"?l:l(P,te,$)}var L=function(P){n($,P);var te=s($);function $(ce,ue,k){var ne;return t(this,$),ne=te.call(this,j(ce,ue,k)),ne.code=p,ne}return e($)}(m);K[p]=L}function B(p,l){if(Array.isArray(p)){var m=p.length;return p=p.map(function(j){return String(j)}),m>2?"one of ".concat(l," ").concat(p.slice(0,m-1).join(", "),", or ")+p[m-1]:m===2?"one of ".concat(l," ").concat(p[0]," or ").concat(p[1]):"of ".concat(l," ").concat(p[0])}else return"of ".concat(l," ").concat(String(p))}function J(p,l,m){return p.substr(0,l.length)===l}function Y(p,l,m){return(m===void 0||m>p.length)&&(m=p.length),p.substring(m-l.length,m)===l}function D(p,l,m){return typeof m!="number"&&(m=0),m+l.length>p.length?!1:p.indexOf(l,m)!==-1}return N("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),N("ERR_INVALID_ARG_TYPE",function(p,l,m){C===void 0&&(C=ir()),C(typeof p=="string","'name' must be a string");var j;typeof l=="string"&&J(l,"not ")?(j="must not be",l=l.replace(/^not /,"")):j="must be";var L;if(Y(p," argument"))L="The ".concat(p," ").concat(j," ").concat(B(l,"type"));else{var P=D(p,".")?"property":"argument";L='The "'.concat(p,'" ').concat(P," ").concat(j," ").concat(B(l,"type"))}return L+=". Received type ".concat(r(m)),L},TypeError),N("ERR_INVALID_ARG_VALUE",function(p,l){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";T===void 0&&(T=De);var j=T.inspect(l);return j.length>128&&(j="".concat(j.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(m,". Received ").concat(j)},TypeError),N("ERR_INVALID_RETURN_VALUE",function(p,l,m){var j;return m&&m.constructor&&m.constructor.name?j="instance of ".concat(m.constructor.name):j="type ".concat(r(m)),"Expected ".concat(p,' to be returned from the "').concat(l,'"')+" function but got ".concat(j,".")},TypeError),N("ERR_MISSING_ARGS",function(){for(var p=arguments.length,l=new Array(p),m=0;m<p;m++)l[m]=arguments[m];C===void 0&&(C=ir()),C(l.length>0,"At least one arg needs to be specified");var j="The ",L=l.length;switch(l=l.map(function(P){return'"'.concat(P,'"')}),L){case 1:j+="".concat(l[0]," argument");break;case 2:j+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:j+=l.slice(0,L-1).join(", "),j+=", and ".concat(l[L-1]," arguments");break}return"".concat(j," must be specified")},TypeError),Ye.codes=K,Ye}var He,sr;function kr(){if(sr)return He;sr=1;function r(h,y){var A=Object.keys(h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(h);y&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(h,_).enumerable})),A.push.apply(A,w)}return A}function e(h){for(var y=1;y<arguments.length;y++){var A=arguments[y]!=null?arguments[y]:{};y%2?r(Object(A),!0).forEach(function(w){t(h,w,A[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach(function(w){Object.defineProperty(h,w,Object.getOwnPropertyDescriptor(A,w))})}return h}function t(h,y,A){return y=d(y),y in h?Object.defineProperty(h,y,{value:A,enumerable:!0,configurable:!0,writable:!0}):h[y]=A,h}function n(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}function f(h,y){for(var A=0;A<y.length;A++){var w=y[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(h,d(w.key),w)}}function s(h,y,A){return y&&f(h.prototype,y),Object.defineProperty(h,"prototype",{writable:!1}),h}function d(h){var y=x(h,"string");return p(y)==="symbol"?y:String(y)}function x(h,y){if(p(h)!=="object"||h===null)return h;var A=h[Symbol.toPrimitive];if(A!==void 0){var w=A.call(h,y||"default");if(p(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(h)}function q(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(y&&y.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),y&&Y(h,y)}function S(h){var y=B();return function(){var w=D(h),_;if(y){var c=D(this).constructor;_=Reflect.construct(w,arguments,c)}else _=w.apply(this,arguments);return K(this,_)}}function K(h,y){if(y&&(p(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(h)}function C(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function T(h){var y=typeof Map=="function"?new Map:void 0;return T=function(w){if(w===null||!J(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y<"u"){if(y.has(w))return y.get(w);y.set(w,_)}function _(){return N(w,arguments,D(this).constructor)}return _.prototype=Object.create(w.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),Y(_,w)},T(h)}function N(h,y,A){return B()?N=Reflect.construct.bind():N=function(_,c,o){var u=[null];u.push.apply(u,c);var v=Function.bind.apply(_,u),b=new v;return o&&Y(b,o.prototype),b},N.apply(null,arguments)}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function J(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function Y(h,y){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,_){return w.__proto__=_,w},Y(h,y)}function D(h){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},D(h)}function p(h){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},p(h)}var l=De,m=l.inspect,j=Ir(),L=j.codes.ERR_INVALID_ARG_TYPE;function P(h,y,A){return(A===void 0||A>h.length)&&(A=h.length),h.substring(A-y.length,A)===y}function te(h,y){if(y=Math.floor(y),h.length==0||y==0)return"";var A=h.length*y;for(y=Math.floor(Math.log(y)/Math.log(2));y;)h+=h,y--;return h+=h.substring(0,A-h.length),h}var $="",ce="",ue="",k="",ne={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Ie=10;function je(h){var y=Object.keys(h),A=Object.create(Object.getPrototypeOf(h));return y.forEach(function(w){A[w]=h[w]}),Object.defineProperty(A,"message",{value:h.message}),A}function he(h){return m(h,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(h,y,A){var w="",_="",c=0,o="",u=!1,v=he(h),b=v.split(`
2
- `),E=he(y).split(`
3
- `),R=0,H="";if(A==="strictEqual"&&p(h)==="object"&&p(y)==="object"&&h!==null&&y!==null&&(A="strictEqualObject"),b.length===1&&E.length===1&&b[0]!==E[0]){var X=b[0].length+E[0].length;if(X<=Ie){if((p(h)!=="object"||h===null)&&(p(y)!=="object"||y===null)&&(h!==0||y!==0))return"".concat(ne[A],`
1
+ import{v as ye,B as Br}from"./vendor-utils-rHXShPKm.js";import{bz as De,bA as Dr,bB as Mr,bC as Pr,bD as Cr,bE as Lr,bF as Vr,bG as Rr,bH as Fr,bI as ar,bJ as $r,bK as Gr,bL as zr,bM as Yr,aJ as Hr,by as Zr,aA as Wr}from"./vendor-ux-did-connect-DHrruicZ.js";var ze={exports:{}},Ye={},fr;function Ir(){if(fr)return Ye;fr=1;function r(p){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(p)}function e(p,l,m){return Object.defineProperty(p,"prototype",{writable:!1}),p}function t(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function n(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),l&&f(p,l)}function f(p,l){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,L){return j.__proto__=L,j},f(p,l)}function s(p){var l=q();return function(){var j=S(p),L;if(l){var P=S(this).constructor;L=Reflect.construct(j,arguments,P)}else L=j.apply(this,arguments);return y(this,L)}}function y(p,l){if(l&&(r(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(p)}function x(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function S(p){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},S(p)}var K={},C,T;function N(p,l,m){m||(m=Error);function j(P,te,$){return typeof l=="string"?l:l(P,te,$)}var L=function(P){n($,P);var te=s($);function $(ce,ue,k){var ne;return t(this,$),ne=te.call(this,j(ce,ue,k)),ne.code=p,ne}return e($)}(m);K[p]=L}function B(p,l){if(Array.isArray(p)){var m=p.length;return p=p.map(function(j){return String(j)}),m>2?"one of ".concat(l," ").concat(p.slice(0,m-1).join(", "),", or ")+p[m-1]:m===2?"one of ".concat(l," ").concat(p[0]," or ").concat(p[1]):"of ".concat(l," ").concat(p[0])}else return"of ".concat(l," ").concat(String(p))}function J(p,l,m){return p.substr(0,l.length)===l}function Y(p,l,m){return(m===void 0||m>p.length)&&(m=p.length),p.substring(m-l.length,m)===l}function D(p,l,m){return typeof m!="number"&&(m=0),m+l.length>p.length?!1:p.indexOf(l,m)!==-1}return N("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),N("ERR_INVALID_ARG_TYPE",function(p,l,m){C===void 0&&(C=ir()),C(typeof p=="string","'name' must be a string");var j;typeof l=="string"&&J(l,"not ")?(j="must not be",l=l.replace(/^not /,"")):j="must be";var L;if(Y(p," argument"))L="The ".concat(p," ").concat(j," ").concat(B(l,"type"));else{var P=D(p,".")?"property":"argument";L='The "'.concat(p,'" ').concat(P," ").concat(j," ").concat(B(l,"type"))}return L+=". Received type ".concat(r(m)),L},TypeError),N("ERR_INVALID_ARG_VALUE",function(p,l){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";T===void 0&&(T=De);var j=T.inspect(l);return j.length>128&&(j="".concat(j.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(m,". Received ").concat(j)},TypeError),N("ERR_INVALID_RETURN_VALUE",function(p,l,m){var j;return m&&m.constructor&&m.constructor.name?j="instance of ".concat(m.constructor.name):j="type ".concat(r(m)),"Expected ".concat(p,' to be returned from the "').concat(l,'"')+" function but got ".concat(j,".")},TypeError),N("ERR_MISSING_ARGS",function(){for(var p=arguments.length,l=new Array(p),m=0;m<p;m++)l[m]=arguments[m];C===void 0&&(C=ir()),C(l.length>0,"At least one arg needs to be specified");var j="The ",L=l.length;switch(l=l.map(function(P){return'"'.concat(P,'"')}),L){case 1:j+="".concat(l[0]," argument");break;case 2:j+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:j+=l.slice(0,L-1).join(", "),j+=", and ".concat(l[L-1]," arguments");break}return"".concat(j," must be specified")},TypeError),Ye.codes=K,Ye}var He,sr;function kr(){if(sr)return He;sr=1;function r(h,d){var A=Object.keys(h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(h);d&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(h,_).enumerable})),A.push.apply(A,w)}return A}function e(h){for(var d=1;d<arguments.length;d++){var A=arguments[d]!=null?arguments[d]:{};d%2?r(Object(A),!0).forEach(function(w){t(h,w,A[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach(function(w){Object.defineProperty(h,w,Object.getOwnPropertyDescriptor(A,w))})}return h}function t(h,d,A){return d=y(d),d in h?Object.defineProperty(h,d,{value:A,enumerable:!0,configurable:!0,writable:!0}):h[d]=A,h}function n(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function f(h,d){for(var A=0;A<d.length;A++){var w=d[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(h,y(w.key),w)}}function s(h,d,A){return d&&f(h.prototype,d),Object.defineProperty(h,"prototype",{writable:!1}),h}function y(h){var d=x(h,"string");return p(d)==="symbol"?d:String(d)}function x(h,d){if(p(h)!=="object"||h===null)return h;var A=h[Symbol.toPrimitive];if(A!==void 0){var w=A.call(h,d||"default");if(p(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(h)}function q(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(d&&d.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),d&&Y(h,d)}function S(h){var d=B();return function(){var w=D(h),_;if(d){var c=D(this).constructor;_=Reflect.construct(w,arguments,c)}else _=w.apply(this,arguments);return K(this,_)}}function K(h,d){if(d&&(p(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(h)}function C(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function T(h){var d=typeof Map=="function"?new Map:void 0;return T=function(w){if(w===null||!J(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof d<"u"){if(d.has(w))return d.get(w);d.set(w,_)}function _(){return N(w,arguments,D(this).constructor)}return _.prototype=Object.create(w.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),Y(_,w)},T(h)}function N(h,d,A){return B()?N=Reflect.construct.bind():N=function(_,c,o){var u=[null];u.push.apply(u,c);var v=Function.bind.apply(_,u),b=new v;return o&&Y(b,o.prototype),b},N.apply(null,arguments)}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function J(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function Y(h,d){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,_){return w.__proto__=_,w},Y(h,d)}function D(h){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},D(h)}function p(h){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},p(h)}var l=De,m=l.inspect,j=Ir(),L=j.codes.ERR_INVALID_ARG_TYPE;function P(h,d,A){return(A===void 0||A>h.length)&&(A=h.length),h.substring(A-d.length,A)===d}function te(h,d){if(d=Math.floor(d),h.length==0||d==0)return"";var A=h.length*d;for(d=Math.floor(Math.log(d)/Math.log(2));d;)h+=h,d--;return h+=h.substring(0,A-h.length),h}var $="",ce="",ue="",k="",ne={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Ie=10;function je(h){var d=Object.keys(h),A=Object.create(Object.getPrototypeOf(h));return d.forEach(function(w){A[w]=h[w]}),Object.defineProperty(A,"message",{value:h.message}),A}function he(h){return m(h,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(h,d,A){var w="",_="",c=0,o="",u=!1,v=he(h),b=v.split(`
2
+ `),E=he(d).split(`
3
+ `),R=0,H="";if(A==="strictEqual"&&p(h)==="object"&&p(d)==="object"&&h!==null&&d!==null&&(A="strictEqualObject"),b.length===1&&E.length===1&&b[0]!==E[0]){var X=b[0].length+E[0].length;if(X<=Ie){if((p(h)!=="object"||h===null)&&(p(d)!=="object"||d===null)&&(h!==0||d!==0))return"".concat(ne[A],`
4
4
 
5
5
  `)+"".concat(b[0]," !== ").concat(E[0],`
6
- `)}else if(A!=="strictEqualObject"){var Q=de.stderr&&de.stderr.isTTY?de.stderr.columns:80;if(X<Q){for(;b[0][R]===E[0][R];)R++;R>2&&(H=`
6
+ `)}else if(A!=="strictEqualObject"){var Q=ye.stderr&&ye.stderr.isTTY?ye.stderr.columns:80;if(X<Q){for(;b[0][R]===E[0][R];)R++;R>2&&(H=`
7
7
  `.concat(te(" ",R),"^"),R=0)}}}for(var oe=b[b.length-1],Se=E[E.length-1];oe===Se&&(R++<2?o=`
8
8
  `.concat(oe).concat(o):w=oe,b.pop(),E.pop(),!(b.length===0||E.length===0));)oe=b[b.length-1],Se=E[E.length-1];var qe=Math.max(b.length,E.length);if(qe===0){var Oe=v.split(`
9
9
  `);if(Oe.length>30)for(Oe[26]="".concat($,"...").concat(k);Oe.length>27;)Oe.pop();return"".concat(ne.notIdentical,`
@@ -31,7 +31,7 @@ import{v as de,B as Br}from"./vendor-utils-rHXShPKm.js";import{bA as De,bB as Dr
31
31
  `).concat(_,`
32
32
  `).concat($,"...").concat(k).concat(w,`
33
33
  `)+"".concat($,"...").concat(k)}return"".concat(Ke).concat(u?Me:"",`
34
- `).concat(_).concat(w).concat(o).concat(H)}var ge=function(h,y){q(w,h);var A=S(w);function w(_){var c;if(n(this,w),p(_)!=="object"||_===null)throw new L("options","Object",_);var o=_.message,u=_.operator,v=_.stackStartFn,b=_.actual,E=_.expected,R=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)c=A.call(this,String(o));else if(de.stderr&&de.stderr.isTTY&&(de.stderr&&de.stderr.getColorDepth&&de.stderr.getColorDepth()!==1?($="\x1B[34m",ce="\x1B[32m",k="\x1B[39m",ue="\x1B[31m"):($="",ce="",k="",ue="")),p(b)==="object"&&b!==null&&p(E)==="object"&&E!==null&&"stack"in b&&b instanceof Error&&"stack"in E&&E instanceof Error&&(b=je(b),E=je(E)),u==="deepStrictEqual"||u==="strictEqual")c=A.call(this,xe(b,E,u));else if(u==="notDeepStrictEqual"||u==="notStrictEqual"){var H=ne[u],X=he(b).split(`
34
+ `).concat(_).concat(w).concat(o).concat(H)}var ge=function(h,d){q(w,h);var A=S(w);function w(_){var c;if(n(this,w),p(_)!=="object"||_===null)throw new L("options","Object",_);var o=_.message,u=_.operator,v=_.stackStartFn,b=_.actual,E=_.expected,R=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)c=A.call(this,String(o));else if(ye.stderr&&ye.stderr.isTTY&&(ye.stderr&&ye.stderr.getColorDepth&&ye.stderr.getColorDepth()!==1?($="\x1B[34m",ce="\x1B[32m",k="\x1B[39m",ue="\x1B[31m"):($="",ce="",k="",ue="")),p(b)==="object"&&b!==null&&p(E)==="object"&&E!==null&&"stack"in b&&b instanceof Error&&"stack"in E&&E instanceof Error&&(b=je(b),E=je(E)),u==="deepStrictEqual"||u==="strictEqual")c=A.call(this,xe(b,E,u));else if(u==="notDeepStrictEqual"||u==="notStrictEqual"){var H=ne[u],X=he(b).split(`
35
35
  `);if(u==="notStrictEqual"&&p(b)==="object"&&b!==null&&(H=ne.notStrictEqualObject),X.length>30)for(X[26]="".concat($,"...").concat(k);X.length>27;)X.pop();X.length===1?c=A.call(this,"".concat(H," ").concat(X[0])):c=A.call(this,"".concat(H,`
36
36
 
37
37
  `).concat(X.join(`
@@ -44,19 +44,19 @@ import{v as de,B as Br}from"./vendor-utils-rHXShPKm.js";import{bA as De,bB as Dr
44
44
 
45
45
  should equal
46
46
 
47
- `):oe=" ".concat(u," ").concat(oe)),c=A.call(this,"".concat(Q).concat(oe))}return Error.stackTraceLimit=R,c.generatedMessage=!o,Object.defineProperty(C(c),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),c.code="ERR_ASSERTION",c.actual=b,c.expected=E,c.operator=u,Error.captureStackTrace&&Error.captureStackTrace(C(c),v),c.stack,c.name="AssertionError",K(c)}return s(w,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:y,value:function(c,o){return m(this,e(e({},o),{},{customInspect:!1,depth:0}))}}]),w}(T(Error),m.custom);return He=ge,He}var Jr=Pr,jr=Dr()(),xr=Mr,Ve=Cr,Xr=xr("Array.prototype.push"),lr=xr("Object.prototype.propertyIsEnumerable"),Qr=jr?Ve.getOwnPropertySymbols:null,et=function(e,t){if(e==null)throw new TypeError("target must be an object");var n=Ve(e);if(arguments.length===1)return n;for(var f=1;f<arguments.length;++f){var s=Ve(arguments[f]),d=Jr(s),x=jr&&(Ve.getOwnPropertySymbols||Qr);if(x)for(var q=x(s),S=0;S<q.length;++S){var K=q[S];lr(s,K)&&Xr(d,K)}for(var C=0;C<d.length;++C){var T=d[C];if(lr(s,T)){var N=s[T];n[T]=N}}}return n},Ze=et,rt=function(){if(!Object.assign)return!1;for(var r="abcdefghijklmnopqrst",e=r.split(""),t={},n=0;n<e.length;++n)t[e[n]]=e[n];var f=Object.assign({},t),s="";for(var d in f)s+=d;return r!==s},tt=function(){if(!Object.assign||!Object.preventExtensions)return!1;var r=Object.preventExtensions({1:2});try{Object.assign(r,"xy")}catch{return r[1]==="y"}return!1},nt=function(){return!Object.assign||rt()||tt()?Ze:Object.assign},pr=function(r){return r!==r},Nr=function(e,t){return e===0&&t===0?1/e===1/t:!!(e===t||pr(e)&&pr(t))},it=Nr,cr=function(){return typeof Object.is=="function"?Object.is:it},We,hr;function $e(){if(hr)return We;hr=1;var r=Pr,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",t=Object.prototype.toString,n=Array.prototype.concat,f=Vr,s=function(S){return typeof S=="function"&&t.call(S)==="[object Function]"},d=Lr(),x=function(S,K,C,T){if(K in S){if(T===!0){if(S[K]===C)return}else if(!s(T)||!T())return}d?f(S,K,C,!0):f(S,K,C)},q=function(S,K){var C=arguments.length>2?arguments[2]:{},T=r(K);e&&(T=n.call(T,Object.getOwnPropertySymbols(K)));for(var N=0;N<T.length;N+=1)x(S,T[N],K[T[N]],C[T[N]])};return q.supportsDescriptors=!!d,We=q,We}var ke,dr;function ot(){if(dr)return ke;dr=1;var r=cr,e=$e();return ke=function(){var n=r();return e(Object,{is:n},{is:function(){return Object.is!==n}}),n},ke}var Je,yr;function at(){if(yr)return Je;yr=1;var r=$e(),e=Rr,t=Nr,n=cr,f=ot(),s=e(n(),Object);return r(s,{getPolyfill:n,implementation:t,shim:f}),Je=s,Je}var Xe,br;function _r(){return br||(br=1,Xe=function(e){return e!==e}),Xe}var Qe,gr;function qr(){if(gr)return Qe;gr=1;var r=_r();return Qe=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r},Qe}var er,vr;function ct(){if(vr)return er;vr=1;var r=$e(),e=qr();return er=function(){var n=e();return r(Number,{isNaN:n},{isNaN:function(){return Number.isNaN!==n}}),n},er}var rr,Er;function ut(){if(Er)return rr;Er=1;var r=Rr,e=$e(),t=_r(),n=qr(),f=ct(),s=r(n(),Number);return e(s,{getPolyfill:n,implementation:t,shim:f}),rr=s,rr}var tr,wr;function ft(){if(wr)return tr;wr=1;function r(i,a){return s(i)||f(i,a)||t(i,a)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(i,a){if(i){if(typeof i=="string")return n(i,a);var g=Object.prototype.toString.call(i).slice(8,-1);if(g==="Object"&&i.constructor&&(g=i.constructor.name),g==="Map"||g==="Set")return Array.from(i);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return n(i,a)}}function n(i,a){(a==null||a>i.length)&&(a=i.length);for(var g=0,O=new Array(a);g<a;g++)O[g]=i[g];return O}function f(i,a){var g=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(g!=null){var O,I,M,U,z=[],Z=!0,ie=!1;try{if(M=(g=g.call(i)).next,a!==0)for(;!(Z=(O=M.call(g)).done)&&(z.push(O.value),z.length!==a);Z=!0);}catch(ae){ie=!0,I=ae}finally{try{if(!Z&&g.return!=null&&(U=g.return(),Object(U)!==U))return}finally{if(ie)throw I}}return z}}function s(i){if(Array.isArray(i))return i}function d(i){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},d(i)}var x=/a/g.flags!==void 0,q=function(a){var g=[];return a.forEach(function(O){return g.push(O)}),g},S=function(a){var g=[];return a.forEach(function(O,I){return g.push([I,O])}),g},K=Object.is?Object.is:at(),C=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},T=Number.isNaN?Number.isNaN:ut();function N(i){return i.call.bind(i)}var B=N(Object.prototype.hasOwnProperty),J=N(Object.prototype.propertyIsEnumerable),Y=N(Object.prototype.toString),D=De.types,p=D.isAnyArrayBuffer,l=D.isArrayBufferView,m=D.isDate,j=D.isMap,L=D.isRegExp,P=D.isSet,te=D.isNativeError,$=D.isBoxedPrimitive,ce=D.isNumberObject,ue=D.isStringObject,k=D.isBooleanObject,ne=D.isBigIntObject,Ie=D.isSymbolObject,je=D.isFloat32Array,he=D.isFloat64Array;function xe(i){if(i.length===0||i.length>10)return!0;for(var a=0;a<i.length;a++){var g=i.charCodeAt(a);if(g<48||g>57)return!0}return i.length===10&&i>=Math.pow(2,32)}function ge(i){return Object.keys(i).filter(xe).concat(C(i).filter(Object.prototype.propertyIsEnumerable.bind(i)))}/*!
47
+ `):oe=" ".concat(u," ").concat(oe)),c=A.call(this,"".concat(Q).concat(oe))}return Error.stackTraceLimit=R,c.generatedMessage=!o,Object.defineProperty(C(c),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),c.code="ERR_ASSERTION",c.actual=b,c.expected=E,c.operator=u,Error.captureStackTrace&&Error.captureStackTrace(C(c),v),c.stack,c.name="AssertionError",K(c)}return s(w,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d,value:function(c,o){return m(this,e(e({},o),{},{customInspect:!1,depth:0}))}}]),w}(T(Error),m.custom);return He=ge,He}var Jr=Pr,jr=Dr()(),xr=Mr,Ve=Cr,Xr=xr("Array.prototype.push"),lr=xr("Object.prototype.propertyIsEnumerable"),Qr=jr?Ve.getOwnPropertySymbols:null,et=function(e,t){if(e==null)throw new TypeError("target must be an object");var n=Ve(e);if(arguments.length===1)return n;for(var f=1;f<arguments.length;++f){var s=Ve(arguments[f]),y=Jr(s),x=jr&&(Ve.getOwnPropertySymbols||Qr);if(x)for(var q=x(s),S=0;S<q.length;++S){var K=q[S];lr(s,K)&&Xr(y,K)}for(var C=0;C<y.length;++C){var T=y[C];if(lr(s,T)){var N=s[T];n[T]=N}}}return n},Ze=et,rt=function(){if(!Object.assign)return!1;for(var r="abcdefghijklmnopqrst",e=r.split(""),t={},n=0;n<e.length;++n)t[e[n]]=e[n];var f=Object.assign({},t),s="";for(var y in f)s+=y;return r!==s},tt=function(){if(!Object.assign||!Object.preventExtensions)return!1;var r=Object.preventExtensions({1:2});try{Object.assign(r,"xy")}catch{return r[1]==="y"}return!1},nt=function(){return!Object.assign||rt()||tt()?Ze:Object.assign},pr=function(r){return r!==r},Nr=function(e,t){return e===0&&t===0?1/e===1/t:!!(e===t||pr(e)&&pr(t))},it=Nr,cr=function(){return typeof Object.is=="function"?Object.is:it},We,hr;function $e(){if(hr)return We;hr=1;var r=Pr,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",t=Object.prototype.toString,n=Array.prototype.concat,f=Vr,s=function(S){return typeof S=="function"&&t.call(S)==="[object Function]"},y=Lr(),x=function(S,K,C,T){if(K in S){if(T===!0){if(S[K]===C)return}else if(!s(T)||!T())return}y?f(S,K,C,!0):f(S,K,C)},q=function(S,K){var C=arguments.length>2?arguments[2]:{},T=r(K);e&&(T=n.call(T,Object.getOwnPropertySymbols(K)));for(var N=0;N<T.length;N+=1)x(S,T[N],K[T[N]],C[T[N]])};return q.supportsDescriptors=!!y,We=q,We}var ke,yr;function ot(){if(yr)return ke;yr=1;var r=cr,e=$e();return ke=function(){var n=r();return e(Object,{is:n},{is:function(){return Object.is!==n}}),n},ke}var Je,dr;function at(){if(dr)return Je;dr=1;var r=$e(),e=Rr,t=Nr,n=cr,f=ot(),s=e(n(),Object);return r(s,{getPolyfill:n,implementation:t,shim:f}),Je=s,Je}var Xe,br;function _r(){return br||(br=1,Xe=function(e){return e!==e}),Xe}var Qe,gr;function qr(){if(gr)return Qe;gr=1;var r=_r();return Qe=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r},Qe}var er,vr;function ct(){if(vr)return er;vr=1;var r=$e(),e=qr();return er=function(){var n=e();return r(Number,{isNaN:n},{isNaN:function(){return Number.isNaN!==n}}),n},er}var rr,Er;function ut(){if(Er)return rr;Er=1;var r=Rr,e=$e(),t=_r(),n=qr(),f=ct(),s=r(n(),Number);return e(s,{getPolyfill:n,implementation:t,shim:f}),rr=s,rr}var tr,wr;function ft(){if(wr)return tr;wr=1;function r(i,a){return s(i)||f(i,a)||t(i,a)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
48
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(i,a){if(i){if(typeof i=="string")return n(i,a);var g=Object.prototype.toString.call(i).slice(8,-1);if(g==="Object"&&i.constructor&&(g=i.constructor.name),g==="Map"||g==="Set")return Array.from(i);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return n(i,a)}}function n(i,a){(a==null||a>i.length)&&(a=i.length);for(var g=0,O=new Array(a);g<a;g++)O[g]=i[g];return O}function f(i,a){var g=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(g!=null){var O,I,M,U,z=[],Z=!0,ie=!1;try{if(M=(g=g.call(i)).next,a!==0)for(;!(Z=(O=M.call(g)).done)&&(z.push(O.value),z.length!==a);Z=!0);}catch(ae){ie=!0,I=ae}finally{try{if(!Z&&g.return!=null&&(U=g.return(),Object(U)!==U))return}finally{if(ie)throw I}}return z}}function s(i){if(Array.isArray(i))return i}function y(i){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},y(i)}var x=/a/g.flags!==void 0,q=function(a){var g=[];return a.forEach(function(O){return g.push(O)}),g},S=function(a){var g=[];return a.forEach(function(O,I){return g.push([I,O])}),g},K=Object.is?Object.is:at(),C=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},T=Number.isNaN?Number.isNaN:ut();function N(i){return i.call.bind(i)}var B=N(Object.prototype.hasOwnProperty),J=N(Object.prototype.propertyIsEnumerable),Y=N(Object.prototype.toString),D=De.types,p=D.isAnyArrayBuffer,l=D.isArrayBufferView,m=D.isDate,j=D.isMap,L=D.isRegExp,P=D.isSet,te=D.isNativeError,$=D.isBoxedPrimitive,ce=D.isNumberObject,ue=D.isStringObject,k=D.isBooleanObject,ne=D.isBigIntObject,Ie=D.isSymbolObject,je=D.isFloat32Array,he=D.isFloat64Array;function xe(i){if(i.length===0||i.length>10)return!0;for(var a=0;a<i.length;a++){var g=i.charCodeAt(a);if(g<48||g>57)return!0}return i.length===10&&i>=Math.pow(2,32)}function ge(i){return Object.keys(i).filter(xe).concat(C(i).filter(Object.prototype.propertyIsEnumerable.bind(i)))}/*!
49
49
  * The buffer module from node.js, for the browser.
50
50
  *
51
51
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
52
52
  * @license MIT
53
- */function h(i,a){if(i===a)return 0;for(var g=i.length,O=a.length,I=0,M=Math.min(g,O);I<M;++I)if(i[I]!==a[I]){g=i[I],O=a[I];break}return g<O?-1:O<g?1:0}var y=!0,A=!1,w=0,_=1,c=2,o=3;function u(i,a){return x?i.source===a.source&&i.flags===a.flags:RegExp.prototype.toString.call(i)===RegExp.prototype.toString.call(a)}function v(i,a){if(i.byteLength!==a.byteLength)return!1;for(var g=0;g<i.byteLength;g++)if(i[g]!==a[g])return!1;return!0}function b(i,a){return i.byteLength!==a.byteLength?!1:h(new Uint8Array(i.buffer,i.byteOffset,i.byteLength),new Uint8Array(a.buffer,a.byteOffset,a.byteLength))===0}function E(i,a){return i.byteLength===a.byteLength&&h(new Uint8Array(i),new Uint8Array(a))===0}function R(i,a){return ce(i)?ce(a)&&K(Number.prototype.valueOf.call(i),Number.prototype.valueOf.call(a)):ue(i)?ue(a)&&String.prototype.valueOf.call(i)===String.prototype.valueOf.call(a):k(i)?k(a)&&Boolean.prototype.valueOf.call(i)===Boolean.prototype.valueOf.call(a):ne(i)?ne(a)&&BigInt.prototype.valueOf.call(i)===BigInt.prototype.valueOf.call(a):Ie(a)&&Symbol.prototype.valueOf.call(i)===Symbol.prototype.valueOf.call(a)}function H(i,a,g,O){if(i===a)return i!==0?!0:g?K(i,a):!0;if(g){if(d(i)!=="object")return typeof i=="number"&&T(i)&&T(a);if(d(a)!=="object"||i===null||a===null||Object.getPrototypeOf(i)!==Object.getPrototypeOf(a))return!1}else{if(i===null||d(i)!=="object")return a===null||d(a)!=="object"?i==a:!1;if(a===null||d(a)!=="object")return!1}var I=Y(i),M=Y(a);if(I!==M)return!1;if(Array.isArray(i)){if(i.length!==a.length)return!1;var U=ge(i),z=ge(a);return U.length!==z.length?!1:Q(i,a,g,O,_,U)}if(I==="[object Object]"&&(!j(i)&&j(a)||!P(i)&&P(a)))return!1;if(m(i)){if(!m(a)||Date.prototype.getTime.call(i)!==Date.prototype.getTime.call(a))return!1}else if(L(i)){if(!L(a)||!u(i,a))return!1}else if(te(i)||i instanceof Error){if(i.message!==a.message||i.name!==a.name)return!1}else if(l(i)){if(!g&&(je(i)||he(i))){if(!v(i,a))return!1}else if(!b(i,a))return!1;var Z=ge(i),ie=ge(a);return Z.length!==ie.length?!1:Q(i,a,g,O,w,Z)}else{if(P(i))return!P(a)||i.size!==a.size?!1:Q(i,a,g,O,c);if(j(i))return!j(a)||i.size!==a.size?!1:Q(i,a,g,O,o);if(p(i)){if(!E(i,a))return!1}else if($(i)&&!R(i,a))return!1}return Q(i,a,g,O,w)}function X(i,a){return a.filter(function(g){return J(i,g)})}function Q(i,a,g,O,I,M){if(arguments.length===5){M=Object.keys(i);var U=Object.keys(a);if(M.length!==U.length)return!1}for(var z=0;z<M.length;z++)if(!B(a,M[z]))return!1;if(g&&arguments.length===5){var Z=C(i);if(Z.length!==0){var ie=0;for(z=0;z<Z.length;z++){var ae=Z[z];if(J(i,ae)){if(!J(a,ae))return!1;M.push(ae),ie++}else if(J(a,ae))return!1}var Te=C(a);if(Z.length!==Te.length&&X(a,Te).length!==ie)return!1}else{var Ne=C(a);if(Ne.length!==0&&X(a,Ne).length!==0)return!1}}if(M.length===0&&(I===w||I===_&&i.length===0||i.size===0))return!0;if(O===void 0)O={val1:new Map,val2:new Map,position:0};else{var Ue=O.val1.get(i);if(Ue!==void 0){var Ee=O.val2.get(a);if(Ee!==void 0)return Ue===Ee}O.position++}O.val1.set(i,O.position),O.val2.set(a,O.position);var Be=se(i,a,g,M,O,I);return O.val1.delete(i),O.val2.delete(a),Be}function oe(i,a,g,O){for(var I=q(i),M=0;M<I.length;M++){var U=I[M];if(H(a,U,g,O))return i.delete(U),!0}return!1}function Se(i){switch(d(i)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":i=+i;case"number":if(T(i))return!1}return!0}function qe(i,a,g){var O=Se(g);return O??(a.has(O)&&!i.has(O))}function Oe(i,a,g,O,I){var M=Se(g);if(M!=null)return M;var U=a.get(M);return U===void 0&&!a.has(M)||!H(O,U,!1,I)?!1:!i.has(M)&&H(O,U,!1,I)}function fe(i,a,g,O){for(var I=null,M=q(i),U=0;U<M.length;U++){var z=M[U];if(d(z)==="object"&&z!==null)I===null&&(I=new Set),I.add(z);else if(!a.has(z)){if(g||!qe(i,a,z))return!1;I===null&&(I=new Set),I.add(z)}}if(I!==null){for(var Z=q(a),ie=0;ie<Z.length;ie++){var ae=Z[ie];if(d(ae)==="object"&&ae!==null){if(!oe(I,ae,g,O))return!1}else if(!g&&!i.has(ae)&&!oe(I,ae,g,O))return!1}return I.size===0}return!0}function Ke(i,a,g,O,I,M){for(var U=q(i),z=0;z<U.length;z++){var Z=U[z];if(H(g,Z,I,M)&&H(O,a.get(Z),I,M))return i.delete(Z),!0}return!1}function Me(i,a,g,O){for(var I=null,M=S(i),U=0;U<M.length;U++){var z=r(M[U],2),Z=z[0],ie=z[1];if(d(Z)==="object"&&Z!==null)I===null&&(I=new Set),I.add(Z);else{var ae=a.get(Z);if(ae===void 0&&!a.has(Z)||!H(ie,ae,g,O)){if(g||!Oe(i,a,Z,ie,O))return!1;I===null&&(I=new Set),I.add(Z)}}}if(I!==null){for(var Te=S(a),Ne=0;Ne<Te.length;Ne++){var Ue=r(Te[Ne],2),Ee=Ue[0],Be=Ue[1];if(d(Ee)==="object"&&Ee!==null){if(!Ke(I,i,Ee,Be,g,O))return!1}else if(!g&&(!i.has(Ee)||!H(i.get(Ee),Be,!1,O))&&!Ke(I,i,Ee,Be,!1,O))return!1}return I.size===0}return!0}function se(i,a,g,O,I,M){var U=0;if(M===c){if(!fe(i,a,g,I))return!1}else if(M===o){if(!Me(i,a,g,I))return!1}else if(M===_)for(;U<i.length;U++)if(B(i,U)){if(!B(a,U)||!H(i[U],a[U],g,I))return!1}else{if(B(a,U))return!1;for(var z=Object.keys(i);U<z.length;U++){var Z=z[U];if(!B(a,Z)||!H(i[Z],a[Z],g,I))return!1}return z.length===Object.keys(a).length}for(U=0;U<O.length;U++){var ie=O[U];if(!H(i[ie],a[ie],g,I))return!1}return!0}function Ae(i,a){return H(i,a,A)}function ve(i,a){return H(i,a,y)}return tr={isDeepEqual:Ae,isDeepStrictEqual:ve},tr}var mr;function ir(){if(mr)return ze.exports;mr=1;function r(c){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},r(c)}function e(c,o,u){return Object.defineProperty(c,"prototype",{writable:!1}),c}function t(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}var n=Ir(),f=n.codes,s=f.ERR_AMBIGUOUS_ARGUMENT,d=f.ERR_INVALID_ARG_TYPE,x=f.ERR_INVALID_ARG_VALUE,q=f.ERR_INVALID_RETURN_VALUE,S=f.ERR_MISSING_ARGS,K=kr(),C=De,T=C.inspect,N=De.types,B=N.isPromise,J=N.isRegExp,Y=nt(),D=cr(),p=Fr("RegExp.prototype.test"),l,m;function j(){var c=ft();l=c.isDeepEqual,m=c.isDeepStrictEqual}var L=!1,P=ze.exports=k,te={};function $(c){throw c.message instanceof Error?c.message:new K(c)}function ce(c,o,u,v,b){var E=arguments.length,R;if(E===0)R="Failed";else if(E===1)u=c,c=void 0;else{if(L===!1){L=!0;var H=de.emitWarning?de.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}E===2&&(v="!=")}if(u instanceof Error)throw u;var X={actual:c,expected:o,operator:v===void 0?"fail":v,stackStartFn:b||ce};u!==void 0&&(X.message=u);var Q=new K(X);throw R&&(Q.message=R,Q.generatedMessage=!0),Q}P.fail=ce,P.AssertionError=K;function ue(c,o,u,v){if(!u){var b=!1;if(o===0)b=!0,v="No value argument passed to `assert.ok()`";else if(v instanceof Error)throw v;var E=new K({actual:u,expected:!0,message:v,operator:"==",stackStartFn:c});throw E.generatedMessage=b,E}}function k(){for(var c=arguments.length,o=new Array(c),u=0;u<c;u++)o[u]=arguments[u];ue.apply(void 0,[k,o.length].concat(o))}P.ok=k,P.equal=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");o!=u&&$({actual:o,expected:u,message:v,operator:"==",stackStartFn:c})},P.notEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");o==u&&$({actual:o,expected:u,message:v,operator:"!=",stackStartFn:c})},P.deepEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),l(o,u)||$({actual:o,expected:u,message:v,operator:"deepEqual",stackStartFn:c})},P.notDeepEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),l(o,u)&&$({actual:o,expected:u,message:v,operator:"notDeepEqual",stackStartFn:c})},P.deepStrictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),m(o,u)||$({actual:o,expected:u,message:v,operator:"deepStrictEqual",stackStartFn:c})},P.notDeepStrictEqual=ne;function ne(c,o,u){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),m(c,o)&&$({actual:c,expected:o,message:u,operator:"notDeepStrictEqual",stackStartFn:ne})}P.strictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");D(o,u)||$({actual:o,expected:u,message:v,operator:"strictEqual",stackStartFn:c})},P.notStrictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");D(o,u)&&$({actual:o,expected:u,message:v,operator:"notStrictEqual",stackStartFn:c})};var Ie=e(function c(o,u,v){var b=this;t(this,c),u.forEach(function(E){E in o&&(v!==void 0&&typeof v[E]=="string"&&J(o[E])&&p(o[E],v[E])?b[E]=v[E]:b[E]=o[E])})});function je(c,o,u,v,b,E){if(!(u in c)||!m(c[u],o[u])){if(!v){var R=new Ie(c,b),H=new Ie(o,b,c),X=new K({actual:R,expected:H,operator:"deepStrictEqual",stackStartFn:E});throw X.actual=c,X.expected=o,X.operator=E.name,X}$({actual:c,expected:o,message:v,operator:E.name,stackStartFn:E})}}function he(c,o,u,v){if(typeof o!="function"){if(J(o))return p(o,c);if(arguments.length===2)throw new d("expected",["Function","RegExp"],o);if(r(c)!=="object"||c===null){var b=new K({actual:c,expected:o,message:u,operator:"deepStrictEqual",stackStartFn:v});throw b.operator=v.name,b}var E=Object.keys(o);if(o instanceof Error)E.push("name","message");else if(E.length===0)throw new x("error",o,"may not be an empty object");return l===void 0&&j(),E.forEach(function(R){typeof c[R]=="string"&&J(o[R])&&p(o[R],c[R])||je(c,o,R,u,E,v)}),!0}return o.prototype!==void 0&&c instanceof o?!0:Error.isPrototypeOf(o)?!1:o.call({},c)===!0}function xe(c){if(typeof c!="function")throw new d("fn","Function",c);try{c()}catch(o){return o}return te}function ge(c){return B(c)||c!==null&&r(c)==="object"&&typeof c.then=="function"&&typeof c.catch=="function"}function h(c){return Promise.resolve().then(function(){var o;if(typeof c=="function"){if(o=c(),!ge(o))throw new q("instance of Promise","promiseFn",o)}else if(ge(c))o=c;else throw new d("promiseFn",["Function","Promise"],c);return Promise.resolve().then(function(){return o}).then(function(){return te}).catch(function(u){return u})})}function y(c,o,u,v){if(typeof u=="string"){if(arguments.length===4)throw new d("error",["Object","Error","Function","RegExp"],u);if(r(o)==="object"&&o!==null){if(o.message===u)throw new s("error/message",'The error message "'.concat(o.message,'" is identical to the message.'))}else if(o===u)throw new s("error/message",'The error "'.concat(o,'" is identical to the message.'));v=u,u=void 0}else if(u!=null&&r(u)!=="object"&&typeof u!="function")throw new d("error",["Object","Error","Function","RegExp"],u);if(o===te){var b="";u&&u.name&&(b+=" (".concat(u.name,")")),b+=v?": ".concat(v):".";var E=c.name==="rejects"?"rejection":"exception";$({actual:void 0,expected:u,operator:c.name,message:"Missing expected ".concat(E).concat(b),stackStartFn:c})}if(u&&!he(o,u,v,c))throw o}function A(c,o,u,v){if(o!==te){if(typeof u=="string"&&(v=u,u=void 0),!u||he(o,u)){var b=v?": ".concat(v):".",E=c.name==="doesNotReject"?"rejection":"exception";$({actual:o,expected:u,operator:c.name,message:"Got unwanted ".concat(E).concat(b,`
54
- `)+'Actual message: "'.concat(o&&o.message,'"'),stackStartFn:c})}throw o}}P.throws=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];y.apply(void 0,[c,xe(o)].concat(v))},P.rejects=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];return h(o).then(function(E){return y.apply(void 0,[c,E].concat(v))})},P.doesNotThrow=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];A.apply(void 0,[c,xe(o)].concat(v))},P.doesNotReject=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];return h(o).then(function(E){return A.apply(void 0,[c,E].concat(v))})},P.ifError=function c(o){if(o!=null){var u="ifError got unwanted exception: ";r(o)==="object"&&typeof o.message=="string"?o.message.length===0&&o.constructor?u+=o.constructor.name:u+=o.message:u+=T(o);var v=new K({actual:o,expected:null,operator:"ifError",message:u,stackStartFn:c}),b=o.stack;if(typeof b=="string"){var E=b.split(`
53
+ */function h(i,a){if(i===a)return 0;for(var g=i.length,O=a.length,I=0,M=Math.min(g,O);I<M;++I)if(i[I]!==a[I]){g=i[I],O=a[I];break}return g<O?-1:O<g?1:0}var d=!0,A=!1,w=0,_=1,c=2,o=3;function u(i,a){return x?i.source===a.source&&i.flags===a.flags:RegExp.prototype.toString.call(i)===RegExp.prototype.toString.call(a)}function v(i,a){if(i.byteLength!==a.byteLength)return!1;for(var g=0;g<i.byteLength;g++)if(i[g]!==a[g])return!1;return!0}function b(i,a){return i.byteLength!==a.byteLength?!1:h(new Uint8Array(i.buffer,i.byteOffset,i.byteLength),new Uint8Array(a.buffer,a.byteOffset,a.byteLength))===0}function E(i,a){return i.byteLength===a.byteLength&&h(new Uint8Array(i),new Uint8Array(a))===0}function R(i,a){return ce(i)?ce(a)&&K(Number.prototype.valueOf.call(i),Number.prototype.valueOf.call(a)):ue(i)?ue(a)&&String.prototype.valueOf.call(i)===String.prototype.valueOf.call(a):k(i)?k(a)&&Boolean.prototype.valueOf.call(i)===Boolean.prototype.valueOf.call(a):ne(i)?ne(a)&&BigInt.prototype.valueOf.call(i)===BigInt.prototype.valueOf.call(a):Ie(a)&&Symbol.prototype.valueOf.call(i)===Symbol.prototype.valueOf.call(a)}function H(i,a,g,O){if(i===a)return i!==0?!0:g?K(i,a):!0;if(g){if(y(i)!=="object")return typeof i=="number"&&T(i)&&T(a);if(y(a)!=="object"||i===null||a===null||Object.getPrototypeOf(i)!==Object.getPrototypeOf(a))return!1}else{if(i===null||y(i)!=="object")return a===null||y(a)!=="object"?i==a:!1;if(a===null||y(a)!=="object")return!1}var I=Y(i),M=Y(a);if(I!==M)return!1;if(Array.isArray(i)){if(i.length!==a.length)return!1;var U=ge(i),z=ge(a);return U.length!==z.length?!1:Q(i,a,g,O,_,U)}if(I==="[object Object]"&&(!j(i)&&j(a)||!P(i)&&P(a)))return!1;if(m(i)){if(!m(a)||Date.prototype.getTime.call(i)!==Date.prototype.getTime.call(a))return!1}else if(L(i)){if(!L(a)||!u(i,a))return!1}else if(te(i)||i instanceof Error){if(i.message!==a.message||i.name!==a.name)return!1}else if(l(i)){if(!g&&(je(i)||he(i))){if(!v(i,a))return!1}else if(!b(i,a))return!1;var Z=ge(i),ie=ge(a);return Z.length!==ie.length?!1:Q(i,a,g,O,w,Z)}else{if(P(i))return!P(a)||i.size!==a.size?!1:Q(i,a,g,O,c);if(j(i))return!j(a)||i.size!==a.size?!1:Q(i,a,g,O,o);if(p(i)){if(!E(i,a))return!1}else if($(i)&&!R(i,a))return!1}return Q(i,a,g,O,w)}function X(i,a){return a.filter(function(g){return J(i,g)})}function Q(i,a,g,O,I,M){if(arguments.length===5){M=Object.keys(i);var U=Object.keys(a);if(M.length!==U.length)return!1}for(var z=0;z<M.length;z++)if(!B(a,M[z]))return!1;if(g&&arguments.length===5){var Z=C(i);if(Z.length!==0){var ie=0;for(z=0;z<Z.length;z++){var ae=Z[z];if(J(i,ae)){if(!J(a,ae))return!1;M.push(ae),ie++}else if(J(a,ae))return!1}var Te=C(a);if(Z.length!==Te.length&&X(a,Te).length!==ie)return!1}else{var Ne=C(a);if(Ne.length!==0&&X(a,Ne).length!==0)return!1}}if(M.length===0&&(I===w||I===_&&i.length===0||i.size===0))return!0;if(O===void 0)O={val1:new Map,val2:new Map,position:0};else{var Ue=O.val1.get(i);if(Ue!==void 0){var Ee=O.val2.get(a);if(Ee!==void 0)return Ue===Ee}O.position++}O.val1.set(i,O.position),O.val2.set(a,O.position);var Be=se(i,a,g,M,O,I);return O.val1.delete(i),O.val2.delete(a),Be}function oe(i,a,g,O){for(var I=q(i),M=0;M<I.length;M++){var U=I[M];if(H(a,U,g,O))return i.delete(U),!0}return!1}function Se(i){switch(y(i)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":i=+i;case"number":if(T(i))return!1}return!0}function qe(i,a,g){var O=Se(g);return O??(a.has(O)&&!i.has(O))}function Oe(i,a,g,O,I){var M=Se(g);if(M!=null)return M;var U=a.get(M);return U===void 0&&!a.has(M)||!H(O,U,!1,I)?!1:!i.has(M)&&H(O,U,!1,I)}function fe(i,a,g,O){for(var I=null,M=q(i),U=0;U<M.length;U++){var z=M[U];if(y(z)==="object"&&z!==null)I===null&&(I=new Set),I.add(z);else if(!a.has(z)){if(g||!qe(i,a,z))return!1;I===null&&(I=new Set),I.add(z)}}if(I!==null){for(var Z=q(a),ie=0;ie<Z.length;ie++){var ae=Z[ie];if(y(ae)==="object"&&ae!==null){if(!oe(I,ae,g,O))return!1}else if(!g&&!i.has(ae)&&!oe(I,ae,g,O))return!1}return I.size===0}return!0}function Ke(i,a,g,O,I,M){for(var U=q(i),z=0;z<U.length;z++){var Z=U[z];if(H(g,Z,I,M)&&H(O,a.get(Z),I,M))return i.delete(Z),!0}return!1}function Me(i,a,g,O){for(var I=null,M=S(i),U=0;U<M.length;U++){var z=r(M[U],2),Z=z[0],ie=z[1];if(y(Z)==="object"&&Z!==null)I===null&&(I=new Set),I.add(Z);else{var ae=a.get(Z);if(ae===void 0&&!a.has(Z)||!H(ie,ae,g,O)){if(g||!Oe(i,a,Z,ie,O))return!1;I===null&&(I=new Set),I.add(Z)}}}if(I!==null){for(var Te=S(a),Ne=0;Ne<Te.length;Ne++){var Ue=r(Te[Ne],2),Ee=Ue[0],Be=Ue[1];if(y(Ee)==="object"&&Ee!==null){if(!Ke(I,i,Ee,Be,g,O))return!1}else if(!g&&(!i.has(Ee)||!H(i.get(Ee),Be,!1,O))&&!Ke(I,i,Ee,Be,!1,O))return!1}return I.size===0}return!0}function se(i,a,g,O,I,M){var U=0;if(M===c){if(!fe(i,a,g,I))return!1}else if(M===o){if(!Me(i,a,g,I))return!1}else if(M===_)for(;U<i.length;U++)if(B(i,U)){if(!B(a,U)||!H(i[U],a[U],g,I))return!1}else{if(B(a,U))return!1;for(var z=Object.keys(i);U<z.length;U++){var Z=z[U];if(!B(a,Z)||!H(i[Z],a[Z],g,I))return!1}return z.length===Object.keys(a).length}for(U=0;U<O.length;U++){var ie=O[U];if(!H(i[ie],a[ie],g,I))return!1}return!0}function Ae(i,a){return H(i,a,A)}function ve(i,a){return H(i,a,d)}return tr={isDeepEqual:Ae,isDeepStrictEqual:ve},tr}var mr;function ir(){if(mr)return ze.exports;mr=1;function r(c){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},r(c)}function e(c,o,u){return Object.defineProperty(c,"prototype",{writable:!1}),c}function t(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}var n=Ir(),f=n.codes,s=f.ERR_AMBIGUOUS_ARGUMENT,y=f.ERR_INVALID_ARG_TYPE,x=f.ERR_INVALID_ARG_VALUE,q=f.ERR_INVALID_RETURN_VALUE,S=f.ERR_MISSING_ARGS,K=kr(),C=De,T=C.inspect,N=De.types,B=N.isPromise,J=N.isRegExp,Y=nt(),D=cr(),p=Fr("RegExp.prototype.test"),l,m;function j(){var c=ft();l=c.isDeepEqual,m=c.isDeepStrictEqual}var L=!1,P=ze.exports=k,te={};function $(c){throw c.message instanceof Error?c.message:new K(c)}function ce(c,o,u,v,b){var E=arguments.length,R;if(E===0)R="Failed";else if(E===1)u=c,c=void 0;else{if(L===!1){L=!0;var H=ye.emitWarning?ye.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}E===2&&(v="!=")}if(u instanceof Error)throw u;var X={actual:c,expected:o,operator:v===void 0?"fail":v,stackStartFn:b||ce};u!==void 0&&(X.message=u);var Q=new K(X);throw R&&(Q.message=R,Q.generatedMessage=!0),Q}P.fail=ce,P.AssertionError=K;function ue(c,o,u,v){if(!u){var b=!1;if(o===0)b=!0,v="No value argument passed to `assert.ok()`";else if(v instanceof Error)throw v;var E=new K({actual:u,expected:!0,message:v,operator:"==",stackStartFn:c});throw E.generatedMessage=b,E}}function k(){for(var c=arguments.length,o=new Array(c),u=0;u<c;u++)o[u]=arguments[u];ue.apply(void 0,[k,o.length].concat(o))}P.ok=k,P.equal=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");o!=u&&$({actual:o,expected:u,message:v,operator:"==",stackStartFn:c})},P.notEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");o==u&&$({actual:o,expected:u,message:v,operator:"!=",stackStartFn:c})},P.deepEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),l(o,u)||$({actual:o,expected:u,message:v,operator:"deepEqual",stackStartFn:c})},P.notDeepEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),l(o,u)&&$({actual:o,expected:u,message:v,operator:"notDeepEqual",stackStartFn:c})},P.deepStrictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),m(o,u)||$({actual:o,expected:u,message:v,operator:"deepStrictEqual",stackStartFn:c})},P.notDeepStrictEqual=ne;function ne(c,o,u){if(arguments.length<2)throw new S("actual","expected");l===void 0&&j(),m(c,o)&&$({actual:c,expected:o,message:u,operator:"notDeepStrictEqual",stackStartFn:ne})}P.strictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");D(o,u)||$({actual:o,expected:u,message:v,operator:"strictEqual",stackStartFn:c})},P.notStrictEqual=function c(o,u,v){if(arguments.length<2)throw new S("actual","expected");D(o,u)&&$({actual:o,expected:u,message:v,operator:"notStrictEqual",stackStartFn:c})};var Ie=e(function c(o,u,v){var b=this;t(this,c),u.forEach(function(E){E in o&&(v!==void 0&&typeof v[E]=="string"&&J(o[E])&&p(o[E],v[E])?b[E]=v[E]:b[E]=o[E])})});function je(c,o,u,v,b,E){if(!(u in c)||!m(c[u],o[u])){if(!v){var R=new Ie(c,b),H=new Ie(o,b,c),X=new K({actual:R,expected:H,operator:"deepStrictEqual",stackStartFn:E});throw X.actual=c,X.expected=o,X.operator=E.name,X}$({actual:c,expected:o,message:v,operator:E.name,stackStartFn:E})}}function he(c,o,u,v){if(typeof o!="function"){if(J(o))return p(o,c);if(arguments.length===2)throw new y("expected",["Function","RegExp"],o);if(r(c)!=="object"||c===null){var b=new K({actual:c,expected:o,message:u,operator:"deepStrictEqual",stackStartFn:v});throw b.operator=v.name,b}var E=Object.keys(o);if(o instanceof Error)E.push("name","message");else if(E.length===0)throw new x("error",o,"may not be an empty object");return l===void 0&&j(),E.forEach(function(R){typeof c[R]=="string"&&J(o[R])&&p(o[R],c[R])||je(c,o,R,u,E,v)}),!0}return o.prototype!==void 0&&c instanceof o?!0:Error.isPrototypeOf(o)?!1:o.call({},c)===!0}function xe(c){if(typeof c!="function")throw new y("fn","Function",c);try{c()}catch(o){return o}return te}function ge(c){return B(c)||c!==null&&r(c)==="object"&&typeof c.then=="function"&&typeof c.catch=="function"}function h(c){return Promise.resolve().then(function(){var o;if(typeof c=="function"){if(o=c(),!ge(o))throw new q("instance of Promise","promiseFn",o)}else if(ge(c))o=c;else throw new y("promiseFn",["Function","Promise"],c);return Promise.resolve().then(function(){return o}).then(function(){return te}).catch(function(u){return u})})}function d(c,o,u,v){if(typeof u=="string"){if(arguments.length===4)throw new y("error",["Object","Error","Function","RegExp"],u);if(r(o)==="object"&&o!==null){if(o.message===u)throw new s("error/message",'The error message "'.concat(o.message,'" is identical to the message.'))}else if(o===u)throw new s("error/message",'The error "'.concat(o,'" is identical to the message.'));v=u,u=void 0}else if(u!=null&&r(u)!=="object"&&typeof u!="function")throw new y("error",["Object","Error","Function","RegExp"],u);if(o===te){var b="";u&&u.name&&(b+=" (".concat(u.name,")")),b+=v?": ".concat(v):".";var E=c.name==="rejects"?"rejection":"exception";$({actual:void 0,expected:u,operator:c.name,message:"Missing expected ".concat(E).concat(b),stackStartFn:c})}if(u&&!he(o,u,v,c))throw o}function A(c,o,u,v){if(o!==te){if(typeof u=="string"&&(v=u,u=void 0),!u||he(o,u)){var b=v?": ".concat(v):".",E=c.name==="doesNotReject"?"rejection":"exception";$({actual:o,expected:u,operator:c.name,message:"Got unwanted ".concat(E).concat(b,`
54
+ `)+'Actual message: "'.concat(o&&o.message,'"'),stackStartFn:c})}throw o}}P.throws=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];d.apply(void 0,[c,xe(o)].concat(v))},P.rejects=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];return h(o).then(function(E){return d.apply(void 0,[c,E].concat(v))})},P.doesNotThrow=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];A.apply(void 0,[c,xe(o)].concat(v))},P.doesNotReject=function c(o){for(var u=arguments.length,v=new Array(u>1?u-1:0),b=1;b<u;b++)v[b-1]=arguments[b];return h(o).then(function(E){return A.apply(void 0,[c,E].concat(v))})},P.ifError=function c(o){if(o!=null){var u="ifError got unwanted exception: ";r(o)==="object"&&typeof o.message=="string"?o.message.length===0&&o.constructor?u+=o.constructor.name:u+=o.message:u+=T(o);var v=new K({actual:o,expected:null,operator:"ifError",message:u,stackStartFn:c}),b=o.stack;if(typeof b=="string"){var E=b.split(`
55
55
  `);E.shift();for(var R=v.stack.split(`
56
56
  `),H=0;H<E.length;H++){var X=R.indexOf(E[H]);if(X!==-1){R=R.slice(0,X);break}}v.stack="".concat(R.join(`
57
57
  `),`
58
58
  `).concat(E.join(`
59
- `))}throw v}};function w(c,o,u,v,b){if(!J(o))throw new d("regexp","RegExp",o);var E=b==="match";if(typeof c!="string"||p(o,c)!==E){if(u instanceof Error)throw u;var R=!u;u=u||(typeof c!="string"?'The "string" argument must be of type string. Received type '+"".concat(r(c)," (").concat(T(c),")"):(E?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(T(o),`. Input:
59
+ `))}throw v}};function w(c,o,u,v,b){if(!J(o))throw new y("regexp","RegExp",o);var E=b==="match";if(typeof c!="string"||p(o,c)!==E){if(u instanceof Error)throw u;var R=!u;u=u||(typeof c!="string"?'The "string" argument must be of type string. Received type '+"".concat(r(c)," (").concat(T(c),")"):(E?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(T(o),`. Input:
60
60
 
61
61
  `).concat(T(c),`
62
- `));var H=new K({actual:c,expected:o,message:u,operator:b,stackStartFn:v});throw H.generatedMessage=R,H}}P.match=function c(o,u,v){w(o,u,v,c,"match")},P.doesNotMatch=function c(o,u,v){w(o,u,v,c,"doesNotMatch")};function _(){for(var c=arguments.length,o=new Array(c),u=0;u<c;u++)o[u]=arguments[u];ue.apply(void 0,[_,o.length].concat(o))}return P.strict=Y(_,P,{equal:P.strictEqual,deepEqual:P.deepStrictEqual,notEqual:P.notStrictEqual,notDeepEqual:P.notDeepStrictEqual}),P.strict.strict=P.strict,ze.exports}var Ce=ar.Buffer;function st(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var n=0;n<r.length;n++){var f=r.charAt(n),s=f.charCodeAt(0);if(e[s]!==255)throw new TypeError(f+" is ambiguous");e[s]=n}var d=r.length,x=r.charAt(0),q=Math.log(d)/Math.log(256),S=Math.log(256)/Math.log(d);function K(N){if((Array.isArray(N)||N instanceof Uint8Array)&&(N=Ce.from(N)),!Ce.isBuffer(N))throw new TypeError("Expected Buffer");if(N.length===0)return"";for(var B=0,J=0,Y=0,D=N.length;Y!==D&&N[Y]===0;)Y++,B++;for(var p=(D-Y)*S+1>>>0,l=new Uint8Array(p);Y!==D;){for(var m=N[Y],j=0,L=p-1;(m!==0||j<J)&&L!==-1;L--,j++)m+=256*l[L]>>>0,l[L]=m%d>>>0,m=m/d>>>0;if(m!==0)throw new Error("Non-zero carry");J=j,Y++}for(var P=p-J;P!==p&&l[P]===0;)P++;for(var te=x.repeat(B);P<p;++P)te+=r.charAt(l[P]);return te}function C(N){if(typeof N!="string")throw new TypeError("Expected String");if(N.length===0)return Ce.alloc(0);for(var B=0,J=0,Y=0;N[B]===x;)J++,B++;for(var D=(N.length-B)*q+1>>>0,p=new Uint8Array(D);B<N.length;){var l=e[N.charCodeAt(B)];if(l===255)return;for(var m=0,j=D-1;(l!==0||m<Y)&&j!==-1;j--,m++)l+=d*p[j]>>>0,p[j]=l%256>>>0,l=l/256>>>0;if(l!==0)throw new Error("Non-zero carry");Y=m,B++}for(var L=D-Y;L!==D&&p[L]===0;)L++;var P=Ce.allocUnsafe(J+(D-L));P.fill(0,0,J);for(var te=J;L!==D;)P[te++]=p[L++];return P}function T(N){var B=C(N);if(B)return B;throw new Error("Non-base"+d+" character")}return{encode:K,decodeUnsafe:C,decode:T}}var lt=st,pt=lt,ht="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",dt=pt(ht),nr=dt,yt=ar.Buffer,bt=function(r){function e(s){var d=r(s);return nr.encode(yt.concat([s,d],s.length+4))}function t(s){var d=s.slice(0,-4),x=s.slice(-4),q=r(d);if(!(x[0]^q[0]|x[1]^q[1]|x[2]^q[2]|x[3]^q[3]))return d}function n(s){var d=nr.decodeUnsafe(s);if(d)return t(d)}function f(s){var d=nr.decode(s),x=t(d);if(!x)throw new Error("Invalid checksum");return x}return{encode:e,decode:f,decodeUnsafe:n}},Sr=$r,gt=bt;function vt(r){var e=Sr("sha256").update(r).digest();return Sr("sha256").update(e).digest()}var Et=gt(vt);const G={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function le(r,e){if(!r)throw new Error(e)}function F(r,e,t){if(le(e instanceof Uint8Array,`Expected ${r} to be an Uint8Array`),t!==void 0)if(Array.isArray(t)){const n=t.join(", "),f=`Expected ${r} to be an Uint8Array with length [${n}]`;le(t.includes(e.length),f)}else{const n=`Expected ${r} to be an Uint8Array with length ${t}`;le(e.length===t,n)}}function Pe(r){le(_e(r)==="Boolean","Expected compressed to be a Boolean")}function pe(r=t=>new Uint8Array(t),e){return typeof r=="function"&&(r=r(e)),F("output",r,e),r}function _e(r){return Object.prototype.toString.call(r).slice(8,-1)}var wt=r=>({contextRandomize(e){switch(le(e===null||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),e!==null&&F("seed",e,32),r.contextRandomize(e)){case 1:throw new Error(G.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(e){return F("private key",e,32),r.privateKeyVerify(e)===0},privateKeyNegate(e){switch(F("private key",e,32),r.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(G.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,t){switch(F("private key",e,32),F("tweak",t,32),r.privateKeyTweakAdd(e,t)){case 0:return e;case 1:throw new Error(G.TWEAK_ADD)}},privateKeyTweakMul(e,t){switch(F("private key",e,32),F("tweak",t,32),r.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(G.TWEAK_MUL)}},publicKeyVerify(e){return F("public key",e,[33,65]),r.publicKeyVerify(e)===0},publicKeyCreate(e,t=!0,n){switch(F("private key",e,32),Pe(t),n=pe(n,t?33:65),r.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(G.SECKEY_INVALID);case 2:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyConvert(e,t=!0,n){switch(F("public key",e,[33,65]),Pe(t),n=pe(n,t?33:65),r.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyNegate(e,t=!0,n){switch(F("public key",e,[33,65]),Pe(t),n=pe(n,t?33:65),r.publicKeyNegate(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE);case 3:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyCombine(e,t=!0,n){le(Array.isArray(e),"Expected public keys to be an Array"),le(e.length>0,"Expected public keys array will have more than zero items");for(const f of e)F("public key",f,[33,65]);switch(Pe(t),n=pe(n,t?33:65),r.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.PUBKEY_COMBINE);case 3:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,t,n=!0,f){switch(F("public key",e,[33,65]),F("tweak",t,32),Pe(n),f=pe(f,n?33:65),r.publicKeyTweakAdd(f,e,t)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.TWEAK_ADD)}},publicKeyTweakMul(e,t,n=!0,f){switch(F("public key",e,[33,65]),F("tweak",t,32),Pe(n),f=pe(f,n?33:65),r.publicKeyTweakMul(f,e,t)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.TWEAK_MUL)}},signatureNormalize(e){switch(F("signature",e,64),r.signatureNormalize(e)){case 0:return e;case 1:throw new Error(G.SIG_PARSE)}},signatureExport(e,t){F("signature",e,64),t=pe(t,72);const n={output:t,outputlen:72};switch(r.signatureExport(n,e)){case 0:return t.slice(0,n.outputlen);case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},signatureImport(e,t){switch(F("signature",e),t=pe(t,64),r.signatureImport(t,e)){case 0:return t;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},ecdsaSign(e,t,n={},f){F("message",e,32),F("private key",t,32),le(_e(n)==="Object","Expected options to be an Object"),n.data!==void 0&&F("options.data",n.data),n.noncefn!==void 0&&le(_e(n.noncefn)==="Function","Expected options.noncefn to be a Function"),f=pe(f,64);const s={signature:f,recid:null};switch(r.ecdsaSign(s,e,t,n.data,n.noncefn)){case 0:return s;case 1:throw new Error(G.SIGN);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},ecdsaVerify(e,t,n){switch(F("signature",e,64),F("message",t,32),F("public key",n,[33,65]),r.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.PUBKEY_PARSE)}},ecdsaRecover(e,t,n,f=!0,s){switch(F("signature",e,64),le(_e(t)==="Number"&&t>=0&&t<=3,"Expected recovery id to be a Number within interval [0, 3]"),F("message",n,32),Pe(f),s=pe(s,f?33:65),r.ecdsaRecover(s,e,t,n)){case 0:return s;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.RECOVER);case 3:throw new Error(G.IMPOSSIBLE_CASE)}},ecdh(e,t,n={},f){switch(F("public key",e,[33,65]),F("private key",t,32),le(_e(n)==="Object","Expected options to be an Object"),n.data!==void 0&&F("options.data",n.data),n.hashfn!==void 0?(le(_e(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&F("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&F("options.ybuf",n.ybuf,32),F("output",f)):f=pe(f,32),r.ecdh(f,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.ECDH)}}});const mt=Gr().ec,ye=new mt("secp256k1"),V=ye.curve,W=V.n.constructor;function St(r,e){let t=new W(e);if(t.cmp(V.p)>=0)return null;t=t.toRed(V.red);let n=t.redSqr().redIMul(t).redIAdd(V.b).redSqrt();return r===3!==n.isOdd()&&(n=n.redNeg()),ye.keyPair({pub:{x:t,y:n}})}function Ot(r,e,t){let n=new W(e),f=new W(t);if(n.cmp(V.p)>=0||f.cmp(V.p)>=0||(n=n.toRed(V.red),f=f.toRed(V.red),(r===6||r===7)&&f.isOdd()!==(r===7)))return null;const s=n.redSqr().redIMul(n);return f.redSqr().redISub(s.redIAdd(V.b)).isZero()?ye.keyPair({pub:{x:n,y:f}}):null}function we(r){const e=r[0];switch(e){case 2:case 3:return r.length!==33?null:St(e,r.subarray(1,33));case 4:case 6:case 7:return r.length!==65?null:Ot(e,r.subarray(1,33),r.subarray(33,65));default:return null}}function Re(r,e){const t=e.encode(null,r.length===33);for(let n=0;n<r.length;++n)r[n]=t[n]}var At={contextRandomize(){return 0},privateKeyVerify(r){const e=new W(r);return e.cmp(V.n)<0&&!e.isZero()?0:1},privateKeyNegate(r){const e=new W(r),t=V.n.sub(e).umod(V.n).toArrayLike(Uint8Array,"be",32);return r.set(t),0},privateKeyTweakAdd(r,e){const t=new W(e);if(t.cmp(V.n)>=0||(t.iadd(new W(r)),t.cmp(V.n)>=0&&t.isub(V.n),t.isZero()))return 1;const n=t.toArrayLike(Uint8Array,"be",32);return r.set(n),0},privateKeyTweakMul(r,e){let t=new W(e);if(t.cmp(V.n)>=0||t.isZero())return 1;t.imul(new W(r)),t.cmp(V.n)>=0&&(t=t.umod(V.n));const n=t.toArrayLike(Uint8Array,"be",32);return r.set(n),0},publicKeyVerify(r){return we(r)===null?1:0},publicKeyCreate(r,e){const t=new W(e);if(t.cmp(V.n)>=0||t.isZero())return 1;const n=ye.keyFromPrivate(e).getPublic();return Re(r,n),0},publicKeyConvert(r,e){const t=we(e);if(t===null)return 1;const n=t.getPublic();return Re(r,n),0},publicKeyNegate(r,e){const t=we(e);if(t===null)return 1;const n=t.getPublic();return n.y=n.y.redNeg(),Re(r,n),0},publicKeyCombine(r,e){const t=new Array(e.length);for(let f=0;f<e.length;++f)if(t[f]=we(e[f]),t[f]===null)return 1;let n=t[0].getPublic();for(let f=1;f<t.length;++f)n=n.add(t[f].pub);return n.isInfinity()?2:(Re(r,n),0)},publicKeyTweakAdd(r,e,t){const n=we(e);if(n===null)return 1;if(t=new W(t),t.cmp(V.n)>=0)return 2;const f=n.getPublic().add(V.g.mul(t));return f.isInfinity()?2:(Re(r,f),0)},publicKeyTweakMul(r,e,t){const n=we(e);if(n===null)return 1;if(t=new W(t),t.cmp(V.n)>=0||t.isZero())return 2;const f=n.getPublic().mul(t);return Re(r,f),0},signatureNormalize(r){const e=new W(r.subarray(0,32)),t=new W(r.subarray(32,64));return e.cmp(V.n)>=0||t.cmp(V.n)>=0?1:(t.cmp(ye.nh)===1&&r.set(V.n.sub(t).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(r,e){const t=e.subarray(0,32),n=e.subarray(32,64);if(new W(t).cmp(V.n)>=0||new W(n).cmp(V.n)>=0)return 1;const{output:f}=r;let s=f.subarray(4,37);s[0]=0,s.set(t,1);let d=33,x=0;for(;d>1&&s[x]===0&&!(s[x+1]&128);--d,++x);if(s=s.subarray(x),s[0]&128||d>1&&s[0]===0&&!(s[1]&128))return 1;let q=f.subarray(39,72);q[0]=0,q.set(n,1);let S=33,K=0;for(;S>1&&q[K]===0&&!(q[K+1]&128);--S,++K);return q=q.subarray(K),q[0]&128||S>1&&q[0]===0&&!(q[1]&128)?1:(r.outputlen=6+d+S,f[0]=48,f[1]=r.outputlen-2,f[2]=2,f[3]=s.length,f.set(s,4),f[4+d]=2,f[5+d]=q.length,f.set(q,6+d),0)},signatureImport(r,e){if(e.length<8||e.length>72||e[0]!==48||e[1]!==e.length-2||e[2]!==2)return 1;const t=e[3];if(t===0||5+t>=e.length||e[4+t]!==2)return 1;const n=e[5+t];if(n===0||6+t+n!==e.length||e[4]&128||t>1&&e[4]===0&&!(e[5]&128)||e[t+6]&128||n>1&&e[t+6]===0&&!(e[t+7]&128))return 1;let f=e.subarray(4,4+t);if(f.length===33&&f[0]===0&&(f=f.subarray(1)),f.length>32)return 1;let s=e.subarray(6+t);if(s.length===33&&s[0]===0&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");let d=new W(f);d.cmp(V.n)>=0&&(d=new W(0));let x=new W(e.subarray(6+t));return x.cmp(V.n)>=0&&(x=new W(0)),r.set(d.toArrayLike(Uint8Array,"be",32),0),r.set(x.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,e,t,n,f){if(f){const x=f;f=q=>{const S=x(e,t,null,n,q);if(!(S instanceof Uint8Array&&S.length===32))throw new Error("This is the way");return new W(S)}}const s=new W(t);if(s.cmp(V.n)>=0||s.isZero())return 1;let d;try{d=ye.sign(e,t,{canonical:!0,k:f,pers:n})}catch{return 1}return r.signature.set(d.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(d.s.toArrayLike(Uint8Array,"be",32),32),r.recid=d.recoveryParam,0},ecdsaVerify(r,e,t){const n={r:r.subarray(0,32),s:r.subarray(32,64)},f=new W(n.r),s=new W(n.s);if(f.cmp(V.n)>=0||s.cmp(V.n)>=0)return 1;if(s.cmp(ye.nh)===1||f.isZero()||s.isZero())return 3;const d=we(t);if(d===null)return 2;const x=d.getPublic();return ye.verify(e,n,x)?0:3},ecdsaRecover(r,e,t,n){const f={r:e.slice(0,32),s:e.slice(32,64)},s=new W(f.r),d=new W(f.s);if(s.cmp(V.n)>=0||d.cmp(V.n)>=0)return 1;if(s.isZero()||d.isZero())return 2;let x;try{x=ye.recoverPubKey(n,f,t)}catch{return 2}return Re(r,x),0},ecdh(r,e,t,n,f,s,d){const x=we(e);if(x===null)return 1;const q=new W(t);if(q.cmp(V.n)>=0||q.isZero())return 2;const S=x.getPublic().mul(q);if(f===void 0){const K=S.encode(null,!0),C=ye.hash().update(K).digest();for(let T=0;T<32;++T)r[T]=C[T]}else{s||(s=new Uint8Array(32));const K=S.getX().toArray("be",32);for(let B=0;B<32;++B)s[B]=K[B];d||(d=new Uint8Array(32));const C=S.getY().toArray("be",32);for(let B=0;B<32;++B)d[B]=C[B];const T=f(s,d,n);if(!(T instanceof Uint8Array&&T.length===r.length))return 2;r.set(T)}return 0}},Pt=wt(At),be=ir(),re=ar.Buffer,Ge=zr(),Rt=Yr,ur=Et,me=Pt,It=re.from("Bitcoin seed","utf8"),Fe=2147483648,jt=78,Kr={private:76066276,public:76067358};function ee(r){this.versions=r||Kr,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}Object.defineProperty(ee.prototype,"fingerprint",{get:function(){return this._fingerprint}});Object.defineProperty(ee.prototype,"identifier",{get:function(){return this._identifier}});Object.defineProperty(ee.prototype,"pubKeyHash",{get:function(){return this.identifier}});Object.defineProperty(ee.prototype,"privateKey",{get:function(){return this._privateKey},set:function(r){r=Uint8Array.from(r),be.equal(r.length,32,"Private key must be 32 bytes."),be(me.privateKeyVerify(r)===!0,"Invalid private key"),this._privateKey=re.from(r),this._publicKey=re.from(me.publicKeyCreate(r,!0)),this._identifier=Ur(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}});Object.defineProperty(ee.prototype,"publicKey",{get:function(){return this._publicKey},set:function(r){be(r.length===33||r.length===65,"Public key must be 33 or 65 bytes."),be(me.publicKeyVerify(r)===!0,"Invalid public key"),this._publicKey=re.from(me.publicKeyConvert(r,!0)),this._identifier=Ur(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}});Object.defineProperty(ee.prototype,"privateExtendedKey",{get:function(){return this._privateKey?ur.encode(Tr(this,this.versions.private,re.concat([re.alloc(1,0),this.privateKey]))):null}});Object.defineProperty(ee.prototype,"publicExtendedKey",{get:function(){return ur.encode(Tr(this,this.versions.public,this.publicKey))}});ee.prototype.derive=function(r){if(r==="m"||r==="M"||r==="m'"||r==="M'")return this;var e=r.split("/"),t=this;return e.forEach(function(n,f){if(f===0){be(/^[mM]{1}/.test(n),'Path must start with "m" or "M"');return}var s=n.length>1&&n[n.length-1]==="'",d=parseInt(n,10);be(d<Fe,"Invalid index"),s&&(d+=Fe),t=t.deriveChild(d)}),t};ee.prototype.deriveChild=function(r){var e=r>=Fe,t=re.allocUnsafe(4);t.writeUInt32BE(r,0);var n;if(e){be(this.privateKey,"Could not derive hardened child key");var f=re.from(this.privateKey),s=re.alloc(1,0);f=re.concat([s,f]),n=re.concat([f,t])}else n=re.concat([this.publicKey,t]);var d=Ge.createHmac("sha512",this.chainCode).update(n).digest(),x=d.slice(0,32),q=d.slice(32),S=new ee(this.versions);if(this.privateKey)try{S.privateKey=re.from(me.privateKeyTweakAdd(re.from(this.privateKey),x))}catch{return this.deriveChild(r+1)}else try{S.publicKey=re.from(me.publicKeyTweakAdd(re.from(this.publicKey),x,!0))}catch{return this.deriveChild(r+1)}return S.chainCode=q,S.depth=this.depth+1,S.parentFingerprint=this.fingerprint,S.index=r,S};ee.prototype.sign=function(r){return re.from(me.ecdsaSign(r,this.privateKey).signature)};ee.prototype.verify=function(r,e){return me.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(r),Uint8Array.from(this.publicKey))};ee.prototype.wipePrivateData=function(){return this._privateKey&&Ge.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this};ee.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}};ee.fromMasterSeed=function(r,e){var t=Ge.createHmac("sha512",It).update(r).digest(),n=t.slice(0,32),f=t.slice(32),s=new ee(e);return s.chainCode=f,s.privateKey=n,s};ee.fromExtendedKey=function(r,e){e=e||Kr;var t=new ee(e),n=ur.decode(r),f=n.readUInt32BE(0);be(f===e.private||f===e.public,"Version mismatch: does not match private or public"),t.depth=n.readUInt8(4),t.parentFingerprint=n.readUInt32BE(5),t.index=n.readUInt32BE(9),t.chainCode=n.slice(13,45);var s=n.slice(45);return s.readUInt8(0)===0?(be(f===e.private,"Version mismatch: version does not match private"),t.privateKey=re.from(s.slice(1))):(be(f===e.public,"Version mismatch: version does not match public"),t.publicKey=re.from(s)),t};ee.fromJSON=function(r){return ee.fromExtendedKey(r.xpriv)};function Tr(r,e,t){var n=re.allocUnsafe(jt);n.writeUInt32BE(e,0),n.writeUInt8(r.depth,4);var f=r.depth?r.parentFingerprint:0;return n.writeUInt32BE(f,5),n.writeUInt32BE(r.index,9),r.chainCode.copy(n,13),t.copy(n,45),n}function Ur(r){var e=Ge.createHash("sha256").update(r).digest();return new Rt().update(e).digest()}ee.HARDENED_OFFSET=Fe;var xt=ee;const Nt=xt,or=Hr,{fromSecretKey:_t,WalletType:qt}=Zr,{isHexStrict:Kt,toHex:Or,toBuffer:Tt,stripHexPrefix:Ar}=Wr,{types:Le}=or,Ut=(r,e,t={role:Le.RoleType.ROLE_ACCOUNT},n=0)=>{if(!e)throw new Error("Cannot get user wallet with empty root sk");const f=or.Hasher.SHA3.hash256(Tt(r)),s=Ar(f).slice(0,16),d=s.slice(0,8),x=s.slice(8,16),q=parseInt(+`0x${d}`,10)&2147483647,S=parseInt(+`0x${x}`,10)&2147483647,K=Ar(Kt(e)?e:Or(e)),C=Nt.fromMasterSeed(Br.from(K,"hex")),T=`m/44'/260'/${q}'/${S}'/${n}`,N=C.derive(T),B=qt(t),{pk:J=Le.KeyType.ED25519}=B;let Y;return J===Le.KeyType.ED25519?Y=or.Signer.Ed25519.genKeyPair("hex",N.privateKey).secretKey:Y=Or(N.privateKey),J===Le.KeyType.ETHEREUM&&(Y=Y.slice(0,66)),_t(Y,B)};var Mt={fromAppDid:Ut};export{Mt as l};
62
+ `));var H=new K({actual:c,expected:o,message:u,operator:b,stackStartFn:v});throw H.generatedMessage=R,H}}P.match=function c(o,u,v){w(o,u,v,c,"match")},P.doesNotMatch=function c(o,u,v){w(o,u,v,c,"doesNotMatch")};function _(){for(var c=arguments.length,o=new Array(c),u=0;u<c;u++)o[u]=arguments[u];ue.apply(void 0,[_,o.length].concat(o))}return P.strict=Y(_,P,{equal:P.strictEqual,deepEqual:P.deepStrictEqual,notEqual:P.notStrictEqual,notDeepEqual:P.notDeepStrictEqual}),P.strict.strict=P.strict,ze.exports}var Ce=ar.Buffer;function st(r){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var n=0;n<r.length;n++){var f=r.charAt(n),s=f.charCodeAt(0);if(e[s]!==255)throw new TypeError(f+" is ambiguous");e[s]=n}var y=r.length,x=r.charAt(0),q=Math.log(y)/Math.log(256),S=Math.log(256)/Math.log(y);function K(N){if((Array.isArray(N)||N instanceof Uint8Array)&&(N=Ce.from(N)),!Ce.isBuffer(N))throw new TypeError("Expected Buffer");if(N.length===0)return"";for(var B=0,J=0,Y=0,D=N.length;Y!==D&&N[Y]===0;)Y++,B++;for(var p=(D-Y)*S+1>>>0,l=new Uint8Array(p);Y!==D;){for(var m=N[Y],j=0,L=p-1;(m!==0||j<J)&&L!==-1;L--,j++)m+=256*l[L]>>>0,l[L]=m%y>>>0,m=m/y>>>0;if(m!==0)throw new Error("Non-zero carry");J=j,Y++}for(var P=p-J;P!==p&&l[P]===0;)P++;for(var te=x.repeat(B);P<p;++P)te+=r.charAt(l[P]);return te}function C(N){if(typeof N!="string")throw new TypeError("Expected String");if(N.length===0)return Ce.alloc(0);for(var B=0,J=0,Y=0;N[B]===x;)J++,B++;for(var D=(N.length-B)*q+1>>>0,p=new Uint8Array(D);B<N.length;){var l=e[N.charCodeAt(B)];if(l===255)return;for(var m=0,j=D-1;(l!==0||m<Y)&&j!==-1;j--,m++)l+=y*p[j]>>>0,p[j]=l%256>>>0,l=l/256>>>0;if(l!==0)throw new Error("Non-zero carry");Y=m,B++}for(var L=D-Y;L!==D&&p[L]===0;)L++;var P=Ce.allocUnsafe(J+(D-L));P.fill(0,0,J);for(var te=J;L!==D;)P[te++]=p[L++];return P}function T(N){var B=C(N);if(B)return B;throw new Error("Non-base"+y+" character")}return{encode:K,decodeUnsafe:C,decode:T}}var lt=st,pt=lt,ht="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",yt=pt(ht),nr=yt,dt=ar.Buffer,bt=function(r){function e(s){var y=r(s);return nr.encode(dt.concat([s,y],s.length+4))}function t(s){var y=s.slice(0,-4),x=s.slice(-4),q=r(y);if(!(x[0]^q[0]|x[1]^q[1]|x[2]^q[2]|x[3]^q[3]))return y}function n(s){var y=nr.decodeUnsafe(s);if(y)return t(y)}function f(s){var y=nr.decode(s),x=t(y);if(!x)throw new Error("Invalid checksum");return x}return{encode:e,decode:f,decodeUnsafe:n}},Sr=$r,gt=bt;function vt(r){var e=Sr("sha256").update(r).digest();return Sr("sha256").update(e).digest()}var Et=gt(vt);const G={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function le(r,e){if(!r)throw new Error(e)}function F(r,e,t){if(le(e instanceof Uint8Array,`Expected ${r} to be an Uint8Array`),t!==void 0)if(Array.isArray(t)){const n=t.join(", "),f=`Expected ${r} to be an Uint8Array with length [${n}]`;le(t.includes(e.length),f)}else{const n=`Expected ${r} to be an Uint8Array with length ${t}`;le(e.length===t,n)}}function Pe(r){le(_e(r)==="Boolean","Expected compressed to be a Boolean")}function pe(r=t=>new Uint8Array(t),e){return typeof r=="function"&&(r=r(e)),F("output",r,e),r}function _e(r){return Object.prototype.toString.call(r).slice(8,-1)}var wt=r=>({contextRandomize(e){switch(le(e===null||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),e!==null&&F("seed",e,32),r.contextRandomize(e)){case 1:throw new Error(G.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(e){return F("private key",e,32),r.privateKeyVerify(e)===0},privateKeyNegate(e){switch(F("private key",e,32),r.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(G.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,t){switch(F("private key",e,32),F("tweak",t,32),r.privateKeyTweakAdd(e,t)){case 0:return e;case 1:throw new Error(G.TWEAK_ADD)}},privateKeyTweakMul(e,t){switch(F("private key",e,32),F("tweak",t,32),r.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(G.TWEAK_MUL)}},publicKeyVerify(e){return F("public key",e,[33,65]),r.publicKeyVerify(e)===0},publicKeyCreate(e,t=!0,n){switch(F("private key",e,32),Pe(t),n=pe(n,t?33:65),r.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(G.SECKEY_INVALID);case 2:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyConvert(e,t=!0,n){switch(F("public key",e,[33,65]),Pe(t),n=pe(n,t?33:65),r.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyNegate(e,t=!0,n){switch(F("public key",e,[33,65]),Pe(t),n=pe(n,t?33:65),r.publicKeyNegate(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE);case 3:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyCombine(e,t=!0,n){le(Array.isArray(e),"Expected public keys to be an Array"),le(e.length>0,"Expected public keys array will have more than zero items");for(const f of e)F("public key",f,[33,65]);switch(Pe(t),n=pe(n,t?33:65),r.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.PUBKEY_COMBINE);case 3:throw new Error(G.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,t,n=!0,f){switch(F("public key",e,[33,65]),F("tweak",t,32),Pe(n),f=pe(f,n?33:65),r.publicKeyTweakAdd(f,e,t)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.TWEAK_ADD)}},publicKeyTweakMul(e,t,n=!0,f){switch(F("public key",e,[33,65]),F("tweak",t,32),Pe(n),f=pe(f,n?33:65),r.publicKeyTweakMul(f,e,t)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.TWEAK_MUL)}},signatureNormalize(e){switch(F("signature",e,64),r.signatureNormalize(e)){case 0:return e;case 1:throw new Error(G.SIG_PARSE)}},signatureExport(e,t){F("signature",e,64),t=pe(t,72);const n={output:t,outputlen:72};switch(r.signatureExport(n,e)){case 0:return t.slice(0,n.outputlen);case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},signatureImport(e,t){switch(F("signature",e),t=pe(t,64),r.signatureImport(t,e)){case 0:return t;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},ecdsaSign(e,t,n={},f){F("message",e,32),F("private key",t,32),le(_e(n)==="Object","Expected options to be an Object"),n.data!==void 0&&F("options.data",n.data),n.noncefn!==void 0&&le(_e(n.noncefn)==="Function","Expected options.noncefn to be a Function"),f=pe(f,64);const s={signature:f,recid:null};switch(r.ecdsaSign(s,e,t,n.data,n.noncefn)){case 0:return s;case 1:throw new Error(G.SIGN);case 2:throw new Error(G.IMPOSSIBLE_CASE)}},ecdsaVerify(e,t,n){switch(F("signature",e,64),F("message",t,32),F("public key",n,[33,65]),r.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.PUBKEY_PARSE)}},ecdsaRecover(e,t,n,f=!0,s){switch(F("signature",e,64),le(_e(t)==="Number"&&t>=0&&t<=3,"Expected recovery id to be a Number within interval [0, 3]"),F("message",n,32),Pe(f),s=pe(s,f?33:65),r.ecdsaRecover(s,e,t,n)){case 0:return s;case 1:throw new Error(G.SIG_PARSE);case 2:throw new Error(G.RECOVER);case 3:throw new Error(G.IMPOSSIBLE_CASE)}},ecdh(e,t,n={},f){switch(F("public key",e,[33,65]),F("private key",t,32),le(_e(n)==="Object","Expected options to be an Object"),n.data!==void 0&&F("options.data",n.data),n.hashfn!==void 0?(le(_e(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&F("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&F("options.ybuf",n.ybuf,32),F("output",f)):f=pe(f,32),r.ecdh(f,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return f;case 1:throw new Error(G.PUBKEY_PARSE);case 2:throw new Error(G.ECDH)}}});const mt=Gr().ec,de=new mt("secp256k1"),V=de.curve,W=V.n.constructor;function St(r,e){let t=new W(e);if(t.cmp(V.p)>=0)return null;t=t.toRed(V.red);let n=t.redSqr().redIMul(t).redIAdd(V.b).redSqrt();return r===3!==n.isOdd()&&(n=n.redNeg()),de.keyPair({pub:{x:t,y:n}})}function Ot(r,e,t){let n=new W(e),f=new W(t);if(n.cmp(V.p)>=0||f.cmp(V.p)>=0||(n=n.toRed(V.red),f=f.toRed(V.red),(r===6||r===7)&&f.isOdd()!==(r===7)))return null;const s=n.redSqr().redIMul(n);return f.redSqr().redISub(s.redIAdd(V.b)).isZero()?de.keyPair({pub:{x:n,y:f}}):null}function we(r){const e=r[0];switch(e){case 2:case 3:return r.length!==33?null:St(e,r.subarray(1,33));case 4:case 6:case 7:return r.length!==65?null:Ot(e,r.subarray(1,33),r.subarray(33,65));default:return null}}function Re(r,e){const t=e.encode(null,r.length===33);for(let n=0;n<r.length;++n)r[n]=t[n]}var At={contextRandomize(){return 0},privateKeyVerify(r){const e=new W(r);return e.cmp(V.n)<0&&!e.isZero()?0:1},privateKeyNegate(r){const e=new W(r),t=V.n.sub(e).umod(V.n).toArrayLike(Uint8Array,"be",32);return r.set(t),0},privateKeyTweakAdd(r,e){const t=new W(e);if(t.cmp(V.n)>=0||(t.iadd(new W(r)),t.cmp(V.n)>=0&&t.isub(V.n),t.isZero()))return 1;const n=t.toArrayLike(Uint8Array,"be",32);return r.set(n),0},privateKeyTweakMul(r,e){let t=new W(e);if(t.cmp(V.n)>=0||t.isZero())return 1;t.imul(new W(r)),t.cmp(V.n)>=0&&(t=t.umod(V.n));const n=t.toArrayLike(Uint8Array,"be",32);return r.set(n),0},publicKeyVerify(r){return we(r)===null?1:0},publicKeyCreate(r,e){const t=new W(e);if(t.cmp(V.n)>=0||t.isZero())return 1;const n=de.keyFromPrivate(e).getPublic();return Re(r,n),0},publicKeyConvert(r,e){const t=we(e);if(t===null)return 1;const n=t.getPublic();return Re(r,n),0},publicKeyNegate(r,e){const t=we(e);if(t===null)return 1;const n=t.getPublic();return n.y=n.y.redNeg(),Re(r,n),0},publicKeyCombine(r,e){const t=new Array(e.length);for(let f=0;f<e.length;++f)if(t[f]=we(e[f]),t[f]===null)return 1;let n=t[0].getPublic();for(let f=1;f<t.length;++f)n=n.add(t[f].pub);return n.isInfinity()?2:(Re(r,n),0)},publicKeyTweakAdd(r,e,t){const n=we(e);if(n===null)return 1;if(t=new W(t),t.cmp(V.n)>=0)return 2;const f=n.getPublic().add(V.g.mul(t));return f.isInfinity()?2:(Re(r,f),0)},publicKeyTweakMul(r,e,t){const n=we(e);if(n===null)return 1;if(t=new W(t),t.cmp(V.n)>=0||t.isZero())return 2;const f=n.getPublic().mul(t);return Re(r,f),0},signatureNormalize(r){const e=new W(r.subarray(0,32)),t=new W(r.subarray(32,64));return e.cmp(V.n)>=0||t.cmp(V.n)>=0?1:(t.cmp(de.nh)===1&&r.set(V.n.sub(t).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(r,e){const t=e.subarray(0,32),n=e.subarray(32,64);if(new W(t).cmp(V.n)>=0||new W(n).cmp(V.n)>=0)return 1;const{output:f}=r;let s=f.subarray(4,37);s[0]=0,s.set(t,1);let y=33,x=0;for(;y>1&&s[x]===0&&!(s[x+1]&128);--y,++x);if(s=s.subarray(x),s[0]&128||y>1&&s[0]===0&&!(s[1]&128))return 1;let q=f.subarray(39,72);q[0]=0,q.set(n,1);let S=33,K=0;for(;S>1&&q[K]===0&&!(q[K+1]&128);--S,++K);return q=q.subarray(K),q[0]&128||S>1&&q[0]===0&&!(q[1]&128)?1:(r.outputlen=6+y+S,f[0]=48,f[1]=r.outputlen-2,f[2]=2,f[3]=s.length,f.set(s,4),f[4+y]=2,f[5+y]=q.length,f.set(q,6+y),0)},signatureImport(r,e){if(e.length<8||e.length>72||e[0]!==48||e[1]!==e.length-2||e[2]!==2)return 1;const t=e[3];if(t===0||5+t>=e.length||e[4+t]!==2)return 1;const n=e[5+t];if(n===0||6+t+n!==e.length||e[4]&128||t>1&&e[4]===0&&!(e[5]&128)||e[t+6]&128||n>1&&e[t+6]===0&&!(e[t+7]&128))return 1;let f=e.subarray(4,4+t);if(f.length===33&&f[0]===0&&(f=f.subarray(1)),f.length>32)return 1;let s=e.subarray(6+t);if(s.length===33&&s[0]===0&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");let y=new W(f);y.cmp(V.n)>=0&&(y=new W(0));let x=new W(e.subarray(6+t));return x.cmp(V.n)>=0&&(x=new W(0)),r.set(y.toArrayLike(Uint8Array,"be",32),0),r.set(x.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,e,t,n,f){if(f){const x=f;f=q=>{const S=x(e,t,null,n,q);if(!(S instanceof Uint8Array&&S.length===32))throw new Error("This is the way");return new W(S)}}const s=new W(t);if(s.cmp(V.n)>=0||s.isZero())return 1;let y;try{y=de.sign(e,t,{canonical:!0,k:f,pers:n})}catch{return 1}return r.signature.set(y.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(y.s.toArrayLike(Uint8Array,"be",32),32),r.recid=y.recoveryParam,0},ecdsaVerify(r,e,t){const n={r:r.subarray(0,32),s:r.subarray(32,64)},f=new W(n.r),s=new W(n.s);if(f.cmp(V.n)>=0||s.cmp(V.n)>=0)return 1;if(s.cmp(de.nh)===1||f.isZero()||s.isZero())return 3;const y=we(t);if(y===null)return 2;const x=y.getPublic();return de.verify(e,n,x)?0:3},ecdsaRecover(r,e,t,n){const f={r:e.slice(0,32),s:e.slice(32,64)},s=new W(f.r),y=new W(f.s);if(s.cmp(V.n)>=0||y.cmp(V.n)>=0)return 1;if(s.isZero()||y.isZero())return 2;let x;try{x=de.recoverPubKey(n,f,t)}catch{return 2}return Re(r,x),0},ecdh(r,e,t,n,f,s,y){const x=we(e);if(x===null)return 1;const q=new W(t);if(q.cmp(V.n)>=0||q.isZero())return 2;const S=x.getPublic().mul(q);if(f===void 0){const K=S.encode(null,!0),C=de.hash().update(K).digest();for(let T=0;T<32;++T)r[T]=C[T]}else{s||(s=new Uint8Array(32));const K=S.getX().toArray("be",32);for(let B=0;B<32;++B)s[B]=K[B];y||(y=new Uint8Array(32));const C=S.getY().toArray("be",32);for(let B=0;B<32;++B)y[B]=C[B];const T=f(s,y,n);if(!(T instanceof Uint8Array&&T.length===r.length))return 2;r.set(T)}return 0}},Pt=wt(At),be=ir(),re=ar.Buffer,Ge=zr(),Rt=Yr,ur=Et,me=Pt,It=re.from("Bitcoin seed","utf8"),Fe=2147483648,jt=78,Kr={private:76066276,public:76067358};function ee(r){this.versions=r||Kr,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}Object.defineProperty(ee.prototype,"fingerprint",{get:function(){return this._fingerprint}});Object.defineProperty(ee.prototype,"identifier",{get:function(){return this._identifier}});Object.defineProperty(ee.prototype,"pubKeyHash",{get:function(){return this.identifier}});Object.defineProperty(ee.prototype,"privateKey",{get:function(){return this._privateKey},set:function(r){r=Uint8Array.from(r),be.equal(r.length,32,"Private key must be 32 bytes."),be(me.privateKeyVerify(r)===!0,"Invalid private key"),this._privateKey=re.from(r),this._publicKey=re.from(me.publicKeyCreate(r,!0)),this._identifier=Ur(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}});Object.defineProperty(ee.prototype,"publicKey",{get:function(){return this._publicKey},set:function(r){be(r.length===33||r.length===65,"Public key must be 33 or 65 bytes."),be(me.publicKeyVerify(r)===!0,"Invalid public key"),this._publicKey=re.from(me.publicKeyConvert(r,!0)),this._identifier=Ur(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}});Object.defineProperty(ee.prototype,"privateExtendedKey",{get:function(){return this._privateKey?ur.encode(Tr(this,this.versions.private,re.concat([re.alloc(1,0),this.privateKey]))):null}});Object.defineProperty(ee.prototype,"publicExtendedKey",{get:function(){return ur.encode(Tr(this,this.versions.public,this.publicKey))}});ee.prototype.derive=function(r){if(r==="m"||r==="M"||r==="m'"||r==="M'")return this;var e=r.split("/"),t=this;return e.forEach(function(n,f){if(f===0){be(/^[mM]{1}/.test(n),'Path must start with "m" or "M"');return}var s=n.length>1&&n[n.length-1]==="'",y=parseInt(n,10);be(y<Fe,"Invalid index"),s&&(y+=Fe),t=t.deriveChild(y)}),t};ee.prototype.deriveChild=function(r){var e=r>=Fe,t=re.allocUnsafe(4);t.writeUInt32BE(r,0);var n;if(e){be(this.privateKey,"Could not derive hardened child key");var f=re.from(this.privateKey),s=re.alloc(1,0);f=re.concat([s,f]),n=re.concat([f,t])}else n=re.concat([this.publicKey,t]);var y=Ge.createHmac("sha512",this.chainCode).update(n).digest(),x=y.slice(0,32),q=y.slice(32),S=new ee(this.versions);if(this.privateKey)try{S.privateKey=re.from(me.privateKeyTweakAdd(re.from(this.privateKey),x))}catch{return this.deriveChild(r+1)}else try{S.publicKey=re.from(me.publicKeyTweakAdd(re.from(this.publicKey),x,!0))}catch{return this.deriveChild(r+1)}return S.chainCode=q,S.depth=this.depth+1,S.parentFingerprint=this.fingerprint,S.index=r,S};ee.prototype.sign=function(r){return re.from(me.ecdsaSign(r,this.privateKey).signature)};ee.prototype.verify=function(r,e){return me.ecdsaVerify(Uint8Array.from(e),Uint8Array.from(r),Uint8Array.from(this.publicKey))};ee.prototype.wipePrivateData=function(){return this._privateKey&&Ge.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this};ee.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}};ee.fromMasterSeed=function(r,e){var t=Ge.createHmac("sha512",It).update(r).digest(),n=t.slice(0,32),f=t.slice(32),s=new ee(e);return s.chainCode=f,s.privateKey=n,s};ee.fromExtendedKey=function(r,e){e=e||Kr;var t=new ee(e),n=ur.decode(r),f=n.readUInt32BE(0);be(f===e.private||f===e.public,"Version mismatch: does not match private or public"),t.depth=n.readUInt8(4),t.parentFingerprint=n.readUInt32BE(5),t.index=n.readUInt32BE(9),t.chainCode=n.slice(13,45);var s=n.slice(45);return s.readUInt8(0)===0?(be(f===e.private,"Version mismatch: version does not match private"),t.privateKey=re.from(s.slice(1))):(be(f===e.public,"Version mismatch: version does not match public"),t.publicKey=re.from(s)),t};ee.fromJSON=function(r){return ee.fromExtendedKey(r.xpriv)};function Tr(r,e,t){var n=re.allocUnsafe(jt);n.writeUInt32BE(e,0),n.writeUInt8(r.depth,4);var f=r.depth?r.parentFingerprint:0;return n.writeUInt32BE(f,5),n.writeUInt32BE(r.index,9),r.chainCode.copy(n,13),t.copy(n,45),n}function Ur(r){var e=Ge.createHash("sha256").update(r).digest();return new Rt().update(e).digest()}ee.HARDENED_OFFSET=Fe;var xt=ee;const Nt=xt,or=Hr,{fromSecretKey:_t,WalletType:qt}=Zr,{isHexStrict:Kt,toHex:Or,toBuffer:Tt,stripHexPrefix:Ar}=Wr,{types:Le}=or,Ut=(r,e,t={role:Le.RoleType.ROLE_ACCOUNT},n=0)=>{if(!e)throw new Error("Cannot get user wallet with empty root sk");const f=or.Hasher.SHA3.hash256(Tt(r)),s=Ar(f).slice(0,16),y=s.slice(0,8),x=s.slice(8,16),q=parseInt(+`0x${y}`,10)&2147483647,S=parseInt(+`0x${x}`,10)&2147483647,K=Ar(Kt(e)?e:Or(e)),C=Nt.fromMasterSeed(Br.from(K,"hex")),T=`m/44'/260'/${q}'/${S}'/${n}`,N=C.derive(T),B=qt(t),{pk:J=Le.KeyType.ED25519}=B;let Y;return J===Le.KeyType.ED25519?Y=or.Signer.Ed25519.genKeyPair("hex",N.privateKey).secretKey:Y=Or(N.privateKey),J===Le.KeyType.ETHEREUM&&(Y=Y.slice(0,66)),_t(Y,B)};var Mt={fromAppDid:Ut};export{Mt as l};
@@ -0,0 +1,113 @@
1
+ import{g as qt,r as T}from"./vendor-react-DEoibe3W.js";import{ah as ue,al as ft,j as e,aa as R,O as se,bt as ge,bu as ze,bp as Y,ad as mt,H as x,a9 as Ge,T as oe,E as Je,bA as ht,bR as Be,bS as We,y as Oe,b4 as qe,ab as xt,a1 as gt,m as Kt,bc as lt,bs as Mt,bo as $t,q as ct,bZ as Ut,I as Ht}from"./vendor-mui-core-D_bnq77o.js";import{J as bt,z as Vt,A as Gt,e as fe,aB as je,C as Jt}from"./vendor-utils-rHXShPKm.js";import{u as le,a6 as jt,_ as M,bQ as Yt,B as me,b2 as Xt,as as vt,j as W,b7 as Zt,r as Ye,A as Qt,bR as es,Z as yt,a7 as St,bn as Ee,am as Ct,X as ts,bu as ss}from"./vendor-ux-did-connect-DHrruicZ.js";import{z as Xe,C as wt,au as Rt,av as Z,t as ne,l as ns,G as dt}from"./index-CIkPfxzG.js";import{a as Ce,u as J,f as ce}from"./vendor-hooks-rDgu5KV9.js";import{a as Ze,b as is}from"./dashboard-BYxl5V9e.js";import{l as as,v as Pe}from"./vendor-arcblock-uz9DVywv.js";import{f as Ke,i as rs,d as os}from"./use-blocklet-logo-Phq7jasP.js";import{A as ls,a as cs,d as ds,b as us}from"./collapse-QV_2gdtM.js";import{S as te}from"./section-Cv4udilp.js";import{S as we}from"./shorten-label-Cng55547.js";import{I as Tt}from"./index-enM9Y412.js";import{R as Nt,A as ps,S as fs,a as ms,b as hs,B as xs}from"./list-BiJWMg_P.js";import{W as gs}from"./did-address-DjwPl1uy.js";import{p as Et}from"./util-CEAObyfj.js";import{D as bs,g as js}from"./traffic-ClE631in.js";import{B as It}from"./bundle-avatar-CDJRatFg.js";import{u as vs}from"./use-mobile-Boa_xu9A.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-DVnkpneF.js";import"./confirm-SdqBW-ti.js";import"./format-error-BrmqJs5a.js";import"./PlayArrow-BToG9L6q.js";import"./get-safe-url-B5RJTMjC.js";import"./session-CHdTc1We.js";import"./InfoOutlined-DkG0jjos.js";import"./dot-BA3EvSrh.js";import"./useAsync-DV3NyLhI.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-DyX6Fl8Z.js";import"./index-BYCeMwoO.js";import"./CheckCircle-Ds4QI0ey.js";import"./index-BIPRCLBG.js";import"./Phone-DcHUzCa-.js";import"./Location-DUEOr9J2.js";import"./Email-DWueGk7t.js";import"./Timezone-B-Ho_Uno.js";import"./base32-_zEVBJUg.js";import"./iframe-DW7zzzTG.js";import"./LaunchOutlined-CXNijfqX.js";import"./ChevronLeft-CnQaQ-rc.js";import"./ChevronRight-a_2_x6Ew.js";import"./index-DcUhenm6.js";import"./vendor-mui-x-R-0SFz4c.js";import"./AdapterDayjs-BD9H1lZ-.js";var Me={exports:{}},$e={exports:{}},Ue={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;function s(o){return o==null}n.exports=t.default,n.exports.default=t.default})(Ue,Ue.exports);var ys=Ue.exports;(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var s=l(as),o=l(ys);function l(m){return m&&m.__esModule?m:{default:m}}var r=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,S=/^[-+]?[0-9]+$/;function p(m,a){(0,s.default)(m),a=a||{};var E=a.allow_leading_zeroes===!1?r:S,I=!a.hasOwnProperty("min")||(0,o.default)(a.min)||m>=a.min,j=!a.hasOwnProperty("max")||(0,o.default)(a.max)||m<=a.max,C=!a.hasOwnProperty("lt")||(0,o.default)(a.lt)||m<a.lt,O=!a.hasOwnProperty("gt")||(0,o.default)(a.gt)||m>a.gt;return E.test(m)&&I&&j&&C&&O}n.exports=t.default,n.exports.default=t.default})($e,$e.exports);var Ss=$e.exports;(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var s=o(Ss);function o(r){return r&&r.__esModule?r:{default:r}}function l(r){return(0,s.default)(r,{allow_leading_zeroes:!1,min:0,max:65535})}n.exports=t.default,n.exports.default=t.default})(Me,Me.exports);var Cs=Me.exports;const ws=qt(Cs),_e={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Rs(){var D,F,_;const{api:n}=Xe(),{blocklet:t}=wt(),{t:s}=le(),{confirmApi:o,confirmHolder:l}=jt(),r=(D=t==null?void 0:t.meta)==null?void 0:D.did,S=Object.assign({..._e},((_=(F=t==null?void 0:t.settings)==null?void 0:F.notification)==null?void 0:_.email)||{}),{handleSubmit:p,control:m,formState:a,watch:E,reset:I}=Rt({defaultValues:bt(S,Object.keys(_e))}),j=Ce({testReceiver:"",testReceiverError:""}),C=E("enabled"),O=J(async(i,h,H=!0)=>{var V,ie;try{const{blocklet:re}=await n.configNotification({input:{did:r,notification:JSON.stringify({email:i})}}),pe=Object.assign({..._e},((ie=(V=re==null?void 0:re.settings)==null?void 0:V.notification)==null?void 0:ie.email)||{});I(pe),H&&M.success(s("oauth.saveSuccess"))}catch(re){if(H)M.error(re.message||s("oauth.saveFailed"));else throw re}}),z=J(async(i,h,H)=>{try{a.isDirty&&await O(i,h,!1),await n.sendEmail({input:{did:r,receiver:H,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),M.success(s("notification.email.testSuccess"))}catch(V){M.error(V.message||s("notification.email.testfailed"))}}),L=J((i,h)=>{j.testReceiver="",j.testReceiverError="",o.open({title:s("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(se,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:s("notification.email.inputTestReceiver"),value:j.testReceiver,onChange:H=>{j.testReceiver=H.target.value},error:!!j.testReceiverError,helperText:j.testReceiverError||" "})}),confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),async onConfirm(H){var ie;const V=(ie=j.testReceiver)==null?void 0:ie.trim();if(!V){j.testReceiverError=s("notification.email.receiverRequired");return}if(!Pe(V)){j.testReceiverError=s("notification.email.receiverInvalid");return}j.testReceiverError="",await z(i,h,V),H()}})}),U=J(i=>{const h=i==null?void 0:i.trim();return h?Pe(h)?!0:s("notification.email.fromInvalid"):s("notification.email.fromRequired")}),$=J(i=>{const h=i==null?void 0:i.trim();return h?Ke(h,{require_host:!1,protocols:[]})?!0:s("notification.email.hostInvalid"):s("notification.email.hostRequired")}),Q=J(i=>i?ws(i)?!0:s("notification.email.portInvalid"):s("notification.email.portRequired")),B=J(i=>i!=null&&i.trim()?!0:s("notification.email.userRequired")),q=J(i=>i!=null&&i.trim()?!0:s("notification.email.passwordRequired")),d=J(i=>i!=null&&i.trim()&&!Ke(i,{protocols:["http","https"],require_protocol:!0})?s("notification.email.linkInvalid"):!0),g=J(i=>i!=null&&i.trim()&&!Pe(i)?s("notification.email.emailInvalid"):!0),b=J(()=>!0);return e.jsxs(R,{children:[e.jsxs(Ts,{component:"form",onSubmit:p(O),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(te,{title:s("notification.email.enable"),my:2.5,children:e.jsx(Z,{name:"enabled",control:m,render:({field:i})=>e.jsx(ge,{control:e.jsx(ze,{checked:i.value,...i})})})}),e.jsx(te,{title:s("notification.email.from"),children:e.jsx(Z,{name:"from",control:m,rules:{validate:C?U:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",required:!0,label:s("notification.email.from"),error:!!a.errors[i.name],helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.host"),children:e.jsx(Z,{name:"host",control:m,rules:{validate:C?$:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",required:!0,error:!!a.errors[i.name],label:s("notification.email.host"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.port"),children:e.jsx(Z,{name:"port",control:m,rules:{validate:C?Q:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",required:!0,type:"number",error:!!a.errors[i.name],label:s("notification.email.port"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.user"),children:e.jsx(Z,{name:"user",control:m,rules:{validate:C?B:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",required:!0,error:!!a.errors[i.name],label:s("notification.email.user"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.password"),children:e.jsx(Z,{name:"password",control:m,rules:{validate:C?q:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",required:!0,type:"password",error:!!a.errors[i.name],label:s("notification.email.password"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.secure"),children:e.jsx(Z,{name:"secure",control:m,rules:{validate:b},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(ge,{control:e.jsx(ze,{checked:i.value,...i,disabled:!C})})})})}),e.jsxs(ls,{children:[e.jsxs(cs,{expandIcon:e.jsx(ds,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[s("notification.email.signature"),e.jsx(mt,{title:s("notification.email.signatureTooltip"),children:e.jsx(Yt,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(us,{children:[e.jsx(te,{title:s("notification.email.companyName"),children:e.jsx(Z,{name:"companyName",control:m,rules:{validate:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",error:!!a.errors[i.name],label:s("notification.email.companyName"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.companyLink"),children:e.jsx(Z,{name:"companyLink",control:m,rules:{validate:C?d:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",error:!!a.errors[i.name],label:s("notification.email.companyLink"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.companyAddress"),children:e.jsx(Z,{name:"companyAddress",control:m,rules:{validate:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",error:!!a.errors[i.name],label:s("notification.email.companyAddress"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})}),e.jsx(te,{title:s("notification.email.supportEmail"),children:e.jsx(Z,{name:"supportEmail",control:m,rules:{validate:C?g:b},render:({field:i})=>{var h;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...i,size:"small",type:"email",error:!!a.errors[i.name],label:s("notification.email.supportEmail"),helperText:((h=a.errors[i.name])==null?void 0:h.message)||" ",disabled:!C})})}})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(me,{variant:"outlined",color:"warning",onClick:p(L),disabled:!C,children:s("oauth.runTest")}),e.jsx(me,{type:"submit",variant:"contained",disabled:!a.isDirty,children:s("oauth.save")})]})]}),l]})}const Ts=ue(ft)``,ke={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Ns(){var Q,B,q;const{api:n}=Xe(),{blocklet:t}=wt(),{t:s}=le(),{confirmApi:o,confirmHolder:l}=jt(),r=(Q=t==null?void 0:t.meta)==null?void 0:Q.did,S=Object.assign({...ke},((q=(B=t==null?void 0:t.settings)==null?void 0:B.notification)==null?void 0:q.pushKit)||{}),{handleSubmit:p,control:m,formState:a,watch:E,reset:I}=Rt({defaultValues:bt(S,Object.keys(ke))}),j=Ce({testReceiver:"",testReceiverError:""}),C=E("enabled"),O=J(async(d,g,b=!0)=>{var D,F;try{const{blocklet:_}=await n.configNotification({input:{did:r,notification:JSON.stringify({pushKit:d})}}),i=Object.assign({...ke},((F=(D=_==null?void 0:_.settings)==null?void 0:D.notification)==null?void 0:F.pushKit)||{});I(i),b&&M.success(s("oauth.saveSuccess"))}catch(_){if(b)M.error(_.message||s("oauth.saveFailed"));else throw _}}),z=J(async(d,g)=>{var b,D,F;try{a.isDirty&&await O(d,g,!1);const _=(b=((t==null?void 0:t.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:b.value,i=Vt(Gt(_,"/.well-known/service/blocklet/logo"),{v:(D=t==null?void 0:t.meta)==null?void 0:D.version,t:new Date((t==null?void 0:t.updatedAt)||0).getTime()}),h={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:t==null?void 0:t.appDid,fullName:(F=t==null?void 0:t.meta)==null?void 0:F.title,avatar:i}}}};await n.sendPush({input:{did:r,receiver:j.testReceiver,notification:JSON.stringify(h)}}),M.success(s("notification.pushKit.testSuccess"))}catch(_){M.error(_.message||s("notification.pushKit.testfailed"))}}),L=J((d,g)=>{j.testReceiverError="",o.open({title:s("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(se,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:s("notification.pushKit.inputTestReceiver"),value:j.testReceiver,onChange:b=>{j.testReceiver=b.target.value},error:!!j.testReceiverError,helperText:j.testReceiverError||" "})}),confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),async onConfirm(b){var F;if(!((F=j.testReceiver)==null?void 0:F.trim())){j.testReceiverError=s("notification.pushKit.receiverRequired");return}j.testReceiverError="",await z(d,g),b()}})}),U=J(d=>{const g=d==null?void 0:d.trim();return g?Ke(g)?!0:s("notification.pushKit.endpointInvalid"):s("notification.pushKit.endpointRequired")}),$=J(()=>!0);return e.jsxs(R,{children:[e.jsxs(Es,{component:"form",onSubmit:p(O),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(te,{title:s("notification.pushKit.enable"),my:2.5,children:e.jsx(Z,{name:"enabled",control:m,render:({field:d})=>e.jsx(ge,{control:e.jsx(ze,{checked:d.value,...d})})})}),e.jsx(te,{title:s("notification.pushKit.endpoint"),children:e.jsx(Z,{name:"endpoint",control:m,rules:{validate:C?U:$},render:({field:d})=>{var g;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...d,size:"small",required:!0,label:s("notification.pushKit.endpoint"),error:!!a.errors[d.name],helperText:((g=a.errors[d.name])==null?void 0:g.message)||" ",disabled:!C})})}})}),e.jsxs(te,{title:s("notification.pushKit.customOptions"),children:[e.jsx(Z,{name:"did",control:m,render:({field:d})=>{var g;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...d,size:"small",label:s("notification.pushKit.did"),error:!!a.errors[d.name],helperText:((g=a.errors[d.name])==null?void 0:g.message)||" ",disabled:!C})})}}),e.jsx(Z,{name:"pushPath",control:m,render:({field:d})=>{var g;return e.jsx(Y,{fullWidth:!0,children:e.jsx(se,{...d,size:"small",label:s("notification.pushKit.pushPath"),error:!!a.errors[d.name],helperText:((g=a.errors[d.name])==null?void 0:g.message)||" ",disabled:!C})})}})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(me,{variant:"outlined",color:"warning",onClick:p(L),disabled:!C,children:s("oauth.runTest")}),e.jsx(me,{type:"submit",variant:"contained",disabled:!a.isDirty,children:s("oauth.save")})]})]}),l]})}const Es=ue(ft)``,ut=[{label:e.jsx(R,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:e.jsx(R,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function Is(){const[n,t]=T.useState(ut[0].value),{locale:s}=T.useContext(Xt),o=ce(()=>({email:e.jsx(Rs,{}),pushKit:e.jsx(Ns,{})}),[s]),l=T.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(vt,{tabs:ut,current:n,onChange:t}),e.jsx(R,{style:l,children:o[n]})]})}const At=T.createContext({}),{Provider:As,Consumer:si}=At;function Os({children:n,blocklet:t=""}){const{api:s,inService:o,ws:{useSubscription:l}}=Xe(),[r,S]=T.useState([]),[p,m]=T.useState({total:0,pageSize:20,pageCount:0,page:1}),a=ce(()=>{var d;return(d=t.meta)==null?void 0:d.did},[t]),[E,I]=T.useState([]),[j,C]=T.useState({}),O=ce(()=>r.length?new Set(r.map(d=>d.id)):new Set,[r]),z=async({page:d=1,pageSize:g=20,...b}={})=>{if(!a)return[];try{const D={paging:{page:d,pageSize:g},...b,teamDid:a,dateRange:b.dateRange?[ne(b.dateRange[0]).toISOString(),ne(b.dateRange[1]).toISOString()]:void 0},{dids:F,..._}=D;let i="";F&&F.includes("system")&&(i="system");const h=F?F.filter(ie=>ie!=="system"):[],H={..._,source:i,componentDids:h},V=await s.getNotificationSendLog({input:H});return C(H),S(V.list),m(V.paging),V.list}catch(D){return M.error(D.message),[]}},L=async()=>{const d=await s.getNotificationComponents({input:{teamDid:a}});I(d.componentDids)},U=T.useCallback(d=>{const g=t.children.find(b=>{var D;return((D=b.meta)==null?void 0:D.did)===d});if(g)return g.ancestors=[t],g},[t]),$=async({notificationId:d,receivers:g,channels:b,...D})=>{await s.resendNotification({input:{teamDid:a,notificationId:d,receivers:g,channels:b.map(F=>F==="wallet"?W.NOTIFICATION_SEND_CHANNEL.WALLET:F==="pushKit"?W.NOTIFICATION_SEND_CHANNEL.PUSH:F),...D}})},Q=T.useCallback(async d=>(await s.getUser({input:{teamDid:a,user:{did:d}}})).user,[s,a]),B=T.useCallback(async({page:d=1,pageSize:g=20,...b}={})=>{try{const D={paging:{page:d,pageSize:g},...b,userName:b.searchText||"",teamDid:a,dateRange:b.dateRange?[ne(b.dateRange[0]).toISOString(),ne(b.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:D})}catch(D){throw M.error(D.message),D}},[s,a]);T.useEffect(()=>{a&&L()},[a]),l(W.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,d=>{O.has(d.notificationId)&&z(j)},[O,j]),l(W.EVENTS.NOTIFICATION_BLOCKLET_CREATE,d=>{O.has(d.id)||z(j)},[O,j]);const q={fetch:z,data:r,paging:p,blocklet:t,getComponent:U,resendNotification:$,getUser:Q,componentDids:E,getReceivers:B,inService:o,teamDid:a};return e.jsx(As,{value:{notificationRecords:q},children:n})}function Qe(){const{notificationRecords:n}=T.useContext(At);return n}Re.propTypes={severity:x.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Ds={info:"primary",success:"success",error:"error",warning:"warning"};function Re({severity:n="info"}){return e.jsx(Zt,{type:Ds[n],children:n})}var et={},Ls=Ge;Object.defineProperty(et,"__esModule",{value:!0});var Ot=et.default=void 0,Ps=Ls(Ye()),_s=e;Ot=et.default=(0,Ps.default)((0,_s.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var tt={},ks=Ge;Object.defineProperty(tt,"__esModule",{value:!0});var Dt=tt.default=void 0,Fs=ks(Ye()),zs=e;Dt=tt.default=(0,Fs.default)((0,zs.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var st={},Bs=Ge;Object.defineProperty(st,"__esModule",{value:!0});var Lt=st.default=void 0,Ws=Bs(Ye()),qs=e;Lt=st.default=(0,Ws.default)((0,qs.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Ks=(n,t,s="")=>{if(!s||!t)return"";switch(s){case W.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return n("notification.sendStatus.reason.disabled",{channel:t});case W.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return n("notification.sendStatus.reason.unavailable",{channel:t});case W.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return n("notification.sendStatus.reason.notSent",{channel:t});case W.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return n("notification.sendStatus.reason.offline");default:return s}};function Pt(n,t,s={}){const{status:o,updatedAt:l,reason:r="",channel:S="wallet"}=s,p=l?n("notification.sendStatus.sentTime",{date:ns(l,t)}):"",m=Ks(n,S,r);return o===W.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:n("notification.sendStatus.failed"),sentTime:p,reason:m}:o===W.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:n("notification.sendStatus.success"),sentTime:p}:{status:"pending",title:n("notification.sendStatus.pending"),reason:m,sentTime:p}}const He={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Ve=["wallet","pushKit","email"],pt=["info","success","error","warning"],_t=n=>{var s,o;const{settings:t}=n;return(o=(s=t==null?void 0:t.notification)==null?void 0:s.email)==null?void 0:o.enabled},kt=n=>{var s,o;const{settings:t}=n;return(o=(s=t==null?void 0:t.notification)==null?void 0:s.pushKit)==null?void 0:o.enabled},Ms=(n,t)=>{const s=fe(t,"extra.notifications.email",!0);return{available:_t(n),enabled:s}},$s=(n,t)=>{const s=fe(t,"extra.notifications.push",!0);return{available:kt(n),enabled:s}},Us=n=>({enabled:fe(n,"extra.notifications.wallet",!0)}),Hs=n=>({enabled:fe(n,"extra.webhooks",[]).length>0}),Te=(n=3)=>new Promise(t=>{setTimeout(()=>{t()},n*1e3)}),Vs=(n,t)=>t==="wallet"||t==="webhook"?[{channel:t,type:"enabled",pass:n("notification.sendStatus.reason.enabled",{channel:t}),fail:n("notification.sendStatus.reason.disabled",{channel:t})}]:t==="pushKit"||t==="email"?[{channel:t,type:"available",pass:n("notification.sendStatus.reason.available",{channel:t}),fail:n("notification.sendStatus.reason.unavailable",{channel:t})},{channel:t,type:"enabled",pass:n("notification.sendStatus.reason.enabled",{channel:t}),fail:n("notification.sendStatus.reason.disabled",{channel:t})}]:[],Ne=(n=[])=>{const t=ne().startOf("day");return n.filter(s=>ne(s.sendAt).isSame(t,"day")).length},Gs=(n,t="")=>{if(t&&Ve.includes(t)){const r=`${t}SendRecord`,S=fe(n,r,[]);return Ne(S)}const s=fe(n,"webhook",{}),o=Object.keys(s??{})??[];if(t&&o.includes(t)){const r=s[t]??[];return Ne(r)}const l={};return Ve.forEach(r=>{const S=`${r}SendRecord`,p=fe(n,S,[]),m=Ne(p);l[r]=m}),o.length>0&&o.forEach(r=>{const S=s[r]??[],p=Ne(S);l[r]=p}),l},Ie=(n,t,s)=>{if(!Array.isArray(n))throw new Error("Invalid filterList or index");return n[s].splice(t,1),n},Ae=(n,t)=>{if(!Array.isArray(t))throw new Error("filters must be an array");return t.length?!t.includes(n):!1},Js=n=>{switch(n){case W.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case W.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case W.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case W.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},Ft=()=>Qt({typography:{fontSize:14,button:{textTransform:"none"}},components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function de({config:n,enableTooltip:t=!0,showTitle:s=!1,children:o}){const{status:l,title:r="",sentTime:S="",reason:p=""}=n,m=[r,p].filter(Boolean).join(", ");return e.jsx(mt,{title:t?e.jsxs(e.Fragment,{children:[e.jsx(oe,{color:"inherit",sx:{fontSize:12},children:m}),e.jsx("span",{children:S})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:He[l],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:He[l]})]}),e.jsx(oe,{color:"inherit",sx:{fontSize:12},children:s?r:o})]})})}de.propTypes={config:x.object.isRequired,enableTooltip:x.bool,showTitle:x.bool,children:x.node};de.defaultProps={enableTooltip:!0,showTitle:!1,children:null};ve.propTypes={list:x.array.isRequired,label:x.string.isRequired,onDelete:x.func};ve.defaultProps={onDelete:()=>{}};function ve({list:n,label:t,onDelete:s}){const{t:o,locale:l}=le();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(oe,{children:[t,": "]}),n.map(r=>{const S=Pt(o,l,{status:r});return e.jsx(Je,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(de,{config:S,enableTooltip:!1,children:S.title})}),onDelete:p=>s(p,r)},r)})]})}nt.propTypes={filterList:x.array.isRequired,onChange:x.func.isRequired,index:x.number.isRequired,column:x.object.isRequired,filterValues:x.array.isRequired,label:x.string.isRequired,renderLabel:x.func.isRequired};function nt({filterList:n,onChange:t,index:s,column:o,filterValues:l,label:r,renderLabel:S}){return e.jsxs(Y,{className:"filter-container",children:[e.jsx(ht,{component:"legend",children:r}),e.jsx(Be,{row:!0,children:l.map(p=>e.jsx(ge,{control:e.jsx(We,{checked:n[s].indexOf(p.value??p)>-1,onChange:m=>{const a=[...n];m.target.checked?a[s]=[...a[s],p.value??p]:a[s]=a[s].filter(E=>E!==(p.value??p)),t(a[s],s,o)},name:p.value??p}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:S(p)})},p.value??p))})]})}function Fe(n){return e.jsx(nt,{...n,renderLabel:t=>e.jsx(de,{enableTooltip:!1,config:{status:t.status},children:t.label})})}be.propTypes={status:x.number.isRequired,updatedAt:x.string.isRequired,reason:x.string,channel:x.string,onResend:x.func};function be({status:n,updatedAt:t,reason:s="",channel:o="wallet",onResend:l}){const{t:r,locale:S}=le(),p=Pt(r,S,{status:n,updatedAt:t,reason:s,channel:o});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(de,{config:p,showTitle:!0}),p.status!=="success"&&e.jsx(Oe,{className:"resend-btn",size:"small",startIcon:e.jsx(Ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:l,children:r("notification.resend")})]})}it.propTypes={value:x.array.isRequired,onChange:x.func};function it({value:n,onChange:t}){const{locale:s}=le(),o=ne().toDate(),[l,r]=T.useState(null),S=T.useCallback(a=>{r(l?null:a.currentTarget)},[l]),p=!!l,m=T.useCallback(a=>{if(!a.startDate||!a.endDate){M.error("Please select a date range");return}if(ne(a.startDate).isAfter(a.endDate)||!ne(a.startDate).isValid()||!ne(a.endDate).isValid()){M.error("Invalid date range");return}t([a.startDate,a.endDate]),r(null)},[t]);return e.jsxs("div",{children:[e.jsx(oe,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(Oe,{onClick:S,variant:"outlined",size:"small",color:"inherit",children:[dt(n[0],s)," - ",dt(n[1],s)]})}),e.jsx(qe,{open:p,anchorEl:l,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(bs,{open:!0,maxDate:o,initialDateRange:{startDate:n[0],endDate:n[1]},toggle:S,definedRanges:js(o),onChange:m})})]})}at.propTypes={itemComponent:x.elementType.isRequired};function at({itemComponent:n,...t}){var l;const{t:s}=le();return!((l=t==null?void 0:t.filterList)!=null&&l.filter(r=>r.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(es.TableFilterList,{...t,ItemComponent:n})})]})}function De({label:n,onDelete:t,canDelete:s=()=>!0,...o}){const l=t&&typeof t=="function"?t:void 0;let r=!0;return s&&typeof s=="function"&&(r=s({label:n,...o})),e.jsx(Je,{label:n,variant:"outlined",...l&&r?{onDelete:l}:{}})}De.propTypes={label:x.string.isRequired,onDelete:x.func,canDelete:x.func};De.defaultProps={canDelete:()=>!0};const Ys=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];rt.propTypes={loading:x.bool,onCancel:x.func,onConfirm:x.func};rt.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function rt({loading:n=!1,onCancel:t,onConfirm:s}){const{t:o}=le(),[l,r]=T.useState(Ys),[S,p]=T.useState(!0),m=(E,I)=>{I.checked=E.target.checked;const j=l.map(C=>({...C,checked:C.value===I.value?I.checked:C.checked}));r(j)},a=E=>{E.stopPropagation(),s({channels:l.filter(I=>I.checked).map(I=>I.value),isResendFailedOnly:S})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(oe,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(Y,{component:"fieldset",variant:"standard",children:[e.jsx(ht,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Be,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:l.map(E=>e.jsx(ge,{control:e.jsx(We,{checked:E.checked,onChange:I=>m(I,E),name:E.value}),label:E.label},E.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Be,{children:e.jsx(ge,{control:e.jsx(We,{checked:S,onChange:E=>p(E.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(Oe,{onClick:E=>{E.stopPropagation(),t()},color:"inherit",children:o("common.cancel")}),e.jsxs(Oe,{onClick:a,color:"primary",disabled:n,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[n&&e.jsx(xt,{size:16}),o("common.confirm")]})]})]})}zt.propTypes={notificationId:x.string.isRequired,handleResend:x.func,resending:x.bool};function zt({notificationId:n,handleResend:t,resending:s=!1}){const{t:o,locale:l}=le(),{getReceivers:r,inService:S,teamDid:p,getUser:m,blocklet:a}=Qe(),[E,I]=T.useState(!1),[j,C]=T.useState([]),O=Ce({anchorEl:null,position:null}),z=Ce({anchorEl:null,position:null}),[L,U]=T.useState(null),[$,Q]=T.useState({total:0,pageSize:10,pageCount:0,page:1}),[B,q]=T.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[ne().subtract(1,"month").startOf("day").toDate(),ne().endOf("day").toDate()]}),[d,g]=T.useState([]),b=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],D=async()=>{if(!E&&n)try{I(!0);const c=await r({notificationId:n,...B}),u=c.list.map(f=>({...f,receiverUser:{...f.receiverUser,avatar:Et(f.receiverUser.avatar,p,S)}}));C(u),Q(c.paging),I(!1)}catch(c){M.error(c.message),I(!1)}};T.useEffect(()=>{D()},[B]);const F=c=>{c.stopPropagation();const u=c.currentTarget;z.anchorEl=u;const f=u.getBoundingClientRect();z.position={top:f.top+window.scrollY,left:f.left+window.scrollX}},_=c=>c.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(me,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(Ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:F,children:o("notification.resend")})}):null,i={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:$.page-1,rowsPerPage:$.pageSize,count:$.total,searchText:B.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:d,onRowSelectionChange:(c,u)=>{g(u.map(f=>f.dataIndex))},customToolbarSelect:_},h=({page:c,rowsPerPage:u,searchText:f,filterList:A})=>{const[,K=[],ee=[],X=[]]=A;B.pageSize!==u?q(G=>({...G,pageSize:u,page:1})):B.page!==c+1?q(G=>({...G,page:c+1})):B.searchText!==f?q(G=>({...G,searchText:f,page:1})):je(K,B.walletSendStatus)?je(ee,B.pushKitSendStatus)?je(X,B.emailSendStatus)||q(G=>({...G,emailSendStatus:X,page:1})):q(G=>({...G,pushKitSendStatus:ee,page:1})):q(G=>({...G,walletSendStatus:K,page:1}))},H=T.useCallback(async(c,u)=>{if(!u)return!1;const f=await m(u);return f?c==="wallet"?Us(f):c==="email"?Ms(a,f):c==="pushKit"?$s(a,f):c==="webhook"?Hs(f):!0:!1},[m,a]),V=T.useCallback(c=>Vs(o,c),[o]),ie=()=>{O.anchorEl=null,O.position=null,U(null)},re=()=>{z.anchorEl=null,z.position=null},pe=async(c,u,f=!0,A="")=>{if(!(!u.length||!c.length))try{t(c,u,f,A),z.anchorEl||(await Te(.5),ie())}catch(K){console.error("handleResend error",{error:K})}},y=async({channels:c,isResendFailedOnly:u})=>{const f=d.map(A=>j[A].receiver);await pe(c,f,u),await Te(.5),re(),g([])},v=async(c,u=[],f=!0)=>{try{await pe(["webhook"],[c.receiver],f,u)}catch(A){M.error(A.response?A.response.statusText:A.message)}},w=async(c,u,f,A=[],K=!0)=>{if(c.stopPropagation(),Gs(u,f)>=4){M.warning(o("notification.resendLimit"));return}if(!Ve.includes(f)){await v(u,A,K);return}if(c){const X=c.currentTarget,G=X.getBoundingClientRect();O.anchorEl=X,O.position={top:G.top+window.scrollY,left:G.left+window.scrollX}}U({channel:f});try{const X=await H(f,u.receiver);await Te(1),U({channel:f,result:X}),(typeof X=="boolean"&&X||Jt(X)&&Object.values(X).every(G=>!!G))&&(await t([f],[u.receiver],K),z.anchorEl||(await Te(.5),ie()))}catch(X){M.error(X.message)}},N=c=>{q(u=>({...u,dateRange:c,page:1}))},P=(c,u,f,A)=>{c.stopPropagation();const K=f.filter(ee=>ee!==u);q(ee=>({...ee,[A]:K,page:1}))},k=ce(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:c=>{const{receiverUser:u,receiver:f}=j[c];return u?e.jsxs(R,{"data-cy":`member-name-${u.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(yt,{src:`${u.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:f,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(we,{children:u.fullName})]},f):e.jsx(gs,{size:14,responsive:!1,compact:!0,copyable:!1,did:f})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:B.walletSendStatus??[],customFilterListOptions:{render:c=>e.jsx(ve,{list:c,label:"Wallet",onDelete:(u,f)=>{u.stopPropagation(),P(u,f,k[1].options.filterList,"walletSendStatus")}}),update:Ie},filterOptions:{names:b,fullWidth:!0,logic:Ae,display:(c,u,f,A)=>e.jsx(Fe,{label:"Wallet",filterList:c,onChange:u,index:f,column:A,filterValues:b})},customBodyRenderLite:c=>{const{walletSendStatus:u,walletSendAt:f,walletSendFailedReason:A}=j[c];return e.jsx(be,{status:u,updatedAt:f,reason:A,channel:"wallet",onResend:K=>w(K,j[c],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{pushKitSendStatus:u,pushKitSendAt:f,pushKitSendFailedReason:A}=j[c];return e.jsx(be,{status:u,updatedAt:f,reason:A,channel:"pushkit",onResend:K=>w(K,j[c],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:B.pushKitSendStatus??[],customFilterListOptions:{render:c=>e.jsx(ve,{list:c,label:"Push Kit",onDelete:(u,f)=>{u.stopPropagation(),P(u,f,k[2].options.filterList,"pushKitSendStatus")}}),update:Ie},filterOptions:{names:b,fullWidth:!0,logic:Ae,display:(c,u,f,A)=>e.jsx(Fe,{label:"Push Kit",filterList:c,onChange:u,index:f,column:A,filterValues:b})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{emailSendStatus:u,emailSendAt:f,emailSendFailedReason:A}=j[c];return e.jsx(be,{status:u,updatedAt:f,reason:A,channel:"email",onResend:K=>w(K,j[c],"email",[],!1)})},filter:!0,filterType:"custom",filterList:B.emailSendStatus??[],customFilterListOptions:{render:c=>e.jsx(ve,{list:c,label:"Email",onDelete:(u,f)=>{u.stopPropagation(),P(u,f,k[3].options.filterList,"emailSendStatus")}}),update:Ie},filterOptions:{names:b,fullWidth:!0,logic:Ae,display:(c,u,f,A)=>e.jsx(Fe,{label:"Email",filterList:c,onChange:u,index:f,column:A,filterValues:b})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{webhook:u}=j[c];if(!u)return null;const f=Object.entries(u)[0];if(!f)return null;const[A,K]=f,ee=K[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(we,{maxLength:30,children:A},A),e.jsx(be,{status:ee.status,updatedAt:ee.sendAt,reason:ee.failedReason,channel:"webhook",onResend:X=>w(X,j[c],"webhook",[A],!1)})]},A)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:c=>{const{createdAt:u}=j[c];return e.jsx(Nt,{value:u,locale:l,shouldUpdate:!0})}}}],[j,l,B,o]),ae=[e.jsx(it,{value:B.dateRange,onChange:N},"date-picker"),e.jsx(me,{variant:"contained",size:"small",color:"primary",loading:E,startIcon:e.jsx(Lt,{}),onClick:()=>D(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(Zs,{children:e.jsxs(gt,{theme:Ft(),children:[e.jsx(St,{className:"receivers-table",locale:l,loading:E,columns:k,data:j,onChange:h,options:i,customButtons:ae,components:{TableFilterList:c=>e.jsx(at,{...c,itemComponent:u=>e.jsx(De,{...u,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(qe,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:ie,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(Qs,{children:[e.jsxs(oe,{variant:"body1",component:"div",className:"check-title",children:[L==null?void 0:L.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:V(L==null?void 0:L.channel).map(c=>{var K,ee;const{type:u,pass:f,fail:A}=c;return!(L!=null&&L.result)||(K=L==null?void 0:L.result)!=null&&K[u]?e.jsxs(oe,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(ee=L==null?void 0:L.result)!=null&&ee[u]?Ee.success.main:"inherit"},children:[L!=null&&L.result?e.jsx(Ot,{}):e.jsx(xt,{size:12,sx:{color:Ee.primary.main}}),e.jsx("span",{children:f})]},u):e.jsxs(oe,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:Ee.error.main},children:[e.jsx(Dt,{}),e.jsx("span",{children:A})]},u)})})]})}),z.anchorEl&&e.jsx(qe,{open:!!z.anchorEl,anchorReference:"anchorPosition",anchorPosition:z.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(rt,{loading:s,onCancel:re,onConfirm:y})})]})})})}const Xs=T.memo(zt),Zs=ue.div`
2
+ td.MuiTableCell-footer {
3
+ border: none !important;
4
+ }
5
+ .sent-status-cell {
6
+ .resend-btn {
7
+ display: none;
8
+ }
9
+ &:hover {
10
+ .resend-btn {
11
+ display: flex;
12
+ }
13
+ }
14
+ }
15
+ `,Qs=ue.div`
16
+ padding: 8px 16px;
17
+ .check-title {
18
+ font-weight: 500;
19
+ margin-bottom: 8px;
20
+ &::first-letter {
21
+ text-transform: uppercase;
22
+ }
23
+ }
24
+ .check-item {
25
+ svg {
26
+ font-size: 16px;
27
+ }
28
+ font-size: 12px;
29
+ }
30
+ `,ye=n=>n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}K`:n;function en(n){const{wallet:t,push:s,email:o,webhook:l}=n;return[{name:"Wallet",value:e.jsx(he,{item:t})},{name:"Push",value:e.jsx(he,{item:s})},{name:"Email",value:e.jsx(he,{item:o})},...l.total>0?[{name:"Webhook",value:e.jsx(he,{item:l,isWebhook:!0})}]:[]]}function tn(n,t,s){const{wallet:o,push:l,email:r,webhook:S}=n;return[{name:"Wallet",value:e.jsx(xe,{loading:s,channel:W.NOTIFICATION_SEND_CHANNEL.WALLET,item:o,onResend:t})},{name:"Push",value:e.jsx(xe,{loading:s,channel:W.NOTIFICATION_SEND_CHANNEL.PUSH,item:l,onResend:t})},{name:"Email",value:e.jsx(xe,{loading:s,channel:W.NOTIFICATION_SEND_CHANNEL.EMAIL,item:r,onResend:t})},...S.total>0?[{name:"Webhook",value:e.jsx(xe,{loading:s,channel:W.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:S,isWebhook:!0,onResend:t})}]:[]]}Le.propTypes={statistics:x.object.isRequired,onResend:x.func,mode:x.oneOf(["simple","detail"]),resending:x.bool};Le.defaultProps={mode:"simple",onResend:()=>{},resending:!1};he.propTypes={item:x.object.isRequired,isWebhook:x.bool};he.defaultProps={isWebhook:!1};function he({item:n,isWebhook:t=!1}){const{t:s}=le(),o=t?n.success.length:n.success,l=n.total,r=o===l?"success":"failed";return e.jsx(R,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,children:e.jsx(R,{display:"flex",alignItems:"center",gap:1,children:e.jsxs(de,{config:{status:r},enableTooltip:!1,children:[ye(o)," / ",ye(l)," ",s("notification.sendStatus.success")]})})})}xe.propTypes={item:x.object.isRequired,isWebhook:x.bool,channel:x.string,onResend:x.func,loading:x.bool};xe.defaultProps={isWebhook:!1,channel:W.NOTIFICATION_SEND_CHANNEL.WALLET,onResend:()=>{},loading:!1};function xe({channel:n,item:t,isWebhook:s=!1,onResend:o,loading:l}){const{t:r}=le(),{success:S,failed:p,pending:m}=t,a=Js(n),E=s?S.length:S,I=s?p.length:p,j=s?m.length:m,C=async U=>{U.stopPropagation();const $=s?[...new Set([...S,...p].map(Q=>Q))]:[];await o([n],[],!0,$)},O=E+I,z=O>0?E/O*100:0,L=O>0?I/O*100:0;return e.jsxs(sn,{successRatio:z,failedRatio:L,children:[e.jsxs(oe,{variant:"h6",children:[a," (",t.total,")"]}),e.jsxs(oe,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:He.success,fontWeight:600,fontSize:24},children:ye(E)}),e.jsx("small",{style:{paddingLeft:4},children:r("notification.sendStatus.success")})]}),e.jsxs(R,{className:"unsent-area",children:[e.jsxs(R,{children:[e.jsxs(de,{config:{status:"failed"},enableTooltip:!1,children:[ye(I)," ",r("notification.sendStatus.failed")]}),e.jsxs(de,{config:{status:"pending"},enableTooltip:!1,children:[ye(j)," ",r("notification.sendStatus.pending")]})]}),I>0&&e.jsx(R,{className:"resend-btn",children:e.jsx(me,{size:"small",color:"primary",loading:l,variant:"contained",startIcon:e.jsx(Ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:C,children:r("notification.resend")})})]})]})}function Le({statistics:n,mode:t="simple",onResend:s,resending:o}){const l=ce(()=>t==="simple"?en(n):tn(n,s,o),[n,t]);return t==="simple"?e.jsx("div",{children:l.map(r=>e.jsx(Tt,{style:{alignItems:"flex-start",marginBottom:t==="simple"?0:16},valueComponent:"div",nameWidth:100,name:r.name,children:r.value},r.name))}):e.jsx(lt,{container:!0,spacing:2,children:l.map(r=>e.jsx(lt,{item:!0,md:4,sm:6,xs:12,children:r.value},r.name))})}const sn=ue(R)`
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ padding: 16px;
35
+ border-radius: 8px;
36
+ background: ${({successRatio:n,failedRatio:t,theme:s})=>n===0&&t===0?s.palette.grey[300]:`linear-gradient(to right, ${Kt(s.palette.success.light,.4)} ${n}%, ${s.palette.grey[100]} ${n}%)`};
37
+ transition: 'background 0.5s ease';
38
+ cursor: pointer;
39
+ .unsent-area {
40
+ width: 100%;
41
+ position: relative;
42
+ .resend-btn {
43
+ position: absolute;
44
+ right: 0;
45
+ bottom: 0;
46
+ }
47
+ }
48
+ `;Bt.propTypes={notification:x.object.isRequired,onCancel:x.func,blocklet:x.object.isRequired,tab:x.string};function Bt({notification:n,onCancel:t=()=>{},blocklet:s,tab:o="info"}){const{t:l,locale:r}=le(),{getComponent:S,resendNotification:p}=Qe(),[m,a]=T.useState(!1),E=ce(()=>S(n.componentDid)||s,[s,n.componentDid]),I=Ce({tab:o||"info"}),j=T.useCallback(async(d,g,b=!0,D=[])=>{var i;if(!d.length||!n.id)return;const F=g.length>0?g:(i=n==null?void 0:n.receivers)==null?void 0:i.map(h=>h.receiver);if(!F.length)return;let _=[...d];if(_.includes(W.NOTIFICATION_SEND_CHANNEL.PUSH)&&!kt(s)&&(M.warning(l("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),_=_.filter(h=>h!==W.NOTIFICATION_SEND_CHANNEL.PUSH)),_.includes(W.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!_t(s)&&(M.warning(l("notification.sendStatus.reason.unavailable",{channel:"Email"})),_=_.filter(h=>h!==W.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!_.length)try{a(!0),await p({notificationId:n.id,receivers:F,channels:_,resendFailedOnly:b,..._.includes("webhook")&&D.length?{webhookUrls:D}:{}}),M.success("Message has been sent!")}catch(h){console.error("handleResend error",{error:h}),M.error(h.response?h.response.statusText:h.message)}finally{a(!1)}},[s,n.id,n==null?void 0:n.receivers,p,l]),C=ce(()=>rs(n),[n]),O=ce(()=>os(n),[n]),z=ce(()=>C?n==null?void 0:n.actorInfo:[],[n]),L=ce(()=>{var d;return(s==null?void 0:s.did)||((d=s==null?void 0:s.meta)==null?void 0:d.did)||""},[s]);function U(){return[{name:l("notification.from"),value:C&&O?e.jsx(ps,{actors:z,teamDid:L,size:32,showName:!0}):e.jsx(fs,{size:32,blocklet:E,showName:!0,hideDot:!0})},{name:l("notification.notificationTitle"),value:e.jsx(we,{maxLength:50,children:n.title})},{name:l("notification.body"),value:C?e.jsx(ms,{notification:n,blocklet:s}):e.jsx(hs,{notification:n,rows:0})},{name:l("notification.severity"),value:e.jsx(Re,{severity:n.severity})},{name:l("notification.createdAt"),value:e.jsx(ts,{value:n.createdAt,locale:r,shouldUpdate:!0,type:"all"})}].map(g=>e.jsx(Tt,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:g.name,children:g.value},g.name))}const $={info:{label:l("common.basicInfo"),value:"info",component:U},receivers:{label:l("notification.receiver"),value:"receivers"},statistics:{label:l("notification.statistics"),value:"statistics"}},Q=Object.values($).map(({label:d,value:g})=>({label:d,value:g})),B=$[I.tab]||$.info,q=d=>{I.tab=d};return e.jsx(Ct,{title:l("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{I.tab="info",t()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(an,{children:[e.jsx(R,{mx:3,className:"tabs",children:e.jsx(vt,{tabs:Q,current:I.tab,onChange:q,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[I.tab==="receivers"&&e.jsx(Xs,{notificationId:n.id,resending:m,handleResend:j}),I.tab==="statistics"&&e.jsx(Le,{statistics:n.statistics,mode:"detail",resending:m,onResend:j}),I.tab==="info"&&e.jsx(B.component,{})]})]})})}const nn=T.memo(Bt),an=ue.div`
49
+ & > .notification-row {
50
+ padding: 0;
51
+ }
52
+
53
+ .tabs {
54
+ margin: 0;
55
+ }
56
+ .body {
57
+ margin-top: 16px;
58
+ }
59
+
60
+ .channel-item {
61
+ display: flex;
62
+ padding: 4px;
63
+ justify-content: flex-start;
64
+ align-items: center;
65
+ gap: 8px;
66
+ > p {
67
+ font-size: 15px;
68
+ }
69
+ .resend-btn {
70
+ svg {
71
+ font-size: 16px;
72
+ }
73
+ display: flex;
74
+ align-items: center;
75
+ font-size: 12px;
76
+ cursor: pointer;
77
+ &.disabled {
78
+ cursor: not-allowed;
79
+ color: ${Ee.text.disabled};
80
+ }
81
+ }
82
+ }
83
+ `;Se.propTypes={blocklet:x.object,label:x.string};Se.defaultProps={blocklet:null,label:""};const rn=ue.div`
84
+ display: flex;
85
+ justify-items: flex-start;
86
+ align-items: center;
87
+ gap: 8px;
88
+ .name {
89
+ display: block;
90
+ max-width: 260px;
91
+ white-space: nowrap;
92
+ overflow: hidden;
93
+ text-overflow: ellipsis;
94
+ }
95
+ `;function Se({blocklet:n,label:t}){var s;return e.jsx(rn,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(It,{size:24,blocklet:n,ancestors:n.ancestors}),e.jsx("span",{className:"name",children:n.title||((s=n.meta)==null?void 0:s.title)})]}):e.jsx("span",{className:"name",children:t})})}ot.propTypes={list:x.array.isRequired,label:x.string.isRequired,onDelete:x.func};ot.defaultProps={onDelete:()=>{}};function ot({list:n,label:t,onDelete:s}){return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(oe,{children:[t,": "]}),n.map(o=>e.jsx(Je,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(Re,{severity:o})}),onDelete:l=>s(l,o)},o))]})}function on(n){return e.jsx(nt,{...n,renderLabel:t=>e.jsx(Re,{severity:t})})}function ln({customTableButtons:n}){var pe;const{t,locale:s}=le(),[o,l]=T.useState(!1),{data:r,paging:S,blocklet:p,fetch:m,getComponent:a,componentDids:E,inService:I,teamDid:j}=Qe(),C=T.useRef(null),[O,z]=T.useState(null),[L,U]=T.useState("info"),$=vs(),[Q,B]=T.useState(!1),q=`notification-records-${(pe=p.meta)==null?void 0:pe.did}`,d=ss(q),[g,b]=T.useState({pageSize:d.rowsPerPage||10,page:d.page?d.page+1:1,dids:d.dids||[],dateRange:d.dateRange||[ne().subtract(1,"month").startOf("day").toDate(),ne().endOf("day").toDate()]}),D=ce(()=>{if(!p.children||!p.children.length)return[];const y=[];return p.children.forEach(v=>{var N;const w=v.did||((N=v.meta)==null?void 0:N.did);E.includes(w)&&(v.ancestors=[p],y.push(v))}),y},[E,p]),F=async y=>{try{l(!0),await m(y),l(!1)}finally{l(!1)}};T.useEffect(()=>{F(g)},[g]),T.useEffect(()=>{const y=r.find(v=>v.id===(O==null?void 0:O.id));O&&y&&z({...y})},[r]);const _=(y,v,w,N)=>{y.stopPropagation();const P=w.filter(k=>k!==v);b(k=>({...k,[N]:P,page:1}))},i=({page:y,rowsPerPage:v,filterList:w})=>{const[N=[],,,,P=[]]=w;g.pageSize!==v?b(k=>({...k,pageSize:v,page:1})):g.page!==y+1?b(k=>({...k,page:y+1})):je(g.dids,N)?je(g.severities,P)||b(k=>({...k,severities:P,page:1})):b(k=>({...k,dids:N,page:1}))},h=T.useCallback(()=>{z(null),U("info")},[]),H=T.useCallback(()=>{m(g)},[m,g]),V=[{label:t("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:y=>y.map((v,w)=>{var P;if(v==="system")return e.jsx("span",{children:t("notification.system")},`system-${w}`);const N=D.find(k=>{var c;return(k.did||((c=k.meta)==null?void 0:c.did))===v});return e.jsx(Se,{blocklet:N,label:(N==null?void 0:N.title)||((P=N==null?void 0:N.meta)==null?void 0:P.title)},v)}),update:(y,v,w)=>(y[w].splice(v,1),y)},filterOptions:{names:D,logic:(y,v)=>v.length?!v.includes(y):!1,display:(y,v,w,N)=>e.jsxs(Y,{style:{width:"380px"},children:[e.jsx(Mt,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs($t,{multiple:!0,value:y[w],renderValue:P=>e.jsx(R,{display:"flex",gap:1,alignItems:"center",style:{overflow:"hidden",textOverflow:"ellipsis"},children:P.map(k=>{var c;if(k==="system")return e.jsx("span",{children:t("notification.system")},k);const ae=D.find(u=>{var A;return(u.did||((A=u.meta)==null?void 0:A.did))===k});return e.jsx(Se,{blocklet:ae,label:(ae==null?void 0:ae.title)||((c=ae==null?void 0:ae.meta)==null?void 0:c.title)},k)})}),onChange:P=>{y[w]=P.target.value,v(y[w],w,N)},children:[e.jsx(ct,{value:"system",children:t("notification.system")}),D.map(P=>{var ae,c;const k=P.did||((ae=P.meta)==null?void 0:ae.did);return e.jsx(ct,{value:k,children:e.jsx(Se,{blocklet:P,label:P.title||((c=P.meta)==null?void 0:c.title)})},k)})]})]})},customBodyRenderLite:y=>{var N,P;const v=r[y],w=a(v.componentDid);return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[w?e.jsx(It,{size:32,blocklet:w,ancestors:w.ancestors??[]}):e.jsx(xs,{blocklet:p,size:32}),e.jsx(we,{maxLength:50,children:((N=w==null?void 0:w.meta)==null?void 0:N.title)||((P=p==null?void 0:p.meta)==null?void 0:P.title)})]})}}},{label:t("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:y=>{const v=r[y],{receivers:w}=v;return e.jsx(Ut,{total:w.length,renderSurplus:N=>N<100?e.jsxs("span",{children:["+",N]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:N=>{N.stopPropagation(),z(v),U("receivers")},children:w.map(N=>{const{receiverUser:P}=N,k=Et(P.avatar,j,I);return e.jsx(yt,{alt:P.fullName,src:`${k}?imageFilter=resize&w=48&h=48`,size:32,did:N.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},N.receiver)})})}}},{label:t("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:y=>{const v=r[y];return e.jsx(R,{onClick:w=>{w.stopPropagation(),z(v),U("statistics")},children:e.jsx(Le,{statistics:v.statistics})})}}},{label:t("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:y=>{const v=r[y];return e.jsx(we,{maxLength:50,children:v.title})}}},{label:t("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:y=>{const v=r[y];return e.jsx(Re,{severity:v.severity})},filter:!0,filterType:"custom",filterList:g.severities??[],customFilterListOptions:{render:y=>e.jsx(ot,{list:y,label:t("notification.severity"),onDelete:(v,w)=>{v.stopPropagation(),_(v,w,V[4].options.filterList,"severities")}}),update:Ie},filterOptions:{names:pt,fullWidth:!0,logic:Ae,display:(y,v,w,N)=>e.jsx(on,{label:t("notification.severity"),filterList:y,onChange:v,index:w,column:N,filterValues:pt})}}},{label:t("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:y=>{const{createdAt:v}=r[y];return e.jsx(Nt,{value:v,locale:s,shouldUpdate:!0})}}}],ie=y=>{b(v=>({...v,dateRange:y,page:1}))},re=[e.jsxs(R,{display:"flex",alignItems:"center",gap:1.5,children:[e.jsx(Ht,{onClick:()=>B(!0),sx:{p:$?0:void 0},children:e.jsx(is,{})},"settings"),$?e.jsx(oe,{children:t("common.setting")}):null]}),...n||[]];return e.jsxs(R,{ref:C,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(cn,{children:e.jsx(gt,{theme:Ft(),children:e.jsx(St,{className:"main-table",verticalKeyWidth:100,loading:o,locale:s,columns:V,data:r,durable:q,onChange:i,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:S.page-1,rowsPerPage:S.pageSize,count:S.total,...d,onRowClick:(y,{dataIndex:v})=>{z(r[v])}},customPreButtons:[e.jsx(it,{value:g.dateRange,onChange:ie})],customButtons:re,components:{TableFilterList:y=>e.jsx(at,{...y,itemComponent:v=>e.jsx(De,{...v,canDelete:w=>{var P;const N=(P=w==null?void 0:w.columnNames)==null?void 0:P[(w==null?void 0:w.index)||0];return(N==null?void 0:N.name)==="sender"}})})}})})}),O&&e.jsx(nn,{refresh:H,onCancel:h,notification:O,blocklet:p,tab:L}),e.jsx(Ct,{title:`${t("common.notification")} ${t("common.setting")}`,fullWidth:!0,maxWidth:"md",open:Q,onClose:()=>B(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(R,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx(Is,{})})})]})}const cn=ue.div`
96
+ td.MuiTableCell-footer {
97
+ border: none !important;
98
+ }
99
+ .sent-status-cell {
100
+ .resend-btn {
101
+ display: none;
102
+ }
103
+ &:hover {
104
+ .resend-btn {
105
+ display: flex;
106
+ }
107
+ }
108
+ }
109
+
110
+ .custom-toobar-btns {
111
+ gap: 4px;
112
+ }
113
+ `;Wt.propTypes={blocklet:x.object.isRequired,customTableButtons:x.array};Wt.defaultProps={customTableButtons:[]};function Wt({blocklet:n={},customTableButtons:t}){return e.jsx(Os,{blocklet:n,children:e.jsx(ln,{customTableButtons:t})})}export{Wt as default};
@@ -1 +1 @@
1
- import{j as o,aa as r,H as i,T as a}from"./vendor-mui-core-UZpb7wT7.js";import{L as f,r as g}from"./vendor-react-DEoibe3W.js";import"./index-u-w3iMC9.js";import"./vendor-arcblock-CN2B_oTr.js";import"./vendor-ux-did-connect-TEE6cGq6.js";import"./vendor-utils-rHXShPKm.js";import"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";const p=(e,t)=>[e,...Array.isArray(t)?t:[t]],l=(e=2)=>({overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"});function n({sx:e,...t}){const s=p({display:"flex",flexWrap:"wrap",mx:-1},e);return o.jsx(r,{sx:s,...t})}n.propTypes={sx:i.object};n.defaultProps={sx:{}};function w({icon:e}){const[t,s]=g.useState(!1);return!e||t?null:typeof e=="string"?o.jsx(r,{component:"img",src:e,alt:"",sx:{width:1,height:1},onError:()=>s(!0)}):e}w.propTypes={icon:i.oneOfType([i.string,i.node]).isRequired};function u({title:e,desc:t,extra:s,cover:c,icon:d,to:x,sx:h}){const m=p({position:"relative",flexBasis:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},maxWidth:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},mb:{xs:2,md:6},px:1},h);return o.jsx(r,{sx:m,children:o.jsx(r,{component:f,to:x,target:"_blank",sx:{display:"flex",flexDirection:"column",gap:1,height:1,pt:0,color:"inherit",textDecoration:"none",borderRadius:1,cursor:"pointer"},children:o.jsxs(r,{children:[o.jsxs(r,{sx:{position:"relative"},children:[c,d&&o.jsx(r,{sx:{position:"absolute",top:44,left:16,zIndex:1,width:56,height:56},children:o.jsx(w,{icon:d})})]}),o.jsx(a,{sx:{mt:1,fontSize:"1.25rem",fontWeight:600,...l()},children:e}),t&&o.jsx(a,{variant:"body2",sx:{my:1,...l(),color:"text.secondary"},children:t}),s]})})})}u.propTypes={title:i.string.isRequired,desc:i.string.isRequired,extra:i.node.isRequired,cover:i.string.isRequired,icon:i.string.isRequired,to:i.string.isRequired,sx:i.object.isRequired};const k="/.well-known/service/static/assets/doc-board-bg-DWZHV9Ng.png";function b({board:e,sx:t,...s}){return o.jsx(u,{date:e.createdAt,sx:t,to:e.link,title:e.title,desc:e.desc,cover:o.jsx(r,{sx:{position:"relative",paddingTop:`${9/16*100}%`,border:1,borderColor:"divider",borderRadius:1,overflow:"hidden"},children:o.jsx(r,{component:"img",src:k,alt:"",sx:{position:"absolute",top:0,left:0,width:1,filter:c=>c.palette.mode==="dark"?"brightness(0.28) contrast(1.1)":"none"}})}),icon:e.icon,...s})}b.propTypes={board:i.object.isRequired,sx:i.object.isRequired};function C(){const e=[{id:"1",title:"Blocklet Platform",desc:"Guide to understand and build on our blocklet platform",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/blocklet-developer/en/getting-started"},{id:"2",title:"Create Blocklet",desc:"Build blocklet with just one command line.",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/createblocklet/en/quick-start"},{id:"3",title:"Blocklet Launcher",desc:"Streamlining Blocklet Launching.",icon:"https://www.arcblock.io/docs/uploads/5a4f4716bc8061532a535fe816a9169c.png",link:"https://www.arcblock.io/docs/launcher/en/launcher-welcome"},{id:"4",title:"DID Spaces",desc:"Digital Spaces for Decentralized Identity (DID)",icon:"https://www.arcblock.io/docs/uploads/3a8b142d7c940c57eced71eddba2ff19.png",link:"https://www.arcblock.io/docs/did-spaces/en/did-spaces-getting-started"},{id:"5",title:"DID Wallet",desc:"DID Wallet Support docs",icon:"https://www.arcblock.io/docs/uploads/59ddb28f405ee670428e5fe1ff12d104.png",link:"https://www.arcblock.io/docs/did-wallet/en/get-started"},{id:"6",title:"DID Names",desc:"Naming Service based on NFT and verifiable credentials",icon:"https://www.didnames.io/favicon.ico?imageFilter=resize&w=32",link:"https://www.arcblock.io/docs/did-domain/en/did-domain-faq"},{id:"7",title:"Blockchain",desc:"The ledger for ArcBlock ecosystem",icon:"https://www.arcblock.io/docs/uploads/4a20c152faae0f104ed0815ff3b8b48b.png",link:"https://www.arcblock.io/docs/blockchain/en/blockchain-how-to-guides"},{id:"8",title:"DID Connect",desc:"The open protocol and development kit for connecting users and dapps",icon:"https://www.arcblock.io/docs/uploads/d189118f89b56e9d5b03ad5a0212a4ab.png",link:"https://www.arcblock.io/docs/did-connect/en/developer-guides"}];return o.jsx(n,{children:e.map(t=>o.jsx(b,{board:t},t.id))})}export{C as default};
1
+ import{j as o,aa as r,H as i,T as a}from"./vendor-mui-core-D_bnq77o.js";import{L as f,r as g}from"./vendor-react-DEoibe3W.js";import"./index-CIkPfxzG.js";import"./vendor-arcblock-uz9DVywv.js";import"./vendor-ux-did-connect-DHrruicZ.js";import"./vendor-utils-rHXShPKm.js";import"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";const p=(e,t)=>[e,...Array.isArray(t)?t:[t]],l=(e=2)=>({overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"});function n({sx:e,...t}){const s=p({display:"flex",flexWrap:"wrap",mx:-1},e);return o.jsx(r,{sx:s,...t})}n.propTypes={sx:i.object};n.defaultProps={sx:{}};function w({icon:e}){const[t,s]=g.useState(!1);return!e||t?null:typeof e=="string"?o.jsx(r,{component:"img",src:e,alt:"",sx:{width:1,height:1},onError:()=>s(!0)}):e}w.propTypes={icon:i.oneOfType([i.string,i.node]).isRequired};function u({title:e,desc:t,extra:s,cover:c,icon:d,to:x,sx:h}){const m=p({position:"relative",flexBasis:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},maxWidth:{xs:"100%",sm:"50%",md:"33.33%",lg:"25%"},mb:{xs:2,md:6},px:1},h);return o.jsx(r,{sx:m,children:o.jsx(r,{component:f,to:x,target:"_blank",sx:{display:"flex",flexDirection:"column",gap:1,height:1,pt:0,color:"inherit",textDecoration:"none",borderRadius:1,cursor:"pointer"},children:o.jsxs(r,{children:[o.jsxs(r,{sx:{position:"relative"},children:[c,d&&o.jsx(r,{sx:{position:"absolute",top:44,left:16,zIndex:1,width:56,height:56},children:o.jsx(w,{icon:d})})]}),o.jsx(a,{sx:{mt:1,fontSize:"1.25rem",fontWeight:600,...l()},children:e}),t&&o.jsx(a,{variant:"body2",sx:{my:1,...l(),color:"text.secondary"},children:t}),s]})})})}u.propTypes={title:i.string.isRequired,desc:i.string.isRequired,extra:i.node.isRequired,cover:i.string.isRequired,icon:i.string.isRequired,to:i.string.isRequired,sx:i.object.isRequired};const k="/.well-known/service/static/assets/doc-board-bg-DWZHV9Ng.png";function b({board:e,sx:t,...s}){return o.jsx(u,{date:e.createdAt,sx:t,to:e.link,title:e.title,desc:e.desc,cover:o.jsx(r,{sx:{position:"relative",paddingTop:`${9/16*100}%`,border:1,borderColor:"divider",borderRadius:1,overflow:"hidden"},children:o.jsx(r,{component:"img",src:k,alt:"",sx:{position:"absolute",top:0,left:0,width:1,filter:c=>c.palette.mode==="dark"?"brightness(0.28) contrast(1.1)":"none"}})}),icon:e.icon,...s})}b.propTypes={board:i.object.isRequired,sx:i.object.isRequired};function C(){const e=[{id:"1",title:"Blocklet Platform",desc:"Guide to understand and build on our blocklet platform",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/blocklet-developer/en/getting-started"},{id:"2",title:"Create Blocklet",desc:"Build blocklet with just one command line.",icon:"https://www.arcblock.io/favicon.ico",link:"https://www.arcblock.io/docs/createblocklet/en/quick-start"},{id:"3",title:"Blocklet Launcher",desc:"Streamlining Blocklet Launching.",icon:"https://www.arcblock.io/docs/uploads/5a4f4716bc8061532a535fe816a9169c.png",link:"https://www.arcblock.io/docs/launcher/en/launcher-welcome"},{id:"4",title:"DID Spaces",desc:"Digital Spaces for Decentralized Identity (DID)",icon:"https://www.arcblock.io/docs/uploads/3a8b142d7c940c57eced71eddba2ff19.png",link:"https://www.arcblock.io/docs/did-spaces/en/did-spaces-getting-started"},{id:"5",title:"DID Wallet",desc:"DID Wallet Support docs",icon:"https://www.arcblock.io/docs/uploads/59ddb28f405ee670428e5fe1ff12d104.png",link:"https://www.arcblock.io/docs/did-wallet/en/get-started"},{id:"6",title:"DID Names",desc:"Naming Service based on NFT and verifiable credentials",icon:"https://www.didnames.io/favicon.ico?imageFilter=resize&w=32",link:"https://www.arcblock.io/docs/did-domain/en/did-domain-faq"},{id:"7",title:"Blockchain",desc:"The ledger for ArcBlock ecosystem",icon:"https://www.arcblock.io/docs/uploads/4a20c152faae0f104ed0815ff3b8b48b.png",link:"https://www.arcblock.io/docs/blockchain/en/blockchain-how-to-guides"},{id:"8",title:"DID Connect",desc:"The open protocol and development kit for connecting users and dapps",icon:"https://www.arcblock.io/docs/uploads/d189118f89b56e9d5b03ad5a0212a4ab.png",link:"https://www.arcblock.io/docs/did-connect/en/developer-guides"}];return o.jsx(n,{children:e.map(t=>o.jsx(b,{board:t},t.id))})}export{C as default};