@abtnode/blocklet-services 1.16.29-beta-ec04c755 → 1.16.29-beta-2eaf40bc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +6 -0
- package/api/libs/push-kit/index.js +1 -1
- package/api/routes/openapi.js +145 -0
- package/api/routes/opencomponent.js +141 -0
- package/api/routes/user.js +21 -21
- package/dist/assets/{Add-CbycMEbf.js → Add-C5zWPWbi.js} +1 -1
- package/dist/assets/{AddBox-DTM_80hR.js → AddBox-C4A7DDm4.js} +1 -1
- package/dist/assets/{Alert-YB1c66Kp.js → Alert-D91U5h--.js} +1 -1
- package/dist/assets/{ArrowDropDown-CyWdnmLZ.js → ArrowDropDown-Cq32DOpt.js} +1 -1
- package/dist/assets/{Avatar-D9rpNCqX.js → Avatar-XXXVLUFk.js} +1 -1
- package/dist/assets/{ButtonGroup-DGBxXxUQ.js → ButtonGroup-k3SZjeUa.js} +1 -1
- package/dist/assets/{CheckCircle-CRnx5xGs.js → CheckCircle-CbXxG2JL.js} +1 -1
- package/dist/assets/ChevronRight-BKcNccG9.js +1 -0
- package/dist/assets/{Close-Bn601fxJ.js → Close-CdBP5F4J.js} +1 -1
- package/dist/assets/{CloseOutlined-CptcS6gg.js → CloseOutlined-Crg0BDr4.js} +1 -1
- package/dist/assets/{Delete-Cx0Gf7gM.js → Delete-DlfFien6.js} +1 -1
- package/dist/assets/{DeleteOutline-BzwVBrxY.js → DeleteOutline-De4xAGvs.js} +1 -1
- package/dist/assets/{Done-B1UDtldR.js → Done-DO1tfb2_.js} +1 -1
- package/dist/assets/{Download-BwTZ49dl.js → Download-CVseEK0o.js} +1 -1
- package/dist/assets/{Edit-DYPDizZY.js → Edit-DOJCHJ5p.js} +1 -1
- package/dist/assets/{EditIcon-DrRjhUgU.js → EditIcon-Bg4AkV00.js} +1 -1
- package/dist/assets/{Error-BS_LdXbq.js → Error-CQmWghPs.js} +1 -1
- package/dist/assets/{ExpandMore-CKKkjQcY.js → ExpandMore-DD2GykPj.js} +1 -1
- package/dist/assets/{FilterList-MtVGweDW.js → FilterList-QafrkXbd.js} +1 -1
- package/dist/assets/{FormControl-D32uXM3n.js → FormControl-Kt4xANtI.js} +1 -1
- package/dist/assets/{FormControlLabel-e33RviPs.js → FormControlLabel-B6ISinfm.js} +1 -1
- package/dist/assets/{FormGroup-BLcBQcJn.js → FormGroup-BEMyIGSj.js} +1 -1
- package/dist/assets/{Google-Duvh4o_V.js → Google-DGP2JaKw.js} +3 -3
- package/dist/assets/{Hidden-BLWrU9rp.js → Hidden-kl5Tbw1B.js} +1 -1
- package/dist/assets/{InfoOutlined-gB9H6_Ii.js → InfoOutlined-BRuBRFbl.js} +1 -1
- package/dist/assets/{InputAdornment-BXT7PVpt.js → InputAdornment-C5IWgB4u.js} +1 -1
- package/dist/assets/{InputLabel-CWy9m12B.js → InputLabel-DbdmcDbJ.js} +1 -1
- package/dist/assets/{LastPage-CDtyKz24.js → LastPage-DXISIPs8.js} +1 -1
- package/dist/assets/{Launch-CzAofQSz.js → Launch-CDcio2Tm.js} +1 -1
- package/dist/assets/{LaunchOutlined-CeH0d6B4.js → LaunchOutlined-D8a8pCOt.js} +1 -1
- package/dist/assets/{Link-DD0QeQw6.js → Link-DFzOJFD-.js} +1 -1
- package/dist/assets/{ListItemText-BFKiv21F.js → ListItemText-Bnnk7Gbj.js} +1 -1
- package/dist/assets/{LoadingButton-Dz5AXKd9.js → LoadingButton-DGVicOWa.js} +1 -1
- package/dist/assets/{LockIcon-B487phFo.js → LockIcon-CTWJWfSc.js} +1 -1
- package/dist/assets/{Loop-BYS1LLqK.js → Loop-CbV2fFUd.js} +1 -1
- package/dist/assets/{MoreVert-CO-YEIdW.js → MoreVert-er-bltGF.js} +1 -1
- package/dist/assets/{OpenInNew-BhWlEURK.js → OpenInNew-Bu6iI6eA.js} +1 -1
- package/dist/assets/{Pagination-CydZ_ZS3.js → Pagination-Dz7kgZlB.js} +1 -1
- package/dist/assets/{PlayArrow-Cwl8HhMy.js → PlayArrow-2r36AAmk.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-P8-fp7ZK.js → QuestionMarkCircle-CoIXItlb.js} +1 -1
- package/dist/assets/{RadioGroup-Betu38Nc.js → RadioGroup-C7j1KJ7y.js} +1 -1
- package/dist/assets/{Search-DJGc3pyw.js → Search-CMyGk9R2.js} +1 -1
- package/dist/assets/{Select-BtAvJtd9.js → Select-BeNQ99oP.js} +2 -2
- package/dist/assets/{ServerLogo-D8TxN4Jj.js → ServerLogo-D12k9g2u.js} +1 -1
- package/dist/assets/{Skeleton-DVKyXmm6.js → Skeleton-FXGSJdkA.js} +1 -1
- package/dist/assets/{Slider-BVffQOhx.js → Slider-GjDHfyBj.js} +1 -1
- package/dist/assets/{Stepper-BtyxP6gd.js → Stepper-BF6lz4ut.js} +1 -1
- package/dist/assets/{TextField-ZfIhKMlW.js → TextField-D3XEyFR4.js} +1 -1
- package/dist/assets/{Toolbar-_kp5UmF_.js → Toolbar-_9it32pJ.js} +1 -1
- package/dist/assets/{ViewList-CTVORyRy.js → ViewList-BhIE_M4V.js} +1 -1
- package/dist/assets/{access-control-D13qKQRZ.js → access-control-BWh_6uO-.js} +1 -1
- package/dist/assets/actions-DLO5dlyV.js +1 -0
- package/dist/assets/{add-component-core-BsClbBJx.js → add-component-core-C3OBXrft.js} +1 -1
- package/dist/assets/{add-resource-C27tcyN6.js → add-resource-DdlMvNYe.js} +1 -1
- package/dist/assets/{addon-BR28jmtN.js → addon-1j40gf6h.js} +1 -1
- package/dist/assets/{analytics-Bf2T1Aa5.js → analytics-DVd3xO2s.js} +8 -8
- package/dist/assets/api-C37A8mCN.js +1 -0
- package/dist/assets/ar-DAUz5_Ej.js +1 -0
- package/dist/assets/audit-logs-CJh_A9OZ.js +58 -0
- package/dist/assets/{button-D8ZxWj_Y.js → button-2f4tapJk.js} +1 -1
- package/dist/assets/{click-to-copy-BsmI9ksY.js → click-to-copy-CNizZfqS.js} +1 -1
- package/dist/assets/{complete-0EoJlSKH.js → complete-CTg4NtH_.js} +2 -2
- package/dist/assets/{component-BeTHUdSb.js → component-DyLPRRkR.js} +4 -1
- package/dist/assets/{config-Bc22LHzP.js → config-BBl1Og8k.js} +2 -2
- package/dist/assets/{config-BjGpyxSf.js → config-Cl9yfIWh.js} +1 -1
- package/dist/assets/{config-navigation-CiFM3Pkt.js → config-navigation-RZ9QpkFv.js} +2 -2
- package/dist/assets/{config-space-u4RHkocA.js → config-space-DTE8U19b.js} +1 -1
- package/dist/assets/{confirm-DZzubb9G.js → confirm-CD6_CMUq.js} +1 -1
- package/dist/assets/{connect-B84lJikd.js → connect-B-qpRVvn.js} +1 -1
- package/dist/assets/{connect-Bs0eOgUl.js → connect-DDELE721.js} +1 -1
- package/dist/assets/{connect-to-Dg702AqR.js → connect-to-DMAPIkc9.js} +1 -1
- package/dist/assets/{content-layout-jcciEmtz.js → content-layout-CK5XQfmW.js} +1 -1
- package/dist/assets/{dashboard-D5zK6xk2.js → dashboard-BOQEjKT8.js} +3 -3
- package/dist/assets/de-JXmbvsP-.js +1 -0
- package/dist/assets/{did-address-eujShTX2.js → did-address-GzRMEyk7.js} +1 -1
- package/dist/assets/domain-C3D9kcXD.js +9 -0
- package/dist/assets/domain-list-BRcBrFVB.js +15 -0
- package/dist/assets/es-D_uIRKnu.js +1 -0
- package/dist/assets/{exchange-passport-B9EVUjA6.js → exchange-passport-B9ZrHETZ.js} +1 -1
- package/dist/assets/{fallback-C_4si_rV.js → fallback-rg9fefdL.js} +1 -1
- package/dist/assets/{format-error-CjSMm5Vi.js → format-error-B3RYdl6q.js} +1 -1
- package/dist/assets/fr-BocLckhV.js +1 -0
- package/dist/assets/{fuel-C4na8ybQ.js → fuel-BDMvUxVC.js} +1 -1
- package/dist/assets/{fullpage-Dw1AcFTi.js → fullpage-DFMbQYE_.js} +1 -1
- package/dist/assets/hi-Bn38t0nX.js +1 -0
- package/dist/assets/home-YZ2dUhxo.js +1 -0
- package/dist/assets/id-DuC9mOr4.js +1 -0
- package/dist/assets/iframe-s25HWReH.js +1 -0
- package/dist/assets/{index-CS3NeNhP.js → index-5qacoeSv.js} +1 -1
- package/dist/assets/{index-T01X8GVg.js → index-BCpZXkUS.js} +1 -1
- package/dist/assets/index-BEbMx7tF.js +54 -0
- package/dist/assets/{index-QkFfPTY0.js → index-BPSr4f2j.js} +1 -1
- package/dist/assets/{index-DlS6Nfdi.js → index-BU9mgEVG.js} +1 -1
- package/dist/assets/index-BfhVorqV.js +1290 -0
- package/dist/assets/{index-DssKTsr4.js → index-Bva9FLKW.js} +1 -1
- package/dist/assets/{index-MrjkTnwO.js → index-CGXAjTXD.js} +5 -5
- package/dist/assets/index-CHJwugzh.js +268 -0
- package/dist/assets/{index-CKSMFqMY.js → index-CHbscbku.js} +1 -1
- package/dist/assets/{index-BdOmFQx3.js → index-CcddEj1V.js} +1 -1
- package/dist/assets/index-Ce3CP3Jp.js +721 -0
- package/dist/assets/{index-D3_-uxGg.js → index-CscyFLCJ.js} +1 -1
- package/dist/assets/{index-DcyNKKFa.js → index-CvOK9BmX.js} +1 -1
- package/dist/assets/{index-CsJ48DX9.js → index-Cx1j9azw.js} +1 -1
- package/dist/assets/{index-BOAwzMIx.js → index-D12KUiCG.js} +1 -1
- package/dist/assets/{index-I0PotiiS.js → index-DJLK29SJ.js} +1 -1
- package/dist/assets/{index-bXSSsGyP.js → index-DMq0_62n.js} +7 -7
- package/dist/assets/{index-B3fl5ZNI.js → index-DOU4d3bN.js} +23 -23
- package/dist/assets/{index-BCA-5NcY.js → index-DU7-35nh.js} +1 -1
- package/dist/assets/{index-B3IAFR-c.js → index-Db5U7Aba.js} +1 -1
- package/dist/assets/{index-XerBd5gM.js → index-Dcp0-2H6.js} +1 -1
- package/dist/assets/{index-CoTilh_C.js → index-Dn7MhkOZ.js} +2 -2
- package/dist/assets/{index-BmM6WRMt.js → index-UmXxvIz7.js} +1 -1
- package/dist/assets/{index-DOYpYIlu.js → index-VRudjsk_.js} +12 -12
- package/dist/assets/{index-CpmTHBat.js → index-WDF_phnR.js} +1 -1
- package/dist/assets/{index-CCfWoc62.js → index-Xh4BYwzS.js} +1 -1
- package/dist/assets/{index-_rl2L_ks.js → index-_y2ZXCMC.js} +1 -1
- package/dist/assets/{index-WNkObbJS.js → index-nyOsFIwy.js} +1 -1
- package/dist/assets/{index-D5HpWHRb.js → index-u_IDQFrq.js} +1 -1
- package/dist/assets/{index.es-CSkvA6BL.js → index.es-BySfVRax.js} +1 -1
- package/dist/assets/{index.esm-B1JHctvs.js → index.esm-Cpbu1bqz.js} +1 -1
- package/dist/assets/{invitation-BQDJkTqd.js → invitation-ZiYOpo0m.js} +1 -1
- package/dist/assets/{invite-B09RGp8m.js → invite-CP_9mlTp.js} +1 -1
- package/dist/assets/{issue-passport-B_jBeR91.js → issue-passport-OdsEQRgF.js} +1 -1
- package/dist/assets/item-B9vXmxNy.js +1 -0
- package/dist/assets/ja-B2J7-ZGM.js +1 -0
- package/dist/assets/{jss-plugin-props-sort.esm-CPTwTzr4.js → jss-plugin-props-sort.esm-InWevx1Y.js} +1 -1
- package/dist/assets/ko-TAMb2jXz.js +1 -0
- package/dist/assets/{launch-result-message-DwBMK891.js → launch-result-message-Z1C1sG3K.js} +1 -1
- package/dist/assets/{layout-CvQrD_gZ.js → layout-BJYUy5aS.js} +1 -1
- package/dist/assets/{list-header-ZAiNp7fJ.js → list-header-7mHFR-6j.js} +1 -1
- package/dist/assets/localization-DH4Rcoxd.js +1 -0
- package/dist/assets/{log-C6ON7x0p.js → log-D0ihnCPe.js} +1 -1
- package/dist/assets/{login-wWHcg30F.js → login-BJ99c8Da.js} +1 -1
- package/dist/assets/{login-oauth-callback-CQ285Vg9.js → login-oauth-callback-DXPZbXE8.js} +1 -1
- package/dist/assets/logo-uploader-Cb8u4LYv.js +122 -0
- package/dist/assets/{lost-passport-CexiR3Fy.js → lost-passport-PezCqF0f.js} +3 -3
- package/dist/assets/{lottie-FwjuTraW.js → lottie-BCG4dny2.js} +1 -1
- package/dist/assets/notifications-CKxrvr1-.js +62 -0
- package/dist/assets/{open-window-hBWl30km.js → open-window-CuGAzF2Z.js} +1 -1
- package/dist/assets/overview-BSBWgzbj.js +12 -0
- package/dist/assets/{page-header-CiI4ihlj.js → page-header-C5ecJ6Qd.js} +1 -1
- package/dist/assets/{permission-DPWxsEsJ.js → permission-BEPRmEw3.js} +1 -1
- package/dist/assets/preferences-knw56gSD.js +1 -0
- package/dist/assets/pt-DAmg1w9n.js +1 -0
- package/dist/assets/publish-resource-D_KlfXTF.js +1 -0
- package/dist/assets/{react-CPynQ78n.js → react-Di5TTO9l.js} +3 -3
- package/dist/assets/{redux-Dzi5_x1P.js → redux-tOVF_oDT.js} +1 -1
- package/dist/assets/resource-dialog-5vdlaAuh.js +57 -0
- package/dist/assets/ru-BqJl8PYs.js +1 -0
- package/dist/assets/{selector-f-DWZqru.js → selector-CNsCKDRb.js} +1 -1
- package/dist/assets/session-Cf-ZqG4P.js +1 -0
- package/dist/assets/setup-CbG6rF4U.js +14 -0
- package/dist/assets/{shorten-label-BlEZNxcS.js → shorten-label-CunJMulX.js} +1 -1
- package/dist/assets/{slicedToArray-Bu31_H15.js → slicedToArray-C9-uQLEN.js} +1 -1
- package/dist/assets/{spaces-5xok4VJR.js → spaces-Dm4toCmL.js} +1 -1
- package/dist/assets/{start-B0Kjrb_2.js → start-CrrzSOx-.js} +1 -1
- package/dist/assets/{step-actions-hcblvpy4.js → step-actions-BkxasUm3.js} +1 -1
- package/dist/assets/{studio-DZY4RG0a.js → studio-Cz2NXhoj.js} +1 -1
- package/dist/assets/{switch-control-CQFuZj13.js → switch-control-BOre_YDJ.js} +1 -1
- package/dist/assets/th-CGcwcZWK.js +1 -0
- package/dist/assets/{toUpper-1-4t-eKJ.js → toUpper-6wIhNvu3.js} +1 -1
- package/dist/assets/{transfer-CMipwPHo.js → transfer-DQPf7r9j.js} +1 -1
- package/dist/assets/{uniqBy-BUeS57o_.js → uniqBy-C3O4Rmks.js} +1 -1
- package/dist/assets/{unsubscribe-DPIZA8eJ.js → unsubscribe-DhdgpWxi.js} +1 -1
- package/dist/assets/{url-join-CumQIGHb.js → url-join-DH_b1eAH.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BlvTBdcE.js → use-blocklet-info-for-connect-did-spaces-gtr1x-_o.js} +1 -1
- package/dist/assets/{use-mobile-VmAoH7cf.js → use-mobile-CnnusHmf.js} +1 -1
- package/dist/assets/{useAsync-CHwNvR5w.js → useAsync-6Zzjy7PW.js} +1 -1
- package/dist/assets/{useFormControl-CKIqQYYi.js → useFormControl-DUzGwbSY.js} +1 -1
- package/dist/assets/{useLocalStorage-BwTfVICM.js → useLocalStorage-B-I-NsSz.js} +1 -1
- package/dist/assets/{useSetState-C2Fy5a5C.js → useSetState-Be-I2Gl-.js} +1 -1
- package/dist/assets/{useSlot-qUg8hMqb.js → useSlot-LBVvloQJ.js} +1 -1
- package/dist/assets/user-center-BXOQaeTd.js +1 -0
- package/dist/assets/{user-sessions-CF43osXe.js → user-sessions-CdgU8G0J.js} +1 -1
- package/dist/assets/{util-BgtPa_LA.js → util-CoWq6oMk.js} +1 -1
- package/dist/assets/vi-lYszmNr_.js +1 -0
- package/dist/assets/wrap-locale-Cn1jipF7.js +1 -0
- package/dist/assets/zh-DMGrvlv0.js +2 -0
- package/dist/assets/zh-tw-BkGc-T4k.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +27 -26
- package/dist/assets/ChevronRight-CQFbCeFz.js +0 -1
- package/dist/assets/MoreHoriz-DXVNYHju.js +0 -1
- package/dist/assets/actions-C7XEfs3G.js +0 -1
- package/dist/assets/api-CTyhvZ_-.js +0 -1
- package/dist/assets/ar-C47j1nYN.js +0 -1
- package/dist/assets/audit-logs-DJspdLu1.js +0 -58
- package/dist/assets/de-Cku7GZWy.js +0 -1
- package/dist/assets/domain-dHNHfYFB.js +0 -9
- package/dist/assets/domain-list-BgPUULga.js +0 -12
- package/dist/assets/es-DQdPvLwC.js +0 -1
- package/dist/assets/fr-BANF9nk5.js +0 -1
- package/dist/assets/hi-3nYHQeSr.js +0 -1
- package/dist/assets/home-acB4wYr7.js +0 -1
- package/dist/assets/id-C4ULMWl7.js +0 -1
- package/dist/assets/iframe-D_Wekpko.js +0 -1
- package/dist/assets/index-CFGAX9C8.js +0 -719
- package/dist/assets/index-D2UR_i8S.js +0 -1291
- package/dist/assets/index-DcPK4-8I.js +0 -54
- package/dist/assets/index-GrtnklOv.js +0 -268
- package/dist/assets/item-CdwwMeVt.js +0 -1
- package/dist/assets/ja-DUtPzStV.js +0 -1
- package/dist/assets/ko-DHayH4OX.js +0 -1
- package/dist/assets/localization-DWMiEH8J.js +0 -1
- package/dist/assets/logo-uploader-BGESEvUM.js +0 -122
- package/dist/assets/notifications-DX9G-nKj.js +0 -62
- package/dist/assets/overview-LbqVzqfg.js +0 -12
- package/dist/assets/preferences-CCwHkP3g.js +0 -1
- package/dist/assets/pt-CtekrXAD.js +0 -1
- package/dist/assets/publish-resource-B_tonO3N.js +0 -1
- package/dist/assets/resource-dialog-CWv37rT1.js +0 -57
- package/dist/assets/ru-aujlmrJM.js +0 -1
- package/dist/assets/session-ClfaP8Dd.js +0 -1
- package/dist/assets/setup-B9T0hKlN.js +0 -14
- package/dist/assets/th-WxIih8J2.js +0 -1
- package/dist/assets/user-center-Bk4t_jqb.js +0 -1
- package/dist/assets/vi-DgBgwcpZ.js +0 -1
- package/dist/assets/wrap-locale-DD1QDW-M.js +0 -1
- package/dist/assets/zh-g9dUotWi.js +0 -2
- package/dist/assets/zh-tw-CoNRcnfg.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{r as $,j as o,fI as zn,h as cr,fJ as Wn,fK as un,fo as fn,fL as St,fM as ct,dy as Re,fN as Vn,fO as Hn,fP as Gn,fQ as pn,fR as lr,fS as Yn,fT as Zn,fU as Xn,fV as Jn,eF as Jt,b4 as Qn,cp as Nr,fW as ei,a7 as ti,aM as Ce,u as Ke,N as dn,B as oe,aQ as yt,A as mn,D as ri,fX as ur,ab as lt,ap as $e,a1 as je,l as Qe,P as M,bO as ni,cq as Qt,T as at,I as ii,eH as oi,Z as Te,db as ai,a0 as ut,bl as We,q as et,fY as si,a9 as ze,dn as ci,aV as hn,E as Ee,a as vt,c as er,fZ as gn,bG as yn,aS as li,X as ui,Y as fi,bN as vn,k as pi,az as di,dq as mi}from"./index-D2UR_i8S.js";import{c as hi}from"./index-BCA-5NcY.js";import{d as bt}from"./Add-CbycMEbf.js";import{d as gi}from"./Loop-BYS1LLqK.js";import{d as yi}from"./ViewList-CTVORyRy.js";import{L as vi,S as bi,d as bn}from"./list-header-ZAiNp7fJ.js";import{D as xn,g as xi}from"./index-CS3NeNhP.js";import"./index-GrtnklOv.js";import"./index-CoTilh_C.js";import{g as wn}from"./resource-dialog-CWv37rT1.js";import{T as wi}from"./index-I0PotiiS.js";import{E as En}from"./index-BOAwzMIx.js";import"./fallback-C_4si_rV.js";import"./index-WNkObbJS.js";import{U as Ei}from"./user-sessions-CF43osXe.js";import{u as ke,d as Dr,W as jn,a as ji}from"./dashboard-D5zK6xk2.js";import{W as fr}from"./did-address-eujShTX2.js";import{P as Ue}from"./permission-DPWxsEsJ.js";import{C as Pt}from"./click-to-copy-BsmI9ksY.js";import{F as tr}from"./FormControl-D32uXM3n.js";import{I as rr}from"./InputLabel-CWy9m12B.js";import{S as nr}from"./Select-BtAvJtd9.js";import{T as Sn}from"./TextField-ZfIhKMlW.js";import{D as pr,f as Ve}from"./format-error-CjSMm5Vi.js";import{A as Je}from"./Alert-YB1c66Kp.js";import{_ as Si}from"./useAsync-CHwNvR5w.js";import{I as ir}from"./index-D5HpWHRb.js";import{C as Ot}from"./confirm-DZzubb9G.js";import{u as Pn}from"./session-ClfaP8Dd.js";import{A as Pi}from"./Avatar-D9rpNCqX.js";import{d as Oi}from"./Delete-Cx0Gf7gM.js";import{p as Ai}from"./index-HqFqdQ4r.js";import{A as Ri}from"./actions-C7XEfs3G.js";import{L as Ii,a as _i}from"./ListItemText-BFKiv21F.js";import{S as Ci}from"./shorten-label-BlEZNxcS.js";import{F as Ti,C as Ni}from"./FormControlLabel-e33RviPs.js";import"./Search-DJGc3pyw.js";import"./FilterList-MtVGweDW.js";import"./toPropertyKey-hKuLU48H.js";import"./useFormControl-CKIqQYYi.js";import"./FormGroup-BLcBQcJn.js";import"./LastPage-CDtyKz24.js";import"./Toolbar-_kp5UmF_.js";import"./index-QkFfPTY0.js";import"./redux-Dzi5_x1P.js";import"./MoreVert-CO-YEIdW.js";import"./index-CFGAX9C8.js";import"./Hidden-BLWrU9rp.js";import"./MoreHoriz-DXVNYHju.js";import"./ExpandMore-CKKkjQcY.js";import"./selector-f-DWZqru.js";import"./use-mobile-VmAoH7cf.js";import"./OpenInNew-BhWlEURK.js";import"./CloseOutlined-CptcS6gg.js";import"./useSlot-qUg8hMqb.js";import"./useLocalStorage-BwTfVICM.js";import"./PlayArrow-Cwl8HhMy.js";import"./ButtonGroup-DGBxXxUQ.js";import"./RadioGroup-Betu38Nc.js";import"./index-CCfWoc62.js";import"./spaces-5xok4VJR.js";import"./index-BmM6WRMt.js";import"./api-CTyhvZ_-.js";import"./Link-DD0QeQw6.js";import"./useSetState-C2Fy5a5C.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var On=dr.default=void 0;Di($);var Ze=o;function Di(e){return e&&e.__esModule?e:{default:e}}function Lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lr(Object(r),!0).forEach(function(n){Li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Li(e,t,r){return t=Ui(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ui(e){var t=qi(e,"string");return typeof t=="symbol"?t:String(t)}function qi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mr=function(t){return(0,Ze.jsxs)("svg",Ur(Ur({},t),{},{children:[(0,Ze.jsx)("g",{clipPath:"url(#clip0)",children:(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,Ze.jsx)("defs",{children:(0,Ze.jsx)("clipPath",{id:"clip0",children:(0,Ze.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};mr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};mr.displayName="person";On=dr.default=mr;var gt={},Ki=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),An="%[a-f0-9]{2}",qr=new RegExp("("+An+")|([^%]+?)","gi"),Kr=new RegExp("("+An+")+","gi");function or(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],or(r),or(n))}function ki(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(qr)||[],r=1;r<t.length;r++)e=or(t,r).join(""),t=e.match(qr)||[];return e}}function Bi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ki(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),c=0;c<s.length;c++){var m=s[c];e=e.replace(new RegExp(m,"g"),t[m])}return e}var Fi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Bi(e)}},Mi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},$i=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),c=0;c<n.length;c++){var m=n[c],P=e[m];(s?t.indexOf(m)!==-1:t(m,P,e))&&(r[m]=P)}return r};(function(e){const t=Ki,r=Fi,n=Mi,s=$i,c=i=>i==null;function m(i){switch(i.arrayFormat){case"index":return l=>(b,j)=>{const h=b.length;return j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,[S(l,i),"[",h,"]"].join("")]:[...b,[S(l,i),"[",S(h,i),"]=",S(j,i)].join("")]};case"bracket":return l=>(b,j)=>j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,[S(l,i),"[]"].join("")]:[...b,[S(l,i),"[]=",S(j,i)].join("")];case"comma":case"separator":return l=>(b,j)=>j==null||j.length===0?b:b.length===0?[[S(l,i),"=",S(j,i)].join("")]:[[b,S(j,i)].join(i.arrayFormatSeparator)];default:return l=>(b,j)=>j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,S(l,i)]:[...b,[S(l,i),"=",S(j,i)].join("")]}}function P(i){let l;switch(i.arrayFormat){case"index":return(b,j,h)=>{if(l=/\[(\d*)\]$/.exec(b),b=b.replace(/\[\d*\]$/,""),!l){h[b]=j;return}h[b]===void 0&&(h[b]={}),h[b][l[1]]=j};case"bracket":return(b,j,h)=>{if(l=/(\[\])$/.exec(b),b=b.replace(/\[\]$/,""),!l){h[b]=j;return}if(h[b]===void 0){h[b]=[j];return}h[b]=[].concat(h[b],j)};case"comma":case"separator":return(b,j,h)=>{const D=typeof j=="string"&&j.includes(i.arrayFormatSeparator),R=typeof j=="string"&&!D&&p(j,i).includes(i.arrayFormatSeparator);j=R?p(j,i):j;const C=D||R?j.split(i.arrayFormatSeparator).map(Q=>p(Q,i)):j===null?j:p(j,i);h[b]=C};default:return(b,j,h)=>{if(h[b]===void 0){h[b]=j;return}h[b]=[].concat(h[b],j)}}}function g(i){if(typeof i!="string"||i.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function S(i,l){return l.encode?l.strict?t(i):encodeURIComponent(i):i}function p(i,l){return l.decode?r(i):i}function U(i){return Array.isArray(i)?i.sort():typeof i=="object"?U(Object.keys(i)).sort((l,b)=>Number(l)-Number(b)).map(l=>i[l]):i}function w(i){const l=i.indexOf("#");return l!==-1&&(i=i.slice(0,l)),i}function A(i){let l="";const b=i.indexOf("#");return b!==-1&&(l=i.slice(b)),l}function x(i){i=w(i);const l=i.indexOf("?");return l===-1?"":i.slice(l+1)}function y(i,l){return l.parseNumbers&&!Number.isNaN(Number(i))&&typeof i=="string"&&i.trim()!==""?i=Number(i):l.parseBooleans&&i!==null&&(i.toLowerCase()==="true"||i.toLowerCase()==="false")&&(i=i.toLowerCase()==="true"),i}function d(i,l){l=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},l),g(l.arrayFormatSeparator);const b=P(l),j=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return j;for(const h of i.split("&")){if(h==="")continue;let[D,R]=n(l.decode?h.replace(/\+/g," "):h,"=");R=R===void 0?null:["comma","separator"].includes(l.arrayFormat)?R:p(R,l),b(p(D,l),R,j)}for(const h of Object.keys(j)){const D=j[h];if(typeof D=="object"&&D!==null)for(const R of Object.keys(D))D[R]=y(D[R],l);else j[h]=y(D,l)}return l.sort===!1?j:(l.sort===!0?Object.keys(j).sort():Object.keys(j).sort(l.sort)).reduce((h,D)=>{const R=j[D];return R&&typeof R=="object"&&!Array.isArray(R)?h[D]=U(R):h[D]=R,h},Object.create(null))}e.extract=x,e.parse=d,e.stringify=(i,l)=>{if(!i)return"";l=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},l),g(l.arrayFormatSeparator);const b=R=>l.skipNull&&c(i[R])||l.skipEmptyString&&i[R]==="",j=m(l),h={};for(const R of Object.keys(i))b(R)||(h[R]=i[R]);const D=Object.keys(h);return l.sort!==!1&&D.sort(l.sort),D.map(R=>{const C=i[R];return C===void 0?"":C===null?S(R,l):Array.isArray(C)?C.reduce(j(R),[]).join("&"):S(R,l)+"="+S(C,l)}).filter(R=>R.length>0).join("&")},e.parseUrl=(i,l)=>{l=Object.assign({decode:!0},l);const[b,j]=n(i,"#");return Object.assign({url:b.split("?")[0]||"",query:d(x(i),l)},l&&l.parseFragmentIdentifier&&j?{fragmentIdentifier:p(j,l)}:{})},e.stringifyUrl=(i,l)=>{l=Object.assign({encode:!0,strict:!0},l);const b=w(i.url).split("?")[0]||"",j=e.extract(i.url),h=e.parse(j,{sort:!1}),D=Object.assign(h,i.query);let R=e.stringify(D,l);R&&(R=`?${R}`);let C=A(i.url);return i.fragmentIdentifier&&(C=`#${S(i.fragmentIdentifier,l)}`),`${b}${R}${C}`},e.pick=(i,l,b)=>{b=Object.assign({parseFragmentIdentifier:!0},b);const{url:j,query:h,fragmentIdentifier:D}=e.parseUrl(i,b);return e.stringifyUrl({url:j,query:s(h,l),fragmentIdentifier:D},b)},e.exclude=(i,l,b)=>{const j=Array.isArray(l)?h=>!l.includes(h):(h,D)=>!l(h,D);return e.pick(i,j,b)}})(gt);const it=Wn,zi={parseNumbers:!1,parseBooleans:!1},Wi={skipNull:!1,skipEmptyString:!1},Vi=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:c,stringifyOptions:m}=t||{},P=Object.assign(Object.assign({},zi),c),g=Object.assign(Object.assign({},Wi),m),S=it.useLocation(),p=(r=it.useHistory)===null||r===void 0?void 0:r.call(it),U=(n=it.useNavigate)===null||n===void 0?void 0:n.call(it),w=zn(),A=$.useRef(typeof e=="function"?e():e||{}),x=$.useMemo(()=>gt.parse(S.search,P),[S.search]),y=$.useMemo(()=>Object.assign(Object.assign({},A.current),x),[x]);return[y,cr(i=>{const l=typeof i=="function"?i(y):i;w(),p&&p[s]({hash:S.hash,search:gt.stringify(Object.assign(Object.assign({},x),l),g)||"?"},S.state),U&&U({hash:S.hash,search:gt.stringify(Object.assign(Object.assign({},x),l),g)||"?"},{replace:s==="replace",state:S.state})})]},Hi=Vi;var le={};Object.defineProperty(le,"__esModule",{value:!0});le.isValid=le.fromJSON=le.fromRandom=le.fromAddress=le.fromPublicKey=le.fromSecretKey=le.Wallet=le.WalletType=void 0;const ft=fn,xt=St,Pe=un;le.WalletType=Pe.DidType;function tt(e,t="default"){const r=(0,Pe.DidType)(t),n=(0,xt.getSigner)(r.pk),s=(0,xt.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Pe.fromPublicKey)(e.pk,r):e.address,hash(c,m=1,P="hex"){return s(c,m,P)},sign(c,m=!0,P="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(m){const g=s(c,1);return n.sign(g,e.sk,P)}return n.sign(c,e.sk,P)},verify(c,m,P=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const g=P?s(c,1):c;return n.verify(g,m,e.pk)},ethHash(c){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(c)},ethSign(c,m=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return m?n.ethSign(n.ethHash(c),(0,ft.toHex)(e.sk)):n.ethSign(c,(0,ft.toHex)(e.sk))},ethVerify(c,m,P=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const g=P?n.ethHash(c):c;return n.ethRecover(g,m)===this.address},toAddress(){return e.pk?(0,Pe.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Pe.DidType.toJSON(r),sk:(0,ft.toHex)(e.sk),pk:(0,ft.toHex)(e.pk),address:this.address}}}}le.Wallet=tt;function Gi(e,t="default"){const r=(0,Pe.DidType)(t),n={sk:e,pk:(0,xt.getSigner)(r.pk).getPublicKey(e)};return tt(n,r)}le.fromSecretKey=Gi;function Yi(e,t="default"){return tt({pk:e},(0,Pe.DidType)(t))}le.fromPublicKey=Yi;function Zi(e){return tt({address:(0,Pe.toAddress)(e)},(0,Pe.toTypeInfo)(e))}le.fromAddress=Zi;function Xi(e="default"){const t=(0,Pe.DidType)(e),n=(0,xt.getSigner)(t.pk).genKeyPair();return tt({sk:n.secretKey,pk:n.publicKey},t)}le.fromRandom=Xi;function Ji(e){const t=Pe.DidType.fromJSON(e.type);return tt(e,t)}le.fromJSON=Ji;function Qi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}le.isValid=Qi;var Tt={exports:{}},Nt={},kr;function Rn(){if(kr)return Nt;kr=1;function e(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(i){return typeof i}:e=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e(y)}function t(y,d){if(!(y instanceof d))throw new TypeError("Cannot call a class as a function")}function r(y,d){return d&&(e(d)==="object"||typeof d=="function")?d:n(y)}function n(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function s(y){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(y)}function c(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(d&&d.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),d&&m(y,d)}function m(y,d){return m=Object.setPrototypeOf||function(l,b){return l.__proto__=b,l},m(y,d)}var P={},g,S;function p(y,d,i){i||(i=Error);function l(j,h,D){return typeof d=="string"?d:d(j,h,D)}var b=function(j){c(h,j);function h(D,R,C){var Q;return t(this,h),Q=r(this,s(h).call(this,l(D,R,C))),Q.code=y,Q}return h}(i);P[y]=b}function U(y,d){if(Array.isArray(y)){var i=y.length;return y=y.map(function(l){return String(l)}),i>2?"one of ".concat(d," ").concat(y.slice(0,i-1).join(", "),", or ")+y[i-1]:i===2?"one of ".concat(d," ").concat(y[0]," or ").concat(y[1]):"of ".concat(d," ").concat(y[0])}else return"of ".concat(d," ").concat(String(y))}function w(y,d,i){return y.substr(!i||i<0?0:+i,d.length)===d}function A(y,d,i){return(i===void 0||i>y.length)&&(i=y.length),y.substring(i-d.length,i)===d}function x(y,d,i){return typeof i!="number"&&(i=0),i+d.length>y.length?!1:y.indexOf(d,i)!==-1}return p("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),p("ERR_INVALID_ARG_TYPE",function(y,d,i){g===void 0&&(g=ar()),g(typeof y=="string","'name' must be a string");var l;typeof d=="string"&&w(d,"not ")?(l="must not be",d=d.replace(/^not /,"")):l="must be";var b;if(A(y," argument"))b="The ".concat(y," ").concat(l," ").concat(U(d,"type"));else{var j=x(y,".")?"property":"argument";b='The "'.concat(y,'" ').concat(j," ").concat(l," ").concat(U(d,"type"))}return b+=". Received type ".concat(e(i)),b},TypeError),p("ERR_INVALID_ARG_VALUE",function(y,d){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";S===void 0&&(S=ct);var l=S.inspect(d);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(y,"' ").concat(i,". Received ").concat(l)},TypeError),p("ERR_INVALID_RETURN_VALUE",function(y,d,i){var l;return i&&i.constructor&&i.constructor.name?l="instance of ".concat(i.constructor.name):l="type ".concat(e(i)),"Expected ".concat(y,' to be returned from the "').concat(d,'"')+" function but got ".concat(l,".")},TypeError),p("ERR_MISSING_ARGS",function(){for(var y=arguments.length,d=new Array(y),i=0;i<y;i++)d[i]=arguments[i];g===void 0&&(g=ar()),g(d.length>0,"At least one arg needs to be specified");var l="The ",b=d.length;switch(d=d.map(function(j){return'"'.concat(j,'"')}),b){case 1:l+="".concat(d[0]," argument");break;case 2:l+="".concat(d[0]," and ").concat(d[1]," arguments");break;default:l+=d.slice(0,b-1).join(", "),l+=", and ".concat(d[b-1]," arguments");break}return"".concat(l," must be specified")},TypeError),Nt.codes=P,Nt}var Dt,Br;function eo(){if(Br)return Dt;Br=1;function e(O){for(var I=1;I<arguments.length;I++){var K=arguments[I]!=null?arguments[I]:{},k=Object.keys(K);typeof Object.getOwnPropertySymbols=="function"&&(k=k.concat(Object.getOwnPropertySymbols(K).filter(function(z){return Object.getOwnPropertyDescriptor(K,z).enumerable}))),k.forEach(function(z){t(O,z,K[z])})}return O}function t(O,I,K){return I in O?Object.defineProperty(O,I,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[I]=K,O}function r(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}function n(O,I){for(var K=0;K<I.length;K++){var k=I[K];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(O,k.key,k)}}function s(O,I,K){return I&&n(O.prototype,I),K&&n(O,K),O}function c(O,I){return I&&(x(I)==="object"||typeof I=="function")?I:m(O)}function m(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function P(O,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(I&&I.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),I&&w(O,I)}function g(O){var I=typeof Map=="function"?new Map:void 0;return g=function(k){if(k===null||!U(k))return k;if(typeof k!="function")throw new TypeError("Super expression must either be null or a function");if(typeof I<"u"){if(I.has(k))return I.get(k);I.set(k,z)}function z(){return p(k,arguments,A(this).constructor)}return z.prototype=Object.create(k.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),w(z,k)},g(O)}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function p(O,I,K){return S()?p=Reflect.construct:p=function(z,X,E){var f=[null];f.push.apply(f,X);var v=Function.bind.apply(z,f),_=new v;return E&&w(_,E.prototype),_},p.apply(null,arguments)}function U(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,I){return w=Object.setPrototypeOf||function(k,z){return k.__proto__=z,k},w(O,I)}function A(O){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(K){return K.__proto__||Object.getPrototypeOf(K)},A(O)}function x(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(K){return typeof K}:x=function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},x(O)}var y=ct,d=y.inspect,i=Rn(),l=i.codes.ERR_INVALID_ARG_TYPE;function b(O,I,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-I.length,K)===I}function j(O,I){if(I=Math.floor(I),O.length==0||I==0)return"";var K=O.length*I;for(I=Math.floor(Math.log(I)/Math.log(2));I;)O+=O,I--;return O+=O.substring(0,K-O.length),O}var h="",D="",R="",C="",Q={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:"},ue=10;function fe(O){var I=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return I.forEach(function(k){K[k]=O[k]}),Object.defineProperty(K,"message",{value:O.message}),K}function ne(O){return d(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(O,I,K){var k="",z="",X=0,E="",f=!1,v=ne(O),_=v.split(`
|
|
1
|
+
import{r as $,j as o,fJ as zn,h as cr,fK as Wn,fL as un,fw as fn,fM as St,fN as ct,dA as Re,fO as Vn,fP as Hn,fQ as Gn,fR as pn,fS as lr,fT as Yn,fU as Zn,fV as Xn,fW as Jn,eG as Jt,b4 as Qn,cp as Nr,fX as ei,a7 as ti,aM as Ce,u as Ke,N as dn,B as oe,aQ as yt,A as mn,D as ri,fY as ur,ab as lt,ap as $e,a1 as je,l as Qe,P as M,bO as ni,cq as Qt,T as at,I as ii,eI as oi,Z as Te,dd as ai,a0 as ut,bl as We,q as et,fZ as si,a9 as ze,dq as ci,aV as hn,E as Ee,a as vt,c as er,f_ as gn,bG as yn,aS as li,X as ui,Y as fi,bN as vn,k as pi,az as di,ds as mi}from"./index-BfhVorqV.js";import{c as hi}from"./index-DU7-35nh.js";import{d as bt}from"./Add-C5zWPWbi.js";import{d as gi}from"./Loop-CbV2fFUd.js";import{d as yi}from"./ViewList-BhIE_M4V.js";import{L as vi,S as bi,d as bn}from"./list-header-7mHFR-6j.js";import{D as wn,g as wi}from"./index-5qacoeSv.js";import"./index-CHJwugzh.js";import"./index-Dn7MhkOZ.js";import{g as xn}from"./resource-dialog-5vdlaAuh.js";import{T as xi}from"./index-DJLK29SJ.js";import{E as En}from"./index-D12KUiCG.js";import"./fallback-rg9fefdL.js";import"./index-nyOsFIwy.js";import{U as Ei}from"./user-sessions-CdgU8G0J.js";import{u as ke,d as Dr,W as jn,a as ji}from"./dashboard-BOQEjKT8.js";import{W as fr}from"./did-address-GzRMEyk7.js";import{P as Ue}from"./permission-BEPRmEw3.js";import{C as Pt}from"./click-to-copy-CNizZfqS.js";import{F as tr}from"./FormControl-Kt4xANtI.js";import{I as rr}from"./InputLabel-DbdmcDbJ.js";import{S as nr}from"./Select-BeNQ99oP.js";import{T as Sn}from"./TextField-D3XEyFR4.js";import{D as pr,f as Ve}from"./format-error-B3RYdl6q.js";import{A as Je}from"./Alert-D91U5h--.js";import{_ as Si}from"./useAsync-6Zzjy7PW.js";import{I as ir}from"./index-u_IDQFrq.js";import{C as At}from"./confirm-CD6_CMUq.js";import{u as Pn}from"./session-Cf-ZqG4P.js";import{A as Pi}from"./Avatar-XXXVLUFk.js";import{d as Ai}from"./Delete-DlfFien6.js";import{p as Oi}from"./index-HqFqdQ4r.js";import{A as Ri}from"./actions-DLO5dlyV.js";import{L as Ii,a as _i}from"./ListItemText-Bnnk7Gbj.js";import{S as Ci}from"./shorten-label-CunJMulX.js";import{F as Ti,C as Ni}from"./FormControlLabel-B6ISinfm.js";import"./Search-CMyGk9R2.js";import"./FilterList-QafrkXbd.js";import"./toPropertyKey-hKuLU48H.js";import"./useFormControl-DUzGwbSY.js";import"./FormGroup-BEMyIGSj.js";import"./LastPage-DXISIPs8.js";import"./Toolbar-_9it32pJ.js";import"./index-BPSr4f2j.js";import"./redux-tOVF_oDT.js";import"./MoreVert-er-bltGF.js";import"./index-Ce3CP3Jp.js";import"./Hidden-kl5Tbw1B.js";import"./ExpandMore-DD2GykPj.js";import"./selector-CNsCKDRb.js";import"./use-mobile-CnnusHmf.js";import"./OpenInNew-Bu6iI6eA.js";import"./CloseOutlined-Crg0BDr4.js";import"./useSlot-LBVvloQJ.js";import"./useLocalStorage-B-I-NsSz.js";import"./PlayArrow-2r36AAmk.js";import"./ButtonGroup-k3SZjeUa.js";import"./RadioGroup-C7j1KJ7y.js";import"./index-Xh4BYwzS.js";import"./spaces-Dm4toCmL.js";import"./index-UmXxvIz7.js";import"./api-C37A8mCN.js";import"./Link-DFzOJFD-.js";import"./useSetState-Be-I2Gl-.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var An=dr.default=void 0;Di($);var Ze=o;function Di(e){return e&&e.__esModule?e:{default:e}}function Lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lr(Object(r),!0).forEach(function(n){Li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Li(e,t,r){return t=Ui(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ui(e){var t=qi(e,"string");return typeof t=="symbol"?t:String(t)}function qi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mr=function(t){return(0,Ze.jsxs)("svg",Ur(Ur({},t),{},{children:[(0,Ze.jsx)("g",{clipPath:"url(#clip0)",children:(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,Ze.jsx)("defs",{children:(0,Ze.jsx)("clipPath",{id:"clip0",children:(0,Ze.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};mr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};mr.displayName="person";An=dr.default=mr;var gt={},Ki=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),On="%[a-f0-9]{2}",qr=new RegExp("("+On+")|([^%]+?)","gi"),Kr=new RegExp("("+On+")+","gi");function or(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],or(r),or(n))}function ki(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(qr)||[],r=1;r<t.length;r++)e=or(t,r).join(""),t=e.match(qr)||[];return e}}function Bi(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ki(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),c=0;c<s.length;c++){var m=s[c];e=e.replace(new RegExp(m,"g"),t[m])}return e}var Fi=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Bi(e)}},Mi=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},$i=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),c=0;c<n.length;c++){var m=n[c],P=e[m];(s?t.indexOf(m)!==-1:t(m,P,e))&&(r[m]=P)}return r};(function(e){const t=Ki,r=Fi,n=Mi,s=$i,c=i=>i==null;function m(i){switch(i.arrayFormat){case"index":return l=>(b,j)=>{const h=b.length;return j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,[S(l,i),"[",h,"]"].join("")]:[...b,[S(l,i),"[",S(h,i),"]=",S(j,i)].join("")]};case"bracket":return l=>(b,j)=>j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,[S(l,i),"[]"].join("")]:[...b,[S(l,i),"[]=",S(j,i)].join("")];case"comma":case"separator":return l=>(b,j)=>j==null||j.length===0?b:b.length===0?[[S(l,i),"=",S(j,i)].join("")]:[[b,S(j,i)].join(i.arrayFormatSeparator)];default:return l=>(b,j)=>j===void 0||i.skipNull&&j===null||i.skipEmptyString&&j===""?b:j===null?[...b,S(l,i)]:[...b,[S(l,i),"=",S(j,i)].join("")]}}function P(i){let l;switch(i.arrayFormat){case"index":return(b,j,h)=>{if(l=/\[(\d*)\]$/.exec(b),b=b.replace(/\[\d*\]$/,""),!l){h[b]=j;return}h[b]===void 0&&(h[b]={}),h[b][l[1]]=j};case"bracket":return(b,j,h)=>{if(l=/(\[\])$/.exec(b),b=b.replace(/\[\]$/,""),!l){h[b]=j;return}if(h[b]===void 0){h[b]=[j];return}h[b]=[].concat(h[b],j)};case"comma":case"separator":return(b,j,h)=>{const D=typeof j=="string"&&j.includes(i.arrayFormatSeparator),R=typeof j=="string"&&!D&&p(j,i).includes(i.arrayFormatSeparator);j=R?p(j,i):j;const C=D||R?j.split(i.arrayFormatSeparator).map(Q=>p(Q,i)):j===null?j:p(j,i);h[b]=C};default:return(b,j,h)=>{if(h[b]===void 0){h[b]=j;return}h[b]=[].concat(h[b],j)}}}function g(i){if(typeof i!="string"||i.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function S(i,l){return l.encode?l.strict?t(i):encodeURIComponent(i):i}function p(i,l){return l.decode?r(i):i}function U(i){return Array.isArray(i)?i.sort():typeof i=="object"?U(Object.keys(i)).sort((l,b)=>Number(l)-Number(b)).map(l=>i[l]):i}function x(i){const l=i.indexOf("#");return l!==-1&&(i=i.slice(0,l)),i}function O(i){let l="";const b=i.indexOf("#");return b!==-1&&(l=i.slice(b)),l}function w(i){i=x(i);const l=i.indexOf("?");return l===-1?"":i.slice(l+1)}function y(i,l){return l.parseNumbers&&!Number.isNaN(Number(i))&&typeof i=="string"&&i.trim()!==""?i=Number(i):l.parseBooleans&&i!==null&&(i.toLowerCase()==="true"||i.toLowerCase()==="false")&&(i=i.toLowerCase()==="true"),i}function d(i,l){l=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},l),g(l.arrayFormatSeparator);const b=P(l),j=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return j;for(const h of i.split("&")){if(h==="")continue;let[D,R]=n(l.decode?h.replace(/\+/g," "):h,"=");R=R===void 0?null:["comma","separator"].includes(l.arrayFormat)?R:p(R,l),b(p(D,l),R,j)}for(const h of Object.keys(j)){const D=j[h];if(typeof D=="object"&&D!==null)for(const R of Object.keys(D))D[R]=y(D[R],l);else j[h]=y(D,l)}return l.sort===!1?j:(l.sort===!0?Object.keys(j).sort():Object.keys(j).sort(l.sort)).reduce((h,D)=>{const R=j[D];return R&&typeof R=="object"&&!Array.isArray(R)?h[D]=U(R):h[D]=R,h},Object.create(null))}e.extract=w,e.parse=d,e.stringify=(i,l)=>{if(!i)return"";l=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},l),g(l.arrayFormatSeparator);const b=R=>l.skipNull&&c(i[R])||l.skipEmptyString&&i[R]==="",j=m(l),h={};for(const R of Object.keys(i))b(R)||(h[R]=i[R]);const D=Object.keys(h);return l.sort!==!1&&D.sort(l.sort),D.map(R=>{const C=i[R];return C===void 0?"":C===null?S(R,l):Array.isArray(C)?C.reduce(j(R),[]).join("&"):S(R,l)+"="+S(C,l)}).filter(R=>R.length>0).join("&")},e.parseUrl=(i,l)=>{l=Object.assign({decode:!0},l);const[b,j]=n(i,"#");return Object.assign({url:b.split("?")[0]||"",query:d(w(i),l)},l&&l.parseFragmentIdentifier&&j?{fragmentIdentifier:p(j,l)}:{})},e.stringifyUrl=(i,l)=>{l=Object.assign({encode:!0,strict:!0},l);const b=x(i.url).split("?")[0]||"",j=e.extract(i.url),h=e.parse(j,{sort:!1}),D=Object.assign(h,i.query);let R=e.stringify(D,l);R&&(R=`?${R}`);let C=O(i.url);return i.fragmentIdentifier&&(C=`#${S(i.fragmentIdentifier,l)}`),`${b}${R}${C}`},e.pick=(i,l,b)=>{b=Object.assign({parseFragmentIdentifier:!0},b);const{url:j,query:h,fragmentIdentifier:D}=e.parseUrl(i,b);return e.stringifyUrl({url:j,query:s(h,l),fragmentIdentifier:D},b)},e.exclude=(i,l,b)=>{const j=Array.isArray(l)?h=>!l.includes(h):(h,D)=>!l(h,D);return e.pick(i,j,b)}})(gt);const it=Wn,zi={parseNumbers:!1,parseBooleans:!1},Wi={skipNull:!1,skipEmptyString:!1},Vi=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:c,stringifyOptions:m}=t||{},P=Object.assign(Object.assign({},zi),c),g=Object.assign(Object.assign({},Wi),m),S=it.useLocation(),p=(r=it.useHistory)===null||r===void 0?void 0:r.call(it),U=(n=it.useNavigate)===null||n===void 0?void 0:n.call(it),x=zn(),O=$.useRef(typeof e=="function"?e():e||{}),w=$.useMemo(()=>gt.parse(S.search,P),[S.search]),y=$.useMemo(()=>Object.assign(Object.assign({},O.current),w),[w]);return[y,cr(i=>{const l=typeof i=="function"?i(y):i;x(),p&&p[s]({hash:S.hash,search:gt.stringify(Object.assign(Object.assign({},w),l),g)||"?"},S.state),U&&U({hash:S.hash,search:gt.stringify(Object.assign(Object.assign({},w),l),g)||"?"},{replace:s==="replace",state:S.state})})]},Hi=Vi;var le={};Object.defineProperty(le,"__esModule",{value:!0});le.isValid=le.fromJSON=le.fromRandom=le.fromAddress=le.fromPublicKey=le.fromSecretKey=le.Wallet=le.WalletType=void 0;const ft=fn,wt=St,Pe=un;le.WalletType=Pe.DidType;function tt(e,t="default"){const r=(0,Pe.DidType)(t),n=(0,wt.getSigner)(r.pk),s=(0,wt.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Pe.fromPublicKey)(e.pk,r):e.address,hash(c,m=1,P="hex"){return s(c,m,P)},sign(c,m=!0,P="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(m){const g=s(c,1);return n.sign(g,e.sk,P)}return n.sign(c,e.sk,P)},verify(c,m,P=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const g=P?s(c,1):c;return n.verify(g,m,e.pk)},ethHash(c){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(c)},ethSign(c,m=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return m?n.ethSign(n.ethHash(c),(0,ft.toHex)(e.sk)):n.ethSign(c,(0,ft.toHex)(e.sk))},ethVerify(c,m,P=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const g=P?n.ethHash(c):c;return n.ethRecover(g,m)===this.address},toAddress(){return e.pk?(0,Pe.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Pe.DidType.toJSON(r),sk:(0,ft.toHex)(e.sk),pk:(0,ft.toHex)(e.pk),address:this.address}}}}le.Wallet=tt;function Gi(e,t="default"){const r=(0,Pe.DidType)(t),n={sk:e,pk:(0,wt.getSigner)(r.pk).getPublicKey(e)};return tt(n,r)}le.fromSecretKey=Gi;function Yi(e,t="default"){return tt({pk:e},(0,Pe.DidType)(t))}le.fromPublicKey=Yi;function Zi(e){return tt({address:(0,Pe.toAddress)(e)},(0,Pe.toTypeInfo)(e))}le.fromAddress=Zi;function Xi(e="default"){const t=(0,Pe.DidType)(e),n=(0,wt.getSigner)(t.pk).genKeyPair();return tt({sk:n.secretKey,pk:n.publicKey},t)}le.fromRandom=Xi;function Ji(e){const t=Pe.DidType.fromJSON(e.type);return tt(e,t)}le.fromJSON=Ji;function Qi(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}le.isValid=Qi;var Tt={exports:{}},Nt={},kr;function Rn(){if(kr)return Nt;kr=1;function e(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(i){return typeof i}:e=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e(y)}function t(y,d){if(!(y instanceof d))throw new TypeError("Cannot call a class as a function")}function r(y,d){return d&&(e(d)==="object"||typeof d=="function")?d:n(y)}function n(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function s(y){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},s(y)}function c(y,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(d&&d.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),d&&m(y,d)}function m(y,d){return m=Object.setPrototypeOf||function(l,b){return l.__proto__=b,l},m(y,d)}var P={},g,S;function p(y,d,i){i||(i=Error);function l(j,h,D){return typeof d=="string"?d:d(j,h,D)}var b=function(j){c(h,j);function h(D,R,C){var Q;return t(this,h),Q=r(this,s(h).call(this,l(D,R,C))),Q.code=y,Q}return h}(i);P[y]=b}function U(y,d){if(Array.isArray(y)){var i=y.length;return y=y.map(function(l){return String(l)}),i>2?"one of ".concat(d," ").concat(y.slice(0,i-1).join(", "),", or ")+y[i-1]:i===2?"one of ".concat(d," ").concat(y[0]," or ").concat(y[1]):"of ".concat(d," ").concat(y[0])}else return"of ".concat(d," ").concat(String(y))}function x(y,d,i){return y.substr(!i||i<0?0:+i,d.length)===d}function O(y,d,i){return(i===void 0||i>y.length)&&(i=y.length),y.substring(i-d.length,i)===d}function w(y,d,i){return typeof i!="number"&&(i=0),i+d.length>y.length?!1:y.indexOf(d,i)!==-1}return p("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),p("ERR_INVALID_ARG_TYPE",function(y,d,i){g===void 0&&(g=ar()),g(typeof y=="string","'name' must be a string");var l;typeof d=="string"&&x(d,"not ")?(l="must not be",d=d.replace(/^not /,"")):l="must be";var b;if(O(y," argument"))b="The ".concat(y," ").concat(l," ").concat(U(d,"type"));else{var j=w(y,".")?"property":"argument";b='The "'.concat(y,'" ').concat(j," ").concat(l," ").concat(U(d,"type"))}return b+=". Received type ".concat(e(i)),b},TypeError),p("ERR_INVALID_ARG_VALUE",function(y,d){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";S===void 0&&(S=ct);var l=S.inspect(d);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(y,"' ").concat(i,". Received ").concat(l)},TypeError),p("ERR_INVALID_RETURN_VALUE",function(y,d,i){var l;return i&&i.constructor&&i.constructor.name?l="instance of ".concat(i.constructor.name):l="type ".concat(e(i)),"Expected ".concat(y,' to be returned from the "').concat(d,'"')+" function but got ".concat(l,".")},TypeError),p("ERR_MISSING_ARGS",function(){for(var y=arguments.length,d=new Array(y),i=0;i<y;i++)d[i]=arguments[i];g===void 0&&(g=ar()),g(d.length>0,"At least one arg needs to be specified");var l="The ",b=d.length;switch(d=d.map(function(j){return'"'.concat(j,'"')}),b){case 1:l+="".concat(d[0]," argument");break;case 2:l+="".concat(d[0]," and ").concat(d[1]," arguments");break;default:l+=d.slice(0,b-1).join(", "),l+=", and ".concat(d[b-1]," arguments");break}return"".concat(l," must be specified")},TypeError),Nt.codes=P,Nt}var Dt,Br;function eo(){if(Br)return Dt;Br=1;function e(A){for(var I=1;I<arguments.length;I++){var K=arguments[I]!=null?arguments[I]:{},k=Object.keys(K);typeof Object.getOwnPropertySymbols=="function"&&(k=k.concat(Object.getOwnPropertySymbols(K).filter(function(z){return Object.getOwnPropertyDescriptor(K,z).enumerable}))),k.forEach(function(z){t(A,z,K[z])})}return A}function t(A,I,K){return I in A?Object.defineProperty(A,I,{value:K,enumerable:!0,configurable:!0,writable:!0}):A[I]=K,A}function r(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function n(A,I){for(var K=0;K<I.length;K++){var k=I[K];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(A,k.key,k)}}function s(A,I,K){return I&&n(A.prototype,I),K&&n(A,K),A}function c(A,I){return I&&(w(I)==="object"||typeof I=="function")?I:m(A)}function m(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function P(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),I&&x(A,I)}function g(A){var I=typeof Map=="function"?new Map:void 0;return g=function(k){if(k===null||!U(k))return k;if(typeof k!="function")throw new TypeError("Super expression must either be null or a function");if(typeof I<"u"){if(I.has(k))return I.get(k);I.set(k,z)}function z(){return p(k,arguments,O(this).constructor)}return z.prototype=Object.create(k.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),x(z,k)},g(A)}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function p(A,I,K){return S()?p=Reflect.construct:p=function(z,X,E){var f=[null];f.push.apply(f,X);var v=Function.bind.apply(z,f),_=new v;return E&&x(_,E.prototype),_},p.apply(null,arguments)}function U(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function x(A,I){return x=Object.setPrototypeOf||function(k,z){return k.__proto__=z,k},x(A,I)}function O(A){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(K){return K.__proto__||Object.getPrototypeOf(K)},O(A)}function w(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(K){return typeof K}:w=function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},w(A)}var y=ct,d=y.inspect,i=Rn(),l=i.codes.ERR_INVALID_ARG_TYPE;function b(A,I,K){return(K===void 0||K>A.length)&&(K=A.length),A.substring(K-I.length,K)===I}function j(A,I){if(I=Math.floor(I),A.length==0||I==0)return"";var K=A.length*I;for(I=Math.floor(Math.log(I)/Math.log(2));I;)A+=A,I--;return A+=A.substring(0,K-A.length),A}var h="",D="",R="",C="",Q={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:"},ue=10;function fe(A){var I=Object.keys(A),K=Object.create(Object.getPrototypeOf(A));return I.forEach(function(k){K[k]=A[k]}),Object.defineProperty(K,"message",{value:A.message}),K}function ne(A){return d(A,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(A,I,K){var k="",z="",X=0,E="",f=!1,v=ne(A),_=v.split(`
|
|
2
2
|
`),q=ne(I).split(`
|
|
3
|
-
`),T=0,V="";if(K==="strictEqual"&&
|
|
3
|
+
`),T=0,V="";if(K==="strictEqual"&&w(A)==="object"&&w(I)==="object"&&A!==null&&I!==null&&(K="strictEqualObject"),_.length===1&&q.length===1&&_[0]!==q[0]){var ae=_[0].length+q[0].length;if(ae<=ue){if((w(A)!=="object"||A===null)&&(w(I)!=="object"||I===null)&&(A!==0||I!==0))return"".concat(Q[K],`
|
|
4
4
|
|
|
5
5
|
`)+"".concat(_[0]," !== ").concat(q[0],`
|
|
6
6
|
`)}else if(K!=="strictEqualObject"){var te=Re.stderr&&Re.stderr.isTTY?Re.stderr.columns:80;if(ae<te){for(;_[0][T]===q[0][T];)T++;T>2&&(V=`
|
|
7
7
|
`.concat(j(" ",T),"^"),T=0)}}}for(var ye=_[_.length-1],be=q[q.length-1];ye===be&&(T++<2?E=`
|
|
8
|
-
`.concat(ye).concat(E):k=ye,_.pop(),q.pop(),!(_.length===0||q.length===0));)ye=_[_.length-1],be=q[q.length-1];var Ne=Math.max(_.length,q.length);if(Ne===0){var
|
|
9
|
-
`);if(
|
|
8
|
+
`.concat(ye).concat(E):k=ye,_.pop(),q.pop(),!(_.length===0||q.length===0));)ye=_[_.length-1],be=q[q.length-1];var Ne=Math.max(_.length,q.length);if(Ne===0){var Ae=v.split(`
|
|
9
|
+
`);if(Ae.length>30)for(Ae[26]="".concat(h,"...").concat(C);Ae.length>27;)Ae.pop();return"".concat(Q.notIdentical,`
|
|
10
10
|
|
|
11
|
-
`).concat(
|
|
11
|
+
`).concat(Ae.join(`
|
|
12
12
|
`),`
|
|
13
13
|
`)}T>3&&(E=`
|
|
14
14
|
`.concat(h,"...").concat(C).concat(E),f=!0),k!==""&&(E=`
|
|
@@ -21,18 +21,18 @@ import{r as $,j as o,fI as zn,h as cr,fJ as Wn,fK as un,fo as fn,fL as St,fM as
|
|
|
21
21
|
`.concat(h,"...").concat(C),f=!0):pe>3&&(z+=`
|
|
22
22
|
`.concat(_[T-2]),de++),z+=`
|
|
23
23
|
`.concat(_[T-1]),de++),X=T,z+=`
|
|
24
|
-
`.concat(D,"+").concat(C," ").concat(_[T]),de++;else{var
|
|
24
|
+
`.concat(D,"+").concat(C," ").concat(_[T]),de++;else{var Oe=q[T],we=_[T],De=we!==Oe&&(!b(we,",")||we.slice(0,-1)!==Oe);De&&b(Oe,",")&&Oe.slice(0,-1)===we&&(De=!1,we+=","),De?(pe>1&&T>2&&(pe>4?(z+=`
|
|
25
25
|
`.concat(h,"...").concat(C),f=!0):pe>3&&(z+=`
|
|
26
26
|
`.concat(_[T-2]),de++),z+=`
|
|
27
27
|
`.concat(_[T-1]),de++),X=T,z+=`
|
|
28
|
-
`.concat(D,"+").concat(C," ").concat(
|
|
29
|
-
`.concat(R,"-").concat(C," ").concat(
|
|
30
|
-
`.concat(
|
|
28
|
+
`.concat(D,"+").concat(C," ").concat(we),k+=`
|
|
29
|
+
`.concat(R,"-").concat(C," ").concat(Oe),de+=2):(z+=k,k="",(pe===1||T===0)&&(z+=`
|
|
30
|
+
`.concat(we),de++))}if(de>20&&T<Ne-2)return"".concat(Be).concat(He,`
|
|
31
31
|
`).concat(z,`
|
|
32
32
|
`).concat(h,"...").concat(C).concat(k,`
|
|
33
33
|
`)+"".concat(h,"...").concat(C)}return"".concat(Be).concat(f?He:"",`
|
|
34
|
-
`).concat(z).concat(k).concat(E).concat(V)}var ge=function(
|
|
35
|
-
`);if(X==="notStrictEqual"&&
|
|
34
|
+
`).concat(z).concat(k).concat(E).concat(V)}var ge=function(A){P(I,A);function I(K){var k;if(r(this,I),w(K)!=="object"||K===null)throw new l("options","Object",K);var z=K.message,X=K.operator,E=K.stackStartFn,f=K.actual,v=K.expected,_=Error.stackTraceLimit;if(Error.stackTraceLimit=0,z!=null)k=c(this,O(I).call(this,String(z)));else if(Re.stderr&&Re.stderr.isTTY&&(Re.stderr&&Re.stderr.getColorDepth&&Re.stderr.getColorDepth()!==1?(h="\x1B[34m",D="\x1B[32m",C="\x1B[39m",R="\x1B[31m"):(h="",D="",C="",R="")),w(f)==="object"&&f!==null&&w(v)==="object"&&v!==null&&"stack"in f&&f instanceof Error&&"stack"in v&&v instanceof Error&&(f=fe(f),v=fe(v)),X==="deepStrictEqual"||X==="strictEqual")k=c(this,O(I).call(this,ie(f,v,X)));else if(X==="notDeepStrictEqual"||X==="notStrictEqual"){var q=Q[X],T=ne(f).split(`
|
|
35
|
+
`);if(X==="notStrictEqual"&&w(f)==="object"&&f!==null&&(q=Q.notStrictEqualObject),T.length>30)for(T[26]="".concat(h,"...").concat(C);T.length>27;)T.pop();T.length===1?k=c(this,O(I).call(this,"".concat(q," ").concat(T[0]))):k=c(this,O(I).call(this,"".concat(q,`
|
|
36
36
|
|
|
37
37
|
`).concat(T.join(`
|
|
38
38
|
`),`
|
|
@@ -44,21 +44,21 @@ import{r as $,j as o,fI as zn,h as cr,fJ as Wn,fK as un,fo as fn,fL as St,fM as
|
|
|
44
44
|
|
|
45
45
|
should equal
|
|
46
46
|
|
|
47
|
-
`):ae=" ".concat(X," ").concat(ae)),k=c(this,
|
|
47
|
+
`):ae=" ".concat(X," ").concat(ae)),k=c(this,O(I).call(this,"".concat(V).concat(ae)))}return Error.stackTraceLimit=_,k.generatedMessage=!z,Object.defineProperty(m(k),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),k.code="ERR_ASSERTION",k.actual=f,k.expected=v,k.operator=X,Error.captureStackTrace&&Error.captureStackTrace(m(k),E),k.stack,k.name="AssertionError",c(k)}return s(I,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(k,z){return d(this,e({},z,{customInspect:!1,depth:0}))}}]),I}(g(Error));return Dt=ge,Dt}var Lt,Fr;function to(){if(Fr)return Lt;Fr=1;function e(r,n){if(r==null)throw new TypeError("Cannot convert first argument to object");for(var s=Object(r),c=1;c<arguments.length;c++){var m=arguments[c];if(m!=null)for(var P=Object.keys(Object(m)),g=0,S=P.length;g<S;g++){var p=P[g],U=Object.getOwnPropertyDescriptor(m,p);U!==void 0&&U.enumerable&&(s[p]=m[p])}}return s}function t(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}return Lt={assign:e,polyfill:t},Lt}var Ut,Mr;function Ot(){if(Mr)return Ut;Mr=1;var e=Hn,t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,s=Gn,c=function(S){return typeof S=="function"&&r.call(S)==="[object Function]"},m=Vn(),P=function(S,p,U,x){if(p in S){if(x===!0){if(S[p]===U)return}else if(!c(x)||!x())return}m?s(S,p,U,!0):s(S,p,U)},g=function(S,p){var U=arguments.length>2?arguments[2]:{},x=e(p);t&&(x=n.call(x,Object.getOwnPropertySymbols(p)));for(var O=0;O<x.length;O+=1)P(S,x[O],p[x[O]],U[x[O]])};return g.supportsDescriptors=!!m,Ut=g,Ut}var qt,$r;function In(){if($r)return qt;$r=1;var e=function(t){return t!==t};return qt=function(r,n){return r===0&&n===0?1/r===1/n:!!(r===n||e(r)&&e(n))},qt}var Kt,zr;function _n(){if(zr)return Kt;zr=1;var e=In();return Kt=function(){return typeof Object.is=="function"?Object.is:e},Kt}var kt,Wr;function ro(){if(Wr)return kt;Wr=1;var e=_n(),t=Ot();return kt=function(){var n=e();return t(Object,{is:n},{is:function(){return Object.is!==n}}),n},kt}var Bt,Vr;function Cn(){if(Vr)return Bt;Vr=1;var e=Ot(),t=pn,r=In(),n=_n(),s=ro(),c=t(n(),Object);return e(c,{getPolyfill:n,implementation:r,shim:s}),Bt=c,Bt}var Ft,Hr;function Tn(){return Hr||(Hr=1,Ft=function(t){return t!==t}),Ft}var Mt,Gr;function Nn(){if(Gr)return Mt;Gr=1;var e=Tn();return Mt=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},Mt}var $t,Yr;function no(){if(Yr)return $t;Yr=1;var e=Ot(),t=Nn();return $t=function(){var n=t();return e(Number,{isNaN:n},{isNaN:function(){return Number.isNaN!==n}}),n},$t}var zt,Zr;function io(){if(Zr)return zt;Zr=1;var e=pn,t=Ot(),r=Tn(),n=Nn(),s=no(),c=e(n(),Number);return t(c,{getPolyfill:n,implementation:r,shim:s}),zt=c,zt}var Wt,Xr;function oo(){if(Xr)return Wt;Xr=1;function e(a,u){return n(a)||r(a,u)||t()}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(a,u){var N=[],B=!0,F=!1,H=void 0;try{for(var W=a[Symbol.iterator](),ee;!(B=(ee=W.next()).done)&&(N.push(ee.value),!(u&&N.length===u));B=!0);}catch(G){F=!0,H=G}finally{try{!B&&W.return!=null&&W.return()}finally{if(F)throw H}}return N}function n(a){if(Array.isArray(a))return a}function s(a){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(N){return typeof N}:s=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},s(a)}var c=/a/g.flags!==void 0,m=function(u){var N=[];return u.forEach(function(B){return N.push(B)}),N},P=function(u){var N=[];return u.forEach(function(B,F){return N.push([F,B])}),N},g=Object.is?Object.is:Cn(),S=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},p=Number.isNaN?Number.isNaN:io();function U(a){return a.call.bind(a)}var x=U(Object.prototype.hasOwnProperty),O=U(Object.prototype.propertyIsEnumerable),w=U(Object.prototype.toString),y=ct.types,d=y.isAnyArrayBuffer,i=y.isArrayBufferView,l=y.isDate,b=y.isMap,j=y.isRegExp,h=y.isSet,D=y.isNativeError,R=y.isBoxedPrimitive,C=y.isNumberObject,Q=y.isStringObject,ue=y.isBooleanObject,fe=y.isBigIntObject,ne=y.isSymbolObject,ie=y.isFloat32Array,ge=y.isFloat64Array;function A(a){if(a.length===0||a.length>10)return!0;for(var u=0;u<a.length;u++){var N=a.charCodeAt(u);if(N<48||N>57)return!0}return a.length===10&&a>=Math.pow(2,32)}function I(a){return Object.keys(a).filter(A).concat(S(a).filter(Object.prototype.propertyIsEnumerable.bind(a)))}/*!
|
|
48
48
|
* The buffer module from node.js, for the browser.
|
|
49
49
|
*
|
|
50
50
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
51
51
|
* @license MIT
|
|
52
|
-
*/function K(a,u){if(a===u)return 0;for(var N=a.length,B=u.length,F=0,H=Math.min(N,B);F<H;++F)if(a[F]!==u[F]){N=a[F],B=u[F];break}return N<B?-1:B<N?1:0}var k=!0,z=!1,X=0,E=1,f=2,v=3;function _(a,u){return c?a.source===u.source&&a.flags===u.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(u)}function q(a,u){if(a.byteLength!==u.byteLength)return!1;for(var N=0;N<a.byteLength;N++)if(a[N]!==u[N])return!1;return!0}function T(a,u){return a.byteLength!==u.byteLength?!1:K(new Uint8Array(a.buffer,a.byteOffset,a.byteLength),new Uint8Array(u.buffer,u.byteOffset,u.byteLength))===0}function V(a,u){return a.byteLength===u.byteLength&&K(new Uint8Array(a),new Uint8Array(u))===0}function ae(a,u){return C(a)?C(u)&&g(Number.prototype.valueOf.call(a),Number.prototype.valueOf.call(u)):Q(a)?Q(u)&&String.prototype.valueOf.call(a)===String.prototype.valueOf.call(u):ue(a)?ue(u)&&Boolean.prototype.valueOf.call(a)===Boolean.prototype.valueOf.call(u):fe(a)?fe(u)&&BigInt.prototype.valueOf.call(a)===BigInt.prototype.valueOf.call(u):ne(u)&&Symbol.prototype.valueOf.call(a)===Symbol.prototype.valueOf.call(u)}function te(a,u,N,B){if(a===u)return a!==0?!0:N?g(a,u):!0;if(N){if(s(a)!=="object")return typeof a=="number"&&p(a)&&p(u);if(s(u)!=="object"||a===null||u===null||Object.getPrototypeOf(a)!==Object.getPrototypeOf(u))return!1}else{if(a===null||s(a)!=="object")return u===null||s(u)!=="object"?a==u:!1;if(u===null||s(u)!=="object")return!1}var F=x(a),H=x(u);if(F!==H)return!1;if(Array.isArray(a)){if(a.length!==u.length)return!1;var W=I(a),ee=I(u);return W.length!==ee.length?!1:be(a,u,N,B,E,W)}if(F==="[object Object]"&&(!b(a)&&b(u)||!h(a)&&h(u)))return!1;if(l(a)){if(!l(u)||Date.prototype.getTime.call(a)!==Date.prototype.getTime.call(u))return!1}else if(j(a)){if(!j(u)||!_(a,u))return!1}else if(D(a)||a instanceof Error){if(a.message!==u.message||a.name!==u.name)return!1}else if(i(a)){if(!N&&(ie(a)||ge(a))){if(!q(a,u))return!1}else if(!T(a,u))return!1;var G=I(a),he=I(u);return G.length!==he.length?!1:be(a,u,N,B,X,G)}else{if(h(a))return!h(u)||a.size!==u.size?!1:be(a,u,N,B,f);if(b(a))return!b(u)||a.size!==u.size?!1:be(a,u,N,B,v);if(d(a)){if(!V(a,u))return!1}else if(R(a)&&!ae(a,u))return!1}return be(a,u,N,B,X)}function ye(a,u){return u.filter(function(N){return A(a,N)})}function be(a,u,N,B,F,H){if(arguments.length===5){H=Object.keys(a);var W=Object.keys(u);if(H.length!==W.length)return!1}for(var ee=0;ee<H.length;ee++)if(!w(u,H[ee]))return!1;if(N&&arguments.length===5){var G=S(a);if(G.length!==0){var he=0;for(ee=0;ee<G.length;ee++){var ve=G[ee];if(A(a,ve)){if(!A(u,ve))return!1;H.push(ve),he++}else if(A(u,ve))return!1}var rt=S(u);if(G.length!==rt.length&&ye(u,rt).length!==he)return!1}else{var Ge=S(u);if(Ge.length!==0&&ye(u,Ge).length!==0)return!1}}if(H.length===0&&(F===X||F===E&&a.length===0||a.size===0))return!0;if(B===void 0)B={val1:new Map,val2:new Map,position:0};else{var nt=B.val1.get(a);if(nt!==void 0){var Ye=B.val2.get(u);if(Ye!==void 0)return nt===Ye}B.position++}B.val1.set(a,B.position),B.val2.set(u,B.position);var $n=xe(a,u,N,H,B,F);return B.val1.delete(a),B.val2.delete(u),$n}function Ne(a,u,N,B){for(var F=m(a),H=0;H<F.length;H++){var W=F[H];if(te(u,W,N,B))return a.delete(W),!0}return!1}function Oe(a){switch(s(a)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":a=+a;case"number":if(p(a))return!1}return!0}function de(a,u,N){var B=Oe(N);return B??(u.has(B)&&!a.has(B))}function Be(a,u,N,B,F){var H=Oe(N);if(H!=null)return H;var W=u.get(H);return W===void 0&&!u.has(H)||!te(B,W,!1,F)?!1:!a.has(H)&&te(B,W,!1,F)}function He(a,u,N,B){for(var F=null,H=m(a),W=0;W<H.length;W++){var ee=H[W];if(s(ee)==="object"&&ee!==null)F===null&&(F=new Set),F.add(ee);else if(!u.has(ee)){if(N||!de(a,u,ee))return!1;F===null&&(F=new Set),F.add(ee)}}if(F!==null){for(var G=m(u),he=0;he<G.length;he++){var ve=G[he];if(s(ve)==="object"&&ve!==null){if(!Ne(F,ve,N,B))return!1}else if(!N&&!a.has(ve)&&!Ne(F,ve,N,B))return!1}return F.size===0}return!0}function pe(a,u,N,B,F,H){for(var W=m(a),ee=0;ee<W.length;ee++){var G=W[ee];if(te(N,G,F,H)&&te(B,u.get(G),F,H))return a.delete(G),!0}return!1}function Ae(a,u,N,B){for(var F=null,H=P(a),W=0;W<H.length;W++){var ee=e(H[W],2),G=ee[0],he=ee[1];if(s(G)==="object"&&G!==null)F===null&&(F=new Set),F.add(G);else{var ve=u.get(G);if(ve===void 0&&!u.has(G)||!te(he,ve,N,B)){if(N||!Be(a,u,G,he,B))return!1;F===null&&(F=new Set),F.add(G)}}}if(F!==null){for(var rt=P(u),Ge=0;Ge<rt.length;Ge++){var nt=e(rt[Ge],2),G=nt[0],Ye=nt[1];if(s(G)==="object"&&G!==null){if(!pe(F,a,G,Ye,N,B))return!1}else if(!N&&(!a.has(G)||!te(a.get(G),Ye,!1,B))&&!pe(F,a,G,Ye,!1,B))return!1}return F.size===0}return!0}function xe(a,u,N,B,F,H){var W=0;if(H===f){if(!He(a,u,N,F))return!1}else if(H===v){if(!Ae(a,u,N,F))return!1}else if(H===E)for(;W<a.length;W++)if(w(a,W)){if(!w(u,W)||!te(a[W],u[W],N,F))return!1}else{if(w(u,W))return!1;for(var ee=Object.keys(a);W<ee.length;W++){var G=ee[W];if(!w(u,G)||!te(a[G],u[G],N,F))return!1}return ee.length===Object.keys(u).length}for(W=0;W<B.length;W++){var he=B[W];if(!te(a[he],u[he],N,F))return!1}return!0}function De(a,u){return te(a,u,z)}function L(a,u){return te(a,u,k)}return Wt={isDeepEqual:De,isDeepStrictEqual:L},Wt}var Jr;function ar(){if(Jr)return Tt.exports;Jr=1;function e(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(E)}function t(E,f){if(!(E instanceof f))throw new TypeError("Cannot call a class as a function")}var r=Rn(),n=r.codes,s=n.ERR_AMBIGUOUS_ARGUMENT,c=n.ERR_INVALID_ARG_TYPE,m=n.ERR_INVALID_ARG_VALUE,P=n.ERR_INVALID_RETURN_VALUE,g=n.ERR_MISSING_ARGS,S=eo(),p=ct,U=p.inspect,w=ct.types,A=w.isPromise,x=w.isRegExp,y=Object.assign?Object.assign:to().assign,d=Object.is?Object.is:Cn(),i,l;function b(){var E=oo();i=E.isDeepEqual,l=E.isDeepStrictEqual}var j=!1,h=Tt.exports=ue,D={};function R(E){throw E.message instanceof Error?E.message:new S(E)}function C(E,f,v,_,q){var T=arguments.length,V;if(T===0)V="Failed";else if(T===1)v=E,E=void 0;else{if(j===!1){j=!0;var ae=Re.emitWarning?Re.emitWarning:console.warn.bind(console);ae("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}T===2&&(_="!=")}if(v instanceof Error)throw v;var te={actual:E,expected:f,operator:_===void 0?"fail":_,stackStartFn:q||C};v!==void 0&&(te.message=v);var ye=new S(te);throw V&&(ye.message=V,ye.generatedMessage=!0),ye}h.fail=C,h.AssertionError=S;function Q(E,f,v,_){if(!v){var q=!1;if(f===0)q=!0,_="No value argument passed to `assert.ok()`";else if(_ instanceof Error)throw _;var T=new S({actual:v,expected:!0,message:_,operator:"==",stackStartFn:E});throw T.generatedMessage=q,T}}function ue(){for(var E=arguments.length,f=new Array(E),v=0;v<E;v++)f[v]=arguments[v];Q.apply(void 0,[ue,f.length].concat(f))}h.ok=ue,h.equal=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");f!=v&&R({actual:f,expected:v,message:_,operator:"==",stackStartFn:E})},h.notEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");f==v&&R({actual:f,expected:v,message:_,operator:"!=",stackStartFn:E})},h.deepEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),i(f,v)||R({actual:f,expected:v,message:_,operator:"deepEqual",stackStartFn:E})},h.notDeepEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),i(f,v)&&R({actual:f,expected:v,message:_,operator:"notDeepEqual",stackStartFn:E})},h.deepStrictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),l(f,v)||R({actual:f,expected:v,message:_,operator:"deepStrictEqual",stackStartFn:E})},h.notDeepStrictEqual=fe;function fe(E,f,v){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),l(E,f)&&R({actual:E,expected:f,message:v,operator:"notDeepStrictEqual",stackStartFn:fe})}h.strictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");d(f,v)||R({actual:f,expected:v,message:_,operator:"strictEqual",stackStartFn:E})},h.notStrictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");d(f,v)&&R({actual:f,expected:v,message:_,operator:"notStrictEqual",stackStartFn:E})};var ne=function E(f,v,_){var q=this;t(this,E),v.forEach(function(T){T in f&&(_!==void 0&&typeof _[T]=="string"&&x(f[T])&&f[T].test(_[T])?q[T]=_[T]:q[T]=f[T])})};function ie(E,f,v,_,q,T){if(!(v in E)||!l(E[v],f[v])){if(!_){var V=new ne(E,q),ae=new ne(f,q,E),te=new S({actual:V,expected:ae,operator:"deepStrictEqual",stackStartFn:T});throw te.actual=E,te.expected=f,te.operator=T.name,te}R({actual:E,expected:f,message:_,operator:T.name,stackStartFn:T})}}function ge(E,f,v,_){if(typeof f!="function"){if(x(f))return f.test(E);if(arguments.length===2)throw new c("expected",["Function","RegExp"],f);if(e(E)!=="object"||E===null){var q=new S({actual:E,expected:f,message:v,operator:"deepStrictEqual",stackStartFn:_});throw q.operator=_.name,q}var T=Object.keys(f);if(f instanceof Error)T.push("name","message");else if(T.length===0)throw new m("error",f,"may not be an empty object");return i===void 0&&b(),T.forEach(function(V){typeof E[V]=="string"&&x(f[V])&&f[V].test(E[V])||ie(E,f,V,v,T,_)}),!0}return f.prototype!==void 0&&E instanceof f?!0:Error.isPrototypeOf(f)?!1:f.call({},E)===!0}function O(E){if(typeof E!="function")throw new c("fn","Function",E);try{E()}catch(f){return f}return D}function I(E){return A(E)||E!==null&&e(E)==="object"&&typeof E.then=="function"&&typeof E.catch=="function"}function K(E){return Promise.resolve().then(function(){var f;if(typeof E=="function"){if(f=E(),!I(f))throw new P("instance of Promise","promiseFn",f)}else if(I(E))f=E;else throw new c("promiseFn",["Function","Promise"],E);return Promise.resolve().then(function(){return f}).then(function(){return D}).catch(function(v){return v})})}function k(E,f,v,_){if(typeof v=="string"){if(arguments.length===4)throw new c("error",["Object","Error","Function","RegExp"],v);if(e(f)==="object"&&f!==null){if(f.message===v)throw new s("error/message",'The error message "'.concat(f.message,'" is identical to the message.'))}else if(f===v)throw new s("error/message",'The error "'.concat(f,'" is identical to the message.'));_=v,v=void 0}else if(v!=null&&e(v)!=="object"&&typeof v!="function")throw new c("error",["Object","Error","Function","RegExp"],v);if(f===D){var q="";v&&v.name&&(q+=" (".concat(v.name,")")),q+=_?": ".concat(_):".";var T=E.name==="rejects"?"rejection":"exception";R({actual:void 0,expected:v,operator:E.name,message:"Missing expected ".concat(T).concat(q),stackStartFn:E})}if(v&&!ge(f,v,_,E))throw f}function z(E,f,v,_){if(f!==D){if(typeof v=="string"&&(_=v,v=void 0),!v||ge(f,v)){var q=_?": ".concat(_):".",T=E.name==="doesNotReject"?"rejection":"exception";R({actual:f,expected:v,operator:E.name,message:"Got unwanted ".concat(T).concat(q,`
|
|
53
|
-
`)+'Actual message: "'.concat(f&&f.message,'"'),stackStartFn:E})}throw f}}h.throws=function E(f){for(var v=arguments.length,_=new Array(v>1?v-1:0),q=1;q<v;q++)_[q-1]=arguments[q];k.apply(void 0,[E,
|
|
52
|
+
*/function K(a,u){if(a===u)return 0;for(var N=a.length,B=u.length,F=0,H=Math.min(N,B);F<H;++F)if(a[F]!==u[F]){N=a[F],B=u[F];break}return N<B?-1:B<N?1:0}var k=!0,z=!1,X=0,E=1,f=2,v=3;function _(a,u){return c?a.source===u.source&&a.flags===u.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(u)}function q(a,u){if(a.byteLength!==u.byteLength)return!1;for(var N=0;N<a.byteLength;N++)if(a[N]!==u[N])return!1;return!0}function T(a,u){return a.byteLength!==u.byteLength?!1:K(new Uint8Array(a.buffer,a.byteOffset,a.byteLength),new Uint8Array(u.buffer,u.byteOffset,u.byteLength))===0}function V(a,u){return a.byteLength===u.byteLength&&K(new Uint8Array(a),new Uint8Array(u))===0}function ae(a,u){return C(a)?C(u)&&g(Number.prototype.valueOf.call(a),Number.prototype.valueOf.call(u)):Q(a)?Q(u)&&String.prototype.valueOf.call(a)===String.prototype.valueOf.call(u):ue(a)?ue(u)&&Boolean.prototype.valueOf.call(a)===Boolean.prototype.valueOf.call(u):fe(a)?fe(u)&&BigInt.prototype.valueOf.call(a)===BigInt.prototype.valueOf.call(u):ne(u)&&Symbol.prototype.valueOf.call(a)===Symbol.prototype.valueOf.call(u)}function te(a,u,N,B){if(a===u)return a!==0?!0:N?g(a,u):!0;if(N){if(s(a)!=="object")return typeof a=="number"&&p(a)&&p(u);if(s(u)!=="object"||a===null||u===null||Object.getPrototypeOf(a)!==Object.getPrototypeOf(u))return!1}else{if(a===null||s(a)!=="object")return u===null||s(u)!=="object"?a==u:!1;if(u===null||s(u)!=="object")return!1}var F=w(a),H=w(u);if(F!==H)return!1;if(Array.isArray(a)){if(a.length!==u.length)return!1;var W=I(a),ee=I(u);return W.length!==ee.length?!1:be(a,u,N,B,E,W)}if(F==="[object Object]"&&(!b(a)&&b(u)||!h(a)&&h(u)))return!1;if(l(a)){if(!l(u)||Date.prototype.getTime.call(a)!==Date.prototype.getTime.call(u))return!1}else if(j(a)){if(!j(u)||!_(a,u))return!1}else if(D(a)||a instanceof Error){if(a.message!==u.message||a.name!==u.name)return!1}else if(i(a)){if(!N&&(ie(a)||ge(a))){if(!q(a,u))return!1}else if(!T(a,u))return!1;var G=I(a),he=I(u);return G.length!==he.length?!1:be(a,u,N,B,X,G)}else{if(h(a))return!h(u)||a.size!==u.size?!1:be(a,u,N,B,f);if(b(a))return!b(u)||a.size!==u.size?!1:be(a,u,N,B,v);if(d(a)){if(!V(a,u))return!1}else if(R(a)&&!ae(a,u))return!1}return be(a,u,N,B,X)}function ye(a,u){return u.filter(function(N){return O(a,N)})}function be(a,u,N,B,F,H){if(arguments.length===5){H=Object.keys(a);var W=Object.keys(u);if(H.length!==W.length)return!1}for(var ee=0;ee<H.length;ee++)if(!x(u,H[ee]))return!1;if(N&&arguments.length===5){var G=S(a);if(G.length!==0){var he=0;for(ee=0;ee<G.length;ee++){var ve=G[ee];if(O(a,ve)){if(!O(u,ve))return!1;H.push(ve),he++}else if(O(u,ve))return!1}var rt=S(u);if(G.length!==rt.length&&ye(u,rt).length!==he)return!1}else{var Ge=S(u);if(Ge.length!==0&&ye(u,Ge).length!==0)return!1}}if(H.length===0&&(F===X||F===E&&a.length===0||a.size===0))return!0;if(B===void 0)B={val1:new Map,val2:new Map,position:0};else{var nt=B.val1.get(a);if(nt!==void 0){var Ye=B.val2.get(u);if(Ye!==void 0)return nt===Ye}B.position++}B.val1.set(a,B.position),B.val2.set(u,B.position);var $n=we(a,u,N,H,B,F);return B.val1.delete(a),B.val2.delete(u),$n}function Ne(a,u,N,B){for(var F=m(a),H=0;H<F.length;H++){var W=F[H];if(te(u,W,N,B))return a.delete(W),!0}return!1}function Ae(a){switch(s(a)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":a=+a;case"number":if(p(a))return!1}return!0}function de(a,u,N){var B=Ae(N);return B??(u.has(B)&&!a.has(B))}function Be(a,u,N,B,F){var H=Ae(N);if(H!=null)return H;var W=u.get(H);return W===void 0&&!u.has(H)||!te(B,W,!1,F)?!1:!a.has(H)&&te(B,W,!1,F)}function He(a,u,N,B){for(var F=null,H=m(a),W=0;W<H.length;W++){var ee=H[W];if(s(ee)==="object"&&ee!==null)F===null&&(F=new Set),F.add(ee);else if(!u.has(ee)){if(N||!de(a,u,ee))return!1;F===null&&(F=new Set),F.add(ee)}}if(F!==null){for(var G=m(u),he=0;he<G.length;he++){var ve=G[he];if(s(ve)==="object"&&ve!==null){if(!Ne(F,ve,N,B))return!1}else if(!N&&!a.has(ve)&&!Ne(F,ve,N,B))return!1}return F.size===0}return!0}function pe(a,u,N,B,F,H){for(var W=m(a),ee=0;ee<W.length;ee++){var G=W[ee];if(te(N,G,F,H)&&te(B,u.get(G),F,H))return a.delete(G),!0}return!1}function Oe(a,u,N,B){for(var F=null,H=P(a),W=0;W<H.length;W++){var ee=e(H[W],2),G=ee[0],he=ee[1];if(s(G)==="object"&&G!==null)F===null&&(F=new Set),F.add(G);else{var ve=u.get(G);if(ve===void 0&&!u.has(G)||!te(he,ve,N,B)){if(N||!Be(a,u,G,he,B))return!1;F===null&&(F=new Set),F.add(G)}}}if(F!==null){for(var rt=P(u),Ge=0;Ge<rt.length;Ge++){var nt=e(rt[Ge],2),G=nt[0],Ye=nt[1];if(s(G)==="object"&&G!==null){if(!pe(F,a,G,Ye,N,B))return!1}else if(!N&&(!a.has(G)||!te(a.get(G),Ye,!1,B))&&!pe(F,a,G,Ye,!1,B))return!1}return F.size===0}return!0}function we(a,u,N,B,F,H){var W=0;if(H===f){if(!He(a,u,N,F))return!1}else if(H===v){if(!Oe(a,u,N,F))return!1}else if(H===E)for(;W<a.length;W++)if(x(a,W)){if(!x(u,W)||!te(a[W],u[W],N,F))return!1}else{if(x(u,W))return!1;for(var ee=Object.keys(a);W<ee.length;W++){var G=ee[W];if(!x(u,G)||!te(a[G],u[G],N,F))return!1}return ee.length===Object.keys(u).length}for(W=0;W<B.length;W++){var he=B[W];if(!te(a[he],u[he],N,F))return!1}return!0}function De(a,u){return te(a,u,z)}function L(a,u){return te(a,u,k)}return Wt={isDeepEqual:De,isDeepStrictEqual:L},Wt}var Jr;function ar(){if(Jr)return Tt.exports;Jr=1;function e(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(v){return typeof v}:e=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},e(E)}function t(E,f){if(!(E instanceof f))throw new TypeError("Cannot call a class as a function")}var r=Rn(),n=r.codes,s=n.ERR_AMBIGUOUS_ARGUMENT,c=n.ERR_INVALID_ARG_TYPE,m=n.ERR_INVALID_ARG_VALUE,P=n.ERR_INVALID_RETURN_VALUE,g=n.ERR_MISSING_ARGS,S=eo(),p=ct,U=p.inspect,x=ct.types,O=x.isPromise,w=x.isRegExp,y=Object.assign?Object.assign:to().assign,d=Object.is?Object.is:Cn(),i,l;function b(){var E=oo();i=E.isDeepEqual,l=E.isDeepStrictEqual}var j=!1,h=Tt.exports=ue,D={};function R(E){throw E.message instanceof Error?E.message:new S(E)}function C(E,f,v,_,q){var T=arguments.length,V;if(T===0)V="Failed";else if(T===1)v=E,E=void 0;else{if(j===!1){j=!0;var ae=Re.emitWarning?Re.emitWarning:console.warn.bind(console);ae("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}T===2&&(_="!=")}if(v instanceof Error)throw v;var te={actual:E,expected:f,operator:_===void 0?"fail":_,stackStartFn:q||C};v!==void 0&&(te.message=v);var ye=new S(te);throw V&&(ye.message=V,ye.generatedMessage=!0),ye}h.fail=C,h.AssertionError=S;function Q(E,f,v,_){if(!v){var q=!1;if(f===0)q=!0,_="No value argument passed to `assert.ok()`";else if(_ instanceof Error)throw _;var T=new S({actual:v,expected:!0,message:_,operator:"==",stackStartFn:E});throw T.generatedMessage=q,T}}function ue(){for(var E=arguments.length,f=new Array(E),v=0;v<E;v++)f[v]=arguments[v];Q.apply(void 0,[ue,f.length].concat(f))}h.ok=ue,h.equal=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");f!=v&&R({actual:f,expected:v,message:_,operator:"==",stackStartFn:E})},h.notEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");f==v&&R({actual:f,expected:v,message:_,operator:"!=",stackStartFn:E})},h.deepEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),i(f,v)||R({actual:f,expected:v,message:_,operator:"deepEqual",stackStartFn:E})},h.notDeepEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),i(f,v)&&R({actual:f,expected:v,message:_,operator:"notDeepEqual",stackStartFn:E})},h.deepStrictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),l(f,v)||R({actual:f,expected:v,message:_,operator:"deepStrictEqual",stackStartFn:E})},h.notDeepStrictEqual=fe;function fe(E,f,v){if(arguments.length<2)throw new g("actual","expected");i===void 0&&b(),l(E,f)&&R({actual:E,expected:f,message:v,operator:"notDeepStrictEqual",stackStartFn:fe})}h.strictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");d(f,v)||R({actual:f,expected:v,message:_,operator:"strictEqual",stackStartFn:E})},h.notStrictEqual=function E(f,v,_){if(arguments.length<2)throw new g("actual","expected");d(f,v)&&R({actual:f,expected:v,message:_,operator:"notStrictEqual",stackStartFn:E})};var ne=function E(f,v,_){var q=this;t(this,E),v.forEach(function(T){T in f&&(_!==void 0&&typeof _[T]=="string"&&w(f[T])&&f[T].test(_[T])?q[T]=_[T]:q[T]=f[T])})};function ie(E,f,v,_,q,T){if(!(v in E)||!l(E[v],f[v])){if(!_){var V=new ne(E,q),ae=new ne(f,q,E),te=new S({actual:V,expected:ae,operator:"deepStrictEqual",stackStartFn:T});throw te.actual=E,te.expected=f,te.operator=T.name,te}R({actual:E,expected:f,message:_,operator:T.name,stackStartFn:T})}}function ge(E,f,v,_){if(typeof f!="function"){if(w(f))return f.test(E);if(arguments.length===2)throw new c("expected",["Function","RegExp"],f);if(e(E)!=="object"||E===null){var q=new S({actual:E,expected:f,message:v,operator:"deepStrictEqual",stackStartFn:_});throw q.operator=_.name,q}var T=Object.keys(f);if(f instanceof Error)T.push("name","message");else if(T.length===0)throw new m("error",f,"may not be an empty object");return i===void 0&&b(),T.forEach(function(V){typeof E[V]=="string"&&w(f[V])&&f[V].test(E[V])||ie(E,f,V,v,T,_)}),!0}return f.prototype!==void 0&&E instanceof f?!0:Error.isPrototypeOf(f)?!1:f.call({},E)===!0}function A(E){if(typeof E!="function")throw new c("fn","Function",E);try{E()}catch(f){return f}return D}function I(E){return O(E)||E!==null&&e(E)==="object"&&typeof E.then=="function"&&typeof E.catch=="function"}function K(E){return Promise.resolve().then(function(){var f;if(typeof E=="function"){if(f=E(),!I(f))throw new P("instance of Promise","promiseFn",f)}else if(I(E))f=E;else throw new c("promiseFn",["Function","Promise"],E);return Promise.resolve().then(function(){return f}).then(function(){return D}).catch(function(v){return v})})}function k(E,f,v,_){if(typeof v=="string"){if(arguments.length===4)throw new c("error",["Object","Error","Function","RegExp"],v);if(e(f)==="object"&&f!==null){if(f.message===v)throw new s("error/message",'The error message "'.concat(f.message,'" is identical to the message.'))}else if(f===v)throw new s("error/message",'The error "'.concat(f,'" is identical to the message.'));_=v,v=void 0}else if(v!=null&&e(v)!=="object"&&typeof v!="function")throw new c("error",["Object","Error","Function","RegExp"],v);if(f===D){var q="";v&&v.name&&(q+=" (".concat(v.name,")")),q+=_?": ".concat(_):".";var T=E.name==="rejects"?"rejection":"exception";R({actual:void 0,expected:v,operator:E.name,message:"Missing expected ".concat(T).concat(q),stackStartFn:E})}if(v&&!ge(f,v,_,E))throw f}function z(E,f,v,_){if(f!==D){if(typeof v=="string"&&(_=v,v=void 0),!v||ge(f,v)){var q=_?": ".concat(_):".",T=E.name==="doesNotReject"?"rejection":"exception";R({actual:f,expected:v,operator:E.name,message:"Got unwanted ".concat(T).concat(q,`
|
|
53
|
+
`)+'Actual message: "'.concat(f&&f.message,'"'),stackStartFn:E})}throw f}}h.throws=function E(f){for(var v=arguments.length,_=new Array(v>1?v-1:0),q=1;q<v;q++)_[q-1]=arguments[q];k.apply(void 0,[E,A(f)].concat(_))},h.rejects=function E(f){for(var v=arguments.length,_=new Array(v>1?v-1:0),q=1;q<v;q++)_[q-1]=arguments[q];return K(f).then(function(T){return k.apply(void 0,[E,T].concat(_))})},h.doesNotThrow=function E(f){for(var v=arguments.length,_=new Array(v>1?v-1:0),q=1;q<v;q++)_[q-1]=arguments[q];z.apply(void 0,[E,A(f)].concat(_))},h.doesNotReject=function E(f){for(var v=arguments.length,_=new Array(v>1?v-1:0),q=1;q<v;q++)_[q-1]=arguments[q];return K(f).then(function(T){return z.apply(void 0,[E,T].concat(_))})},h.ifError=function E(f){if(f!=null){var v="ifError got unwanted exception: ";e(f)==="object"&&typeof f.message=="string"?f.message.length===0&&f.constructor?v+=f.constructor.name:v+=f.message:v+=U(f);var _=new S({actual:f,expected:null,operator:"ifError",message:v,stackStartFn:E}),q=f.stack;if(typeof q=="string"){var T=q.split(`
|
|
54
54
|
`);T.shift();for(var V=_.stack.split(`
|
|
55
55
|
`),ae=0;ae<T.length;ae++){var te=V.indexOf(T[ae]);if(te!==-1){V=V.slice(0,te);break}}_.stack="".concat(V.join(`
|
|
56
56
|
`),`
|
|
57
57
|
`).concat(T.join(`
|
|
58
|
-
`))}throw _}};function X(){for(var E=arguments.length,f=new Array(E),v=0;v<E;v++)f[v]=arguments[v];Q.apply(void 0,[X,f.length].concat(f))}return h.strict=y(X,h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict,Tt.exports}var pt=lr.Buffer;function ao(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var s=e.charAt(n),c=s.charCodeAt(0);if(t[c]!==255)throw new TypeError(s+" is ambiguous");t[c]=n}var m=e.length,P=e.charAt(0),g=Math.log(m)/Math.log(256),S=Math.log(256)/Math.log(m);function p(A){if((Array.isArray(A)||A instanceof Uint8Array)&&(A=pt.from(A)),!pt.isBuffer(A))throw new TypeError("Expected Buffer");if(A.length===0)return"";for(var x=0,y=0,d=0,i=A.length;d!==i&&A[d]===0;)d++,x++;for(var l=(i-d)*S+1>>>0,b=new Uint8Array(l);d!==i;){for(var j=A[d],h=0,D=l-1;(j!==0||h<y)&&D!==-1;D--,h++)j+=256*b[D]>>>0,b[D]=j%m>>>0,j=j/m>>>0;if(j!==0)throw new Error("Non-zero carry");y=h,d++}for(var R=l-y;R!==l&&b[R]===0;)R++;for(var C=P.repeat(x);R<l;++R)C+=e.charAt(b[R]);return C}function U(A){if(typeof A!="string")throw new TypeError("Expected String");if(A.length===0)return pt.alloc(0);for(var x=0,y=0,d=0;A[x]===P;)y++,x++;for(var i=(A.length-x)*g+1>>>0,l=new Uint8Array(i);A[x];){var b=t[A.charCodeAt(x)];if(b===255)return;for(var j=0,h=i-1;(b!==0||j<d)&&h!==-1;h--,j++)b+=m*l[h]>>>0,l[h]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");d=j,x++}for(var D=i-d;D!==i&&l[D]===0;)D++;var R=pt.allocUnsafe(y+(i-D));R.fill(0,0,y);for(var C=y;D!==i;)R[C++]=l[D++];return R}function w(A){var x=U(A);if(x)return x;throw new Error("Non-base"+m+" character")}return{encode:p,decodeUnsafe:U,decode:w}}var so=ao,co=so,lo="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",uo=co(lo),Vt=uo,fo=lr.Buffer,po=function(e){function t(c){var m=e(c);return Vt.encode(fo.concat([c,m],c.length+4))}function r(c){var m=c.slice(0,-4),P=c.slice(-4),g=e(m);if(!(P[0]^g[0]|P[1]^g[1]|P[2]^g[2]|P[3]^g[3]))return m}function n(c){var m=Vt.decodeUnsafe(c);if(m)return r(m)}function s(c){var m=Vt.decode(c),P=r(m);if(!P)throw new Error("Invalid checksum");return P}return{encode:t,decode:s,decodeUnsafe:n}},Qr=Yn(),mo=po;function ho(e){var t=Qr("sha256").update(e).digest();return Qr("sha256").update(t).digest()}var go=mo(ho);const J={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 we(e,t){if(!e)throw new Error(t)}function Z(e,t,r){if(we(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){const n=r.join(", "),s=`Expected ${e} to be an Uint8Array with length [${n}]`;we(r.includes(t.length),s)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;we(t.length===r,n)}}function Fe(e){we(Xe(e)==="Boolean","Expected compressed to be a Boolean")}function Se(e=r=>new Uint8Array(r),t){return typeof e=="function"&&(e=e(t)),Z("output",e,t),e}function Xe(e){return Object.prototype.toString.call(e).slice(8,-1)}var yo=e=>({contextRandomize(t){switch(we(t===null||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),t!==null&&Z("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(J.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(t){return Z("private key",t,32),e.privateKeyVerify(t)===0},privateKeyNegate(t){switch(Z("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(J.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(t,r){switch(Z("private key",t,32),Z("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(J.TWEAK_ADD)}},privateKeyTweakMul(t,r){switch(Z("private key",t,32),Z("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(J.TWEAK_MUL)}},publicKeyVerify(t){return Z("public key",t,[33,65]),e.publicKeyVerify(t)===0},publicKeyCreate(t,r=!0,n){switch(Z("private key",t,32),Fe(r),n=Se(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(J.SECKEY_INVALID);case 2:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyConvert(t,r=!0,n){switch(Z("public key",t,[33,65]),Fe(r),n=Se(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyNegate(t,r=!0,n){switch(Z("public key",t,[33,65]),Fe(r),n=Se(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE);case 3:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyCombine(t,r=!0,n){we(Array.isArray(t),"Expected public keys to be an Array"),we(t.length>0,"Expected public keys array will have more than zero items");for(const s of t)Z("public key",s,[33,65]);switch(Fe(r),n=Se(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.PUBKEY_COMBINE);case 3:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(t,r,n=!0,s){switch(Z("public key",t,[33,65]),Z("tweak",r,32),Fe(n),s=Se(s,n?33:65),e.publicKeyTweakAdd(s,t,r)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.TWEAK_ADD)}},publicKeyTweakMul(t,r,n=!0,s){switch(Z("public key",t,[33,65]),Z("tweak",r,32),Fe(n),s=Se(s,n?33:65),e.publicKeyTweakMul(s,t,r)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.TWEAK_MUL)}},signatureNormalize(t){switch(Z("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(J.SIG_PARSE)}},signatureExport(t,r){Z("signature",t,64),r=Se(r,72);const n={output:r,outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},signatureImport(t,r){switch(Z("signature",t),r=Se(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},ecdsaSign(t,r,n={},s){Z("message",t,32),Z("private key",r,32),we(Xe(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Z("options.data",n.data),n.noncefn!==void 0&&we(Xe(n.noncefn)==="Function","Expected options.noncefn to be a Function"),s=Se(s,64);const c={signature:s,recid:null};switch(e.ecdsaSign(c,t,r,n.data,n.noncefn)){case 0:return c;case 1:throw new Error(J.SIGN);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},ecdsaVerify(t,r,n){switch(Z("signature",t,64),Z("message",r,32),Z("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.PUBKEY_PARSE)}},ecdsaRecover(t,r,n,s=!0,c){switch(Z("signature",t,64),we(Xe(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Z("message",n,32),Fe(s),c=Se(c,s?33:65),e.ecdsaRecover(c,t,r,n)){case 0:return c;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.RECOVER);case 3:throw new Error(J.IMPOSSIBLE_CASE)}},ecdh(t,r,n={},s){switch(Z("public key",t,[33,65]),Z("private key",r,32),we(Xe(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Z("options.data",n.data),n.hashfn!==void 0?(we(Xe(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&Z("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&Z("options.ybuf",n.ybuf,32),Z("output",s)):s=Se(s,32),e.ecdh(s,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.ECDH)}}});const vo=Zn().ec,Ie=new vo("secp256k1"),Y=Ie.curve,re=Y.n.constructor;function bo(e,t){let r=new re(t);if(r.cmp(Y.p)>=0)return null;r=r.toRed(Y.red);let n=r.redSqr().redIMul(r).redIAdd(Y.b).redSqrt();return e===3!==n.isOdd()&&(n=n.redNeg()),Ie.keyPair({pub:{x:r,y:n}})}function xo(e,t,r){let n=new re(t),s=new re(r);if(n.cmp(Y.p)>=0||s.cmp(Y.p)>=0||(n=n.toRed(Y.red),s=s.toRed(Y.red),(e===6||e===7)&&s.isOdd()!==(e===7)))return null;const c=n.redSqr().redIMul(n);return s.redSqr().redISub(c.redIAdd(Y.b)).isZero()?Ie.keyPair({pub:{x:n,y:s}}):null}function Le(e){const t=e[0];switch(t){case 2:case 3:return e.length!==33?null:bo(t,e.subarray(1,33));case 4:case 6:case 7:return e.length!==65?null:xo(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function Me(e,t){const r=t.encode(null,e.length===33);for(let n=0;n<e.length;++n)e[n]=r[n]}var wo={contextRandomize(){return 0},privateKeyVerify(e){const t=new re(e);return t.cmp(Y.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new re(e),r=Y.n.sub(t).umod(Y.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd(e,t){const r=new re(t);if(r.cmp(Y.n)>=0||(r.iadd(new re(e)),r.cmp(Y.n)>=0&&r.isub(Y.n),r.isZero()))return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new re(t);if(r.cmp(Y.n)>=0||r.isZero())return 1;r.imul(new re(e)),r.cmp(Y.n)>=0&&(r=r.umod(Y.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify(e){return Le(e)===null?1:0},publicKeyCreate(e,t){const r=new re(t);if(r.cmp(Y.n)>=0||r.isZero())return 1;const n=Ie.keyFromPrivate(t).getPublic();return Me(e,n),0},publicKeyConvert(e,t){const r=Le(t);if(r===null)return 1;const n=r.getPublic();return Me(e,n),0},publicKeyNegate(e,t){const r=Le(t);if(r===null)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),Me(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let s=0;s<t.length;++s)if(r[s]=Le(t[s]),r[s]===null)return 1;let n=r[0].getPublic();for(let s=1;s<r.length;++s)n=n.add(r[s].pub);return n.isInfinity()?2:(Me(e,n),0)},publicKeyTweakAdd(e,t,r){const n=Le(t);if(n===null)return 1;if(r=new re(r),r.cmp(Y.n)>=0)return 2;const s=n.getPublic().add(Y.g.mul(r));return s.isInfinity()?2:(Me(e,s),0)},publicKeyTweakMul(e,t,r){const n=Le(t);if(n===null)return 1;if(r=new re(r),r.cmp(Y.n)>=0||r.isZero())return 2;const s=n.getPublic().mul(r);return Me(e,s),0},signatureNormalize(e){const t=new re(e.subarray(0,32)),r=new re(e.subarray(32,64));return t.cmp(Y.n)>=0||r.cmp(Y.n)>=0?1:(r.cmp(Ie.nh)===1&&e.set(Y.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new re(r).cmp(Y.n)>=0||new re(n).cmp(Y.n)>=0)return 1;const{output:s}=e;let c=s.subarray(4,37);c[0]=0,c.set(r,1);let m=33,P=0;for(;m>1&&c[P]===0&&!(c[P+1]&128);--m,++P);if(c=c.subarray(P),c[0]&128||m>1&&c[0]===0&&!(c[1]&128))return 1;let g=s.subarray(39,72);g[0]=0,g.set(n,1);let S=33,p=0;for(;S>1&&g[p]===0&&!(g[p+1]&128);--S,++p);return g=g.subarray(p),g[0]&128||S>1&&g[0]===0&&!(g[1]&128)?1:(e.outputlen=6+m+S,s[0]=48,s[1]=e.outputlen-2,s[2]=2,s[3]=c.length,s.set(c,4),s[4+m]=2,s[5+m]=g.length,s.set(g,6+m),0)},signatureImport(e,t){if(t.length<8||t.length>72||t[0]!==48||t[1]!==t.length-2||t[2]!==2)return 1;const r=t[3];if(r===0||5+r>=t.length||t[4+r]!==2)return 1;const n=t[5+r];if(n===0||6+r+n!==t.length||t[4]&128||r>1&&t[4]===0&&!(t[5]&128)||t[r+6]&128||n>1&&t[r+6]===0&&!(t[r+7]&128))return 1;let s=t.subarray(4,4+r);if(s.length===33&&s[0]===0&&(s=s.subarray(1)),s.length>32)return 1;let c=t.subarray(6+r);if(c.length===33&&c[0]===0&&(c=c.slice(1)),c.length>32)throw new Error("S length is too long");let m=new re(s);m.cmp(Y.n)>=0&&(m=new re(0));let P=new re(t.subarray(6+r));return P.cmp(Y.n)>=0&&(P=new re(0)),e.set(m.toArrayLike(Uint8Array,"be",32),0),e.set(P.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,s){if(s){const P=s;s=g=>{const S=P(t,r,null,n,g);if(!(S instanceof Uint8Array&&S.length===32))throw new Error("This is the way");return new re(S)}}const c=new re(r);if(c.cmp(Y.n)>=0||c.isZero())return 1;let m;try{m=Ie.sign(t,r,{canonical:!0,k:s,pers:n})}catch{return 1}return e.signature.set(m.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(m.s.toArrayLike(Uint8Array,"be",32),32),e.recid=m.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},s=new re(n.r),c=new re(n.s);if(s.cmp(Y.n)>=0||c.cmp(Y.n)>=0)return 1;if(c.cmp(Ie.nh)===1||s.isZero()||c.isZero())return 3;const m=Le(r);if(m===null)return 2;const P=m.getPublic();return Ie.verify(t,n,P)?0:3},ecdsaRecover(e,t,r,n){const s={r:t.slice(0,32),s:t.slice(32,64)},c=new re(s.r),m=new re(s.s);if(c.cmp(Y.n)>=0||m.cmp(Y.n)>=0)return 1;if(c.isZero()||m.isZero())return 2;let P;try{P=Ie.recoverPubKey(n,s,r)}catch{return 2}return Me(e,P),0},ecdh(e,t,r,n,s,c,m){const P=Le(t);if(P===null)return 1;const g=new re(r);if(g.cmp(Y.n)>=0||g.isZero())return 2;const S=P.getPublic().mul(g);if(s===void 0){const p=S.encode(null,!0),U=Ie.hash().update(p).digest();for(let w=0;w<32;++w)e[w]=U[w]}else{c||(c=new Uint8Array(32));const p=S.getX().toArray("be",32);for(let x=0;x<32;++x)c[x]=p[x];m||(m=new Uint8Array(32));const U=S.getY().toArray("be",32);for(let x=0;x<32;++x)m[x]=U[x];const w=s(c,m,n);if(!(w instanceof Uint8Array&&w.length===e.length))return 2;e.set(w)}return 0}},Eo=yo(wo),_e=ar(),ce=lr.Buffer,Rt=Xn(),jo=Jn,hr=go,qe=Eo,So=ce.from("Bitcoin seed","utf8"),wt=2147483648,Po=78,Dn={private:76066276,public:76067358};function se(e){this.versions=e||Dn,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}Object.defineProperty(se.prototype,"fingerprint",{get:function(){return this._fingerprint}});Object.defineProperty(se.prototype,"identifier",{get:function(){return this._identifier}});Object.defineProperty(se.prototype,"pubKeyHash",{get:function(){return this.identifier}});Object.defineProperty(se.prototype,"privateKey",{get:function(){return this._privateKey},set:function(e){e=Uint8Array.from(e),_e.equal(e.length,32,"Private key must be 32 bytes."),_e(qe.privateKeyVerify(e)===!0,"Invalid private key"),this._privateKey=ce.from(e),this._publicKey=ce.from(qe.publicKeyCreate(e,!0)),this._identifier=Un(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}});Object.defineProperty(se.prototype,"publicKey",{get:function(){return this._publicKey},set:function(e){_e(e.length===33||e.length===65,"Public key must be 33 or 65 bytes."),_e(qe.publicKeyVerify(e)===!0,"Invalid public key"),this._publicKey=ce.from(qe.publicKeyConvert(e,!0)),this._identifier=Un(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}});Object.defineProperty(se.prototype,"privateExtendedKey",{get:function(){return this._privateKey?hr.encode(Ln(this,this.versions.private,ce.concat([ce.alloc(1,0),this.privateKey]))):null}});Object.defineProperty(se.prototype,"publicExtendedKey",{get:function(){return hr.encode(Ln(this,this.versions.public,this.publicKey))}});se.prototype.derive=function(e){if(e==="m"||e==="M"||e==="m'"||e==="M'")return this;var t=e.split("/"),r=this;return t.forEach(function(n,s){if(s===0){_e(/^[mM]{1}/.test(n),'Path must start with "m" or "M"');return}var c=n.length>1&&n[n.length-1]==="'",m=parseInt(n,10);_e(m<wt,"Invalid index"),c&&(m+=wt),r=r.deriveChild(m)}),r};se.prototype.deriveChild=function(e){var t=e>=wt,r=ce.allocUnsafe(4);r.writeUInt32BE(e,0);var n;if(t){_e(this.privateKey,"Could not derive hardened child key");var s=ce.from(this.privateKey),c=ce.alloc(1,0);s=ce.concat([c,s]),n=ce.concat([s,r])}else n=ce.concat([this.publicKey,r]);var m=Rt.createHmac("sha512",this.chainCode).update(n).digest(),P=m.slice(0,32),g=m.slice(32),S=new se(this.versions);if(this.privateKey)try{S.privateKey=ce.from(qe.privateKeyTweakAdd(ce.from(this.privateKey),P))}catch{return this.deriveChild(e+1)}else try{S.publicKey=ce.from(qe.publicKeyTweakAdd(ce.from(this.publicKey),P,!0))}catch{return this.deriveChild(e+1)}return S.chainCode=g,S.depth=this.depth+1,S.parentFingerprint=this.fingerprint,S.index=e,S};se.prototype.sign=function(e){return ce.from(qe.ecdsaSign(e,this.privateKey).signature)};se.prototype.verify=function(e,t){return qe.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),Uint8Array.from(this.publicKey))};se.prototype.wipePrivateData=function(){return this._privateKey&&Rt.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this};se.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}};se.fromMasterSeed=function(e,t){var r=Rt.createHmac("sha512",So).update(e).digest(),n=r.slice(0,32),s=r.slice(32),c=new se(t);return c.chainCode=s,c.privateKey=n,c};se.fromExtendedKey=function(e,t){t=t||Dn;var r=new se(t),n=hr.decode(e),s=n.readUInt32BE(0);_e(s===t.private||s===t.public,"Version mismatch: does not match private or public"),r.depth=n.readUInt8(4),r.parentFingerprint=n.readUInt32BE(5),r.index=n.readUInt32BE(9),r.chainCode=n.slice(13,45);var c=n.slice(45);return c.readUInt8(0)===0?(_e(s===t.private,"Version mismatch: version does not match private"),r.privateKey=ce.from(c.slice(1))):(_e(s===t.public,"Version mismatch: version does not match public"),r.publicKey=ce.from(c)),r};se.fromJSON=function(e){return se.fromExtendedKey(e.xpriv)};function Ln(e,t,r){var n=ce.allocUnsafe(Po);n.writeUInt32BE(t,0),n.writeUInt8(e.depth,4);var s=e.depth?e.parentFingerprint:0;return n.writeUInt32BE(s,5),n.writeUInt32BE(e.index,9),e.chainCode.copy(n,13),r.copy(n,45),n}function Un(e){var t=Rt.createHash("sha256").update(e).digest();return new jo().update(t).digest()}se.HARDENED_OFFSET=wt;var Oo=se;const Ao=Oo,sr=St,{fromSecretKey:Ro,WalletType:Io}=le,{isHexStrict:_o,toHex:en,toBuffer:Co,stripHexPrefix:tn}=fn,{types:dt}=sr,To=(e,t,r={role:dt.RoleType.ROLE_ACCOUNT},n=0)=>{if(!t)throw new Error("Cannot get user wallet with empty root sk");const s=sr.Hasher.SHA3.hash256(Co(e)),c=tn(s).slice(0,16),m=c.slice(0,8),P=c.slice(8,16),g=parseInt(+`0x${m}`,10)&2147483647,S=parseInt(+`0x${P}`,10)&2147483647,p=tn(_o(t)?t:en(t)),U=Ao.fromMasterSeed(Jt.from(p,"hex")),w=`m/44'/260'/${g}'/${S}'/${n}`,A=U.derive(w),x=Io(r),{pk:y=dt.KeyType.ED25519}=x;let d;return y===dt.KeyType.ED25519?d=sr.Signer.Ed25519.genKeyPair("hex",A.privateKey).secretKey:d=en(A.privateKey),y===dt.KeyType.ETHEREUM&&(d=d.slice(0,66)),Ro(d,x)};var No={fromAppDid:To};const Do=St,Ht=le,Gt=un,Lo=No,rn={role:Do.types.RoleType.ROLE_APPLICATION},Uo=(e,t,r,n)=>{let s=r||rn;const c=(0,Gt.isEthereumType)((0,Gt.DidType)(r));if(c?s=(0,Ht.WalletType)(r):s=(0,Ht.WalletType)(rn),!(0,Gt.isValid)(e)){let m="";try{return c?m=e.slice(0,66):m=e,(0,Ht.fromSecretKey)(m,s)}catch(P){throw new Error(`Cannot get blocklet wallet with invalid blocklet did or custom sk: ${P.message}`)}}if(!t)throw new Error("Cannot get blocklet wallet with empty node sk");return(0,Lo.fromAppDid)(e,t,s,n||0)};var qo=Uo,qn=Nr&&Nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const ot=qn(ei),Ko=St,mt=qn(qo),ko=ti,Bo=(e,t,{returnWallet:r=!0}={})=>{if(!e||typeof e!="object"||!Array.isArray(e.environments)||!(0,ot.default)(e,"meta.did"))throw new Error("Blocklet state must be an object");const{environments:n,configs:s=[]}=e,c=[...s,...n],m=c.find(C=>C.key==="BLOCKLET_APP_DESCRIPTION"),P=c.find(C=>C.key==="BLOCKLET_PASSPORT_COLOR"),g=c.find(C=>C.key==="BLOCKLET_APP_URL"),S=c.find(C=>C.key==="BLOCKLET_APP_TENANT_MODE"),{did:p,version:U}=e.meta,w=(0,ko.getDisplayName)(e),A=(0,ot.default)(m,"value",e.meta.description),x=(0,ot.default)(P,"value","auto"),y=(0,ot.default)(g,"value",""),d=(0,ot.default)(S,"value","");if(!r)return{did:p,version:U,name:w,description:A,passportColor:x,appUrl:y,secret:"",wallet:null,permanentWallet:null,tenantMode:d};const i=c.find(C=>C.key==="BLOCKLET_APP_SK"),l=c.find(C=>C.key==="BLOCKLET_APP_CHAIN_TYPE")||c.find(C=>C.key==="BLOCKLET_WALLET_TYPE"),b=c.find(C=>C.key==="BLOCKLET_APP_PSK");let j;l&&(l.value==="ethereum"||l.value==="eth")&&(j=l.value);let h=null,D=null;if(i&&i.value)h=(0,mt.default)(i.value,void 0,j),b&&b.value&&b.value!==i.value&&(D=(0,mt.default)(b.value,void 0,j));else{if(!t||typeof t!="string")throw new Error("Node secret key must be a string");l?h=(0,mt.default)(e.meta.did,t,j):h=(0,mt.default)(e.meta.did,t)}const R=Ko.Hasher.SHA3.hash256(Jt.concat([h.secretKey,h.address].map(Jt.from)));return{did:p,version:U,name:w,description:A,passportColor:x,appUrl:y,secret:R,wallet:h,permanentWallet:D||h,tenantMode:d}};var Fo=Bo;const Mo=Qn(Fo);function gr({teamDid:e,roles:t,apps:r,onCancel:n,onSuccess:s,onError:c,endpoint:m}){const{api:P}=Ce(),{t:g,locale:S}=Ke(),p=dn({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:r.length>0?r[0].appPid:null}),U=async()=>{if(!p.role){p.error=g("team.member.error.passportEmpty");return}const x=p.remark.trim();p.error=null,p.loading=!0;try{let y=p.sourceAppPid??null;y===e&&(y=null);const{inviteInfo:d}=await P.createMemberInvitation({input:{teamDid:e,role:p.role,remark:x,sourceAppPid:y}});p.inviteInfo=d,p.activeStep=1}catch(y){const d=Ve(y);p.error=d,c(y)}finally{p.loading=!1}},A=[{body:o.jsxs(oe,{sx:{display:"flex",flexDirection:"column",gap:3},children:[r.length>1?o.jsxs(tr,{fullWidth:!0,children:[o.jsx(rr,{children:g("common.sourceApp")}),o.jsx(nr,{value:p.sourceAppPid,onChange:x=>{p.error=null,p.sourceAppPid=x.target.value},fullWidth:!0,label:g("common.passport"),disabled:p.loading,children:r.map(x=>o.jsx(yt,{value:x.appPid,children:o.jsxs(oe,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[o.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(mn,{did:x.appPid,size:28}),x.appName]}),o.jsx(ri,{did:x.appPid,compact:!0,responsive:!1})]})},x.appPid))})]}):null,o.jsxs(tr,{fullWidth:!0,variant:"outlined",children:[o.jsx(rr,{children:g("common.passport")}),o.jsx(nr,{"data-cy":"invite-member-select-role",value:p.role,onChange:x=>{p.error=null,p.role=x.target.value},fullWidth:!0,label:g("common.passport"),disabled:p.loading,onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),U())},children:t.filter(x=>x.name!=="owner").map(x=>o.jsx(yt,{value:x.name,"data-cy":`invite-member-select-option-${x.name}`,children:o.jsx("span",{children:x.title||x.name})},x.name))})]}),o.jsx(Sn,{label:g("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:p.remark,onChange:x=>{p.error=null,p.remark=x.target.value},disabled:p.loading,"data-cy":"invite-member-input-remark"})]}),cancel:g("common.cancel"),confirm:g("team.member.inviteDialog.createInviteLink"),onCancel:n,onConfirm:U},{body:()=>{var y,d;const x=ur({inviteId:(y=p.inviteInfo)==null?void 0:y.inviteId,endpoint:m});return o.jsxs("div",{children:[o.jsx(oe,{sx:{fontSize:16,fontWeight:"bold"},children:g("team.member.inviteDialog.createSuccessTip",{expireDate:lt((d=p.inviteInfo)==null?void 0:d.expireDate,S)})}),o.jsx("div",{style:{marginTop:"40px"}}),o.jsx(Pt,{children:x})]})},confirm:g("common.confirm"),onConfirm:s}][p.activeStep];return o.jsxs($e,{title:g("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:o.jsxs(o.Fragment,{children:[A.cancel&&o.jsx(je,{onClick:A.onCancel,color:"inherit",children:A.cancel}),o.jsxs(je,{onClick:A.onConfirm,color:"primary",disabled:p.loading||!p.role,variant:"contained",autoFocus:!0,children:[p.loading&&o.jsx(Qe,{size:16}),A.confirm]})]}),children:[o.jsx(pr,{component:"div",children:typeof A.body=="function"?A.body():A.body}),!!p.error&&o.jsx(Je,{severity:"error",variant:"icon",children:p.error})]})}gr.propTypes={teamDid:M.string.isRequired,onCancel:M.func.isRequired,onSuccess:M.func.isRequired,onError:M.func,roles:M.array,apps:M.array,endpoint:M.string};gr.defaultProps={onError:()=>{},roles:[],apps:[],endpoint:""};function yr({teamDid:e,onCancel:t,onSuccess:r,onError:n,endpoint:s}){const{api:c,info:m}=Ce(),{api:P}=$.useContext(ni),[g,S]=$.useState(!1),{t:p,locale:U}=Ke(),[w,A]=$.useState(""),[x,y]=$.useState(!1),[d,i]=$.useState(0),[l,b]=$.useState(""),[j,h]=$.useState(""),D=!!Qt(m,"ownerNft.did"),R=Si(async()=>{if(D){const{state:ie}=await c.getDelegationState();return ie}return{delegated:!0}});if(R.loading)return o.jsx($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:o.jsx("div",{style:{display:"flex",justifyContent:"center"},children:o.jsx(Qe,{})})});if(R.error)return o.jsx($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:o.jsx(Je,{severity:"error",variant:"icon",children:Ve(R.error)})});const C=async()=>{A(null),S(!0);try{const{inviteInfo:ie}=await c.createTransferInvitation({input:{teamDid:e,role:"owner",remark:j.trim()}});b(ie),i(fe.length-1)}catch(ie){const ge=Ve(ie);A(ge),n(ie)}finally{S(!1)}},Q=()=>{y(!0),i(1)},ue=()=>{y(!1),i(0)},fe=[{body:o.jsxs(at,{component:"div",children:[o.jsxs(Je,{severity:"warning",children:[o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.progress")}),o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),o.jsx(Je,{severity:"warning",children:o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.revoke")})}),o.jsx("div",{style:{marginTop:20,marginBottom:10}}),o.jsx(Sn,{label:p("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:j,onChange:ie=>{A(null),h(ie.target.value)},disabled:g,"data-cy":"transfer-node-input-remark"}),o.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:p("common.cancel"),confirm:p("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:D&&!Qt(R,"value.delegated")?Q:C},{body:()=>o.jsx(ii,{action:"delegate-transfer-nft",open:x,locale:U,checkFn:P.get,onClose:ue,onSuccess:C,checkTimeout:5*60*1e3,webWalletUrl:oi(m),extraParams:{targetDID:m.did},messages:{title:p("team.transferNode.delegateDialog.title"),scan:p("team.transferNode.delegateDialog.scan"),confirm:p("team.transferNode.delegateDialog.confirm"),success:p("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const ie=ur({inviteId:l.inviteId,endpoint:s});return o.jsxs("div",{children:[o.jsx($o,{children:p("team.transferNode.inviteDialog.createSuccessTip",{expireDate:lt(l.expireDate,U)})}),o.jsx("div",{style:{marginTop:"40px"}}),o.jsx(Pt,{children:ie})]})},confirm:p("common.confirm"),onConfirm:r}],ne=fe[d];return o.jsxs($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:o.jsxs(o.Fragment,{children:[ne.cancel&&o.jsx(je,{onClick:ne.onCancel,color:"inherit",children:ne.cancel}),o.jsxs(je,{onClick:ne.onConfirm,color:"primary",disabled:g,variant:"contained",autoFocus:!0,children:[g&&o.jsx(Qe,{size:16}),ne.confirm]})]}),children:[o.jsx(pr,{component:"div",children:typeof ne.body=="function"?ne.body():ne.body}),!!w&&o.jsx(Je,{severity:"error",variant:"icon",children:w})]})}yr.propTypes={teamDid:M.string.isRequired,onCancel:M.func.isRequired,onSuccess:M.func.isRequired,onError:M.func,endpoint:M.string};yr.defaultProps={onError:()=>{},endpoint:""};const $o=Te.div`
|
|
58
|
+
`))}throw _}};function X(){for(var E=arguments.length,f=new Array(E),v=0;v<E;v++)f[v]=arguments[v];Q.apply(void 0,[X,f.length].concat(f))}return h.strict=y(X,h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict,Tt.exports}var pt=lr.Buffer;function ao(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var s=e.charAt(n),c=s.charCodeAt(0);if(t[c]!==255)throw new TypeError(s+" is ambiguous");t[c]=n}var m=e.length,P=e.charAt(0),g=Math.log(m)/Math.log(256),S=Math.log(256)/Math.log(m);function p(O){if((Array.isArray(O)||O instanceof Uint8Array)&&(O=pt.from(O)),!pt.isBuffer(O))throw new TypeError("Expected Buffer");if(O.length===0)return"";for(var w=0,y=0,d=0,i=O.length;d!==i&&O[d]===0;)d++,w++;for(var l=(i-d)*S+1>>>0,b=new Uint8Array(l);d!==i;){for(var j=O[d],h=0,D=l-1;(j!==0||h<y)&&D!==-1;D--,h++)j+=256*b[D]>>>0,b[D]=j%m>>>0,j=j/m>>>0;if(j!==0)throw new Error("Non-zero carry");y=h,d++}for(var R=l-y;R!==l&&b[R]===0;)R++;for(var C=P.repeat(w);R<l;++R)C+=e.charAt(b[R]);return C}function U(O){if(typeof O!="string")throw new TypeError("Expected String");if(O.length===0)return pt.alloc(0);for(var w=0,y=0,d=0;O[w]===P;)y++,w++;for(var i=(O.length-w)*g+1>>>0,l=new Uint8Array(i);O[w];){var b=t[O.charCodeAt(w)];if(b===255)return;for(var j=0,h=i-1;(b!==0||j<d)&&h!==-1;h--,j++)b+=m*l[h]>>>0,l[h]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");d=j,w++}for(var D=i-d;D!==i&&l[D]===0;)D++;var R=pt.allocUnsafe(y+(i-D));R.fill(0,0,y);for(var C=y;D!==i;)R[C++]=l[D++];return R}function x(O){var w=U(O);if(w)return w;throw new Error("Non-base"+m+" character")}return{encode:p,decodeUnsafe:U,decode:x}}var so=ao,co=so,lo="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",uo=co(lo),Vt=uo,fo=lr.Buffer,po=function(e){function t(c){var m=e(c);return Vt.encode(fo.concat([c,m],c.length+4))}function r(c){var m=c.slice(0,-4),P=c.slice(-4),g=e(m);if(!(P[0]^g[0]|P[1]^g[1]|P[2]^g[2]|P[3]^g[3]))return m}function n(c){var m=Vt.decodeUnsafe(c);if(m)return r(m)}function s(c){var m=Vt.decode(c),P=r(m);if(!P)throw new Error("Invalid checksum");return P}return{encode:t,decode:s,decodeUnsafe:n}},Qr=Yn(),mo=po;function ho(e){var t=Qr("sha256").update(e).digest();return Qr("sha256").update(t).digest()}var go=mo(ho);const J={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 xe(e,t){if(!e)throw new Error(t)}function Z(e,t,r){if(xe(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){const n=r.join(", "),s=`Expected ${e} to be an Uint8Array with length [${n}]`;xe(r.includes(t.length),s)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;xe(t.length===r,n)}}function Fe(e){xe(Xe(e)==="Boolean","Expected compressed to be a Boolean")}function Se(e=r=>new Uint8Array(r),t){return typeof e=="function"&&(e=e(t)),Z("output",e,t),e}function Xe(e){return Object.prototype.toString.call(e).slice(8,-1)}var yo=e=>({contextRandomize(t){switch(xe(t===null||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),t!==null&&Z("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(J.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(t){return Z("private key",t,32),e.privateKeyVerify(t)===0},privateKeyNegate(t){switch(Z("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(J.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(t,r){switch(Z("private key",t,32),Z("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(J.TWEAK_ADD)}},privateKeyTweakMul(t,r){switch(Z("private key",t,32),Z("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(J.TWEAK_MUL)}},publicKeyVerify(t){return Z("public key",t,[33,65]),e.publicKeyVerify(t)===0},publicKeyCreate(t,r=!0,n){switch(Z("private key",t,32),Fe(r),n=Se(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(J.SECKEY_INVALID);case 2:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyConvert(t,r=!0,n){switch(Z("public key",t,[33,65]),Fe(r),n=Se(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyNegate(t,r=!0,n){switch(Z("public key",t,[33,65]),Fe(r),n=Se(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE);case 3:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyCombine(t,r=!0,n){xe(Array.isArray(t),"Expected public keys to be an Array"),xe(t.length>0,"Expected public keys array will have more than zero items");for(const s of t)Z("public key",s,[33,65]);switch(Fe(r),n=Se(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.PUBKEY_COMBINE);case 3:throw new Error(J.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(t,r,n=!0,s){switch(Z("public key",t,[33,65]),Z("tweak",r,32),Fe(n),s=Se(s,n?33:65),e.publicKeyTweakAdd(s,t,r)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.TWEAK_ADD)}},publicKeyTweakMul(t,r,n=!0,s){switch(Z("public key",t,[33,65]),Z("tweak",r,32),Fe(n),s=Se(s,n?33:65),e.publicKeyTweakMul(s,t,r)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.TWEAK_MUL)}},signatureNormalize(t){switch(Z("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(J.SIG_PARSE)}},signatureExport(t,r){Z("signature",t,64),r=Se(r,72);const n={output:r,outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},signatureImport(t,r){switch(Z("signature",t),r=Se(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},ecdsaSign(t,r,n={},s){Z("message",t,32),Z("private key",r,32),xe(Xe(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Z("options.data",n.data),n.noncefn!==void 0&&xe(Xe(n.noncefn)==="Function","Expected options.noncefn to be a Function"),s=Se(s,64);const c={signature:s,recid:null};switch(e.ecdsaSign(c,t,r,n.data,n.noncefn)){case 0:return c;case 1:throw new Error(J.SIGN);case 2:throw new Error(J.IMPOSSIBLE_CASE)}},ecdsaVerify(t,r,n){switch(Z("signature",t,64),Z("message",r,32),Z("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.PUBKEY_PARSE)}},ecdsaRecover(t,r,n,s=!0,c){switch(Z("signature",t,64),xe(Xe(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Z("message",n,32),Fe(s),c=Se(c,s?33:65),e.ecdsaRecover(c,t,r,n)){case 0:return c;case 1:throw new Error(J.SIG_PARSE);case 2:throw new Error(J.RECOVER);case 3:throw new Error(J.IMPOSSIBLE_CASE)}},ecdh(t,r,n={},s){switch(Z("public key",t,[33,65]),Z("private key",r,32),xe(Xe(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Z("options.data",n.data),n.hashfn!==void 0?(xe(Xe(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&Z("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&Z("options.ybuf",n.ybuf,32),Z("output",s)):s=Se(s,32),e.ecdh(s,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return s;case 1:throw new Error(J.PUBKEY_PARSE);case 2:throw new Error(J.ECDH)}}});const vo=Zn().ec,Ie=new vo("secp256k1"),Y=Ie.curve,re=Y.n.constructor;function bo(e,t){let r=new re(t);if(r.cmp(Y.p)>=0)return null;r=r.toRed(Y.red);let n=r.redSqr().redIMul(r).redIAdd(Y.b).redSqrt();return e===3!==n.isOdd()&&(n=n.redNeg()),Ie.keyPair({pub:{x:r,y:n}})}function wo(e,t,r){let n=new re(t),s=new re(r);if(n.cmp(Y.p)>=0||s.cmp(Y.p)>=0||(n=n.toRed(Y.red),s=s.toRed(Y.red),(e===6||e===7)&&s.isOdd()!==(e===7)))return null;const c=n.redSqr().redIMul(n);return s.redSqr().redISub(c.redIAdd(Y.b)).isZero()?Ie.keyPair({pub:{x:n,y:s}}):null}function Le(e){const t=e[0];switch(t){case 2:case 3:return e.length!==33?null:bo(t,e.subarray(1,33));case 4:case 6:case 7:return e.length!==65?null:wo(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function Me(e,t){const r=t.encode(null,e.length===33);for(let n=0;n<e.length;++n)e[n]=r[n]}var xo={contextRandomize(){return 0},privateKeyVerify(e){const t=new re(e);return t.cmp(Y.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new re(e),r=Y.n.sub(t).umod(Y.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakAdd(e,t){const r=new re(t);if(r.cmp(Y.n)>=0||(r.iadd(new re(e)),r.cmp(Y.n)>=0&&r.isub(Y.n),r.isZero()))return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new re(t);if(r.cmp(Y.n)>=0||r.isZero())return 1;r.imul(new re(e)),r.cmp(Y.n)>=0&&(r=r.umod(Y.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify(e){return Le(e)===null?1:0},publicKeyCreate(e,t){const r=new re(t);if(r.cmp(Y.n)>=0||r.isZero())return 1;const n=Ie.keyFromPrivate(t).getPublic();return Me(e,n),0},publicKeyConvert(e,t){const r=Le(t);if(r===null)return 1;const n=r.getPublic();return Me(e,n),0},publicKeyNegate(e,t){const r=Le(t);if(r===null)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),Me(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let s=0;s<t.length;++s)if(r[s]=Le(t[s]),r[s]===null)return 1;let n=r[0].getPublic();for(let s=1;s<r.length;++s)n=n.add(r[s].pub);return n.isInfinity()?2:(Me(e,n),0)},publicKeyTweakAdd(e,t,r){const n=Le(t);if(n===null)return 1;if(r=new re(r),r.cmp(Y.n)>=0)return 2;const s=n.getPublic().add(Y.g.mul(r));return s.isInfinity()?2:(Me(e,s),0)},publicKeyTweakMul(e,t,r){const n=Le(t);if(n===null)return 1;if(r=new re(r),r.cmp(Y.n)>=0||r.isZero())return 2;const s=n.getPublic().mul(r);return Me(e,s),0},signatureNormalize(e){const t=new re(e.subarray(0,32)),r=new re(e.subarray(32,64));return t.cmp(Y.n)>=0||r.cmp(Y.n)>=0?1:(r.cmp(Ie.nh)===1&&e.set(Y.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new re(r).cmp(Y.n)>=0||new re(n).cmp(Y.n)>=0)return 1;const{output:s}=e;let c=s.subarray(4,37);c[0]=0,c.set(r,1);let m=33,P=0;for(;m>1&&c[P]===0&&!(c[P+1]&128);--m,++P);if(c=c.subarray(P),c[0]&128||m>1&&c[0]===0&&!(c[1]&128))return 1;let g=s.subarray(39,72);g[0]=0,g.set(n,1);let S=33,p=0;for(;S>1&&g[p]===0&&!(g[p+1]&128);--S,++p);return g=g.subarray(p),g[0]&128||S>1&&g[0]===0&&!(g[1]&128)?1:(e.outputlen=6+m+S,s[0]=48,s[1]=e.outputlen-2,s[2]=2,s[3]=c.length,s.set(c,4),s[4+m]=2,s[5+m]=g.length,s.set(g,6+m),0)},signatureImport(e,t){if(t.length<8||t.length>72||t[0]!==48||t[1]!==t.length-2||t[2]!==2)return 1;const r=t[3];if(r===0||5+r>=t.length||t[4+r]!==2)return 1;const n=t[5+r];if(n===0||6+r+n!==t.length||t[4]&128||r>1&&t[4]===0&&!(t[5]&128)||t[r+6]&128||n>1&&t[r+6]===0&&!(t[r+7]&128))return 1;let s=t.subarray(4,4+r);if(s.length===33&&s[0]===0&&(s=s.subarray(1)),s.length>32)return 1;let c=t.subarray(6+r);if(c.length===33&&c[0]===0&&(c=c.slice(1)),c.length>32)throw new Error("S length is too long");let m=new re(s);m.cmp(Y.n)>=0&&(m=new re(0));let P=new re(t.subarray(6+r));return P.cmp(Y.n)>=0&&(P=new re(0)),e.set(m.toArrayLike(Uint8Array,"be",32),0),e.set(P.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,s){if(s){const P=s;s=g=>{const S=P(t,r,null,n,g);if(!(S instanceof Uint8Array&&S.length===32))throw new Error("This is the way");return new re(S)}}const c=new re(r);if(c.cmp(Y.n)>=0||c.isZero())return 1;let m;try{m=Ie.sign(t,r,{canonical:!0,k:s,pers:n})}catch{return 1}return e.signature.set(m.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(m.s.toArrayLike(Uint8Array,"be",32),32),e.recid=m.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},s=new re(n.r),c=new re(n.s);if(s.cmp(Y.n)>=0||c.cmp(Y.n)>=0)return 1;if(c.cmp(Ie.nh)===1||s.isZero()||c.isZero())return 3;const m=Le(r);if(m===null)return 2;const P=m.getPublic();return Ie.verify(t,n,P)?0:3},ecdsaRecover(e,t,r,n){const s={r:t.slice(0,32),s:t.slice(32,64)},c=new re(s.r),m=new re(s.s);if(c.cmp(Y.n)>=0||m.cmp(Y.n)>=0)return 1;if(c.isZero()||m.isZero())return 2;let P;try{P=Ie.recoverPubKey(n,s,r)}catch{return 2}return Me(e,P),0},ecdh(e,t,r,n,s,c,m){const P=Le(t);if(P===null)return 1;const g=new re(r);if(g.cmp(Y.n)>=0||g.isZero())return 2;const S=P.getPublic().mul(g);if(s===void 0){const p=S.encode(null,!0),U=Ie.hash().update(p).digest();for(let x=0;x<32;++x)e[x]=U[x]}else{c||(c=new Uint8Array(32));const p=S.getX().toArray("be",32);for(let w=0;w<32;++w)c[w]=p[w];m||(m=new Uint8Array(32));const U=S.getY().toArray("be",32);for(let w=0;w<32;++w)m[w]=U[w];const x=s(c,m,n);if(!(x instanceof Uint8Array&&x.length===e.length))return 2;e.set(x)}return 0}},Eo=yo(xo),_e=ar(),ce=lr.Buffer,Rt=Xn(),jo=Jn,hr=go,qe=Eo,So=ce.from("Bitcoin seed","utf8"),xt=2147483648,Po=78,Dn={private:76066276,public:76067358};function se(e){this.versions=e||Dn,this.depth=0,this.index=0,this._privateKey=null,this._publicKey=null,this.chainCode=null,this._fingerprint=0,this.parentFingerprint=0}Object.defineProperty(se.prototype,"fingerprint",{get:function(){return this._fingerprint}});Object.defineProperty(se.prototype,"identifier",{get:function(){return this._identifier}});Object.defineProperty(se.prototype,"pubKeyHash",{get:function(){return this.identifier}});Object.defineProperty(se.prototype,"privateKey",{get:function(){return this._privateKey},set:function(e){e=Uint8Array.from(e),_e.equal(e.length,32,"Private key must be 32 bytes."),_e(qe.privateKeyVerify(e)===!0,"Invalid private key"),this._privateKey=ce.from(e),this._publicKey=ce.from(qe.publicKeyCreate(e,!0)),this._identifier=Un(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0)}});Object.defineProperty(se.prototype,"publicKey",{get:function(){return this._publicKey},set:function(e){_e(e.length===33||e.length===65,"Public key must be 33 or 65 bytes."),_e(qe.publicKeyVerify(e)===!0,"Invalid public key"),this._publicKey=ce.from(qe.publicKeyConvert(e,!0)),this._identifier=Un(this.publicKey),this._fingerprint=this._identifier.slice(0,4).readUInt32BE(0),this._privateKey=null}});Object.defineProperty(se.prototype,"privateExtendedKey",{get:function(){return this._privateKey?hr.encode(Ln(this,this.versions.private,ce.concat([ce.alloc(1,0),this.privateKey]))):null}});Object.defineProperty(se.prototype,"publicExtendedKey",{get:function(){return hr.encode(Ln(this,this.versions.public,this.publicKey))}});se.prototype.derive=function(e){if(e==="m"||e==="M"||e==="m'"||e==="M'")return this;var t=e.split("/"),r=this;return t.forEach(function(n,s){if(s===0){_e(/^[mM]{1}/.test(n),'Path must start with "m" or "M"');return}var c=n.length>1&&n[n.length-1]==="'",m=parseInt(n,10);_e(m<xt,"Invalid index"),c&&(m+=xt),r=r.deriveChild(m)}),r};se.prototype.deriveChild=function(e){var t=e>=xt,r=ce.allocUnsafe(4);r.writeUInt32BE(e,0);var n;if(t){_e(this.privateKey,"Could not derive hardened child key");var s=ce.from(this.privateKey),c=ce.alloc(1,0);s=ce.concat([c,s]),n=ce.concat([s,r])}else n=ce.concat([this.publicKey,r]);var m=Rt.createHmac("sha512",this.chainCode).update(n).digest(),P=m.slice(0,32),g=m.slice(32),S=new se(this.versions);if(this.privateKey)try{S.privateKey=ce.from(qe.privateKeyTweakAdd(ce.from(this.privateKey),P))}catch{return this.deriveChild(e+1)}else try{S.publicKey=ce.from(qe.publicKeyTweakAdd(ce.from(this.publicKey),P,!0))}catch{return this.deriveChild(e+1)}return S.chainCode=g,S.depth=this.depth+1,S.parentFingerprint=this.fingerprint,S.index=e,S};se.prototype.sign=function(e){return ce.from(qe.ecdsaSign(e,this.privateKey).signature)};se.prototype.verify=function(e,t){return qe.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),Uint8Array.from(this.publicKey))};se.prototype.wipePrivateData=function(){return this._privateKey&&Rt.randomBytes(this._privateKey.length).copy(this._privateKey),this._privateKey=null,this};se.prototype.toJSON=function(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}};se.fromMasterSeed=function(e,t){var r=Rt.createHmac("sha512",So).update(e).digest(),n=r.slice(0,32),s=r.slice(32),c=new se(t);return c.chainCode=s,c.privateKey=n,c};se.fromExtendedKey=function(e,t){t=t||Dn;var r=new se(t),n=hr.decode(e),s=n.readUInt32BE(0);_e(s===t.private||s===t.public,"Version mismatch: does not match private or public"),r.depth=n.readUInt8(4),r.parentFingerprint=n.readUInt32BE(5),r.index=n.readUInt32BE(9),r.chainCode=n.slice(13,45);var c=n.slice(45);return c.readUInt8(0)===0?(_e(s===t.private,"Version mismatch: version does not match private"),r.privateKey=ce.from(c.slice(1))):(_e(s===t.public,"Version mismatch: version does not match public"),r.publicKey=ce.from(c)),r};se.fromJSON=function(e){return se.fromExtendedKey(e.xpriv)};function Ln(e,t,r){var n=ce.allocUnsafe(Po);n.writeUInt32BE(t,0),n.writeUInt8(e.depth,4);var s=e.depth?e.parentFingerprint:0;return n.writeUInt32BE(s,5),n.writeUInt32BE(e.index,9),e.chainCode.copy(n,13),r.copy(n,45),n}function Un(e){var t=Rt.createHash("sha256").update(e).digest();return new jo().update(t).digest()}se.HARDENED_OFFSET=xt;var Ao=se;const Oo=Ao,sr=St,{fromSecretKey:Ro,WalletType:Io}=le,{isHexStrict:_o,toHex:en,toBuffer:Co,stripHexPrefix:tn}=fn,{types:dt}=sr,To=(e,t,r={role:dt.RoleType.ROLE_ACCOUNT},n=0)=>{if(!t)throw new Error("Cannot get user wallet with empty root sk");const s=sr.Hasher.SHA3.hash256(Co(e)),c=tn(s).slice(0,16),m=c.slice(0,8),P=c.slice(8,16),g=parseInt(+`0x${m}`,10)&2147483647,S=parseInt(+`0x${P}`,10)&2147483647,p=tn(_o(t)?t:en(t)),U=Oo.fromMasterSeed(Jt.from(p,"hex")),x=`m/44'/260'/${g}'/${S}'/${n}`,O=U.derive(x),w=Io(r),{pk:y=dt.KeyType.ED25519}=w;let d;return y===dt.KeyType.ED25519?d=sr.Signer.Ed25519.genKeyPair("hex",O.privateKey).secretKey:d=en(O.privateKey),y===dt.KeyType.ETHEREUM&&(d=d.slice(0,66)),Ro(d,w)};var No={fromAppDid:To};const Do=St,Ht=le,Gt=un,Lo=No,rn={role:Do.types.RoleType.ROLE_APPLICATION},Uo=(e,t,r,n)=>{let s=r||rn;const c=(0,Gt.isEthereumType)((0,Gt.DidType)(r));if(c?s=(0,Ht.WalletType)(r):s=(0,Ht.WalletType)(rn),!(0,Gt.isValid)(e)){let m="";try{return c?m=e.slice(0,66):m=e,(0,Ht.fromSecretKey)(m,s)}catch(P){throw new Error(`Cannot get blocklet wallet with invalid blocklet did or custom sk: ${P.message}`)}}if(!t)throw new Error("Cannot get blocklet wallet with empty node sk");return(0,Lo.fromAppDid)(e,t,s,n||0)};var qo=Uo,qn=Nr&&Nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const ot=qn(ei),Ko=St,mt=qn(qo),ko=ti,Bo=(e,t,{returnWallet:r=!0}={})=>{if(!e||typeof e!="object"||!Array.isArray(e.environments)||!(0,ot.default)(e,"meta.did"))throw new Error("Blocklet state must be an object");const{environments:n,configs:s=[]}=e,c=[...s,...n],m=c.find(C=>C.key==="BLOCKLET_APP_DESCRIPTION"),P=c.find(C=>C.key==="BLOCKLET_PASSPORT_COLOR"),g=c.find(C=>C.key==="BLOCKLET_APP_URL"),S=c.find(C=>C.key==="BLOCKLET_APP_TENANT_MODE"),{did:p,version:U}=e.meta,x=(0,ko.getDisplayName)(e),O=(0,ot.default)(m,"value",e.meta.description),w=(0,ot.default)(P,"value","auto"),y=(0,ot.default)(g,"value",""),d=(0,ot.default)(S,"value","");if(!r)return{did:p,version:U,name:x,description:O,passportColor:w,appUrl:y,secret:"",wallet:null,permanentWallet:null,tenantMode:d};const i=c.find(C=>C.key==="BLOCKLET_APP_SK"),l=c.find(C=>C.key==="BLOCKLET_APP_CHAIN_TYPE")||c.find(C=>C.key==="BLOCKLET_WALLET_TYPE"),b=c.find(C=>C.key==="BLOCKLET_APP_PSK");let j;l&&(l.value==="ethereum"||l.value==="eth")&&(j=l.value);let h=null,D=null;if(i&&i.value)h=(0,mt.default)(i.value,void 0,j),b&&b.value&&b.value!==i.value&&(D=(0,mt.default)(b.value,void 0,j));else{if(!t||typeof t!="string")throw new Error("Node secret key must be a string");l?h=(0,mt.default)(e.meta.did,t,j):h=(0,mt.default)(e.meta.did,t)}const R=Ko.Hasher.SHA3.hash256(Jt.concat([h.secretKey,h.address].map(Jt.from)));return{did:p,version:U,name:x,description:O,passportColor:w,appUrl:y,secret:R,wallet:h,permanentWallet:D||h,tenantMode:d}};var Fo=Bo;const Mo=Qn(Fo);function gr({teamDid:e,roles:t,apps:r,onCancel:n,onSuccess:s,onError:c,endpoint:m}){const{api:P}=Ce(),{t:g,locale:S}=Ke(),p=dn({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:r.length>0?r[0].appPid:null}),U=async()=>{if(!p.role){p.error=g("team.member.error.passportEmpty");return}const w=p.remark.trim();p.error=null,p.loading=!0;try{let y=p.sourceAppPid??null;y===e&&(y=null);const{inviteInfo:d}=await P.createMemberInvitation({input:{teamDid:e,role:p.role,remark:w,sourceAppPid:y}});p.inviteInfo=d,p.activeStep=1}catch(y){const d=Ve(y);p.error=d,c(y)}finally{p.loading=!1}},O=[{body:o.jsxs(oe,{sx:{display:"flex",flexDirection:"column",gap:3},children:[r.length>1?o.jsxs(tr,{fullWidth:!0,children:[o.jsx(rr,{children:g("common.sourceApp")}),o.jsx(nr,{value:p.sourceAppPid,onChange:w=>{p.error=null,p.sourceAppPid=w.target.value},fullWidth:!0,label:g("common.passport"),disabled:p.loading,children:r.map(w=>o.jsx(yt,{value:w.appPid,children:o.jsxs(oe,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[o.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(mn,{did:w.appPid,size:28}),w.appName]}),o.jsx(ri,{did:w.appPid,compact:!0,responsive:!1})]})},w.appPid))})]}):null,o.jsxs(tr,{fullWidth:!0,variant:"outlined",children:[o.jsx(rr,{children:g("common.passport")}),o.jsx(nr,{"data-cy":"invite-member-select-role",value:p.role,onChange:w=>{p.error=null,p.role=w.target.value},fullWidth:!0,label:g("common.passport"),disabled:p.loading,onKeyPress:w=>{w.key==="Enter"&&(w.preventDefault(),U())},children:t.filter(w=>w.name!=="owner").map(w=>o.jsx(yt,{value:w.name,"data-cy":`invite-member-select-option-${w.name}`,children:o.jsx("span",{children:w.title||w.name})},w.name))})]}),o.jsx(Sn,{label:g("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:p.remark,onChange:w=>{p.error=null,p.remark=w.target.value},disabled:p.loading,"data-cy":"invite-member-input-remark"})]}),cancel:g("common.cancel"),confirm:g("team.member.inviteDialog.createInviteLink"),onCancel:n,onConfirm:U},{body:()=>{var y,d;const w=ur({inviteId:(y=p.inviteInfo)==null?void 0:y.inviteId,endpoint:m});return o.jsxs("div",{children:[o.jsx(oe,{sx:{fontSize:16,fontWeight:"bold"},children:g("team.member.inviteDialog.createSuccessTip",{expireDate:lt((d=p.inviteInfo)==null?void 0:d.expireDate,S)})}),o.jsx("div",{style:{marginTop:"40px"}}),o.jsx(Pt,{children:w})]})},confirm:g("common.confirm"),onConfirm:s}][p.activeStep];return o.jsxs($e,{title:g("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:o.jsxs(o.Fragment,{children:[O.cancel&&o.jsx(je,{onClick:O.onCancel,color:"inherit",children:O.cancel}),o.jsxs(je,{onClick:O.onConfirm,color:"primary",disabled:p.loading||!p.role,variant:"contained",autoFocus:!0,children:[p.loading&&o.jsx(Qe,{size:16}),O.confirm]})]}),children:[o.jsx(pr,{component:"div",children:typeof O.body=="function"?O.body():O.body}),!!p.error&&o.jsx(Je,{severity:"error",variant:"icon",children:p.error})]})}gr.propTypes={teamDid:M.string.isRequired,onCancel:M.func.isRequired,onSuccess:M.func.isRequired,onError:M.func,roles:M.array,apps:M.array,endpoint:M.string};gr.defaultProps={onError:()=>{},roles:[],apps:[],endpoint:""};function yr({teamDid:e,onCancel:t,onSuccess:r,onError:n,endpoint:s}){const{api:c,info:m}=Ce(),{api:P}=$.useContext(ni),[g,S]=$.useState(!1),{t:p,locale:U}=Ke(),[x,O]=$.useState(""),[w,y]=$.useState(!1),[d,i]=$.useState(0),[l,b]=$.useState(""),[j,h]=$.useState(""),D=!!Qt(m,"ownerNft.did"),R=Si(async()=>{if(D){const{state:ie}=await c.getDelegationState();return ie}return{delegated:!0}});if(R.loading)return o.jsx($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:o.jsx("div",{style:{display:"flex",justifyContent:"center"},children:o.jsx(Qe,{})})});if(R.error)return o.jsx($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:o.jsx(Je,{severity:"error",variant:"icon",children:Ve(R.error)})});const C=async()=>{O(null),S(!0);try{const{inviteInfo:ie}=await c.createTransferInvitation({input:{teamDid:e,role:"owner",remark:j.trim()}});b(ie),i(fe.length-1)}catch(ie){const ge=Ve(ie);O(ge),n(ie)}finally{S(!1)}},Q=()=>{y(!0),i(1)},ue=()=>{y(!1),i(0)},fe=[{body:o.jsxs(at,{component:"div",children:[o.jsxs(Je,{severity:"warning",children:[o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.progress")}),o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),o.jsx(Je,{severity:"warning",children:o.jsx(at,{children:p("team.transferNode.inviteDialog.tips.revoke")})}),o.jsx("div",{style:{marginTop:20,marginBottom:10}}),o.jsx(Sn,{label:p("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:j,onChange:ie=>{O(null),h(ie.target.value)},disabled:g,"data-cy":"transfer-node-input-remark"}),o.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:p("common.cancel"),confirm:p("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:D&&!Qt(R,"value.delegated")?Q:C},{body:()=>o.jsx(ii,{action:"delegate-transfer-nft",open:w,locale:U,checkFn:P.get,onClose:ue,onSuccess:C,checkTimeout:5*60*1e3,webWalletUrl:oi(m),extraParams:{targetDID:m.did},messages:{title:p("team.transferNode.delegateDialog.title"),scan:p("team.transferNode.delegateDialog.scan"),confirm:p("team.transferNode.delegateDialog.confirm"),success:p("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const ie=ur({inviteId:l.inviteId,endpoint:s});return o.jsxs("div",{children:[o.jsx($o,{children:p("team.transferNode.inviteDialog.createSuccessTip",{expireDate:lt(l.expireDate,U)})}),o.jsx("div",{style:{marginTop:"40px"}}),o.jsx(Pt,{children:ie})]})},confirm:p("common.confirm"),onConfirm:r}],ne=fe[d];return o.jsxs($e,{title:p("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:o.jsxs(o.Fragment,{children:[ne.cancel&&o.jsx(je,{onClick:ne.onCancel,color:"inherit",children:ne.cancel}),o.jsxs(je,{onClick:ne.onConfirm,color:"primary",disabled:g,variant:"contained",autoFocus:!0,children:[g&&o.jsx(Qe,{size:16}),ne.confirm]})]}),children:[o.jsx(pr,{component:"div",children:typeof ne.body=="function"?ne.body():ne.body}),!!x&&o.jsx(Je,{severity:"error",variant:"icon",children:x})]})}yr.propTypes={teamDid:M.string.isRequired,onCancel:M.func.isRequired,onSuccess:M.func.isRequired,onError:M.func,endpoint:M.string};yr.defaultProps={onError:()=>{},endpoint:""};const $o=Te.div`
|
|
59
59
|
font-size: 16px;
|
|
60
60
|
font-weight: bold;
|
|
61
|
-
`;var vr={};Object.defineProperty(vr,"__esModule",{value:!0});var br=vr.default=void 0;zo($);var Yt=o;function zo(e){return e&&e.__esModule?e:{default:e}}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nn(Object(r),!0).forEach(function(n){Wo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wo(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vo(e){var t=Ho(e,"string");return typeof t=="symbol"?t:String(t)}function Ho(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var
|
|
61
|
+
`;var vr={};Object.defineProperty(vr,"__esModule",{value:!0});var br=vr.default=void 0;zo($);var Yt=o;function zo(e){return e&&e.__esModule?e:{default:e}}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nn(Object(r),!0).forEach(function(n){Wo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wo(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vo(e){var t=Ho(e,"string");return typeof t=="symbol"?t:String(t)}function Ho(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wr=function(t){return(0,Yt.jsxs)("svg",on(on({},t),{},{children:[(0,Yt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,Yt.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};wr.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};wr.displayName="forbid-login";br=vr.default=wr;var xr={};Object.defineProperty(xr,"__esModule",{value:!0});var Er=xr.default=void 0;Go($);var ht=o;function Go(e){return e&&e.__esModule?e:{default:e}}function an(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function sn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?an(Object(r),!0).forEach(function(n){Yo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yo(e,t,r){return t=Zo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zo(e){var t=Xo(e,"string");return typeof t=="symbol"?t:String(t)}function Xo(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jr=function(t){return(0,ht.jsxs)("svg",sn(sn({},t),{},{children:[(0,ht.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,ht.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,ht.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};jr.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};jr.displayName="allow-login";Er=xr.default=jr;function Et(e){const{passport:t,onDelete:r,...n}=e;return o.jsxs(Jo,{...n,children:[t.title||t.name," ",!!r&&o.jsx(ai,{"data-cy":"delete-issuance",className:"delete",onClick:r})]})}Et.propTypes={passport:M.object.isRequired,onDelete:M.func};Et.defaultProps={onDelete:null};const Jo=Te.span`
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
padding: 2px 8px;
|
|
64
64
|
background: ${e=>e.theme.palette.primary.main};
|
|
@@ -73,7 +73,7 @@ should equal
|
|
|
73
73
|
margin-left: 6px;
|
|
74
74
|
cursor: pointer;
|
|
75
75
|
}
|
|
76
|
-
`;function Sr({issuances:e,teamDid:t,onRefresh:r}){const{api:n,inService:s}=Ce(),{t:c,locale:m}=$.useContext(ut),[P,g]=$.useState(null),[S,p]=$.useState(!1),{endpoint:U}=ke(),
|
|
76
|
+
`;function Sr({issuances:e,teamDid:t,onRefresh:r}){const{api:n,inService:s}=Ce(),{t:c,locale:m}=$.useContext(ut),[P,g]=$.useState(null),[S,p]=$.useState(!1),{endpoint:U}=ke(),x=async({id:d})=>{if(!S){p(!0);try{await n.deletePassportIssuance({input:{teamDid:t,sessionId:d}}),r()}catch(i){et.error(i.message)}finally{p(!1),g(null)}}},O=()=>{p(!1),g(null)},w=d=>U?si({id:d.id,endpoint:U}):"";function y({data:d}){return o.jsxs("div",{className:"issuance",children:[o.jsxs(oe,{display:"flex",justifyContent:"space-between",children:[o.jsx(Ue,{permission:s?"":"mutate_team",role:s?We:[],children:i=>i?o.jsx(Et,{passport:{title:d.title,name:d.name},onDelete:()=>g({title:c("team.passport.issuance.delete.title"),description:c("team.passport.issuance.delete.description",{link:w(d)}),confirm:c("common.delConfirm"),cancel:c("common.cancel"),onConfirm:()=>{x(d)},onCancel:O})}):o.jsx(Et,{passport:{title:d.title,name:d.name}})}),o.jsxs("div",{style:{color:"#999"},children:[c("common.expires"),": ",lt(d.expireDate,m)]})]}),o.jsx(oe,{mt:2,children:o.jsx(Pt,{children:w(d)})})]})}return o.jsxs(Qo,{children:[e.map(d=>o.jsx(y,{data:d})),P&&o.jsx(At,{title:P.title,description:P.description,confirm:P.confirm,cancel:P.cancel,params:P.params,onConfirm:P.onConfirm,onCancel:P.onCancel})]})}const Qo=Te.div`
|
|
77
77
|
.MuiTableHead-root {
|
|
78
78
|
display: none;
|
|
79
79
|
}
|
|
@@ -89,7 +89,7 @@ should equal
|
|
|
89
89
|
padding-bottom: 6px;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
`;Sr.propTypes={teamDid:M.string.isRequired,issuances:M.array,onRefresh:M.func};Sr.defaultProps={issuances:[],onRefresh:()=>{}};var me={};Object.defineProperty(me,"__esModule",{value:!0});me.getSourceProviders=me.getSourceProvider=Pr=me.getWalletDid=me.getWallet=me.getConnectedDids=me.getConnectedAccounts=me.getPermanentDid=void 0;const Kn=ze;function ea(e){return e==null?void 0:e.did}me.getPermanentDid=ea;function It(e){return(e==null?void 0:e.connectedAccounts)||[]}me.getConnectedAccounts=It;function ta(e){return It(e).map(n=>n.did)}me.getConnectedDids=ta;function kn(e){return It(e).find(n=>n.provider===Kn.LOGIN_PROVIDER.WALLET)}me.getWallet=kn;function ra(e){const t=kn(e);return t==null?void 0:t.did}var Pr=me.getWalletDid=ra;function na(e){return(e==null?void 0:e.sourceProvider)||Kn.LOGIN_PROVIDER.WALLET}me.getSourceProvider=na;function ia(e){return It(e).map(r=>r.provider)}me.getSourceProviders=ia;function _t({teamDid:e,ownerDid:t,needReceive:r,roles:n,onCancel:s,onSuccess:c,onError:m,showOwnerPassport:P}){const{api:g}=Ce(),[S,p]=$.useState(!1),[U,
|
|
92
|
+
`;Sr.propTypes={teamDid:M.string.isRequired,issuances:M.array,onRefresh:M.func};Sr.defaultProps={issuances:[],onRefresh:()=>{}};var me={};Object.defineProperty(me,"__esModule",{value:!0});me.getSourceProviders=me.getSourceProvider=Pr=me.getWalletDid=me.getWallet=me.getConnectedDids=me.getConnectedAccounts=me.getPermanentDid=void 0;const Kn=ze;function ea(e){return e==null?void 0:e.did}me.getPermanentDid=ea;function It(e){return(e==null?void 0:e.connectedAccounts)||[]}me.getConnectedAccounts=It;function ta(e){return It(e).map(n=>n.did)}me.getConnectedDids=ta;function kn(e){return It(e).find(n=>n.provider===Kn.LOGIN_PROVIDER.WALLET)}me.getWallet=kn;function ra(e){const t=kn(e);return t==null?void 0:t.did}var Pr=me.getWalletDid=ra;function na(e){return(e==null?void 0:e.sourceProvider)||Kn.LOGIN_PROVIDER.WALLET}me.getSourceProvider=na;function ia(e){return It(e).map(r=>r.provider)}me.getSourceProviders=ia;function _t({teamDid:e,ownerDid:t,needReceive:r,roles:n,onCancel:s,onSuccess:c,onError:m,showOwnerPassport:P}){const{api:g}=Ce(),[S,p]=$.useState(!1),[U,x]=$.useState(""),{t:O}=Ke(),[w,y]=$.useState(""),d=async()=>{if(!w){x(O("team.member.error.passportEmpty"));return}x(null),p(!0);try{await g.createPassportIssuance({input:{teamDid:e,name:w,ownerDid:t}}),c()}catch(i){const l=Ve(i);x(l),m(i)}finally{p(!1)}};return o.jsxs($e,{title:O("team.passport.issue"),fullWidth:!0,open:!0,onClick:i=>i.stopPropagation(),onClose:s,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:o.jsxs(o.Fragment,{children:[o.jsx(je,{onClick:s,color:"inherit",size:"small",children:O("common.cancel")}),o.jsxs(je,{onClick:d,color:"primary",size:"small",disabled:S||!w,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[S&&o.jsx(Qe,{size:16}),O(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[o.jsx(pr,{component:"div",children:o.jsx(at,{component:"div",children:o.jsxs(tr,{style:{width:"100%"},variant:"outlined",children:[o.jsx(rr,{children:O("common.passport")}),o.jsx(nr,{"data-cy":"issue-passport-select-passport",value:w,onChange:i=>{x(null),y(i.target.value)},fullWidth:!0,label:O("common.passport"),disabled:S,onKeyPress:i=>{i.key==="Enter"&&(i.preventDefault(),d())},children:n.filter(i=>P||i.name!=="owner").map(i=>o.jsx(yt,{value:i.name,"data-cy":`issue-passport-select-option-${i.name}`,children:o.jsx("span",{children:i.title||i.name})},i.name))})]})})}),!!U&&o.jsx(Je,{severity:"error",variant:"icon",children:U})]})}_t.propTypes={teamDid:M.string.isRequired,ownerDid:M.string.isRequired,needReceive:M.bool,onCancel:M.func.isRequired,onSuccess:M.func.isRequired,onError:M.func,roles:M.array,showOwnerPassport:M.bool};_t.defaultProps={onError:()=>{},roles:[],showOwnerPassport:!1,needReceive:!0};function Ar({passport:e,user:t,color:r,width:n,icon:s,children:c,createPassportSvg:m,...P}){const{t:g}=Ke();return o.jsxs(oa,{display:"flex",alignItems:"center",...P,children:[o.jsx("div",{dangerouslySetInnerHTML:{__html:m({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:e.revoked,preferredColor:r,width:n})}}),o.jsxs("div",{className:"body",children:[o.jsxs(oe,{className:"title",display:"flex",alignItems:"center",children:[ci(e.title),o.jsxs("div",{className:"status-icons",children:[s,e.revoked&&o.jsx(xn,{})]})]}),e.expirationDate&&o.jsx(oe,{className:"title",display:"flex",alignItems:"center",children:g("team.passport.validUntil",{date:e.expirationDate})}),c]})]})}Ar.propTypes={passport:M.any.isRequired,user:M.any.isRequired,color:M.string.isRequired,createPassportSvg:M.func.isRequired,icon:M.any,children:M.any,width:M.number};Ar.defaultProps={icon:null,children:null,width:150};const oa=Te(oe)`
|
|
93
93
|
.body {
|
|
94
94
|
padding: 0;
|
|
95
95
|
margin-left: 24px;
|
|
@@ -115,7 +115,7 @@ should equal
|
|
|
115
115
|
margin-left: 0.4em;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
`;function jt({action:e,passport:t}){const{t:r}=Ke(),{roles:n}=ke(),s=n.find(c=>c.name===t.role);return o.jsxs("div",{children:[o.jsx("div",{children:r(e==="enable"?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),s&&o.jsx(oe,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),s&&o.jsx(oe,{mt:1,children:s.description})]})}jt.propTypes={action:M.string.isRequired,passport:M.object.isRequired};jt.defaultProps={};function
|
|
118
|
+
`;function jt({action:e,passport:t}){const{t:r}=Ke(),{roles:n}=ke(),s=n.find(c=>c.name===t.role);return o.jsxs("div",{children:[o.jsx("div",{children:r(e==="enable"?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),s&&o.jsx(oe,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),s&&o.jsx(oe,{mt:1,children:s.description})]})}jt.propTypes={action:M.string.isRequired,passport:M.object.isRequired};jt.defaultProps={};function Or({user:e,onCreate:t,createPassportSvg:r}){var ge;const{t:n}=Ke(),{session:s}=Pn(),{roles:c,teamDid:m,teamIssuerDid:P,refresh:g,enablePassportIssuance:S,trustedPassports:p,passportColor:U,blocklet:x}=ke(),{appIdList:O}=hn(),{api:w,inService:y}=Ce(),[d,i]=$.useState(!1),[l,b]=$.useState(null),[j,h]=$.useState(!1),[D,R]=$.useState(""),C=[P,...O||[]].filter(Boolean),Q=(Qt(e,"passports")||[]).map(A=>({...A,revoked:A.status===Ee.PASSPORT_STATUS.REVOKED})),ue=async A=>{if(!d){i(!0);try{const I=A.status===Ee.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport";await w[I]({input:{teamDid:m,userDid:e.did,passportId:A.id}}),g()}catch(I){et.error(Ve(I))}finally{i(!1),b(null)}}},fe=A=>A.status===Ee.PASSPORT_STATUS.REVOKED?b({title:n("team.member.enablePassport"),description:o.jsx(jt,{action:"enable",passport:A}),confirm:n("common.enable"),cancel:n("common.cancel"),onConfirm:()=>{ue(A)},onCancel:()=>{i(!1),b(null)},color:"primary"}):b({title:n("team.member.revokePassport"),description:o.jsx(jt,{action:"revoke",passport:A}),confirm:n("common.revoke"),cancel:n("common.cancel"),onConfirm:()=>{ue(A)},onCancel:()=>{i(!1),b(null)}}),ne=(A,I)=>e.did===s.user.did&&s.user.passportId&&s.user.passportId===I.id?{revokable:!1,message:n("team.passport.shouldNotDeleteCurrent")}:A?m===I.issuer.id&&I.name==="owner"?{revokable:!1,message:n("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:n("team.passport.noPermission")},ie=Q.filter(A=>!D||A.title.includes(D)||A.name.includes(D));return o.jsxs(aa,{children:[o.jsxs(vi,{children:[o.jsx("div",{className:"left",children:o.jsx(bi,{placeholder:n("team.passport.search"),value:D,onChange:A=>R(A.target.value)})}),o.jsx("div",{className:"right",children:S&&!!e.approved&&o.jsx(Ue,{permission:y?"":"mutate_team",role:y?We:[],children:o.jsxs(je,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:()=>h(!0),children:[o.jsx(bt,{style:{fontSize:16,marginRight:4}}),n("team.passport.issue")]})})})]}),o.jsxs(oe,{children:[ie.map(A=>o.jsx(Ue,{permission:y?"":"mutate_team",role:y?We:[],children:I=>o.jsxs(oe,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[o.jsx(Ar,{passport:A,user:e,color:U,createPassportSvg:r,icon:C.length&&!C.includes(A.issuer.id)?o.jsx(bn,{}):null,children:!!C.length&&!C.includes(A.issuer.id)&&o.jsxs("div",{className:"tip",children:[A.issuer.id!==P&&!p.some(K=>K.issuerDid===A.issuer.id)&&o.jsx(vt,{title:n("team.passport.notTrustedIssuerTip"),children:o.jsx(oe,{component:Dr,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),o.jsx("span",{children:n("team.passport.issueBy",{name:A.issuer.name})})]})}),o.jsx(oe,{children:ne(I,A).revokable?o.jsxs(je,{variant:"outlined",color:A.revoked?"primary":"secondary",onClick:()=>fe(A),children:[A.revoked?o.jsx(bt,{style:{fontSize:16,marginRight:4}}):o.jsx(xn,{style:{height:16,marginRight:4}}),A.revoked?n("common.enable"):n("common.revoke")]}):o.jsx(vt,{title:ne(I,A).message,children:o.jsx(Dr,{style:{color:"#ddd"}})})})]})},A.id)),!ie.length&&o.jsx(En,{children:n("common.empty")})]}),j&&o.jsx(_t,{teamDid:m,ownerDid:e.did,needReceive:Pr(e)===e.did,roles:c,onCancel:()=>h(!1),onSuccess:()=>{t(),h(!1)},showOwnerPassport:x&&!((ge=x.settings)!=null&&ge.owner)}),l&&o.jsx(At,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel,color:l.color})]})}Or.propTypes={user:M.object.isRequired,createPassportSvg:M.func.isRequired,onCreate:M.func};Or.defaultProps={onCreate:()=>{}};const aa=Te.div`
|
|
119
119
|
.passport-item {
|
|
120
120
|
.MuiButton-outlinedSecondary {
|
|
121
121
|
color: #f16e6e;
|
|
@@ -127,7 +127,7 @@ should equal
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
`,{ROLES:sa,PASSPORT_STATUS:ca}=Ee,la=e=>((e==null?void 0:e.passports)||[]).some(t=>t.role===sa.OWNER&&t.status===ca.VALID);var ua={hasActiveOwnerPassport:la};const fa=(e,t)=>e.nodeOwner&&e.nodeOwner.did===t,cn=(e,t)=>e&&e.did===t;function Ct({user:e,onCancel:t,onSuccess:r,onError:n,children:s}){const{api:c,info:m,inService:P}=Ce(),{session:g}=Pn(),{teamDid:S,refresh:p}=ke(),{t:U}=Ke(),[
|
|
130
|
+
`,{ROLES:sa,PASSPORT_STATUS:ca}=Ee,la=e=>((e==null?void 0:e.passports)||[]).some(t=>t.role===sa.OWNER&&t.status===ca.VALID);var ua={hasActiveOwnerPassport:la};const fa=(e,t)=>e.nodeOwner&&e.nodeOwner.did===t,cn=(e,t)=>e&&e.did===t;function Ct({user:e,onCancel:t,onSuccess:r,onError:n,children:s}){const{api:c,info:m,inService:P}=Ce(),{session:g}=Pn(),{teamDid:S,refresh:p}=ke(),{t:U}=Ke(),[x,O]=$.useState(!1),[w,y]=$.useState(!1),d=()=>y(!0),i=async j=>{const{did:h,approved:D}=j;if(!x){O(!0);try{await c.updateUserApproval({input:{teamDid:S,user:{did:h,approved:!D}}}),y(!1),r(),p()}catch(R){et.error(Ve(R)),n()}finally{O(!1)}}},l={title:e.approved?U("team.member.forbidLogin"):U("team.member.allowLogin"),description:e.approved?U("team.member.forbidLoginDescription"):U("team.member.allowLoginDescription"),confirm:U("common.confirm"),cancel:U("common.cancel"),onConfirm:()=>{i(e)},onCancel:()=>{O(!1),y(!1),t()},color:e.approved?"error":"primary"};let b;return ua.hasActiveOwnerPassport(e)?b=!1:P?b=!cn(g.user,e.did):b=m.nodeOwner&&!fa(m,e.did)&&!cn(g.user,e.did),b?o.jsxs(o.Fragment,{children:[typeof s=="function"?s({can:b,open:d}):s,w?o.jsx(At,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel,color:l.color}):null]}):null}Ct.propTypes={user:M.object,onSuccess:M.func,onCancel:M.func,onError:M.func,children:M.oneOfType([M.object,M.func])};Ct.defaultProps={user:{},onSuccess:()=>{},onCancel:()=>{},onError:()=>{},children:null};function Bn(e,t,r){if(e&&e.startsWith(Ee.USER_AVATAR_URL_PREFIX)){const n=window.env.apiPrefix||"/";return r?er(n,Ee.USER_AVATAR_PATH_PREFIX,e.replace(Ee.USER_AVATAR_URL_PREFIX,"")):er(n,Ee.USER_AVATAR_PATH_PREFIX,t,e.replace(Ee.USER_AVATAR_URL_PREFIX,""))}return e}function Rr({user:e}){return(e.connectedAccounts||[]).map(r=>o.jsx(ir,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.provider,children:o.jsx(fr,{did:r.did,showQrcode:!0})},r.did))}Rr.propTypes={user:M.object.isRequired};Rr.defaultProps={};M.string.isRequired;const st="info";function Ir({userDid:e,onCancel:t,initTab:r,createPassportSvg:n}){const{api:s,ws:{useSubscription:c},inService:m}=Ce(),{roles:P,teamDid:g,enablePassportIssuance:S}=ke(),{t:p,locale:U}=Ke(),x=dn({user:null,issuances:null,tab:r||st}),O=async(h,D)=>{try{const R=await s.doBatchQuery({getUser:{input:{teamDid:h,user:{did:D},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:h,ownerDid:D}}});R.getUser.user&&(R.getUser.user.avatar=Bn(R.getUser.user.avatar,h,m),R.getUser.user.passports=(R.getUser.user.passports||[]).filter(C=>C.issuer)),x.user=R.getUser.user||{},x.issuances=R.getPassportIssuances.list||[]}catch(R){et.error(Ve(R))}};$.useEffect(()=>{g&&O(g,e)},[e,g]);const w=h=>{h.teamDid===g&&h.user&&h.user.did===e&&O(g,e)};c(ze.TeamEvents.userUpdated,w,[e,g]),$.useEffect(()=>{x.issuances&&!x.issuances.length&&x.tab==="issuances"&&(x.tab=st)},[x.issuances]);const y=async h=>{await O(g,h.did),x.tab=st},d=()=>{var D,R;return(x.user?[{name:p("team.member.name"),value:x.user.fullName},{name:p("common.email"),value:x.user.email},{name:p("team.member.source"),value:o.jsx(oe,{display:"flex",alignItems:"center",children:ze.PROVIDER_NAME[((D=x.user)==null?void 0:D.sourceProvider)||Ee.USER_TYPE.WALLET]||((R=x.user)==null?void 0:R.sourceProvider)})},{name:p("team.member.allowLogin"),value:x.user.approved?p("common.yes"):p("common.no")},{name:p("team.member.lastLogin"),value:lt(x.user.lastLoginAt,U)},{name:p("team.member.lastLoginIp"),value:x.user.lastLoginIp||""},{name:p("common.createdAt"),value:lt(x.user.createdAt,U)},{name:p("common.remark"),value:x.user.remark||"--"},Array.isArray(x.user.tags)&&x.user.tags.length>0?{name:p("common.tags"),value:x.user.tags.map(C=>o.jsx(jn,{style:{background:C.color,color:gn(C.color),marginRight:4},children:C.title},C.id))}:null].filter(Boolean):[]).map(C=>C.name===p("common.did")?o.jsx(ir,{valueComponent:"div",nameWidth:120,name:C.name,nameFormatter:()=>p("common.did"),children:C.value},C.name):o.jsx(ir,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:C.name,children:C.value},C.name))},i={info:{label:p("common.basicInfo"),value:st,component:d},oauth:{label:p("team.member.connectedAccounts"),value:"oauth",component:()=>o.jsx(Rr,{user:x.user,onChangeUser:y})},passports:{label:p("common.passport"),value:"passports",component:()=>o.jsx(Or,{user:x.user,teamDid:g,roles:P,createPassportSvg:n,onCreate:()=>{O(g,e).then(()=>{S&&x.issuances&&x.issuances.length&&(x.tab="issuances")})},onRefresh:()=>{O(g,e)}})},issuances:{label:p("team.passport.issuance.pending"),value:"issuances",component:()=>o.jsx(Sr,{issuances:x.issuances||[],teamDid:g,onRefresh:()=>O(g,e)})}},l=Object.values(i).map(({label:h,value:D})=>({label:h,value:D})).filter(h=>{var D;return h.value==="issuances"?S&&x.issuances&&!!x.issuances.length:h.value==="oauth"?(((D=x.user)==null?void 0:D.connectedAccounts)||[]).find(C=>{var Q;return C.provider!==(((Q=x.user)==null?void 0:Q.sourceProvider)||ze.LOGIN_PROVIDER.WALLET)}):!0}),b=i[x.tab]||i.info,j=h=>{x.tab=h};return o.jsx($e,{title:p("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:x.user&&o.jsx(Ue,{permission:m?"":"mutate_team",role:m?We:[],children:o.jsx(Ct,{user:x.user,children:({open:h})=>o.jsxs(ma,{onClick:h,children:[x.user.approved?o.jsx(br,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):o.jsx(Er,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),x.user.approved?p("team.member.forbidLogin"):p("team.member.allowLogin")]})})}),children:o.jsxs(pa,{children:[!x.user&&o.jsx(da,{children:o.jsx(Qe,{})}),x.user&&o.jsxs("div",{children:[o.jsxs(oe,{display:"flex",alignItems:"center",className:"info",children:[o.jsx(Pi,{src:x.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),o.jsxs(oe,{children:[o.jsx(oe,{className:"name",children:x.user.fullName}),o.jsx(oe,{className:"did",mt:1,children:o.jsx(fr,{did:x.user.did,showQrcode:!0})})]})]}),o.jsx(oe,{mx:3,className:"tabs",children:o.jsx(xi,{tabs:l,current:x.tab,onChange:j,scrollButtons:"auto"})}),o.jsx("div",{className:"body",children:o.jsx(b.component,{})})]})]})})}Ir.propTypes={userDid:M.string.isRequired,onCancel:M.func.isRequired,createPassportSvg:M.func.isRequired,initTab:M.string};Ir.defaultProps={initTab:st};const pa=Te.div`
|
|
131
131
|
.info {
|
|
132
132
|
.name {
|
|
133
133
|
font-weight: 400;
|
|
@@ -168,9 +168,9 @@ should equal
|
|
|
168
168
|
bottom: 0;
|
|
169
169
|
background: #fff;
|
|
170
170
|
z-index: 10;
|
|
171
|
-
`;function _r(){const{api:e,inService:t}=Ce(),{t:r,locale:n}=$.useContext(ut),{teamDid:s,invitations:c,refresh:m,endpoint:P}=ke(),[g,S]=$.useState(null),[p,U]=$.useState(!1),
|
|
171
|
+
`;function _r(){const{api:e,inService:t}=Ce(),{t:r,locale:n}=$.useContext(ut),{teamDid:s,invitations:c,refresh:m,endpoint:P}=ke(),[g,S]=$.useState(null),[p,U]=$.useState(!1),x=async({inviteId:d})=>{if(!p){U(!0);try{await e.deleteInvitation({input:{teamDid:s,inviteId:d}}),m(),await li(800)}catch(i){console.error(i)}finally{U(!1),S(null)}}},O=()=>{U(!1),S(null)},w=d=>P?ur({inviteId:d.inviteId,endpoint:P}):"",y=[{label:r("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:d=>{const i=c[d];return P?o.jsx(Pt,{children:w(i)}):o.jsx(Qe,{size:16})}}},{label:r("common.role"),name:"role",widtn:70},{label:r("common.remark"),name:"remark",options:{customBodyRender:d=>d||"--"}},{label:r("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:(d,{rowIndex:i})=>{var b;const l=c[i];return(b=l==null?void 0:l.inviter)==null?void 0:b.fullName}}},{label:r("common.expires"),name:"expireDate",options:{customBodyRender:d=>o.jsx(yn,{value:d,locale:n})}},{label:r("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:d=>{const i=c[d];return o.jsx(Ue,{permission:t?"":"mutate_team",role:t?We:[],children:o.jsxs(je,{onClick:()=>S({title:r("team.inviting.delete.title"),description:r("team.inviting.delete.description",{link:w(i)}),confirm:r("common.delConfirm"),cancel:r("common.cancel"),onConfirm:()=>x(i),onCancel:O}),size:"small",color:"error",variant:"text",children:[o.jsx(Ai,{style:{fontSize:"1.2em"}}),r("common.delete")]})})}}}];return o.jsxs(ha,{children:[c.length?o.jsx(wn,{locale:n,data:[...c],columns:y,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):o.jsx(En,{children:r("common.empty")}),g&&o.jsx(At,{title:g.title,description:g.description,confirm:g.confirm,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})]})}const ha=Te.div`
|
|
172
172
|
margin-top: -20px;
|
|
173
|
-
`;_r.propTypes={};_r.defaultProps={};var Cr={},ga=fi;Object.defineProperty(Cr,"__esModule",{value:!0});var Fn=Cr.default=void 0,ya=ga(ui()),va=o;Fn=Cr.default=(0,ya.default)((0,va.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");function Tr({type:e,user:t,onIssuePassport:r,onRefresh:n}){const{teamDid:s,roles:c}=ke(),{confirmHolder:m,confirmApi:P}=vn(),{t:g}=$.useContext(ut),[S,p]=$.useState(!1),{api:U}=Ce(),w=cr(async()=>{const{userSessions:A=[]}=t,x=A.map(y=>()=>U.logoutUser({input:{teamDid:s,appPid:s,userDid:t.did,visitorId:y.visitorId}}));await Ai(x,{concurrency:3,stopOnError:!1})});return o.jsxs(o.Fragment,{children:[m,o.jsx(Ri,{"data-cy":"member-actions",actions:[{icon:o.jsx(bt,{fontSize:"small"}),text:g("team.passport.issue"),"data-cy":"action-issue-passport",onClick:A=>{A.stopPropagation(),p(!0)}},({close:A})=>o.jsx(Ct,{user:t,children:({open:x})=>o.jsxs(yt,{dense:!0,onClick:y=>{y.stopPropagation(),A(),x(y)},"data-cy":"action-toggle-block",children:[o.jsx(Ii,{style:{minWidth:24,marginRight:8},children:t.approved?o.jsx(br,{}):o.jsx(Er,{})}),o.jsx(_i,{primary:t.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")})]})},"toggle-approval"),e==="blocklet"&&{icon:o.jsx(Fn,{fontSize:"small"}),text:g("team.member.forceLogout"),onClick:A=>{A.stopPropagation(),P.open({title:g("team.member.forceLogout"),content:g("team.member.forceLogoutDescription"),confirmButtonText:g("common.confirm"),cancelButtonText:g("common.cancel"),onClick:x=>x.stopPropagation(),onConfirm:async()=>{await w(),await P.close(),n()}})}}].filter(Boolean)}),S&&o.jsx(_t,{teamDid:s,ownerDid:t.did,needReceive:Pr(t)===t.did,roles:c,onCancel:()=>p(!1),onSuccess:()=>{r(),p(!1)}})]})}Tr.propTypes={type:M.oneOf(["server","blocklet"]).isRequired,user:M.object.isRequired,onIssuePassport:M.func,onRefresh:M.func};Tr.defaultProps={onIssuePassport:()=>{},onRefresh:()=>{}};const Zt="$all",ln="$none",Xt=(e,t)=>{const r=e.find(n=>n.key===t);return(r==null?void 0:r.value)||0},ba=(e,t)=>{const r=e.passports||[];return r.length?!r.some(n=>{var s;return t.includes((s=n.issuer)==null?void 0:s.id)}):!1};function Mn({user:e}){const{t}=$.useContext(ut),r=o.jsxs("div",{className:"member-block",children:[o.jsxs("div",{className:"member-avatar",children:[o.jsx(mn,{src:`${e.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:e.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!e.approved&&o.jsx("did",{className:"badge-block"}),e.isFromExternal&&o.jsx(vt,{title:t("team.passport.externalPassport"),children:o.jsx(oe,{ml:1,className:"icon",children:o.jsx(bn,{})})})]}),o.jsxs("div",{className:"member-meta",children:[o.jsx("div",{className:"member-text",children:o.jsx(Ci,{children:e.fullName})}),Array.isArray(e.tags)&&e.tags.length>0&&o.jsx("div",{className:"member-tags",children:e.tags.map(n=>o.jsx(jn,{style:{background:n.color,color:gn(n.color),marginRight:4},children:n.title},n.id))})]})]});return e.approved?r:o.jsx(oe,{display:"flex",alignItems:"center",children:o.jsx(vt,{title:t("team.member.forbidLoginDescription"),children:r})})}Mn.propTypes={user:M.object.isRequired};function xa({type:e,createPassportSvg:t}){var pe,Ae,xe,De;const{confirmApi:r,confirmHolder:n}=vn({sx:{".MuiDialog-paper":{borderRadius:2,maxWidth:1e3},".ux-dialog_title":{fontWeight:600},".ux-dialog_closeButton":{p:1},".MuiDialogActions-root":{display:{xs:"none",md:"flex"}}}}),{appIdList:s=[],blocklet:c}=hn(),{teamDid:m,invitations:P,teamIssuerDid:g,roles:S,refresh:p,enablePassportIssuance:U,endpoint:w,api:A}=ke(),{inService:x,ws:{useSubscription:y}}=Ce(),d=[];if(c){const L=(((Ae=(pe=c.settings)==null?void 0:pe.federated)==null?void 0:Ae.sites)||[]).find(u=>u.isMaster!==!1),a=(((De=(xe=c.settings)==null?void 0:xe.federated)==null?void 0:De.sites)||[]).find(u=>u.appId===c.appDid);if((a==null?void 0:a.status)==="approved"&&d.push({appId:L==null?void 0:L.appId,appName:L==null?void 0:L.appName,appDescription:L==null?void 0:L.appDescription,appLogo:L==null?void 0:L.appLogo,appPid:L==null?void 0:L.appPid,appUrl:L==null?void 0:L.appUrl,version:L==null?void 0:L.version,sourceAppPid:L==null?void 0:L.appPid,provider:"wallet"}),a)d.push({appId:(a==null?void 0:a.appId)||c.appDid,appName:a==null?void 0:a.appName,appDescription:a==null?void 0:a.appDescription,appLogo:a==null?void 0:a.appLogo,appPid:a==null?void 0:a.appPid,appUrl:a==null?void 0:a.appUrl,version:a==null?void 0:a.version,sourceAppPid:null,provider:"wallet"});else{const u=Mo(c,void 0,{returnWallet:!1});d.push({appId:u.did,appName:u.name,appDescription:u.description,appLogo:er(u.appUrl,Ee.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),appPid:c==null?void 0:c.appPid,appUrl:u.appUrl,version:u.version,sourceAppPid:null,provider:"wallet"})}}const{t:i,locale:l}=$.useContext(ut),[b,j]=$.useState(!1),[h,D]=$.useState(!1),[R,C]=$.useState(!1),[Q,ue]=$.useState(!1),[fe,ne]=$.useState(!1),[ie,ge]=$.useState([]),[O,I]=$.useState(),[K,k]=$.useState([]),[z]=Hi({did:void 0}),X=`members-${m}`,E=xi(X),[f,v]=$.useState({role:Zt,searchText:E.searchText||"",hideBlocked:!1,pageSize:E.rowsPerPage||10,page:E.page?E.page+1:1});pi(async()=>{if(z.did){const{user:L}=await A.getUser({did:z.did});L&&ue(L)}});const _=(S||[]).map(L=>({name:L.name,title:L.title,num:Xt(K,L.name)}));_.unshift({name:Zt,title:"All Members",num:Xt(K,Zt)}),_.push({name:ln,title:"Other",num:Xt(K,ln)});const q=()=>{const L={includeTags:!0,includeUserSessions:e==="blocklet"};f.hideBlocked&&(L.approved=!0),L.role=f.role,f.searchText&&(L.search=f.searchText),ne(!0),A.getUsers({query:L,paging:{page:f.page,pageSize:f.pageSize}}).then(a=>{ne(!1),(a.users||[]).forEach(u=>{u.isFromExternal=ba(u,mi(s)?[g]:s),u.avatar=Bn(u.avatar,m,x),u.passports=(u.passports||[]).filter(N=>N.issuer)}),ge(a.users||[]),I(a.paging.total)}).catch(a=>{ne(!1),et.error(a.message)})},T=()=>{A.getUsersCountPerRole().then(L=>{k(L.counts||[])}).catch(L=>{et.error(L.message)})},V=L=>{L.teamDid===m&&(q(),T())};$.useEffect(()=>{q()},[`${f.hideBlocked}-${f.role}-${f.page}-${f.pageSize}-${f.searchText}`]),$.useEffect(()=>{T()},[]),y(ze.TeamEvents.userUpdated,V,[f]),y(ze.TeamEvents.userAdded,V,[f]);const ae=U,te=cr(L=>{r.open({title:"User Sessions",content:o.jsx(Ei,{user:L,showAction:!1,showUser:!1}),onConfirm(){r.close()},confirmButtonText:i("common.close"),showCancelButton:!1})}),ye=[{label:i("common.name"),name:"fullName",options:{customBodyRenderLite:L=>{const a=ie[L];return o.jsx("div",{"data-cy":`member-name-${a.fullName}`,children:o.jsx(Mn,{user:a})},a.did)}}},{label:i("common.address"),name:"did",options:{customBodyRender:L=>o.jsx(fr,{size:14,responsive:!1,compact:!0,copyable:!1,did:L})}},{label:i("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:L=>o.jsx(oe,{sx:{minWidth:"100px"},children:o.jsx(yn,{value:L,locale:l})})}},{label:i("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:L=>L||"-"}},{label:i("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:L=>{const a=ie[L],u=a.sourceProvider||Ee.USER_TYPE.WALLET,N=ze.PROVIDER_NAME[u]||u;return a.sourceAppPid?`${N} (${i("team.member.federated")})`:N}}},e==="blocklet"&&{label:i("team.member.activeUserSessions"),name:"userSessions",options:{customBodyRenderLite:L=>{var u,N,B;const a=ie[L];return o.jsx(di,{onClick:F=>{F.stopPropagation(),te(a)},children:o.jsx(ji,{badgeContent:(u=a==null?void 0:a.userSessions)==null?void 0:u.length,color:((N=a==null?void 0:a.userSessions)==null?void 0:N.length)>0?"primary":"default",sx:((B=a==null?void 0:a.userSessions)==null?void 0:B.length)>0?{}:{".MuiBadge-badge":{backgroundColor:"grey",color:"white"}},showZero:!0,children:o.jsx(yi,{})})})}}},{label:i("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:L=>{const a=ie[L];return o.jsx(Ue,{permission:x?"":"mutate_team",role:x?We:[],children:o.jsx(Tr,{type:e,user:a,onIssuePassport:()=>ue({...a,initTab:"issuances"}),onRefresh:()=>V({teamDid:m})})})}}}].filter(Boolean),be=[];ae&&(be.push(o.jsxs(je,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:()=>{C(!0)},children:[o.jsx(On,{style:{height:"1em",marginRight:4}}),i("common.inviting"),P.length?` (${P.length})`:""]}),o.jsx(Ue,{permission:x?"":"mutate_team",role:x?We:[],children:o.jsxs(je,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:()=>j(!0),children:[o.jsx(bt,{style:{fontSize:"1.3em",marginRight:4}}),i("team.invite")]})})),e==="server"&&be.push(o.jsx(Ue,{role:"owner",children:o.jsxs(je,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:()=>D(!0),children:[o.jsx(gi,{style:{fontSize:"1.3em",marginRight:4}}),i("team.transferNode.name")]})})));const Ne=L=>{fe||v(a=>({...a,role:L,hideBlocked:!1,searchText:"",page:1}))},Oe=L=>{v(a=>({...a,hideBlocked:L,page:1}))},de=({page:L,rowsPerPage:a,searchText:u})=>{f.pageSize!==a?v(N=>({...N,pageSize:a,page:1})):f.page!==L+1?v(N=>({...N,page:L+1})):f.searchText!==u&&v(N=>({...N,searchText:u,page:1}))},Be=$.useRef(null),He={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(L,{dataIndex:a},u){var N;if((N=Be.current)!=null&&N.contains(u.target)){const B=ie[a];ue(B)}},page:f.page-1,rowsPerPage:f.pageSize,count:O,searchDebounceTime:600};return o.jsxs(wa,{children:[n,o.jsxs(oe,{className:"main",display:"flex",sx:{mt:x?4:0},children:[o.jsx("div",{className:"left",children:o.jsx("div",{className:"tabs",children:_.map(L=>o.jsxs("div",{className:`tab ${f.role===L.name?"active":""}`,onClick:()=>Ne(L.name),children:[o.jsx("span",{className:"text",children:L.title}),o.jsx("span",{className:hi("badge",{"is-rect":L.num>999}),children:L.num})]},L.name))})}),o.jsx("div",{ref:Be,className:"right",children:o.jsx(xn,{className:"main-table",verticalKeyWidth:100,locale:l,durable:X,durableKeys:["page","rowsPerPage"],title:o.jsx("div",{className:"table-toolbar-left",children:o.jsx(Ti,{control:o.jsx(Ni,{sx:{display:"flex !important"},disabled:fe,color:"primary",checked:f.hideBlocked,onChange:L=>Oe(L.target.checked)}),label:i("team.member.hideBlockedMember")})}),data:ie,columns:ye,customButtons:be,options:He,loading:fe,onChange:de})})]}),o.jsx($e,{title:i("common.inviting"),onClose:()=>C(!1),open:R,maxWidth:"lg",fullWidth:!0,children:o.jsx(_r,{})}),Q&&o.jsx(Ir,{onCancel:()=>ue(null),userDid:Q.did,createPassportSvg:t,initTab:Q.initTab}),b&&o.jsx(gr,{teamDid:m,endpoint:w,roles:S,apps:d,onCancel:()=>j(!1),onSuccess:()=>{p(),j(!1)}}),h&&o.jsx(yr,{teamDid:m,endpoint:w,roles:S,onCancel:()=>D(!1),onSuccess:()=>{p(),D(!1)}})]})}const wa=Te.div`
|
|
173
|
+
`;_r.propTypes={};_r.defaultProps={};var Cr={},ga=fi;Object.defineProperty(Cr,"__esModule",{value:!0});var Fn=Cr.default=void 0,ya=ga(ui()),va=o;Fn=Cr.default=(0,ya.default)((0,va.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout");function Tr({type:e,user:t,onIssuePassport:r,onRefresh:n}){const{teamDid:s,roles:c}=ke(),{confirmHolder:m,confirmApi:P}=vn(),{t:g}=$.useContext(ut),[S,p]=$.useState(!1),{api:U}=Ce(),x=cr(async()=>{const{userSessions:O=[]}=t,w=O.map(y=>()=>U.logoutUser({input:{teamDid:s,appPid:s,userDid:t.did,visitorId:y.visitorId}}));await Oi(w,{concurrency:3,stopOnError:!1})});return o.jsxs(o.Fragment,{children:[m,o.jsx(Ri,{"data-cy":"member-actions",actions:[{icon:o.jsx(bt,{fontSize:"small"}),text:g("team.passport.issue"),"data-cy":"action-issue-passport",onClick:O=>{O.stopPropagation(),p(!0)}},({close:O})=>o.jsx(Ct,{user:t,children:({open:w})=>o.jsxs(yt,{dense:!0,onClick:y=>{y.stopPropagation(),O(),w(y)},"data-cy":"action-toggle-block",children:[o.jsx(Ii,{style:{minWidth:24,marginRight:8},children:t.approved?o.jsx(br,{}):o.jsx(Er,{})}),o.jsx(_i,{primary:t.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")})]})},"toggle-approval"),e==="blocklet"&&{icon:o.jsx(Fn,{fontSize:"small"}),text:g("team.member.forceLogout"),onClick:O=>{O.stopPropagation(),P.open({title:g("team.member.forceLogout"),content:g("team.member.forceLogoutDescription"),confirmButtonText:g("common.confirm"),cancelButtonText:g("common.cancel"),onClick:w=>w.stopPropagation(),onConfirm:async()=>{await x(),await P.close(),n()}})}}].filter(Boolean)}),S&&o.jsx(_t,{teamDid:s,ownerDid:t.did,needReceive:Pr(t)===t.did,roles:c,onCancel:()=>p(!1),onSuccess:()=>{r(),p(!1)}})]})}Tr.propTypes={type:M.oneOf(["server","blocklet"]).isRequired,user:M.object.isRequired,onIssuePassport:M.func,onRefresh:M.func};Tr.defaultProps={onIssuePassport:()=>{},onRefresh:()=>{}};const Zt="$all",ln="$none",Xt=(e,t)=>{const r=e.find(n=>n.key===t);return(r==null?void 0:r.value)||0},ba=(e,t)=>{const r=e.passports||[];return r.length?!r.some(n=>{var s;return t.includes((s=n.issuer)==null?void 0:s.id)}):!1};function Mn({user:e}){const{t}=$.useContext(ut),r=o.jsxs("div",{className:"member-block",children:[o.jsxs("div",{className:"member-avatar",children:[o.jsx(mn,{src:`${e.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:e.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!e.approved&&o.jsx("did",{className:"badge-block"}),e.isFromExternal&&o.jsx(vt,{title:t("team.passport.externalPassport"),children:o.jsx(oe,{ml:1,className:"icon",children:o.jsx(bn,{})})})]}),o.jsxs("div",{className:"member-meta",children:[o.jsx("div",{className:"member-text",children:o.jsx(Ci,{children:e.fullName})}),Array.isArray(e.tags)&&e.tags.length>0&&o.jsx("div",{className:"member-tags",children:e.tags.map(n=>o.jsx(jn,{style:{background:n.color,color:gn(n.color),marginRight:4},children:n.title},n.id))})]})]});return e.approved?r:o.jsx(oe,{display:"flex",alignItems:"center",children:o.jsx(vt,{title:t("team.member.forbidLoginDescription"),children:r})})}Mn.propTypes={user:M.object.isRequired};function wa({type:e,createPassportSvg:t}){var pe,Oe,we,De;const{confirmApi:r,confirmHolder:n}=vn({sx:{".MuiDialog-paper":{borderRadius:2,maxWidth:1e3},".ux-dialog_title":{fontWeight:600},".ux-dialog_closeButton":{p:1},".MuiDialogActions-root":{display:{xs:"none",md:"flex"}}}}),{appIdList:s=[],blocklet:c}=hn(),{teamDid:m,invitations:P,teamIssuerDid:g,roles:S,refresh:p,enablePassportIssuance:U,endpoint:x,api:O}=ke(),{inService:w,ws:{useSubscription:y}}=Ce(),d=[];if(c){const L=(((Oe=(pe=c.settings)==null?void 0:pe.federated)==null?void 0:Oe.sites)||[]).find(u=>u.isMaster!==!1),a=(((De=(we=c.settings)==null?void 0:we.federated)==null?void 0:De.sites)||[]).find(u=>u.appId===c.appDid);if((a==null?void 0:a.status)==="approved"&&d.push({appId:L==null?void 0:L.appId,appName:L==null?void 0:L.appName,appDescription:L==null?void 0:L.appDescription,appLogo:L==null?void 0:L.appLogo,appPid:L==null?void 0:L.appPid,appUrl:L==null?void 0:L.appUrl,version:L==null?void 0:L.version,sourceAppPid:L==null?void 0:L.appPid,provider:"wallet"}),a)d.push({appId:(a==null?void 0:a.appId)||c.appDid,appName:a==null?void 0:a.appName,appDescription:a==null?void 0:a.appDescription,appLogo:a==null?void 0:a.appLogo,appPid:a==null?void 0:a.appPid,appUrl:a==null?void 0:a.appUrl,version:a==null?void 0:a.version,sourceAppPid:null,provider:"wallet"});else{const u=Mo(c,void 0,{returnWallet:!1});d.push({appId:u.did,appName:u.name,appDescription:u.description,appLogo:er(u.appUrl,Ee.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),appPid:c==null?void 0:c.appPid,appUrl:u.appUrl,version:u.version,sourceAppPid:null,provider:"wallet"})}}const{t:i,locale:l}=$.useContext(ut),[b,j]=$.useState(!1),[h,D]=$.useState(!1),[R,C]=$.useState(!1),[Q,ue]=$.useState(!1),[fe,ne]=$.useState(!1),[ie,ge]=$.useState([]),[A,I]=$.useState(),[K,k]=$.useState([]),[z]=Hi({did:void 0}),X=`members-${m}`,E=wi(X),[f,v]=$.useState({role:Zt,searchText:E.searchText||"",hideBlocked:!1,pageSize:E.rowsPerPage||10,page:E.page?E.page+1:1});pi(async()=>{if(z.did){const{user:L}=await O.getUser({did:z.did});L&&ue(L)}});const _=(S||[]).map(L=>({name:L.name,title:L.title,num:Xt(K,L.name)}));_.unshift({name:Zt,title:"All Members",num:Xt(K,Zt)}),_.push({name:ln,title:"Other",num:Xt(K,ln)});const q=()=>{const L={includeTags:!0,includeUserSessions:e==="blocklet"};f.hideBlocked&&(L.approved=!0),L.role=f.role,f.searchText&&(L.search=f.searchText),ne(!0),O.getUsers({query:L,paging:{page:f.page,pageSize:f.pageSize}}).then(a=>{ne(!1),(a.users||[]).forEach(u=>{u.isFromExternal=ba(u,mi(s)?[g]:s),u.avatar=Bn(u.avatar,m,w),u.passports=(u.passports||[]).filter(N=>N.issuer)}),ge(a.users||[]),I(a.paging.total)}).catch(a=>{ne(!1),et.error(a.message)})},T=()=>{O.getUsersCountPerRole().then(L=>{k(L.counts||[])}).catch(L=>{et.error(L.message)})},V=L=>{L.teamDid===m&&(q(),T())};$.useEffect(()=>{q()},[`${f.hideBlocked}-${f.role}-${f.page}-${f.pageSize}-${f.searchText}`]),$.useEffect(()=>{T()},[]),y(ze.TeamEvents.userUpdated,V,[f]),y(ze.TeamEvents.userAdded,V,[f]);const ae=U,te=cr(L=>{r.open({title:"User Sessions",content:o.jsx(Ei,{user:L,showAction:!1,showUser:!1}),onConfirm(){r.close()},confirmButtonText:i("common.close"),showCancelButton:!1})}),ye=[{label:i("common.name"),name:"fullName",options:{customBodyRenderLite:L=>{const a=ie[L];return o.jsx("div",{"data-cy":`member-name-${a.fullName}`,children:o.jsx(Mn,{user:a})},a.did)}}},{label:i("common.address"),name:"did",options:{customBodyRender:L=>o.jsx(fr,{size:14,responsive:!1,compact:!0,copyable:!1,did:L})}},{label:i("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:L=>o.jsx(oe,{sx:{minWidth:"100px"},children:o.jsx(yn,{value:L,locale:l})})}},{label:i("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:L=>L||"-"}},{label:i("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:L=>{const a=ie[L],u=a.sourceProvider||Ee.USER_TYPE.WALLET,N=ze.PROVIDER_NAME[u]||u;return a.sourceAppPid?`${N} (${i("team.member.federated")})`:N}}},e==="blocklet"&&{label:i("team.member.activeUserSessions"),name:"userSessions",options:{customBodyRenderLite:L=>{var u,N,B;const a=ie[L];return o.jsx(di,{onClick:F=>{F.stopPropagation(),te(a)},children:o.jsx(ji,{badgeContent:(u=a==null?void 0:a.userSessions)==null?void 0:u.length,color:((N=a==null?void 0:a.userSessions)==null?void 0:N.length)>0?"primary":"default",sx:((B=a==null?void 0:a.userSessions)==null?void 0:B.length)>0?{}:{".MuiBadge-badge":{backgroundColor:"grey",color:"white"}},showZero:!0,children:o.jsx(yi,{})})})}}},{label:i("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:L=>{const a=ie[L];return o.jsx(Ue,{permission:w?"":"mutate_team",role:w?We:[],children:o.jsx(Tr,{type:e,user:a,onIssuePassport:()=>ue({...a,initTab:"issuances"}),onRefresh:()=>V({teamDid:m})})})}}}].filter(Boolean),be=[];ae&&(be.push(o.jsxs(je,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:()=>{C(!0)},children:[o.jsx(An,{style:{height:"1em",marginRight:4}}),i("common.inviting"),P.length?` (${P.length})`:""]}),o.jsx(Ue,{permission:w?"":"mutate_team",role:w?We:[],children:o.jsxs(je,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:()=>j(!0),children:[o.jsx(bt,{style:{fontSize:"1.3em",marginRight:4}}),i("team.invite")]})})),e==="server"&&be.push(o.jsx(Ue,{role:"owner",children:o.jsxs(je,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:()=>D(!0),children:[o.jsx(gi,{style:{fontSize:"1.3em",marginRight:4}}),i("team.transferNode.name")]})})));const Ne=L=>{fe||v(a=>({...a,role:L,hideBlocked:!1,searchText:"",page:1}))},Ae=L=>{v(a=>({...a,hideBlocked:L,page:1}))},de=({page:L,rowsPerPage:a,searchText:u})=>{f.pageSize!==a?v(N=>({...N,pageSize:a,page:1})):f.page!==L+1?v(N=>({...N,page:L+1})):f.searchText!==u&&v(N=>({...N,searchText:u,page:1}))},Be=$.useRef(null),He={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(L,{dataIndex:a},u){var N;if((N=Be.current)!=null&&N.contains(u.target)){const B=ie[a];ue(B)}},page:f.page-1,rowsPerPage:f.pageSize,count:A,searchDebounceTime:600};return o.jsxs(xa,{children:[n,o.jsxs(oe,{className:"main",display:"flex",sx:{mt:w?4:0},children:[o.jsx("div",{className:"left",children:o.jsx("div",{className:"tabs",children:_.map(L=>o.jsxs("div",{className:`tab ${f.role===L.name?"active":""}`,onClick:()=>Ne(L.name),children:[o.jsx("span",{className:"text",children:L.title}),o.jsx("span",{className:hi("badge",{"is-rect":L.num>999}),children:L.num})]},L.name))})}),o.jsx("div",{ref:Be,className:"right",children:o.jsx(wn,{className:"main-table",verticalKeyWidth:100,locale:l,durable:X,durableKeys:["page","rowsPerPage"],title:o.jsx("div",{className:"table-toolbar-left",children:o.jsx(Ti,{control:o.jsx(Ni,{sx:{display:"flex !important"},disabled:fe,color:"primary",checked:f.hideBlocked,onChange:L=>Ae(L.target.checked)}),label:i("team.member.hideBlockedMember")})}),data:ie,columns:ye,customButtons:be,options:He,loading:fe,onChange:de})})]}),o.jsx($e,{title:i("common.inviting"),onClose:()=>C(!1),open:R,maxWidth:"lg",fullWidth:!0,children:o.jsx(_r,{})}),Q&&o.jsx(Ir,{onCancel:()=>ue(null),userDid:Q.did,createPassportSvg:t,initTab:Q.initTab}),b&&o.jsx(gr,{teamDid:m,endpoint:x,roles:S,apps:d,onCancel:()=>j(!1),onSuccess:()=>{p(),j(!1)}}),h&&o.jsx(yr,{teamDid:m,endpoint:x,roles:S,onCancel:()=>D(!1),onSuccess:()=>{p(),D(!1)}})]})}const xa=Te.div`
|
|
174
174
|
.main {
|
|
175
175
|
.left {
|
|
176
176
|
width: 168px;
|
|
@@ -285,4 +285,4 @@ should equal
|
|
|
285
285
|
align-items: center;
|
|
286
286
|
padding: 7px 0;
|
|
287
287
|
}
|
|
288
|
-
`;
|
|
288
|
+
`;wa.propTypes={type:M.oneOf(["server","blocklet"]).isRequired,createPassportSvg:M.func.isRequired};export{wa as default};
|