@abtnode/blocklet-services 1.16.25-next-be3a37f4 → 1.16.25-next-0ba03ffc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/api/routes/blocklet.js +3 -1
  2. package/dist/assets/{Add-lZ4mxpbL.js → Add-VHM4X35I.js} +1 -1
  3. package/dist/assets/{Alert-Sdrkip3b.js → Alert-S-K00IIm.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-0_YaRpzF.js → ArrowDropDown-dOF7w2jE.js} +1 -1
  5. package/dist/assets/{Avatar-xLWc5S5b.js → Avatar-uCUhCf_X.js} +1 -1
  6. package/dist/assets/{ButtonGroup-Re1nNykr.js → ButtonGroup-qCxUB-nY.js} +1 -1
  7. package/dist/assets/{CheckCircle-pSajKl0K.js → CheckCircle-NNn2MbNR.js} +1 -1
  8. package/dist/assets/{ChevronRight-E9CFXCjm.js → ChevronRight-Vq37EHaM.js} +1 -1
  9. package/dist/assets/{CloseOutlined-X-D-0DBL.js → CloseOutlined-0yftFx9y.js} +1 -1
  10. package/dist/assets/{Delete-yBiZpo99.js → Delete-AeiD7mr6.js} +1 -1
  11. package/dist/assets/{DeleteOutline-65Cuhlpm.js → DeleteOutline-jpC3NQA3.js} +1 -1
  12. package/dist/assets/{Done-xYwONwQm.js → Done-JPgtUiEs.js} +1 -1
  13. package/dist/assets/{Download-nUZa-YZm.js → Download-5EbqDeOW.js} +1 -1
  14. package/dist/assets/{Edit-OhHXrW-y.js → Edit-dF90rER8.js} +1 -1
  15. package/dist/assets/{EditIcon-Bc_-MLIG.js → EditIcon-JqaY-cVO.js} +1 -1
  16. package/dist/assets/{ExpandMore-V-R7JsGL.js → ExpandMore-eZlZGcH3.js} +1 -1
  17. package/dist/assets/{FilterList-Hm_AfXra.js → FilterList-yQzGx3bl.js} +3 -3
  18. package/dist/assets/{FormControl-UyqgO9Ab.js → FormControl-4VSdyrNO.js} +1 -1
  19. package/dist/assets/{FormControlLabel-9bCs5HRT.js → FormControlLabel-ZonWy2wI.js} +1 -1
  20. package/dist/assets/{FormGroup-ofRNksFA.js → FormGroup-vP_5HyTe.js} +1 -1
  21. package/dist/assets/{Google-S_pBVgQ8.js → Google-bZ5UgBmu.js} +1 -1
  22. package/dist/assets/{Grid-3SE35yjG.js → Grid-6Fp6Zlv9.js} +1 -1
  23. package/dist/assets/Hidden-Pe2ng7Rw.js +1 -0
  24. package/dist/assets/{InfoOutlined-jLffwAQN.js → InfoOutlined-AG--yKC5.js} +1 -1
  25. package/dist/assets/{InputAdornment-8CaUKP_t.js → InputAdornment-WSuxuckj.js} +1 -1
  26. package/dist/assets/{InputLabel--xXan3mK.js → InputLabel-qs2hFajj.js} +1 -1
  27. package/dist/assets/{LastPage-D9tpDmBg.js → LastPage-2pqCfwDy.js} +1 -1
  28. package/dist/assets/{Launch-hRhwJbQR.js → Launch-lohVCG9e.js} +1 -1
  29. package/dist/assets/{LaunchOutlined-6538M4-X.js → LaunchOutlined-O3RWtJyo.js} +1 -1
  30. package/dist/assets/{Link-qwWqvw7Y.js → Link-cQnDWF8q.js} +1 -1
  31. package/dist/assets/{ListItem-uf59B9KY.js → ListItem-3Ql868Fm.js} +1 -1
  32. package/dist/assets/{ListItemText-v8mvGUjy.js → ListItemText-oPCiLl5T.js} +1 -1
  33. package/dist/assets/{LockIcon-HXoQTlUo.js → LockIcon-npz0Q-pG.js} +1 -1
  34. package/dist/assets/{Loop-y2VDs_7o.js → Loop-ElOtCrxg.js} +1 -1
  35. package/dist/assets/{MoreHoriz-h0p3UhnV.js → MoreHoriz-k7rdHDUW.js} +1 -1
  36. package/dist/assets/{MoreVert-MwQoF0F6.js → MoreVert-unDDvrfA.js} +1 -1
  37. package/dist/assets/{OpenInNew-EArz_tFd.js → OpenInNew-cX0aZ2F0.js} +1 -1
  38. package/dist/assets/{Pagination-P2Q87_Fw.js → Pagination-nsx0i6TM.js} +1 -1
  39. package/dist/assets/{PlayArrow-aCMeuyjP.js → PlayArrow-yHc03l0W.js} +1 -1
  40. package/dist/assets/{RadioGroup-J9SFYdhF.js → RadioGroup-LeM4Vkqp.js} +1 -1
  41. package/dist/assets/{Search-JVIzhtig.js → Search-_-UgQ7Hu.js} +1 -1
  42. package/dist/assets/{Select-Uz_h4btJ.js → Select-4awwcSOi.js} +2 -2
  43. package/dist/assets/{ServerLogo-cJ3Q9a_X.js → ServerLogo-G8b6dgV7.js} +1 -1
  44. package/dist/assets/{Skeleton--a2ajR0H.js → Skeleton-rsid18D2.js} +2 -2
  45. package/dist/assets/{Slider-d03zAvC1.js → Slider-TphcyTXJ.js} +1 -1
  46. package/dist/assets/{Stepper-Ckw-JQ2D.js → Stepper-iLBoKLqy.js} +1 -1
  47. package/dist/assets/{TableRow-wEa_QnPy.js → TableRow--wjCeDGm.js} +1 -1
  48. package/dist/assets/{TextField-y1frF4gR.js → TextField-g9pcpW6B.js} +1 -1
  49. package/dist/assets/{Toolbar-y0kWdfqe.js → Toolbar-o1kZQfAp.js} +1 -1
  50. package/dist/assets/{ViewList-nYuZscNN.js → ViewList-v2AkGg87.js} +1 -1
  51. package/dist/assets/{access-control-APvTPpAm.js → access-control-X1UI7fec.js} +1 -1
  52. package/dist/assets/{actions-DL367zbF.js → actions-S0escup5.js} +1 -1
  53. package/dist/assets/{add-component-core-KZRHpJtF.js → add-component-core-SmqRabzS.js} +1 -1
  54. package/dist/assets/add-resource-FgLV68Um.js +1 -0
  55. package/dist/assets/{addon-PtLac09D.js → addon-k2Bk_zUs.js} +1 -1
  56. package/dist/assets/{analytics-r5zIdsEi.js → analytics-sx33qWhY.js} +6 -6
  57. package/dist/assets/api-2gP1CH2g.js +1 -0
  58. package/dist/assets/ar-hqS-pUMS.js +1 -0
  59. package/dist/assets/{audit-logs-L50xEbC1.js → audit-logs-0AzqSAUn.js} +1 -1
  60. package/dist/assets/{button-kxA4_akG.js → button-idAjoLvb.js} +1 -1
  61. package/dist/assets/{click-to-copy-BXczzFkc.js → click-to-copy-BZQL395o.js} +1 -1
  62. package/dist/assets/{complete-wFu-iD6J.js → complete-k3sYOQBg.js} +2 -2
  63. package/dist/assets/{component-cgfgry4n.js → component-dp73_ERX.js} +17 -17
  64. package/dist/assets/{config-u8MQycm5.js → config-DxQ-P9ON.js} +1 -1
  65. package/dist/assets/{config-P1j_HOCS.js → config-Zhqo8DRq.js} +2 -2
  66. package/dist/assets/{config-navigation-44ONhSCZ.js → config-navigation-LNgNXI4Z.js} +5 -5
  67. package/dist/assets/{config-space-wFjyKefP.js → config-space-fNICKDn7.js} +1 -1
  68. package/dist/assets/confirm-KsAuFoUx.js +7 -0
  69. package/dist/assets/{connect-8d2_FRcC.js → connect-O3QGVbnk.js} +1 -1
  70. package/dist/assets/{connect-DhaI81RV.js → connect-ZamHXdlh.js} +1 -1
  71. package/dist/assets/connect-to-41egPyvV.js +54 -0
  72. package/dist/assets/{content-layout-K3qfzXkD.js → content-layout-ZBZt-JSK.js} +1 -1
  73. package/dist/assets/dashboard-lFhf3Ubv.js +134 -0
  74. package/dist/assets/de-Dld4VlAB.js +1 -0
  75. package/dist/assets/{did-address-Q6r9kSWU.js → did-address-f2GBnNmi.js} +1 -1
  76. package/dist/assets/domain-list-mxmY_pFE.js +12 -0
  77. package/dist/assets/{domain-XXTXs5-i.js → domain-uteXMOor.js} +1 -1
  78. package/dist/assets/es-YDHDxliE.js +1 -0
  79. package/dist/assets/{exchange-passport-2p0qsOrz.js → exchange-passport-YuJIiQ8u.js} +1 -1
  80. package/dist/assets/{fallback-stZRYYBF.js → fallback-7236Dku-.js} +1 -1
  81. package/dist/assets/fr-eQpU_0iI.js +1 -0
  82. package/dist/assets/{fuel-DZxH_Hjw.js → fuel-eO3rMO_9.js} +1 -1
  83. package/dist/assets/{fullpage-a5T_jRyi.js → fullpage-6zGrSIYB.js} +1 -1
  84. package/dist/assets/hi-LuqrDtFj.js +1 -0
  85. package/dist/assets/{home-2OrcwbfG.js → home-dz5_Hv0r.js} +1 -1
  86. package/dist/assets/id-7bfeZcSL.js +1 -0
  87. package/dist/assets/{iframe-Kzn32-hn.js → iframe-MK07NbeX.js} +1 -1
  88. package/dist/assets/{index-aHetRZlP.js → index-07K_uNGV.js} +1 -1
  89. package/dist/assets/{index-eHiuO6FO.js → index-1EGGKHCq.js} +1 -1
  90. package/dist/assets/index-AzS_0yY5.js +4 -0
  91. package/dist/assets/{index-d0HWrgcb.js → index-FMiuJs7M.js} +1 -1
  92. package/dist/assets/{index-3ySpuGaA.js → index-FuXFxQs5.js} +5 -5
  93. package/dist/assets/{index-btS5NVdj.js → index-HSMaykWd.js} +1 -1
  94. package/dist/assets/index-JNrk9DeJ.js +54 -0
  95. package/dist/assets/{index-QEc24wlT.js → index-LKQoyO0-.js} +11 -11
  96. package/dist/assets/{index-aF8jhNI-.js → index-MOTRm3_a.js} +1 -1
  97. package/dist/assets/{index-V3bd7z9T.js → index-SAP7f4VF.js} +7 -7
  98. package/dist/assets/{index-0FPN72Sx.js → index-SifjhHzo.js} +8 -8
  99. package/dist/assets/{index-qlPnZF_S.js → index-USnqP1FH.js} +1 -1
  100. package/dist/assets/{index-eksOb0dZ.js → index-VdL4GTJp.js} +3 -3
  101. package/dist/assets/{index-CRbbKO3F.js → index-ZrGCJVt2.js} +1 -1
  102. package/dist/assets/{index-i7lnxZJ8.js → index-_JoNCblw.js} +1 -1
  103. package/dist/assets/index-gNUiQRCm.js +13 -0
  104. package/dist/assets/{index-AAeG7JoU.js → index-jEc5BXAO.js} +1 -1
  105. package/dist/assets/{index-qovA7RT2.js → index-jpkTZ3yY.js} +1 -1
  106. package/dist/assets/index-mA0gRUfb.js +1 -0
  107. package/dist/assets/{index-8Ltw7adH.js → index-mALy8jgU.js} +1 -1
  108. package/dist/assets/{index-3gq6XeKX.js → index-mbI6KzKO.js} +3 -3
  109. package/dist/assets/{index-dbuVZzvX.js → index-nn8-tgMy.js} +1 -1
  110. package/dist/assets/{index-baXn_loT.js → index-q66I5h5N.js} +1 -1
  111. package/dist/assets/{index-_IFA08HO.js → index-ue2l5FlZ.js} +1 -1
  112. package/dist/assets/{index-qSYDZylC.js → index-vKbwcqV8.js} +109 -122
  113. package/dist/assets/{index-Z516eVX-.js → index-wY2kLVu3.js} +1 -1
  114. package/dist/assets/{index-41MsyR99.js → index-wcoAySa3.js} +2 -2
  115. package/dist/assets/{index-5-f0uSU3.js → index-zOWiTfU-.js} +5 -5
  116. package/dist/assets/{index.es-PP-WzLpZ.js → index.es-VxMbp-Dq.js} +3 -3
  117. package/dist/assets/{index.esm-7VB_gheg.js → index.esm-4KV_z8CU.js} +1 -1
  118. package/dist/assets/{invitation-MFS-Nbg2.js → invitation-9OG7T9GF.js} +1 -1
  119. package/dist/assets/{invite-A0723Fa0.js → invite-uTy1CpFx.js} +1 -1
  120. package/dist/assets/{issue-passport-qeoGEzEJ.js → issue-passport-bLsTyrlA.js} +1 -1
  121. package/dist/assets/ja-zxfOYYmf.js +1 -0
  122. package/dist/assets/{jss-plugin-props-sort.esm-D5BlghfN.js → jss-plugin-props-sort.esm-Gx4jplev.js} +1 -1
  123. package/dist/assets/ko-nNOvSqr4.js +1 -0
  124. package/dist/assets/{launch-result-message-BTtWZO4x.js → launch-result-message-bDTw8fgD.js} +1 -1
  125. package/dist/assets/{layout-zDjW3z4b.js → layout-ptq3jgAv.js} +2 -2
  126. package/dist/assets/{list-header-NrNf4ww2.js → list-header-Sjo0J2--.js} +1 -1
  127. package/dist/assets/localization-bNgI3FyU.js +1 -0
  128. package/dist/assets/{log-vtX0UCjY.js → log-ediWFlB2.js} +1 -1
  129. package/dist/assets/{login-flhHgexj.js → login-v6EWErJL.js} +1 -1
  130. package/dist/assets/{logo-uploader-xRQlkZ4F.js → logo-uploader-37CmrH1L.js} +3 -3
  131. package/dist/assets/{lost-passport-mha6EGzR.js → lost-passport-weSTgKYH.js} +3 -3
  132. package/dist/assets/{lottie-ZP6kRMPz.js → lottie-HdDWpZ90.js} +1 -1
  133. package/dist/assets/{notifications-3Xzs4h9V.js → notifications-_Ge2Rtt9.js} +2 -2
  134. package/dist/assets/{overview-WqmvrFVk.js → overview-A0ytyrjw.js} +1 -1
  135. package/dist/assets/{page-header-_Bv8UU1p.js → page-header-1Mrt5BnE.js} +1 -1
  136. package/dist/assets/{permission-UQw_mXhQ.js → permission-gQoO--2t.js} +1 -1
  137. package/dist/assets/{preferences-tICAys9H.js → preferences-fJD3z2fT.js} +1 -1
  138. package/dist/assets/pt-heiY3KFA.js +1 -0
  139. package/dist/assets/publish-resource-PCDyiGCc.js +1 -0
  140. package/dist/assets/{react-borpVomN.js → react-ORigY1N4.js} +3 -3
  141. package/dist/assets/{redux--rqpftZj.js → redux-hWRUVdez.js} +1 -1
  142. package/dist/assets/ru-chMrxviB.js +1 -0
  143. package/dist/assets/selector-pRBPjc-f.js +46 -0
  144. package/dist/assets/session-6cUztA5d.js +1 -0
  145. package/dist/assets/setup-oqEterjK.js +19 -0
  146. package/dist/assets/{slicedToArray-vO7CT7RI.js → slicedToArray-vvHTaCgK.js} +1 -1
  147. package/dist/assets/{spaces-Mb6GGuoZ.js → spaces-s85H-FBD.js} +1 -1
  148. package/dist/assets/start-wpkTMhTx.js +186 -0
  149. package/dist/assets/step-actions-T_Y6dCyn.js +31 -0
  150. package/dist/assets/{studio-mrQdpWqr.js → studio-t7mzudVb.js} +1 -1
  151. package/dist/assets/{switch-control-XB9n-Ggg.js → switch-control-ls_MI1Ur.js} +1 -1
  152. package/dist/assets/{th-fNXiYapm.js → th-kYoC3ZAn.js} +1 -1
  153. package/dist/assets/{toUpper-40rJRTB6.js → toUpper-o4k4fZbW.js} +1 -1
  154. package/dist/assets/{transfer-7z-6sRns.js → transfer-7ERnc_Xj.js} +1 -1
  155. package/dist/assets/ua-parser-oj4_ao3J.js +57 -0
  156. package/dist/assets/uniqBy-n0biGuYX.js +1 -0
  157. package/dist/assets/{unsubscribe-Bgz-96K2.js → unsubscribe-oduuQOXc.js} +1 -1
  158. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-RqzHWIsv.js → use-blocklet-info-for-connect-did-spaces-fbIOWA16.js} +1 -1
  159. package/dist/assets/{useAsync-HlOA1vZO.js → useAsync-kfT00-2v.js} +1 -1
  160. package/dist/assets/{useFormControl-RPQwTOAU.js → useFormControl-Uof7nUR0.js} +1 -1
  161. package/dist/assets/{useLocalStorage-QIvxcgrR.js → useLocalStorage-D0X3xdjD.js} +1 -1
  162. package/dist/assets/{useSetState-7V0tflQ2.js → useSetState-y5hy6G_a.js} +1 -1
  163. package/dist/assets/{useSlot-rlbG6RwJ.js → useSlot-TlIMQWy_.js} +1 -1
  164. package/dist/assets/{user-center-MixqlgtO.js → user-center-2SrNOr_K.js} +1 -1
  165. package/dist/assets/{user-sessions-DHsskD-P.js → user-sessions-sbI3D5p1.js} +1 -1
  166. package/dist/assets/{util-85N-_Pgj.js → util-zExokVVm.js} +1 -1
  167. package/dist/assets/vi-sx1guwtr.js +1 -0
  168. package/dist/assets/{wrap-locale-GDRCyvNR.js → wrap-locale-0aT8OIgN.js} +1 -1
  169. package/dist/assets/zh-cwmlGVAR.js +1 -0
  170. package/dist/assets/zh-tw-8Ut4xVvG.js +1 -0
  171. package/dist/index.html +1 -1
  172. package/dist/service-worker.js +1 -1
  173. package/package.json +18 -18
  174. package/dist/assets/Hidden-oxCC7kMQ.js +0 -1
  175. package/dist/assets/add-resource-T1d1Huct.js +0 -1
  176. package/dist/assets/api-4mY5BjEo.js +0 -1
  177. package/dist/assets/ar-5b7W7J1I.js +0 -1
  178. package/dist/assets/confirm-2kHFQlD_.js +0 -7
  179. package/dist/assets/connect-to-IYkW0Mij.js +0 -54
  180. package/dist/assets/dashboard-EF-S_0yr.js +0 -134
  181. package/dist/assets/de-bkZ7Bss5.js +0 -1
  182. package/dist/assets/domain-list-XLuzyzq7.js +0 -12
  183. package/dist/assets/es-mvEE3F2H.js +0 -1
  184. package/dist/assets/fr-CntcXM0r.js +0 -1
  185. package/dist/assets/hi-e5pX09vq.js +0 -1
  186. package/dist/assets/id-re8udxfE.js +0 -1
  187. package/dist/assets/index-5UdUp3Bz.js +0 -54
  188. package/dist/assets/index-Xmh3L24H.js +0 -13
  189. package/dist/assets/index-h_D0VzlA.js +0 -4
  190. package/dist/assets/index-rPWBV4BD.js +0 -1
  191. package/dist/assets/ja-f824NFje.js +0 -1
  192. package/dist/assets/ko-LEYmvplQ.js +0 -1
  193. package/dist/assets/localization-2rcERL-P.js +0 -1
  194. package/dist/assets/pt-W2XRyyDs.js +0 -1
  195. package/dist/assets/publish-resource-G6Rshv3j.js +0 -1
  196. package/dist/assets/ru-ku_uUlqq.js +0 -1
  197. package/dist/assets/selector-sBtObpG1.js +0 -46
  198. package/dist/assets/session-PXkZWYZj.js +0 -1
  199. package/dist/assets/setup-sUfD_NMH.js +0 -19
  200. package/dist/assets/start-i4dGLDuk.js +0 -186
  201. package/dist/assets/step-actions-eyJ47HoG.js +0 -31
  202. package/dist/assets/ua-parser-M2aliXHw.js +0 -57
  203. package/dist/assets/uniqBy-FPiZPJ28.js +0 -1
  204. package/dist/assets/vi-1_KVwbnF.js +0 -1
  205. package/dist/assets/zh-ks4Av33q.js +0 -1
  206. package/dist/assets/zh-tw-2x2b7soG.js +0 -1
@@ -1,10 +1,10 @@
1
- import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,fB as _e,bn as ce,ao as Y,W as M,S as ne,P as b,R as W,bK as Jt,dy as Te,y as er,eu as tr,d1 as rr,U as de,B as E,bq as G,o as se,fC as nr,a5 as le,db as sr,aZ as St,x as q,a as ge,bG as wt,c as at,H as or,fD as Ct,bB as Pt,b6 as ir,O as ar,Q as cr,bM as Rt,i as lr,ax as dr,A as mr,dc as ur}from"./index-qSYDZylC.js";import{c as pr}from"./index-Z516eVX-.js";import{d as he}from"./Add-lZ4mxpbL.js";import{d as fr}from"./Loop-y2VDs_7o.js";import{d as gr}from"./ViewList-nYuZscNN.js";import{L as hr,S as xr,d as Ot}from"./list-header-NrNf4ww2.js";import{D as It,g as br}from"./index-qovA7RT2.js";import"./index-V3bd7z9T.js";import"./index-3gq6XeKX.js";import{e as Dt}from"./ua-parser-M2aliXHw.js";import{T as vr}from"./MoreVert-MwQoF0F6.js";import"./fallback-stZRYYBF.js";import"./index-btS5NVdj.js";import{U as yr}from"./user-sessions-DHsskD-P.js";import{u as Q,d as ct,W as Tt,a as jr}from"./dashboard-EF-S_0yr.js";import{W as Le}from"./did-address-Q6r9kSWU.js";import{P as K}from"./permission-UQw_mXhQ.js";import{D as Fe,A as re,f as Z}from"./index-41MsyR99.js";import{C as ve}from"./click-to-copy-BXczzFkc.js";import{F as At}from"./FormControl-UyqgO9Ab.js";import{I as kt}from"./InputLabel--xXan3mK.js";import{S as Et}from"./Select-Uz_h4btJ.js";import{T as Nt}from"./TextField-y1frF4gR.js";import{_ as Sr}from"./useAsync-HlOA1vZO.js";import{I as Ae}from"./index-AAeG7JoU.js";import{C as ye}from"./confirm-2kHFQlD_.js";import{u as _t}from"./session-PXkZWYZj.js";import{A as wr}from"./Avatar-xLWc5S5b.js";import{d as Cr}from"./Delete-yBiZpo99.js";import{A as Pr}from"./actions-DL367zbF.js";import{L as Rr,a as Or}from"./ListItemText-v8mvGUjy.js";import{F as Ir,C as Dr}from"./FormControlLabel-9bCs5HRT.js";import"./Search-JVIzhtig.js";import"./FilterList-Hm_AfXra.js";import"./TableRow-wEa_QnPy.js";import"./Grid-3SE35yjG.js";import"./useFormControl-RPQwTOAU.js";import"./FormGroup-ofRNksFA.js";import"./LastPage-D9tpDmBg.js";import"./Toolbar-y0kWdfqe.js";import"./index-5-f0uSU3.js";import"./redux--rqpftZj.js";import"./index-eHiuO6FO.js";import"./Hidden-oxCC7kMQ.js";import"./MoreHoriz-h0p3UhnV.js";import"./ExpandMore-V-R7JsGL.js";import"./ListItem-uf59B9KY.js";import"./selector-sBtObpG1.js";import"./index-d-Rw6UM2.js";import"./CloseOutlined-X-D-0DBL.js";import"./index-Xmh3L24H.js";import"./useLocalStorage-QIvxcgrR.js";import"./PlayArrow-aCMeuyjP.js";import"./Alert-Sdrkip3b.js";import"./useSlot-rlbG6RwJ.js";import"./ButtonGroup-Re1nNykr.js";import"./RadioGroup-J9SFYdhF.js";import"./spaces-Mb6GGuoZ.js";import"./index-dbuVZzvX.js";import"./api-4mY5BjEo.js";import"./Link-qwWqvw7Y.js";import"./useSetState-7V0tflQ2.js";var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});var Lt=Ue.default=void 0;Tr(S);var ee=t;function Tr(e){return e&&e.__esModule?e:{default:e}}function lt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function dt(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?lt(Object(s),!0).forEach(function(i){Ar(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):lt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Ar(e,r,s){return r=kr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function kr(e){var r=Er(e,"string");return typeof r=="symbol"?r:String(r)}function Er(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $e=function(r){return(0,ee.jsxs)("svg",dt(dt({},r),{},{children:[(0,ee.jsx)("g",{clipPath:"url(#clip0)",children:(0,ee.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,ee.jsx)("defs",{children:(0,ee.jsx)("clipPath",{id:"clip0",children:(0,ee.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};$e.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};$e.displayName="person";Lt=Ue.default=$e;var fe={},Nr=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Ft="%[a-f0-9]{2}",mt=new RegExp("("+Ft+")|([^%]+?)","gi"),ut=new RegExp("("+Ft+")+","gi");function ke(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var s=e.slice(0,r),i=e.slice(r);return Array.prototype.concat.call([],ke(s),ke(i))}function _r(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(mt)||[],s=1;s<r.length;s++)e=ke(r,s).join(""),r=e.match(mt)||[];return e}}function Lr(e){for(var r={"%FE%FF":"��","%FF%FE":"��"},s=ut.exec(e);s;){try{r[s[0]]=decodeURIComponent(s[0])}catch{var i=_r(s[0]);i!==s[0]&&(r[s[0]]=i)}s=ut.exec(e)}r["%C2"]="�";for(var f=Object.keys(r),j=0;j<f.length;j++){var O=f[j];e=e.replace(new RegExp(O,"g"),r[O])}return e}var Fr=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 Lr(e)}},Ur=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const s=e.indexOf(r);return s===-1?[e]:[e.slice(0,s),e.slice(s+r.length)]},$r=function(e,r){for(var s={},i=Object.keys(e),f=Array.isArray(r),j=0;j<i.length;j++){var O=i[j],R=e[O];(f?r.indexOf(O)!==-1:r(O,R,e))&&(s[O]=R)}return s};(function(e){const r=Nr,s=Fr,i=Ur,f=$r,j=n=>n==null;function O(n){switch(n.arrayFormat){case"index":return o=>(a,c)=>{const u=a.length;return c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,[h(o,n),"[",u,"]"].join("")]:[...a,[h(o,n),"[",h(u,n),"]=",h(c,n)].join("")]};case"bracket":return o=>(a,c)=>c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,[h(o,n),"[]"].join("")]:[...a,[h(o,n),"[]=",h(c,n)].join("")];case"comma":case"separator":return o=>(a,c)=>c==null||c.length===0?a:a.length===0?[[h(o,n),"=",h(c,n)].join("")]:[[a,h(c,n)].join(n.arrayFormatSeparator)];default:return o=>(a,c)=>c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,h(o,n)]:[...a,[h(o,n),"=",h(c,n)].join("")]}}function R(n){let o;switch(n.arrayFormat){case"index":return(a,c,u)=>{if(o=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!o){u[a]=c;return}u[a]===void 0&&(u[a]={}),u[a][o[1]]=c};case"bracket":return(a,c,u)=>{if(o=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!o){u[a]=c;return}if(u[a]===void 0){u[a]=[c];return}u[a]=[].concat(u[a],c)};case"comma":case"separator":return(a,c,u)=>{const g=typeof c=="string"&&c.includes(n.arrayFormatSeparator),m=typeof c=="string"&&!g&&d(c,n).includes(n.arrayFormatSeparator);c=m?d(c,n):c;const x=g||m?c.split(n.arrayFormatSeparator).map(A=>d(A,n)):c===null?c:d(c,n);u[a]=x};default:return(a,c,u)=>{if(u[a]===void 0){u[a]=c;return}u[a]=[].concat(u[a],c)}}}function p(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(n,o){return o.encode?o.strict?r(n):encodeURIComponent(n):n}function d(n,o){return o.decode?s(n):n}function w(n){return Array.isArray(n)?n.sort():typeof n=="object"?w(Object.keys(n)).sort((o,a)=>Number(o)-Number(a)).map(o=>n[o]):n}function l(n){const o=n.indexOf("#");return o!==-1&&(n=n.slice(0,o)),n}function v(n){let o="";const a=n.indexOf("#");return a!==-1&&(o=n.slice(a)),o}function I(n){n=l(n);const o=n.indexOf("?");return o===-1?"":n.slice(o+1)}function C(n,o){return o.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?n=Number(n):o.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")&&(n=n.toLowerCase()==="true"),n}function y(n,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),p(o.arrayFormatSeparator);const a=R(o),c=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return c;for(const u of n.split("&")){if(u==="")continue;let[g,m]=i(o.decode?u.replace(/\+/g," "):u,"=");m=m===void 0?null:["comma","separator"].includes(o.arrayFormat)?m:d(m,o),a(d(g,o),m,c)}for(const u of Object.keys(c)){const g=c[u];if(typeof g=="object"&&g!==null)for(const m of Object.keys(g))g[m]=C(g[m],o);else c[u]=C(g,o)}return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((u,g)=>{const m=c[g];return m&&typeof m=="object"&&!Array.isArray(m)?u[g]=w(m):u[g]=m,u},Object.create(null))}e.extract=I,e.parse=y,e.stringify=(n,o)=>{if(!n)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),p(o.arrayFormatSeparator);const a=m=>o.skipNull&&j(n[m])||o.skipEmptyString&&n[m]==="",c=O(o),u={};for(const m of Object.keys(n))a(m)||(u[m]=n[m]);const g=Object.keys(u);return o.sort!==!1&&g.sort(o.sort),g.map(m=>{const x=n[m];return x===void 0?"":x===null?h(m,o):Array.isArray(x)?x.reduce(c(m),[]).join("&"):h(m,o)+"="+h(x,o)}).filter(m=>m.length>0).join("&")},e.parseUrl=(n,o)=>{o=Object.assign({decode:!0},o);const[a,c]=i(n,"#");return Object.assign({url:a.split("?")[0]||"",query:y(I(n),o)},o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:d(c,o)}:{})},e.stringifyUrl=(n,o)=>{o=Object.assign({encode:!0,strict:!0},o);const a=l(n.url).split("?")[0]||"",c=e.extract(n.url),u=e.parse(c,{sort:!1}),g=Object.assign(u,n.query);let m=e.stringify(g,o);m&&(m=`?${m}`);let x=v(n.url);return n.fragmentIdentifier&&(x=`#${h(n.fragmentIdentifier,o)}`),`${a}${m}${x}`},e.pick=(n,o,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:c,query:u,fragmentIdentifier:g}=e.parseUrl(n,a);return e.stringifyUrl({url:c,query:f(u,o),fragmentIdentifier:g},a)},e.exclude=(n,o,a)=>{const c=Array.isArray(o)?u=>!o.includes(u):(u,g)=>!o(u,g);return e.pick(n,c,a)}})(fe);const ie=Zt,Br={parseNumbers:!1,parseBooleans:!1},Mr={skipNull:!1,skipEmptyString:!1},zr=(e,r)=>{var s,i;const{navigateMode:f="push",parseOptions:j,stringifyOptions:O}=r||{},R=Object.assign(Object.assign({},Br),j),p=Object.assign(Object.assign({},Mr),O),h=ie.useLocation(),d=(s=ie.useHistory)===null||s===void 0?void 0:s.call(ie),w=(i=ie.useNavigate)===null||i===void 0?void 0:i.call(ie),l=Gt(),v=S.useRef(typeof e=="function"?e():e||{}),I=S.useMemo(()=>fe.parse(h.search,R),[h.search]),C=S.useMemo(()=>Object.assign(Object.assign({},v.current),I),[I]);return[C,Ee(n=>{const o=typeof n=="function"?n(C):n;l(),d&&d[f]({hash:h.hash,search:fe.stringify(Object.assign(Object.assign({},I),o),p)||"?"},h.state),w&&w({hash:h.hash,search:fe.stringify(Object.assign(Object.assign({},I),o),p)||"?"},{replace:f==="replace",state:h.state})})]},qr=zr;function Be({teamDid:e,roles:r,onCancel:s,onSuccess:i,onError:f,endpoint:j}){const{api:O}=H(),[R,p]=S.useState(!1),[h,d]=S.useState(""),{t:w,locale:l}=V(),[v,I]=S.useState(0),[C,y]=S.useState(""),[n,o]=S.useState(""),[a,c]=S.useState(""),u=async()=>{if(!n){d(w("team.member.error.passportEmpty"));return}const x=a.trim();d(null),p(!0);try{const{inviteInfo:A}=await O.createMemberInvitation({input:{teamDid:e,role:n,remark:x}});y(A),I(1)}catch(A){const U=Z(A);d(U),f(A)}finally{p(!1)}},m=[{body:t.jsxs(te,{component:"div",children:[t.jsxs(At,{style:{width:"100%"},variant:"outlined",children:[t.jsx(kt,{children:w("common.passport")}),t.jsx(Et,{"data-cy":"invite-member-select-role",value:n,onChange:x=>{d(null),o(x.target.value)},fullWidth:!0,label:w("common.passport"),disabled:R,onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),u())},children:r.filter(x=>x.name!=="owner").map(x=>t.jsx(Ne,{value:x.name,"data-cy":`invite-member-select-option-${x.name}`,children:t.jsx("span",{children:x.title||x.name})},x.name))})]}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(Nt,{label:w("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:a,onChange:x=>{d(null),c(x.target.value)},disabled:R,"data-cy":"invite-member-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:w("common.cancel"),confirm:w("team.member.inviteDialog.createInviteLink"),onCancel:s,onConfirm:u},{body:()=>{const x=_e({inviteId:C.inviteId,endpoint:j});return t.jsxs("div",{children:[t.jsx(Wr,{children:w("team.member.inviteDialog.createSuccessTip",{expireDate:ce(C.expireDate,l)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(ve,{children:x})]})},confirm:w("common.confirm"),onConfirm:i}][v];return t.jsxs(Y,{title:w("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[m.cancel&&t.jsx(M,{onClick:m.onCancel,color:"inherit",children:m.cancel}),t.jsxs(M,{onClick:m.onConfirm,color:"primary",disabled:R||!n,variant:"contained",autoFocus:!0,children:[R&&t.jsx(ne,{size:16}),m.confirm]})]}),children:[t.jsx(Fe,{component:"div",children:typeof m.body=="function"?m.body():m.body}),!!h&&t.jsx(re,{type:"error",variant:"icon",children:h})]})}Be.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,endpoint:b.string};Be.defaultProps={onError:()=>{},roles:[],endpoint:""};const Wr=W.div`
1
+ import{r as S,j as t,fx as Gt,h as Ee,fy as Jt,aY as H,u as V,T as te,b2 as Ne,fz as Le,a9 as ce,ao as Y,W as M,S as ne,P as b,R as q,bJ as Zt,dx as Te,y as er,es as tr,d0 as rr,U as de,B as E,bp as G,o as se,fA as nr,a7 as le,da as sr,b8 as St,x as W,a as ge,bF as wt,c as at,H as or,fB as Ct,bA as Pt,b5 as ir,O as ar,Q as cr,bL as Rt,i as lr,ax as dr,A as mr,db as ur}from"./index-vKbwcqV8.js";import{c as pr}from"./index-wY2kLVu3.js";import{d as he}from"./Add-VHM4X35I.js";import{d as fr}from"./Loop-ElOtCrxg.js";import{d as gr}from"./ViewList-v2AkGg87.js";import{L as hr,S as xr,d as Ot}from"./list-header-Sjo0J2--.js";import{D as It,g as br}from"./index-jpkTZ3yY.js";import"./index-SAP7f4VF.js";import"./index-mbI6KzKO.js";import{e as Dt}from"./ua-parser-oj4_ao3J.js";import{T as vr}from"./MoreVert-unDDvrfA.js";import"./fallback-7236Dku-.js";import"./index-HSMaykWd.js";import{U as yr}from"./user-sessions-sbI3D5p1.js";import{u as Q,d as ct,W as Tt,a as jr}from"./dashboard-lFhf3Ubv.js";import{W as _e}from"./did-address-f2GBnNmi.js";import{P as K}from"./permission-gQoO--2t.js";import{D as Fe,A as re,f as J}from"./index-wcoAySa3.js";import{C as ve}from"./click-to-copy-BZQL395o.js";import{F as At}from"./FormControl-4VSdyrNO.js";import{I as kt}from"./InputLabel-qs2hFajj.js";import{S as Et}from"./Select-4awwcSOi.js";import{T as Nt}from"./TextField-g9pcpW6B.js";import{_ as Sr}from"./useAsync-kfT00-2v.js";import{I as Ae}from"./index-jEc5BXAO.js";import{C as ye}from"./confirm-KsAuFoUx.js";import{u as Lt}from"./session-6cUztA5d.js";import{A as wr}from"./Avatar-uCUhCf_X.js";import{d as Cr}from"./Delete-AeiD7mr6.js";import{A as Pr}from"./actions-S0escup5.js";import{L as Rr,a as Or}from"./ListItemText-oPCiLl5T.js";import{F as Ir,C as Dr}from"./FormControlLabel-ZonWy2wI.js";import"./Search-_-UgQ7Hu.js";import"./FilterList-yQzGx3bl.js";import"./TableRow--wjCeDGm.js";import"./Grid-6Fp6Zlv9.js";import"./useFormControl-Uof7nUR0.js";import"./FormGroup-vP_5HyTe.js";import"./LastPage-2pqCfwDy.js";import"./Toolbar-o1kZQfAp.js";import"./index-zOWiTfU-.js";import"./redux-hWRUVdez.js";import"./index-1EGGKHCq.js";import"./Hidden-Pe2ng7Rw.js";import"./MoreHoriz-k7rdHDUW.js";import"./ExpandMore-eZlZGcH3.js";import"./ListItem-3Ql868Fm.js";import"./selector-pRBPjc-f.js";import"./index-d-Rw6UM2.js";import"./CloseOutlined-0yftFx9y.js";import"./index-gNUiQRCm.js";import"./useLocalStorage-D0X3xdjD.js";import"./PlayArrow-yHc03l0W.js";import"./Alert-S-K00IIm.js";import"./useSlot-TlIMQWy_.js";import"./ButtonGroup-qCxUB-nY.js";import"./RadioGroup-LeM4Vkqp.js";import"./spaces-s85H-FBD.js";import"./index-nn8-tgMy.js";import"./api-2gP1CH2g.js";import"./Link-cQnDWF8q.js";import"./useSetState-y5hy6G_a.js";var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});var _t=Ue.default=void 0;Tr(S);var ee=t;function Tr(e){return e&&e.__esModule?e:{default:e}}function lt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function dt(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?lt(Object(s),!0).forEach(function(i){Ar(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):lt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Ar(e,r,s){return r=kr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function kr(e){var r=Er(e,"string");return typeof r=="symbol"?r:String(r)}function Er(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $e=function(r){return(0,ee.jsxs)("svg",dt(dt({},r),{},{children:[(0,ee.jsx)("g",{clipPath:"url(#clip0)",children:(0,ee.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,ee.jsx)("defs",{children:(0,ee.jsx)("clipPath",{id:"clip0",children:(0,ee.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};$e.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};$e.displayName="person";_t=Ue.default=$e;var fe={},Nr=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Ft="%[a-f0-9]{2}",mt=new RegExp("("+Ft+")|([^%]+?)","gi"),ut=new RegExp("("+Ft+")+","gi");function ke(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var s=e.slice(0,r),i=e.slice(r);return Array.prototype.concat.call([],ke(s),ke(i))}function Lr(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(mt)||[],s=1;s<r.length;s++)e=ke(r,s).join(""),r=e.match(mt)||[];return e}}function _r(e){for(var r={"%FE%FF":"��","%FF%FE":"��"},s=ut.exec(e);s;){try{r[s[0]]=decodeURIComponent(s[0])}catch{var i=Lr(s[0]);i!==s[0]&&(r[s[0]]=i)}s=ut.exec(e)}r["%C2"]="�";for(var f=Object.keys(r),j=0;j<f.length;j++){var O=f[j];e=e.replace(new RegExp(O,"g"),r[O])}return e}var Fr=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 _r(e)}},Ur=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const s=e.indexOf(r);return s===-1?[e]:[e.slice(0,s),e.slice(s+r.length)]},$r=function(e,r){for(var s={},i=Object.keys(e),f=Array.isArray(r),j=0;j<i.length;j++){var O=i[j],R=e[O];(f?r.indexOf(O)!==-1:r(O,R,e))&&(s[O]=R)}return s};(function(e){const r=Nr,s=Fr,i=Ur,f=$r,j=n=>n==null;function O(n){switch(n.arrayFormat){case"index":return o=>(a,c)=>{const u=a.length;return c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,[h(o,n),"[",u,"]"].join("")]:[...a,[h(o,n),"[",h(u,n),"]=",h(c,n)].join("")]};case"bracket":return o=>(a,c)=>c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,[h(o,n),"[]"].join("")]:[...a,[h(o,n),"[]=",h(c,n)].join("")];case"comma":case"separator":return o=>(a,c)=>c==null||c.length===0?a:a.length===0?[[h(o,n),"=",h(c,n)].join("")]:[[a,h(c,n)].join(n.arrayFormatSeparator)];default:return o=>(a,c)=>c===void 0||n.skipNull&&c===null||n.skipEmptyString&&c===""?a:c===null?[...a,h(o,n)]:[...a,[h(o,n),"=",h(c,n)].join("")]}}function R(n){let o;switch(n.arrayFormat){case"index":return(a,c,u)=>{if(o=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!o){u[a]=c;return}u[a]===void 0&&(u[a]={}),u[a][o[1]]=c};case"bracket":return(a,c,u)=>{if(o=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!o){u[a]=c;return}if(u[a]===void 0){u[a]=[c];return}u[a]=[].concat(u[a],c)};case"comma":case"separator":return(a,c,u)=>{const g=typeof c=="string"&&c.includes(n.arrayFormatSeparator),m=typeof c=="string"&&!g&&d(c,n).includes(n.arrayFormatSeparator);c=m?d(c,n):c;const x=g||m?c.split(n.arrayFormatSeparator).map(A=>d(A,n)):c===null?c:d(c,n);u[a]=x};default:return(a,c,u)=>{if(u[a]===void 0){u[a]=c;return}u[a]=[].concat(u[a],c)}}}function p(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(n,o){return o.encode?o.strict?r(n):encodeURIComponent(n):n}function d(n,o){return o.decode?s(n):n}function w(n){return Array.isArray(n)?n.sort():typeof n=="object"?w(Object.keys(n)).sort((o,a)=>Number(o)-Number(a)).map(o=>n[o]):n}function l(n){const o=n.indexOf("#");return o!==-1&&(n=n.slice(0,o)),n}function v(n){let o="";const a=n.indexOf("#");return a!==-1&&(o=n.slice(a)),o}function I(n){n=l(n);const o=n.indexOf("?");return o===-1?"":n.slice(o+1)}function C(n,o){return o.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?n=Number(n):o.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")&&(n=n.toLowerCase()==="true"),n}function y(n,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),p(o.arrayFormatSeparator);const a=R(o),c=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return c;for(const u of n.split("&")){if(u==="")continue;let[g,m]=i(o.decode?u.replace(/\+/g," "):u,"=");m=m===void 0?null:["comma","separator"].includes(o.arrayFormat)?m:d(m,o),a(d(g,o),m,c)}for(const u of Object.keys(c)){const g=c[u];if(typeof g=="object"&&g!==null)for(const m of Object.keys(g))g[m]=C(g[m],o);else c[u]=C(g,o)}return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((u,g)=>{const m=c[g];return m&&typeof m=="object"&&!Array.isArray(m)?u[g]=w(m):u[g]=m,u},Object.create(null))}e.extract=I,e.parse=y,e.stringify=(n,o)=>{if(!n)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),p(o.arrayFormatSeparator);const a=m=>o.skipNull&&j(n[m])||o.skipEmptyString&&n[m]==="",c=O(o),u={};for(const m of Object.keys(n))a(m)||(u[m]=n[m]);const g=Object.keys(u);return o.sort!==!1&&g.sort(o.sort),g.map(m=>{const x=n[m];return x===void 0?"":x===null?h(m,o):Array.isArray(x)?x.reduce(c(m),[]).join("&"):h(m,o)+"="+h(x,o)}).filter(m=>m.length>0).join("&")},e.parseUrl=(n,o)=>{o=Object.assign({decode:!0},o);const[a,c]=i(n,"#");return Object.assign({url:a.split("?")[0]||"",query:y(I(n),o)},o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:d(c,o)}:{})},e.stringifyUrl=(n,o)=>{o=Object.assign({encode:!0,strict:!0},o);const a=l(n.url).split("?")[0]||"",c=e.extract(n.url),u=e.parse(c,{sort:!1}),g=Object.assign(u,n.query);let m=e.stringify(g,o);m&&(m=`?${m}`);let x=v(n.url);return n.fragmentIdentifier&&(x=`#${h(n.fragmentIdentifier,o)}`),`${a}${m}${x}`},e.pick=(n,o,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:c,query:u,fragmentIdentifier:g}=e.parseUrl(n,a);return e.stringifyUrl({url:c,query:f(u,o),fragmentIdentifier:g},a)},e.exclude=(n,o,a)=>{const c=Array.isArray(o)?u=>!o.includes(u):(u,g)=>!o(u,g);return e.pick(n,c,a)}})(fe);const ie=Jt,Br={parseNumbers:!1,parseBooleans:!1},Mr={skipNull:!1,skipEmptyString:!1},zr=(e,r)=>{var s,i;const{navigateMode:f="push",parseOptions:j,stringifyOptions:O}=r||{},R=Object.assign(Object.assign({},Br),j),p=Object.assign(Object.assign({},Mr),O),h=ie.useLocation(),d=(s=ie.useHistory)===null||s===void 0?void 0:s.call(ie),w=(i=ie.useNavigate)===null||i===void 0?void 0:i.call(ie),l=Gt(),v=S.useRef(typeof e=="function"?e():e||{}),I=S.useMemo(()=>fe.parse(h.search,R),[h.search]),C=S.useMemo(()=>Object.assign(Object.assign({},v.current),I),[I]);return[C,Ee(n=>{const o=typeof n=="function"?n(C):n;l(),d&&d[f]({hash:h.hash,search:fe.stringify(Object.assign(Object.assign({},I),o),p)||"?"},h.state),w&&w({hash:h.hash,search:fe.stringify(Object.assign(Object.assign({},I),o),p)||"?"},{replace:f==="replace",state:h.state})})]},Wr=zr;function Be({teamDid:e,roles:r,onCancel:s,onSuccess:i,onError:f,endpoint:j}){const{api:O}=H(),[R,p]=S.useState(!1),[h,d]=S.useState(""),{t:w,locale:l}=V(),[v,I]=S.useState(0),[C,y]=S.useState(""),[n,o]=S.useState(""),[a,c]=S.useState(""),u=async()=>{if(!n){d(w("team.member.error.passportEmpty"));return}const x=a.trim();d(null),p(!0);try{const{inviteInfo:A}=await O.createMemberInvitation({input:{teamDid:e,role:n,remark:x}});y(A),I(1)}catch(A){const U=J(A);d(U),f(A)}finally{p(!1)}},m=[{body:t.jsxs(te,{component:"div",children:[t.jsxs(At,{style:{width:"100%"},variant:"outlined",children:[t.jsx(kt,{children:w("common.passport")}),t.jsx(Et,{"data-cy":"invite-member-select-role",value:n,onChange:x=>{d(null),o(x.target.value)},fullWidth:!0,label:w("common.passport"),disabled:R,onKeyPress:x=>{x.key==="Enter"&&(x.preventDefault(),u())},children:r.filter(x=>x.name!=="owner").map(x=>t.jsx(Ne,{value:x.name,"data-cy":`invite-member-select-option-${x.name}`,children:t.jsx("span",{children:x.title||x.name})},x.name))})]}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(Nt,{label:w("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:a,onChange:x=>{d(null),c(x.target.value)},disabled:R,"data-cy":"invite-member-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:w("common.cancel"),confirm:w("team.member.inviteDialog.createInviteLink"),onCancel:s,onConfirm:u},{body:()=>{const x=Le({inviteId:C.inviteId,endpoint:j});return t.jsxs("div",{children:[t.jsx(qr,{children:w("team.member.inviteDialog.createSuccessTip",{expireDate:ce(C.expireDate,l)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(ve,{children:x})]})},confirm:w("common.confirm"),onConfirm:i}][v];return t.jsxs(Y,{title:w("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[m.cancel&&t.jsx(M,{onClick:m.onCancel,color:"inherit",children:m.cancel}),t.jsxs(M,{onClick:m.onConfirm,color:"primary",disabled:R||!n,variant:"contained",autoFocus:!0,children:[R&&t.jsx(ne,{size:16}),m.confirm]})]}),children:[t.jsx(Fe,{component:"div",children:typeof m.body=="function"?m.body():m.body}),!!h&&t.jsx(re,{type:"error",variant:"icon",children:h})]})}Be.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,endpoint:b.string};Be.defaultProps={onError:()=>{},roles:[],endpoint:""};const qr=q.div`
2
2
  font-size: 16px;
3
3
  font-weight: bold;
4
- `;function Me({teamDid:e,onCancel:r,onSuccess:s,onError:i,endpoint:f}){const{api:j,info:O}=H(),{api:R}=S.useContext(Jt),[p,h]=S.useState(!1),{t:d,locale:w}=V(),[l,v]=S.useState(""),[I,C]=S.useState(!1),[y,n]=S.useState(0),[o,a]=S.useState(""),[c,u]=S.useState(""),g=!!Te(O,"ownerNft.did"),m=Sr(async()=>{if(g){const{state:_}=await j.getDelegationState();return _}return{delegated:!0}});if(m.loading)return t.jsx(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:r,children:t.jsx("div",{style:{display:"flex",justifyContent:"center"},children:t.jsx(ne,{})})});if(m.error)return t.jsx(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:r,children:t.jsx(re,{type:"error",variant:"icon",children:Z(m.error)})});const x=async()=>{v(null),h(!0);try{const{inviteInfo:_}=await j.createTransferInvitation({input:{teamDid:e,role:"owner",remark:c.trim()}});a(_),n(z.length-1)}catch(_){const J=Z(_);v(J),i(_)}finally{h(!1)}},A=()=>{C(!0),n(1)},U=()=>{C(!1),n(0)},z=[{body:t.jsxs(te,{component:"div",children:[t.jsxs(re,{type:"warning",children:[t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.progress")}),t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),t.jsx(re,{type:"warning",children:t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.revoke")})}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(Nt,{label:d("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:c,onChange:_=>{v(null),u(_.target.value)},disabled:p,"data-cy":"transfer-node-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:d("common.cancel"),confirm:d("team.transferNode.inviteDialog.createInviteLink"),onCancel:r,onConfirm:g&&!Te(m,"value.delegated")?A:x},{body:()=>t.jsx(er,{action:"delegate-transfer-nft",open:I,locale:w,checkFn:R.get,onClose:U,onSuccess:x,checkTimeout:5*60*1e3,webWalletUrl:tr(O),extraParams:{targetDID:O.did},messages:{title:d("team.transferNode.delegateDialog.title"),scan:d("team.transferNode.delegateDialog.scan"),confirm:d("team.transferNode.delegateDialog.confirm"),success:d("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const _=_e({inviteId:o.inviteId,endpoint:f});return t.jsxs("div",{children:[t.jsx(Hr,{children:d("team.transferNode.inviteDialog.createSuccessTip",{expireDate:ce(o.expireDate,w)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(ve,{children:_})]})},confirm:d("common.confirm"),onConfirm:s}],$=z[y];return t.jsxs(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[$.cancel&&t.jsx(M,{onClick:$.onCancel,color:"inherit",children:$.cancel}),t.jsxs(M,{onClick:$.onConfirm,color:"primary",disabled:p,variant:"contained",autoFocus:!0,children:[p&&t.jsx(ne,{size:16}),$.confirm]})]}),children:[t.jsx(Fe,{component:"div",children:typeof $.body=="function"?$.body():$.body}),!!l&&t.jsx(re,{type:"error",variant:"icon",children:l})]})}Me.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,endpoint:b.string};Me.defaultProps={onError:()=>{},endpoint:""};const Hr=W.div`
4
+ `;function Me({teamDid:e,onCancel:r,onSuccess:s,onError:i,endpoint:f}){const{api:j,info:O}=H(),{api:R}=S.useContext(Zt),[p,h]=S.useState(!1),{t:d,locale:w}=V(),[l,v]=S.useState(""),[I,C]=S.useState(!1),[y,n]=S.useState(0),[o,a]=S.useState(""),[c,u]=S.useState(""),g=!!Te(O,"ownerNft.did"),m=Sr(async()=>{if(g){const{state:L}=await j.getDelegationState();return L}return{delegated:!0}});if(m.loading)return t.jsx(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:r,children:t.jsx("div",{style:{display:"flex",justifyContent:"center"},children:t.jsx(ne,{})})});if(m.error)return t.jsx(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:r,children:t.jsx(re,{type:"error",variant:"icon",children:J(m.error)})});const x=async()=>{v(null),h(!0);try{const{inviteInfo:L}=await j.createTransferInvitation({input:{teamDid:e,role:"owner",remark:c.trim()}});a(L),n(z.length-1)}catch(L){const Z=J(L);v(Z),i(L)}finally{h(!1)}},A=()=>{C(!0),n(1)},U=()=>{C(!1),n(0)},z=[{body:t.jsxs(te,{component:"div",children:[t.jsxs(re,{type:"warning",children:[t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.progress")}),t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),t.jsx(re,{type:"warning",children:t.jsx(te,{children:d("team.transferNode.inviteDialog.tips.revoke")})}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(Nt,{label:d("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:c,onChange:L=>{v(null),u(L.target.value)},disabled:p,"data-cy":"transfer-node-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:d("common.cancel"),confirm:d("team.transferNode.inviteDialog.createInviteLink"),onCancel:r,onConfirm:g&&!Te(m,"value.delegated")?A:x},{body:()=>t.jsx(er,{action:"delegate-transfer-nft",open:I,locale:w,checkFn:R.get,onClose:U,onSuccess:x,checkTimeout:5*60*1e3,webWalletUrl:tr(O),extraParams:{targetDID:O.did},messages:{title:d("team.transferNode.delegateDialog.title"),scan:d("team.transferNode.delegateDialog.scan"),confirm:d("team.transferNode.delegateDialog.confirm"),success:d("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const L=Le({inviteId:o.inviteId,endpoint:f});return t.jsxs("div",{children:[t.jsx(Hr,{children:d("team.transferNode.inviteDialog.createSuccessTip",{expireDate:ce(o.expireDate,w)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(ve,{children:L})]})},confirm:d("common.confirm"),onConfirm:s}],$=z[y];return t.jsxs(Y,{title:d("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[$.cancel&&t.jsx(M,{onClick:$.onCancel,color:"inherit",children:$.cancel}),t.jsxs(M,{onClick:$.onConfirm,color:"primary",disabled:p,variant:"contained",autoFocus:!0,children:[p&&t.jsx(ne,{size:16}),$.confirm]})]}),children:[t.jsx(Fe,{component:"div",children:typeof $.body=="function"?$.body():$.body}),!!l&&t.jsx(re,{type:"error",variant:"icon",children:l})]})}Me.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,endpoint:b.string};Me.defaultProps={onError:()=>{},endpoint:""};const Hr=q.div`
5
5
  font-size: 16px;
6
6
  font-weight: bold;
7
- `;var ze={};Object.defineProperty(ze,"__esModule",{value:!0});var qe=ze.default=void 0;Kr(S);var Oe=t;function Kr(e){return e&&e.__esModule?e:{default:e}}function pt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function ft(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?pt(Object(s),!0).forEach(function(i){Vr(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):pt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Vr(e,r,s){return r=Qr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Qr(e){var r=Xr(e,"string");return typeof r=="symbol"?r:String(r)}function Xr(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var We=function(r){return(0,Oe.jsxs)("svg",ft(ft({},r),{},{children:[(0,Oe.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,Oe.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};We.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};We.displayName="forbid-login";qe=ze.default=We;var He={};Object.defineProperty(He,"__esModule",{value:!0});var Ke=He.default=void 0;Yr(S);var pe=t;function Yr(e){return e&&e.__esModule?e:{default:e}}function gt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function ht(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?gt(Object(s),!0).forEach(function(i){Gr(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):gt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Gr(e,r,s){return r=Zr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Zr(e){var r=Jr(e,"string");return typeof r=="symbol"?r:String(r)}function Jr(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ve=function(r){return(0,pe.jsxs)("svg",ht(ht({},r),{},{children:[(0,pe.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,pe.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,pe.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};Ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};Ve.displayName="allow-login";Ke=He.default=Ve;function xe(e){const{passport:r,onDelete:s,...i}=e;return t.jsxs(en,{...i,children:[r.title||r.name," ",!!s&&t.jsx(rr,{"data-cy":"delete-issuance",className:"delete",onClick:s})]})}xe.propTypes={passport:b.object.isRequired,onDelete:b.func};xe.defaultProps={onDelete:null};const en=W.span`
7
+ `;var ze={};Object.defineProperty(ze,"__esModule",{value:!0});var We=ze.default=void 0;Kr(S);var Oe=t;function Kr(e){return e&&e.__esModule?e:{default:e}}function pt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function ft(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?pt(Object(s),!0).forEach(function(i){Vr(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):pt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Vr(e,r,s){return r=Qr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Qr(e){var r=Xr(e,"string");return typeof r=="symbol"?r:String(r)}function Xr(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var qe=function(r){return(0,Oe.jsxs)("svg",ft(ft({},r),{},{children:[(0,Oe.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,Oe.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};qe.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};qe.displayName="forbid-login";We=ze.default=qe;var He={};Object.defineProperty(He,"__esModule",{value:!0});var Ke=He.default=void 0;Yr(S);var pe=t;function Yr(e){return e&&e.__esModule?e:{default:e}}function gt(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,i)}return s}function ht(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?gt(Object(s),!0).forEach(function(i){Gr(e,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):gt(Object(s)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))})}return e}function Gr(e,r,s){return r=Jr(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Jr(e){var r=Zr(e,"string");return typeof r=="symbol"?r:String(r)}function Zr(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var i=s.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ve=function(r){return(0,pe.jsxs)("svg",ht(ht({},r),{},{children:[(0,pe.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,pe.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,pe.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};Ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};Ve.displayName="allow-login";Ke=He.default=Ve;function xe(e){const{passport:r,onDelete:s,...i}=e;return t.jsxs(en,{...i,children:[r.title||r.name," ",!!s&&t.jsx(rr,{"data-cy":"delete-issuance",className:"delete",onClick:s})]})}xe.propTypes={passport:b.object.isRequired,onDelete:b.func};xe.defaultProps={onDelete:null};const en=q.span`
8
8
  display: inline-flex;
9
9
  padding: 2px 8px;
10
10
  background: ${e=>e.theme.palette.primary.main};
@@ -19,7 +19,7 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
19
19
  margin-left: 6px;
20
20
  cursor: pointer;
21
21
  }
22
- `;function Qe({issuances:e,teamDid:r,onRefresh:s}){const{api:i,inService:f}=H(),{t:j,locale:O}=S.useContext(de),[R,p]=S.useState(null),[h,d]=S.useState(!1),{endpoint:w}=Q(),l=async({id:y})=>{if(!h){d(!0);try{await i.deletePassportIssuance({input:{teamDid:r,sessionId:y}}),s()}catch(n){se.error(n.message)}finally{d(!1),p(null)}}},v=()=>{d(!1),p(null)},I=y=>w?nr({id:y.id,endpoint:w}):"";function C({data:y}){return t.jsxs("div",{className:"issuance",children:[t.jsxs(E,{display:"flex",justifyContent:"space-between",children:[t.jsx(K,{permission:f?"":"mutate_team",role:f?G:[],children:n=>n?t.jsx(xe,{passport:{title:y.title,name:y.name},onDelete:()=>p({title:j("team.passport.issuance.delete.title"),description:j("team.passport.issuance.delete.description",{link:I(y)}),confirm:j("common.delConfirm"),cancel:j("common.cancel"),onConfirm:()=>{l(y)},onCancel:v})}):t.jsx(xe,{passport:{title:y.title,name:y.name}})}),t.jsxs("div",{style:{color:"#999"},children:[j("common.expires"),": ",ce(y.expireDate,O)]})]}),t.jsx(E,{mt:2,children:t.jsx(ve,{children:I(y)})})]})}return t.jsxs(tn,{children:[e.map(y=>t.jsx(C,{data:y})),R&&t.jsx(ye,{title:R.title,description:R.description,confirm:R.confirm,cancel:R.cancel,params:R.params,onConfirm:R.onConfirm,onCancel:R.onCancel})]})}const tn=W.div`
22
+ `;function Qe({issuances:e,teamDid:r,onRefresh:s}){const{api:i,inService:f}=H(),{t:j,locale:O}=S.useContext(de),[R,p]=S.useState(null),[h,d]=S.useState(!1),{endpoint:w}=Q(),l=async({id:y})=>{if(!h){d(!0);try{await i.deletePassportIssuance({input:{teamDid:r,sessionId:y}}),s()}catch(n){se.error(n.message)}finally{d(!1),p(null)}}},v=()=>{d(!1),p(null)},I=y=>w?nr({id:y.id,endpoint:w}):"";function C({data:y}){return t.jsxs("div",{className:"issuance",children:[t.jsxs(E,{display:"flex",justifyContent:"space-between",children:[t.jsx(K,{permission:f?"":"mutate_team",role:f?G:[],children:n=>n?t.jsx(xe,{passport:{title:y.title,name:y.name},onDelete:()=>p({title:j("team.passport.issuance.delete.title"),description:j("team.passport.issuance.delete.description",{link:I(y)}),confirm:j("common.delConfirm"),cancel:j("common.cancel"),onConfirm:()=>{l(y)},onCancel:v})}):t.jsx(xe,{passport:{title:y.title,name:y.name}})}),t.jsxs("div",{style:{color:"#999"},children:[j("common.expires"),": ",ce(y.expireDate,O)]})]}),t.jsx(E,{mt:2,children:t.jsx(ve,{children:I(y)})})]})}return t.jsxs(tn,{children:[e.map(y=>t.jsx(C,{data:y})),R&&t.jsx(ye,{title:R.title,description:R.description,confirm:R.confirm,cancel:R.cancel,params:R.params,onConfirm:R.onConfirm,onCancel:R.onCancel})]})}const tn=q.div`
23
23
  .MuiTableHead-root {
24
24
  display: none;
25
25
  }
@@ -35,7 +35,7 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
35
35
  padding-bottom: 6px;
36
36
  }
37
37
  }
38
- `;Qe.propTypes={teamDid:b.string.isRequired,issuances:b.array,onRefresh:b.func};Qe.defaultProps={issuances:[],onRefresh:()=>{}};var L={};Object.defineProperty(L,"__esModule",{value:!0});L.getSourceProviders=L.getSourceProvider=Xe=L.getWalletDid=L.getWallet=L.getConnectedDids=L.getConnectedAccounts=L.getPermanentDid=void 0;const Ut=le;function rn(e){return e==null?void 0:e.did}L.getPermanentDid=rn;function je(e){return(e==null?void 0:e.connectedAccounts)||[]}L.getConnectedAccounts=je;function nn(e){return je(e).map(i=>i.did)}L.getConnectedDids=nn;function $t(e){return je(e).find(i=>i.provider===Ut.LOGIN_PROVIDER.WALLET)}L.getWallet=$t;function sn(e){const r=$t(e);return r==null?void 0:r.did}var Xe=L.getWalletDid=sn;function on(e){return(e==null?void 0:e.sourceProvider)||Ut.LOGIN_PROVIDER.WALLET}L.getSourceProvider=on;function an(e){return je(e).map(s=>s.provider)}L.getSourceProviders=an;function Se({teamDid:e,ownerDid:r,needReceive:s,roles:i,onCancel:f,onSuccess:j,onError:O,showOwnerPassport:R}){const{api:p}=H(),[h,d]=S.useState(!1),[w,l]=S.useState(""),{t:v}=V(),[I,C]=S.useState(""),y=async()=>{if(!I){l(v("team.member.error.passportEmpty"));return}l(null),d(!0);try{await p.createPassportIssuance({input:{teamDid:e,name:I,ownerDid:r}}),j()}catch(n){const o=Z(n);l(o),O(n)}finally{d(!1)}};return t.jsxs(Y,{title:v("team.passport.issue"),fullWidth:!0,open:!0,onClick:n=>n.stopPropagation(),onClose:f,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:t.jsxs(t.Fragment,{children:[t.jsx(M,{onClick:f,color:"inherit",size:"small",children:v("common.cancel")}),t.jsxs(M,{onClick:y,color:"primary",size:"small",disabled:h||!I,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[h&&t.jsx(ne,{size:16}),v(s?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[t.jsx(Fe,{component:"div",children:t.jsx(te,{component:"div",children:t.jsxs(At,{style:{width:"100%"},variant:"outlined",children:[t.jsx(kt,{children:v("common.passport")}),t.jsx(Et,{"data-cy":"issue-passport-select-passport",value:I,onChange:n=>{l(null),C(n.target.value)},fullWidth:!0,label:v("common.passport"),disabled:h,onKeyPress:n=>{n.key==="Enter"&&(n.preventDefault(),y())},children:i.filter(n=>R||n.name!=="owner").map(n=>t.jsx(Ne,{value:n.name,"data-cy":`issue-passport-select-option-${n.name}`,children:t.jsx("span",{children:n.title||n.name})},n.name))})]})})}),!!w&&t.jsx(re,{type:"error",variant:"icon",children:w})]})}Se.propTypes={teamDid:b.string.isRequired,ownerDid:b.string.isRequired,needReceive:b.bool,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,showOwnerPassport:b.bool};Se.defaultProps={onError:()=>{},roles:[],showOwnerPassport:!1,needReceive:!0};function Ye({passport:e,user:r,color:s,width:i,icon:f,children:j,createPassportSvg:O,...R}){const{t:p}=V();return t.jsxs(cn,{display:"flex",alignItems:"center",...R,children:[t.jsx("div",{dangerouslySetInnerHTML:{__html:O({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:r.fullName,ownerDid:r.did,ownerAvatarUrl:r.avatar,revoked:e.revoked,preferredColor:s,width:i})}}),t.jsxs("div",{className:"body",children:[t.jsxs(E,{className:"title",display:"flex",alignItems:"center",children:[sr(e.title),t.jsxs("div",{className:"status-icons",children:[f,e.revoked&&t.jsx(Dt,{})]})]}),e.expirationDate&&t.jsx(E,{className:"title",display:"flex",alignItems:"center",children:p("team.passport.validUntil",{date:e.expirationDate})}),j]})]})}Ye.propTypes={passport:b.any.isRequired,user:b.any.isRequired,color:b.string.isRequired,createPassportSvg:b.func.isRequired,icon:b.any,children:b.any,width:b.number};Ye.defaultProps={icon:null,children:null,width:150};const cn=W(E)`
38
+ `;Qe.propTypes={teamDid:b.string.isRequired,issuances:b.array,onRefresh:b.func};Qe.defaultProps={issuances:[],onRefresh:()=>{}};var _={};Object.defineProperty(_,"__esModule",{value:!0});_.getSourceProviders=_.getSourceProvider=Xe=_.getWalletDid=_.getWallet=_.getConnectedDids=_.getConnectedAccounts=_.getPermanentDid=void 0;const Ut=le;function rn(e){return e==null?void 0:e.did}_.getPermanentDid=rn;function je(e){return(e==null?void 0:e.connectedAccounts)||[]}_.getConnectedAccounts=je;function nn(e){return je(e).map(i=>i.did)}_.getConnectedDids=nn;function $t(e){return je(e).find(i=>i.provider===Ut.LOGIN_PROVIDER.WALLET)}_.getWallet=$t;function sn(e){const r=$t(e);return r==null?void 0:r.did}var Xe=_.getWalletDid=sn;function on(e){return(e==null?void 0:e.sourceProvider)||Ut.LOGIN_PROVIDER.WALLET}_.getSourceProvider=on;function an(e){return je(e).map(s=>s.provider)}_.getSourceProviders=an;function Se({teamDid:e,ownerDid:r,needReceive:s,roles:i,onCancel:f,onSuccess:j,onError:O,showOwnerPassport:R}){const{api:p}=H(),[h,d]=S.useState(!1),[w,l]=S.useState(""),{t:v}=V(),[I,C]=S.useState(""),y=async()=>{if(!I){l(v("team.member.error.passportEmpty"));return}l(null),d(!0);try{await p.createPassportIssuance({input:{teamDid:e,name:I,ownerDid:r}}),j()}catch(n){const o=J(n);l(o),O(n)}finally{d(!1)}};return t.jsxs(Y,{title:v("team.passport.issue"),fullWidth:!0,open:!0,onClick:n=>n.stopPropagation(),onClose:f,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:t.jsxs(t.Fragment,{children:[t.jsx(M,{onClick:f,color:"inherit",size:"small",children:v("common.cancel")}),t.jsxs(M,{onClick:y,color:"primary",size:"small",disabled:h||!I,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[h&&t.jsx(ne,{size:16}),v(s?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[t.jsx(Fe,{component:"div",children:t.jsx(te,{component:"div",children:t.jsxs(At,{style:{width:"100%"},variant:"outlined",children:[t.jsx(kt,{children:v("common.passport")}),t.jsx(Et,{"data-cy":"issue-passport-select-passport",value:I,onChange:n=>{l(null),C(n.target.value)},fullWidth:!0,label:v("common.passport"),disabled:h,onKeyPress:n=>{n.key==="Enter"&&(n.preventDefault(),y())},children:i.filter(n=>R||n.name!=="owner").map(n=>t.jsx(Ne,{value:n.name,"data-cy":`issue-passport-select-option-${n.name}`,children:t.jsx("span",{children:n.title||n.name})},n.name))})]})})}),!!w&&t.jsx(re,{type:"error",variant:"icon",children:w})]})}Se.propTypes={teamDid:b.string.isRequired,ownerDid:b.string.isRequired,needReceive:b.bool,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,showOwnerPassport:b.bool};Se.defaultProps={onError:()=>{},roles:[],showOwnerPassport:!1,needReceive:!0};function Ye({passport:e,user:r,color:s,width:i,icon:f,children:j,createPassportSvg:O,...R}){const{t:p}=V();return t.jsxs(cn,{display:"flex",alignItems:"center",...R,children:[t.jsx("div",{dangerouslySetInnerHTML:{__html:O({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:r.fullName,ownerDid:r.did,ownerAvatarUrl:r.avatar,revoked:e.revoked,preferredColor:s,width:i})}}),t.jsxs("div",{className:"body",children:[t.jsxs(E,{className:"title",display:"flex",alignItems:"center",children:[sr(e.title),t.jsxs("div",{className:"status-icons",children:[f,e.revoked&&t.jsx(Dt,{})]})]}),e.expirationDate&&t.jsx(E,{className:"title",display:"flex",alignItems:"center",children:p("team.passport.validUntil",{date:e.expirationDate})}),j]})]})}Ye.propTypes={passport:b.any.isRequired,user:b.any.isRequired,color:b.string.isRequired,createPassportSvg:b.func.isRequired,icon:b.any,children:b.any,width:b.number};Ye.defaultProps={icon:null,children:null,width:150};const cn=q(E)`
39
39
  .body {
40
40
  padding: 0;
41
41
  margin-left: 24px;
@@ -61,7 +61,7 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
61
61
  margin-left: 0.4em;
62
62
  }
63
63
  }
64
- `;function be({action:e,passport:r}){const{t:s}=V(),{roles:i}=Q(),f=i.find(j=>j.name===r.role);return t.jsxs("div",{children:[t.jsx("div",{children:s(e==="enable"?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),f&&t.jsx(E,{mt:3,fontWeight:"bold",children:s("team.member.passportPermissionTitle")}),f&&t.jsx(E,{mt:1,children:f.description})]})}be.propTypes={action:b.string.isRequired,passport:b.object.isRequired};be.defaultProps={};function Ge({user:e,onCreate:r,createPassportSvg:s}){var J;const{t:i}=V(),{session:f}=_t(),{roles:j,teamDid:O,teamIssuerDid:R,refresh:p,enablePassportIssuance:h,trustedPassports:d,passportColor:w,blocklet:l}=Q(),{appIdList:v}=St(),{api:I,inService:C}=H(),[y,n]=S.useState(!1),[o,a]=S.useState(null),[c,u]=S.useState(!1),[g,m]=S.useState(""),x=[R,...v||[]].filter(Boolean),A=(Te(e,"passports")||[]).map(D=>({...D,revoked:D.status===q.PASSPORT_STATUS.REVOKED})),U=async D=>{if(!y){n(!0);try{const B=D.status===q.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport";await I[B]({input:{teamDid:O,userDid:e.did,passportId:D.id}}),p()}catch(B){se.error(Z(B))}finally{n(!1),a(null)}}},z=D=>D.status===q.PASSPORT_STATUS.REVOKED?a({title:i("team.member.enablePassport"),description:t.jsx(be,{action:"enable",passport:D}),confirm:i("common.enable"),cancel:i("common.cancel"),onConfirm:()=>{U(D)},onCancel:()=>{n(!1),a(null)},color:"primary"}):a({title:i("team.member.revokePassport"),description:t.jsx(be,{action:"revoke",passport:D}),confirm:i("common.revoke"),cancel:i("common.cancel"),onConfirm:()=>{U(D)},onCancel:()=>{n(!1),a(null)}}),$=(D,B)=>e.did===f.user.did&&f.user.passportId&&f.user.passportId===B.id?{revokable:!1,message:i("team.passport.shouldNotDeleteCurrent")}:D?O===B.issuer.id&&B.name==="owner"?{revokable:!1,message:i("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:i("team.passport.noPermission")},_=A.filter(D=>!g||D.title.includes(g)||D.name.includes(g));return t.jsxs(ln,{children:[t.jsxs(hr,{children:[t.jsx("div",{className:"left",children:t.jsx(xr,{placeholder:i("team.passport.search"),value:g,onChange:D=>m(D.target.value)})}),t.jsx("div",{className:"right",children:h&&!!e.approved&&t.jsx(K,{permission:C?"":"mutate_team",role:C?G:[],children:t.jsxs(M,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:()=>u(!0),children:[t.jsx(he,{style:{fontSize:16,marginRight:4}}),i("team.passport.issue")]})})})]}),t.jsxs(E,{children:[_.map(D=>t.jsx(K,{permission:C?"":"mutate_team",role:C?G:[],children:B=>t.jsxs(E,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[t.jsx(Ye,{passport:D,user:e,color:w,createPassportSvg:s,icon:x.length&&!x.includes(D.issuer.id)?t.jsx(Ot,{}):null,children:!!x.length&&!x.includes(D.issuer.id)&&t.jsxs("div",{className:"tip",children:[D.issuer.id!==R&&!d.some(me=>me.issuerDid===D.issuer.id)&&t.jsx(ge,{title:i("team.passport.notTrustedIssuerTip"),children:t.jsx(E,{component:ct,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),t.jsx("span",{children:i("team.passport.issueBy",{name:D.issuer.name})})]})}),t.jsx(E,{children:$(B,D).revokable?t.jsxs(M,{variant:"outlined",color:D.revoked?"primary":"secondary",onClick:()=>z(D),children:[D.revoked?t.jsx(he,{style:{fontSize:16,marginRight:4}}):t.jsx(Dt,{style:{height:16,marginRight:4}}),D.revoked?i("common.enable"):i("common.revoke")]}):t.jsx(ge,{title:$(B,D).message,children:t.jsx(ct,{style:{color:"#ddd"}})})})]})},D.id)),!_.length&&t.jsx(wt,{children:i("common.empty")})]}),c&&t.jsx(Se,{teamDid:O,ownerDid:e.did,needReceive:Xe(e)===e.did,roles:j,onCancel:()=>u(!1),onSuccess:()=>{r(),u(!1)},showOwnerPassport:l&&!((J=l.settings)!=null&&J.owner)}),o&&t.jsx(ye,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel,color:o.color})]})}Ge.propTypes={user:b.object.isRequired,createPassportSvg:b.func.isRequired,onCreate:b.func};Ge.defaultProps={onCreate:()=>{}};const ln=W.div`
64
+ `;function be({action:e,passport:r}){const{t:s}=V(),{roles:i}=Q(),f=i.find(j=>j.name===r.role);return t.jsxs("div",{children:[t.jsx("div",{children:s(e==="enable"?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),f&&t.jsx(E,{mt:3,fontWeight:"bold",children:s("team.member.passportPermissionTitle")}),f&&t.jsx(E,{mt:1,children:f.description})]})}be.propTypes={action:b.string.isRequired,passport:b.object.isRequired};be.defaultProps={};function Ge({user:e,onCreate:r,createPassportSvg:s}){var Z;const{t:i}=V(),{session:f}=Lt(),{roles:j,teamDid:O,teamIssuerDid:R,refresh:p,enablePassportIssuance:h,trustedPassports:d,passportColor:w,blocklet:l}=Q(),{appIdList:v}=St(),{api:I,inService:C}=H(),[y,n]=S.useState(!1),[o,a]=S.useState(null),[c,u]=S.useState(!1),[g,m]=S.useState(""),x=[R,...v||[]].filter(Boolean),A=(Te(e,"passports")||[]).map(D=>({...D,revoked:D.status===W.PASSPORT_STATUS.REVOKED})),U=async D=>{if(!y){n(!0);try{const B=D.status===W.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport";await I[B]({input:{teamDid:O,userDid:e.did,passportId:D.id}}),p()}catch(B){se.error(J(B))}finally{n(!1),a(null)}}},z=D=>D.status===W.PASSPORT_STATUS.REVOKED?a({title:i("team.member.enablePassport"),description:t.jsx(be,{action:"enable",passport:D}),confirm:i("common.enable"),cancel:i("common.cancel"),onConfirm:()=>{U(D)},onCancel:()=>{n(!1),a(null)},color:"primary"}):a({title:i("team.member.revokePassport"),description:t.jsx(be,{action:"revoke",passport:D}),confirm:i("common.revoke"),cancel:i("common.cancel"),onConfirm:()=>{U(D)},onCancel:()=>{n(!1),a(null)}}),$=(D,B)=>e.did===f.user.did&&f.user.passportId&&f.user.passportId===B.id?{revokable:!1,message:i("team.passport.shouldNotDeleteCurrent")}:D?O===B.issuer.id&&B.name==="owner"?{revokable:!1,message:i("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:i("team.passport.noPermission")},L=A.filter(D=>!g||D.title.includes(g)||D.name.includes(g));return t.jsxs(ln,{children:[t.jsxs(hr,{children:[t.jsx("div",{className:"left",children:t.jsx(xr,{placeholder:i("team.passport.search"),value:g,onChange:D=>m(D.target.value)})}),t.jsx("div",{className:"right",children:h&&!!e.approved&&t.jsx(K,{permission:C?"":"mutate_team",role:C?G:[],children:t.jsxs(M,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:()=>u(!0),children:[t.jsx(he,{style:{fontSize:16,marginRight:4}}),i("team.passport.issue")]})})})]}),t.jsxs(E,{children:[L.map(D=>t.jsx(K,{permission:C?"":"mutate_team",role:C?G:[],children:B=>t.jsxs(E,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[t.jsx(Ye,{passport:D,user:e,color:w,createPassportSvg:s,icon:x.length&&!x.includes(D.issuer.id)?t.jsx(Ot,{}):null,children:!!x.length&&!x.includes(D.issuer.id)&&t.jsxs("div",{className:"tip",children:[D.issuer.id!==R&&!d.some(me=>me.issuerDid===D.issuer.id)&&t.jsx(ge,{title:i("team.passport.notTrustedIssuerTip"),children:t.jsx(E,{component:ct,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),t.jsx("span",{children:i("team.passport.issueBy",{name:D.issuer.name})})]})}),t.jsx(E,{children:$(B,D).revokable?t.jsxs(M,{variant:"outlined",color:D.revoked?"primary":"secondary",onClick:()=>z(D),children:[D.revoked?t.jsx(he,{style:{fontSize:16,marginRight:4}}):t.jsx(Dt,{style:{height:16,marginRight:4}}),D.revoked?i("common.enable"):i("common.revoke")]}):t.jsx(ge,{title:$(B,D).message,children:t.jsx(ct,{style:{color:"#ddd"}})})})]})},D.id)),!L.length&&t.jsx(wt,{children:i("common.empty")})]}),c&&t.jsx(Se,{teamDid:O,ownerDid:e.did,needReceive:Xe(e)===e.did,roles:j,onCancel:()=>u(!1),onSuccess:()=>{r(),u(!1)},showOwnerPassport:l&&!((Z=l.settings)!=null&&Z.owner)}),o&&t.jsx(ye,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel,color:o.color})]})}Ge.propTypes={user:b.object.isRequired,createPassportSvg:b.func.isRequired,onCreate:b.func};Ge.defaultProps={onCreate:()=>{}};const ln=q.div`
65
65
  .passport-item {
66
66
  .MuiButton-outlinedSecondary {
67
67
  color: #f16e6e;
@@ -73,7 +73,7 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
73
73
  }
74
74
  }
75
75
  }
76
- `,{ROLES:dn,PASSPORT_STATUS:mn}=q,un=e=>((e==null?void 0:e.passports)||[]).some(r=>r.role===dn.OWNER&&r.status===mn.VALID);var pn={hasActiveOwnerPassport:un};const fn=(e,r)=>e.nodeOwner&&e.nodeOwner.did===r,xt=(e,r)=>e&&e.did===r;function we({user:e,onCancel:r,onSuccess:s,onError:i,children:f}){const{api:j,info:O,inService:R}=H(),{session:p}=_t(),{teamDid:h,refresh:d}=Q(),{t:w}=V(),[l,v]=S.useState(!1),[I,C]=S.useState(!1),y=()=>C(!0),n=async c=>{const{did:u,approved:g}=c;if(!l){v(!0);try{await j.updateUserApproval({input:{teamDid:h,user:{did:u,approved:!g}}}),C(!1),s(),d()}catch(m){se.error(Z(m)),i()}finally{v(!1)}}},o={title:e.approved?w("team.member.forbidLogin"):w("team.member.allowLogin"),description:e.approved?w("team.member.forbidLoginDescription"):w("team.member.allowLoginDescription"),confirm:w("common.confirm"),cancel:w("common.cancel"),onConfirm:()=>{n(e)},onCancel:()=>{v(!1),C(!1),r()},color:e.approved?"error":"primary"};let a;return pn.hasActiveOwnerPassport(e)?a=!1:R?a=!xt(p.user,e.did):a=O.nodeOwner&&!fn(O,e.did)&&!xt(p.user,e.did),a?t.jsxs(t.Fragment,{children:[typeof f=="function"?f({can:a,open:y}):f,I?t.jsx(ye,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel,color:o.color}):null]}):null}we.propTypes={user:b.object,onSuccess:b.func,onCancel:b.func,onError:b.func,children:b.oneOfType([b.object,b.func])};we.defaultProps={user:{},onSuccess:()=>{},onCancel:()=>{},onError:()=>{},children:null};function Bt(e,r,s){if(e&&e.startsWith(q.USER_AVATAR_URL_PREFIX)){const i=window.env.apiPrefix||"/";return s?at(i,q.USER_AVATAR_PATH_PREFIX,e.replace(q.USER_AVATAR_URL_PREFIX,"")):at(i,q.USER_AVATAR_PATH_PREFIX,r,e.replace(q.USER_AVATAR_URL_PREFIX,""))}return e}function Ze({user:e}){return(e.connectedAccounts||[]).map(s=>t.jsx(Ae,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.provider,children:t.jsx(Le,{did:s.did})},s.did))}Ze.propTypes={user:b.object.isRequired};Ze.defaultProps={};b.string.isRequired;const ae="info";function Je({userDid:e,onCancel:r,initTab:s,createPassportSvg:i}){const{api:f,ws:{useSubscription:j},inService:O}=H(),{roles:R,teamDid:p,enablePassportIssuance:h}=Q(),{t:d,locale:w}=V(),l=or({user:null,issuances:null,tab:s||ae}),v=async(g,m)=>{try{const x=await f.doBatchQuery({getUser:{input:{teamDid:g,user:{did:m},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:g,ownerDid:m}}});x.getUser.user&&(x.getUser.user.avatar=Bt(x.getUser.user.avatar,g,O),x.getUser.user.passports=(x.getUser.user.passports||[]).filter(A=>A.issuer)),l.user=x.getUser.user||{},l.issuances=x.getPassportIssuances.list||[]}catch(x){se.error(Z(x))}};S.useEffect(()=>{p&&v(p,e)},[e,p]);const I=g=>{g.teamDid===p&&g.user&&g.user.did===e&&v(p,e)};j(le.TeamEvents.userUpdated,I,[e,p]),S.useEffect(()=>{l.issuances&&!l.issuances.length&&l.tab==="issuances"&&(l.tab=ae)},[l.issuances]);const C=async g=>{await v(p,g.did),l.tab=ae},y={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},n=()=>{var m,x;return(l.user?[{name:d("team.member.name"),value:l.user.fullName},{name:d("common.email"),value:l.user.email},{name:d("team.member.source"),value:t.jsx(E,{display:"flex",alignItems:"center",children:y[((m=l.user)==null?void 0:m.sourceProvider)||q.USER_TYPE.WALLET]||((x=l.user)==null?void 0:x.sourceProvider)})},{name:d("team.member.allowLogin"),value:l.user.approved?d("common.yes"):d("common.no")},{name:d("team.member.lastLogin"),value:ce(l.user.lastLoginAt,w)},{name:d("team.member.lastLoginIp"),value:l.user.lastLoginIp||""},{name:d("common.createdAt"),value:ce(l.user.createdAt,w)},{name:d("common.remark"),value:l.user.remark||"--"},Array.isArray(l.user.tags)&&l.user.tags.length>0?{name:d("common.tags"),value:l.user.tags.map(A=>t.jsx(Tt,{style:{background:A.color,color:Ct(A.color),marginRight:4},children:A.title},A.id))}:null].filter(Boolean):[]).map(A=>A.name===d("common.did")?t.jsx(Ae,{valueComponent:"div",nameWidth:120,name:A.name,nameFormatter:()=>d("common.did"),children:A.value},A.name):t.jsx(Ae,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:A.name,children:A.value},A.name))},o={info:{label:d("common.basicInfo"),value:ae,component:n},oauth:{label:d("team.member.connectedAccounts"),value:"oauth",component:()=>t.jsx(Ze,{user:l.user,onChangeUser:C})},passports:{label:d("common.passport"),value:"passports",component:()=>t.jsx(Ge,{user:l.user,teamDid:p,roles:R,createPassportSvg:i,onCreate:()=>{v(p,e).then(()=>{h&&l.issuances&&l.issuances.length&&(l.tab="issuances")})},onRefresh:()=>{v(p,e)}})},issuances:{label:d("team.passport.issuance.pending"),value:"issuances",component:()=>t.jsx(Qe,{issuances:l.issuances||[],teamDid:p,onRefresh:()=>v(p,e)})}},a=Object.values(o).map(({label:g,value:m})=>({label:g,value:m})).filter(g=>{var m;return g.value==="issuances"?h&&l.issuances&&!!l.issuances.length:g.value==="oauth"?(((m=l.user)==null?void 0:m.connectedAccounts)||[]).find(A=>{var U;return A.provider!==(((U=l.user)==null?void 0:U.sourceProvider)||le.LOGIN_PROVIDER.WALLET)}):!0}),c=o[l.tab]||o.info,u=g=>{l.tab=g};return t.jsx(Y,{title:d("common.member"),onClose:r,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:l.user&&t.jsx(K,{permission:O?"":"mutate_team",role:O?G:[],children:t.jsx(we,{user:l.user,children:({open:g})=>t.jsxs(xn,{onClick:g,children:[l.user.approved?t.jsx(qe,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):t.jsx(Ke,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),l.user.approved?d("team.member.forbidLogin"):d("team.member.allowLogin")]})})}),children:t.jsxs(gn,{children:[!l.user&&t.jsx(hn,{children:t.jsx(ne,{})}),l.user&&t.jsxs("div",{children:[t.jsxs(E,{display:"flex",alignItems:"center",className:"info",children:[t.jsx(wr,{src:l.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(E,{children:[t.jsx(E,{className:"name",children:l.user.fullName}),t.jsx(E,{className:"did",mt:1,children:t.jsx(Le,{did:l.user.did})})]})]}),t.jsx(E,{mx:3,className:"tabs",children:t.jsx(vr,{tabs:a,current:l.tab,onChange:u,scrollButtons:"auto"})}),t.jsx("div",{className:"body",children:t.jsx(c.component,{})})]})]})})}Je.propTypes={userDid:b.string.isRequired,onCancel:b.func.isRequired,createPassportSvg:b.func.isRequired,initTab:b.string};Je.defaultProps={initTab:ae};const gn=W.div`
76
+ `,{ROLES:dn,PASSPORT_STATUS:mn}=W,un=e=>((e==null?void 0:e.passports)||[]).some(r=>r.role===dn.OWNER&&r.status===mn.VALID);var pn={hasActiveOwnerPassport:un};const fn=(e,r)=>e.nodeOwner&&e.nodeOwner.did===r,xt=(e,r)=>e&&e.did===r;function we({user:e,onCancel:r,onSuccess:s,onError:i,children:f}){const{api:j,info:O,inService:R}=H(),{session:p}=Lt(),{teamDid:h,refresh:d}=Q(),{t:w}=V(),[l,v]=S.useState(!1),[I,C]=S.useState(!1),y=()=>C(!0),n=async c=>{const{did:u,approved:g}=c;if(!l){v(!0);try{await j.updateUserApproval({input:{teamDid:h,user:{did:u,approved:!g}}}),C(!1),s(),d()}catch(m){se.error(J(m)),i()}finally{v(!1)}}},o={title:e.approved?w("team.member.forbidLogin"):w("team.member.allowLogin"),description:e.approved?w("team.member.forbidLoginDescription"):w("team.member.allowLoginDescription"),confirm:w("common.confirm"),cancel:w("common.cancel"),onConfirm:()=>{n(e)},onCancel:()=>{v(!1),C(!1),r()},color:e.approved?"error":"primary"};let a;return pn.hasActiveOwnerPassport(e)?a=!1:R?a=!xt(p.user,e.did):a=O.nodeOwner&&!fn(O,e.did)&&!xt(p.user,e.did),a?t.jsxs(t.Fragment,{children:[typeof f=="function"?f({can:a,open:y}):f,I?t.jsx(ye,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel,color:o.color}):null]}):null}we.propTypes={user:b.object,onSuccess:b.func,onCancel:b.func,onError:b.func,children:b.oneOfType([b.object,b.func])};we.defaultProps={user:{},onSuccess:()=>{},onCancel:()=>{},onError:()=>{},children:null};function Bt(e,r,s){if(e&&e.startsWith(W.USER_AVATAR_URL_PREFIX)){const i=window.env.apiPrefix||"/";return s?at(i,W.USER_AVATAR_PATH_PREFIX,e.replace(W.USER_AVATAR_URL_PREFIX,"")):at(i,W.USER_AVATAR_PATH_PREFIX,r,e.replace(W.USER_AVATAR_URL_PREFIX,""))}return e}function Je({user:e}){return(e.connectedAccounts||[]).map(s=>t.jsx(Ae,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.provider,children:t.jsx(_e,{did:s.did})},s.did))}Je.propTypes={user:b.object.isRequired};Je.defaultProps={};b.string.isRequired;const ae="info";function Ze({userDid:e,onCancel:r,initTab:s,createPassportSvg:i}){const{api:f,ws:{useSubscription:j},inService:O}=H(),{roles:R,teamDid:p,enablePassportIssuance:h}=Q(),{t:d,locale:w}=V(),l=or({user:null,issuances:null,tab:s||ae}),v=async(g,m)=>{try{const x=await f.doBatchQuery({getUser:{input:{teamDid:g,user:{did:m},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:g,ownerDid:m}}});x.getUser.user&&(x.getUser.user.avatar=Bt(x.getUser.user.avatar,g,O),x.getUser.user.passports=(x.getUser.user.passports||[]).filter(A=>A.issuer)),l.user=x.getUser.user||{},l.issuances=x.getPassportIssuances.list||[]}catch(x){se.error(J(x))}};S.useEffect(()=>{p&&v(p,e)},[e,p]);const I=g=>{g.teamDid===p&&g.user&&g.user.did===e&&v(p,e)};j(le.TeamEvents.userUpdated,I,[e,p]),S.useEffect(()=>{l.issuances&&!l.issuances.length&&l.tab==="issuances"&&(l.tab=ae)},[l.issuances]);const C=async g=>{await v(p,g.did),l.tab=ae},y={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},n=()=>{var m,x;return(l.user?[{name:d("team.member.name"),value:l.user.fullName},{name:d("common.email"),value:l.user.email},{name:d("team.member.source"),value:t.jsx(E,{display:"flex",alignItems:"center",children:y[((m=l.user)==null?void 0:m.sourceProvider)||W.USER_TYPE.WALLET]||((x=l.user)==null?void 0:x.sourceProvider)})},{name:d("team.member.allowLogin"),value:l.user.approved?d("common.yes"):d("common.no")},{name:d("team.member.lastLogin"),value:ce(l.user.lastLoginAt,w)},{name:d("team.member.lastLoginIp"),value:l.user.lastLoginIp||""},{name:d("common.createdAt"),value:ce(l.user.createdAt,w)},{name:d("common.remark"),value:l.user.remark||"--"},Array.isArray(l.user.tags)&&l.user.tags.length>0?{name:d("common.tags"),value:l.user.tags.map(A=>t.jsx(Tt,{style:{background:A.color,color:Ct(A.color),marginRight:4},children:A.title},A.id))}:null].filter(Boolean):[]).map(A=>A.name===d("common.did")?t.jsx(Ae,{valueComponent:"div",nameWidth:120,name:A.name,nameFormatter:()=>d("common.did"),children:A.value},A.name):t.jsx(Ae,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:A.name,children:A.value},A.name))},o={info:{label:d("common.basicInfo"),value:ae,component:n},oauth:{label:d("team.member.connectedAccounts"),value:"oauth",component:()=>t.jsx(Je,{user:l.user,onChangeUser:C})},passports:{label:d("common.passport"),value:"passports",component:()=>t.jsx(Ge,{user:l.user,teamDid:p,roles:R,createPassportSvg:i,onCreate:()=>{v(p,e).then(()=>{h&&l.issuances&&l.issuances.length&&(l.tab="issuances")})},onRefresh:()=>{v(p,e)}})},issuances:{label:d("team.passport.issuance.pending"),value:"issuances",component:()=>t.jsx(Qe,{issuances:l.issuances||[],teamDid:p,onRefresh:()=>v(p,e)})}},a=Object.values(o).map(({label:g,value:m})=>({label:g,value:m})).filter(g=>{var m;return g.value==="issuances"?h&&l.issuances&&!!l.issuances.length:g.value==="oauth"?(((m=l.user)==null?void 0:m.connectedAccounts)||[]).find(A=>{var U;return A.provider!==(((U=l.user)==null?void 0:U.sourceProvider)||le.LOGIN_PROVIDER.WALLET)}):!0}),c=o[l.tab]||o.info,u=g=>{l.tab=g};return t.jsx(Y,{title:d("common.member"),onClose:r,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:l.user&&t.jsx(K,{permission:O?"":"mutate_team",role:O?G:[],children:t.jsx(we,{user:l.user,children:({open:g})=>t.jsxs(xn,{onClick:g,children:[l.user.approved?t.jsx(We,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):t.jsx(Ke,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),l.user.approved?d("team.member.forbidLogin"):d("team.member.allowLogin")]})})}),children:t.jsxs(gn,{children:[!l.user&&t.jsx(hn,{children:t.jsx(ne,{})}),l.user&&t.jsxs("div",{children:[t.jsxs(E,{display:"flex",alignItems:"center",className:"info",children:[t.jsx(wr,{src:l.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(E,{children:[t.jsx(E,{className:"name",children:l.user.fullName}),t.jsx(E,{className:"did",mt:1,children:t.jsx(_e,{did:l.user.did})})]})]}),t.jsx(E,{mx:3,className:"tabs",children:t.jsx(vr,{tabs:a,current:l.tab,onChange:u,scrollButtons:"auto"})}),t.jsx("div",{className:"body",children:t.jsx(c.component,{})})]})]})})}Ze.propTypes={userDid:b.string.isRequired,onCancel:b.func.isRequired,createPassportSvg:b.func.isRequired,initTab:b.string};Ze.defaultProps={initTab:ae};const gn=q.div`
77
77
  .info {
78
78
  .name {
79
79
  font-weight: 400;
@@ -92,13 +92,13 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
92
92
  .body {
93
93
  margin-top: 24px;
94
94
  }
95
- `,hn=W.div`
95
+ `,hn=q.div`
96
96
  flex: 1;
97
97
  display: flex;
98
98
  justify-content: center;
99
99
  align-items: center;
100
100
  height: 200px;
101
- `,xn=W.div`
101
+ `,xn=q.div`
102
102
  flex-shrink: 0;
103
103
  width: 100%;
104
104
  height: 64px;
@@ -114,9 +114,9 @@ import{r as S,j as t,fz as Gt,h as Ee,fA as Zt,aY as H,u as V,T as te,b3 as Ne,f
114
114
  bottom: 0;
115
115
  background: #fff;
116
116
  z-index: 10;
117
- `;function et(){const{api:e,inService:r}=H(),{t:s,locale:i}=S.useContext(de),{teamDid:f,invitations:j,refresh:O,endpoint:R}=Q(),[p,h]=S.useState(null),[d,w]=S.useState(!1),l=async({inviteId:y})=>{if(!d){w(!0);try{await e.deleteInvitation({input:{teamDid:f,inviteId:y}}),O(),await ir(800)}catch(n){console.error(n)}finally{w(!1),h(null)}}},v=()=>{w(!1),h(null)},I=y=>R?_e({inviteId:y.inviteId,endpoint:R}):"",C=[{label:s("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:y=>{const n=j[y];return R?t.jsx(ve,{children:I(n)}):t.jsx(ne,{size:16})}}},{label:s("common.role"),name:"role",widtn:70},{label:s("common.remark"),name:"remark",options:{customBodyRender:y=>y||"--"}},{label:s("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:(y,{rowIndex:n})=>{var a;const o=j[n];return(a=o==null?void 0:o.inviter)==null?void 0:a.fullName}}},{label:s("common.expires"),name:"expireDate",options:{customBodyRender:y=>t.jsx(Pt,{value:y,locale:i})}},{label:s("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:y=>{const n=j[y];return t.jsx(K,{permission:r?"":"mutate_team",role:r?G:[],children:t.jsxs(M,{onClick:()=>h({title:s("team.inviting.delete.title"),description:s("team.inviting.delete.description",{link:I(n)}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:()=>l(n),onCancel:v}),size:"small",color:"error",variant:"text",children:[t.jsx(Cr,{style:{fontSize:"1.2em"}}),s("common.delete")]})})}}}];return t.jsxs(bn,{children:[j.length?t.jsx(It,{locale:i,data:[...j],columns:C,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):t.jsx(wt,{children:s("common.empty")}),p&&t.jsx(ye,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel})]})}const bn=W.div`
117
+ `;function et(){const{api:e,inService:r}=H(),{t:s,locale:i}=S.useContext(de),{teamDid:f,invitations:j,refresh:O,endpoint:R}=Q(),[p,h]=S.useState(null),[d,w]=S.useState(!1),l=async({inviteId:y})=>{if(!d){w(!0);try{await e.deleteInvitation({input:{teamDid:f,inviteId:y}}),O(),await ir(800)}catch(n){console.error(n)}finally{w(!1),h(null)}}},v=()=>{w(!1),h(null)},I=y=>R?Le({inviteId:y.inviteId,endpoint:R}):"",C=[{label:s("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:y=>{const n=j[y];return R?t.jsx(ve,{children:I(n)}):t.jsx(ne,{size:16})}}},{label:s("common.role"),name:"role",widtn:70},{label:s("common.remark"),name:"remark",options:{customBodyRender:y=>y||"--"}},{label:s("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:(y,{rowIndex:n})=>{var a;const o=j[n];return(a=o==null?void 0:o.inviter)==null?void 0:a.fullName}}},{label:s("common.expires"),name:"expireDate",options:{customBodyRender:y=>t.jsx(Pt,{value:y,locale:i})}},{label:s("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:y=>{const n=j[y];return t.jsx(K,{permission:r?"":"mutate_team",role:r?G:[],children:t.jsxs(M,{onClick:()=>h({title:s("team.inviting.delete.title"),description:s("team.inviting.delete.description",{link:I(n)}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:()=>l(n),onCancel:v}),size:"small",color:"error",variant:"text",children:[t.jsx(Cr,{style:{fontSize:"1.2em"}}),s("common.delete")]})})}}}];return t.jsxs(bn,{children:[j.length?t.jsx(It,{locale:i,data:[...j],columns:C,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):t.jsx(wt,{children:s("common.empty")}),p&&t.jsx(ye,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel})]})}const bn=q.div`
118
118
  margin-top: -20px;
119
- `;et.propTypes={};et.defaultProps={};var tt={},vn=cr;Object.defineProperty(tt,"__esModule",{value:!0});var Mt=tt.default=void 0,yn=vn(ar()),jn=t;Mt=tt.default=(0,yn.default)((0,jn.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");class Sn extends Error{constructor(r){super(),this.name="AbortError",this.message=r}}const bt=e=>globalThis.DOMException===void 0?new Sn(e):new DOMException(e),vt=e=>{const r=e.reason===void 0?bt("This operation was aborted."):e.reason;return r instanceof Error?r:bt(r)};async function wn(e,r,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:f}={}){return new Promise((j,O)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof r!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);const R=[],p=[],h=new Map;let d=!1,w=!1,l=!1,v=0,I=0;const C=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),y=o=>{d=!0,w=!0,O(o)};f&&(f.aborted&&y(vt(f)),f.addEventListener("abort",()=>{y(vt(f))}));const n=async()=>{if(w)return;const o=await C.next(),a=I;if(I++,o.done){if(l=!0,v===0&&!w){if(!i&&p.length>0){y(new AggregateError(p));return}if(w=!0,h.size===0){j(R);return}const c=[];for(const[u,g]of R.entries())h.get(u)!==yt&&c.push(g);j(c)}return}v++,(async()=>{try{const c=await o.value;if(w)return;const u=await r(c,a);u===yt&&h.set(a,u),R[a]=u,v--,await n()}catch(c){if(i)y(c);else{p.push(c),v--;try{await n()}catch(u){y(u)}}}})()};(async()=>{for(let o=0;o<s;o++){try{await n()}catch(a){y(a);break}if(l||d)break}})()})}const yt=Symbol("skip");async function Cn(e,r){return wn(e,s=>s(),r)}function rt({type:e,user:r,onIssuePassport:s,onRefresh:i}){const{teamDid:f,roles:j}=Q(),{confirmHolder:O,confirmApi:R}=Rt(),{t:p}=S.useContext(de),[h,d]=S.useState(!1),{api:w}=H(),l=Ee(async()=>{const{userSessions:v=[]}=r,I=v.map(C=>()=>w.logoutUser({input:{teamDid:f,appPid:f,userDid:r.did,visitorId:C.visitorId}}));await Cn(I,{concurrency:3,stopOnError:!1})});return t.jsxs(t.Fragment,{children:[O,t.jsx(Pr,{"data-cy":"member-actions",actions:[{icon:t.jsx(he,{fontSize:"small"}),text:p("team.passport.issue"),"data-cy":"action-issue-passport",onClick:v=>{v.stopPropagation(),d(!0)}},({close:v})=>t.jsx(we,{user:r,children:({open:I})=>t.jsxs(Ne,{dense:!0,onClick:C=>{C.stopPropagation(),v(),I(C)},"data-cy":"action-toggle-block",children:[t.jsx(Rr,{style:{minWidth:24,marginRight:8},children:r.approved?t.jsx(qe,{}):t.jsx(Ke,{})}),t.jsx(Or,{primary:r.approved?p("team.member.forbidLogin"):p("team.member.allowLogin")})]})},"toggle-approval"),e==="blocklet"&&{icon:t.jsx(Mt,{fontSize:"small"}),text:p("team.member.forceLogout"),onClick:v=>{v.stopPropagation(),R.open({title:p("team.member.forceLogout"),content:p("team.member.forceLogoutDescription"),confirmButtonText:p("common.confirm"),cancelButtonText:p("common.cancel"),onClick:I=>I.stopPropagation(),onConfirm:async()=>{await l(),await R.close(),i()}})}}].filter(Boolean)}),h&&t.jsx(Se,{teamDid:f,ownerDid:r.did,needReceive:Xe(r)===r.did,roles:j,onCancel:()=>d(!1),onSuccess:()=>{s(),d(!1)}})]})}rt.propTypes={type:b.oneOf(["server","blocklet"]).isRequired,user:b.object.isRequired,onIssuePassport:b.func,onRefresh:b.func};rt.defaultProps={onIssuePassport:()=>{},onRefresh:()=>{}};const Ie="$all",jt="$none",De=(e,r)=>{const s=e.find(i=>i.key===r);return(s==null?void 0:s.value)||0},Pn=(e,r)=>{const s=e.passports||[];return s.length?!s.some(i=>{var f;return r.includes((f=i.issuer)==null?void 0:f.id)}):!1};function zt({user:e}){const{t:r}=S.useContext(de),s=t.jsxs("div",{className:"member-block",children:[t.jsxs("div",{className:"member-avatar",children:[t.jsx(mr,{src:`${e.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:e.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!e.approved&&t.jsx("did",{className:"badge-block"}),e.isFromExternal&&t.jsx(ge,{title:r("team.passport.externalPassport"),children:t.jsx(E,{ml:1,className:"icon",children:t.jsx(Ot,{})})})]}),t.jsxs("div",{className:"member-meta",children:[t.jsx("div",{className:"member-text",children:e.fullName}),Array.isArray(e.tags)&&e.tags.length>0&&t.jsx("div",{className:"member-tags",children:e.tags.map(i=>t.jsx(Tt,{style:{background:i.color,color:Ct(i.color),marginRight:4},children:i.title},i.id))})]})]});return e.approved?s:t.jsx(E,{display:"flex",alignItems:"center",children:t.jsx(ge,{title:r("team.member.forbidLoginDescription"),children:s})})}zt.propTypes={user:b.object.isRequired};function Rn({type:e,createPassportSvg:r}){const{confirmApi:s,confirmHolder:i}=Rt({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:f=[]}=St(),{teamDid:j,invitations:O,teamIssuerDid:R,roles:p,refresh:h,enablePassportIssuance:d,endpoint:w,api:l}=Q(),{inService:v,ws:{useSubscription:I}}=H(),{t:C,locale:y}=S.useContext(de),[n,o]=S.useState(!1),[a,c]=S.useState(!1),[u,g]=S.useState(!1),[m,x]=S.useState(!1),[A,U]=S.useState(!1),[z,$]=S.useState([]),[_,J]=S.useState(),[D,B]=S.useState([]),[me]=qr({did:void 0}),nt=`members-${j}`,ue=br(nt),[k,oe]=S.useState({role:Ie,searchText:ue.searchText||"",hideBlocked:!1,pageSize:ue.rowsPerPage||10,page:ue.page?ue.page+1:1});lr(async()=>{if(me.did){const{user:P}=await l.getUser({did:me.did});P&&x(P)}});const Ce=(p||[]).map(P=>({name:P.name,title:P.title,num:De(D,P.name)}));Ce.unshift({name:Ie,title:"All Members",num:De(D,Ie)}),Ce.push({name:jt,title:"Other",num:De(D,jt)});const st=()=>{const P={includeTags:!0,includeUserSessions:e==="blocklet"};k.hideBlocked&&(P.approved=!0),P.role=k.role,k.searchText&&(P.search=k.searchText),U(!0),l.getUsers({query:P,paging:{page:k.page,pageSize:k.pageSize}}).then(T=>{U(!1),(T.users||[]).forEach(N=>{N.isFromExternal=Pn(N,ur(f)?[R]:f),N.avatar=Bt(N.avatar,j,v),N.passports=(N.passports||[]).filter(F=>F.issuer)}),$(T.users||[]),J(T.paging.total)}).catch(T=>{U(!1),se.error(T.message)})},ot=()=>{l.getUsersCountPerRole().then(P=>{B(P.counts||[])}).catch(P=>{se.error(P.message)})},Pe=P=>{P.teamDid===j&&(st(),ot())};S.useEffect(()=>{st()},[`${k.hideBlocked}-${k.role}-${k.page}-${k.pageSize}-${k.searchText}`]),S.useEffect(()=>{ot()},[]),I(le.TeamEvents.userUpdated,Pe,[k]),I(le.TeamEvents.userAdded,Pe,[k]);const qt=d,Wt=Ee(P=>{s.open({title:"User Sessions",content:t.jsx(yr,{user:P,showAction:!1,showUser:!1}),onConfirm(){s.close()},confirmButtonText:C("common.close"),showCancelButton:!1})}),Ht=[{label:C("common.name"),name:"fullName",options:{customBodyRenderLite:P=>{const T=z[P];return t.jsx("div",{"data-cy":`member-name-${T.fullName}`,children:t.jsx(zt,{user:T})},T.did)}}},{label:C("common.address"),name:"did",options:{customBodyRender:P=>t.jsx(Le,{size:14,responsive:!0,copyable:!1,did:P})}},{label:C("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:P=>t.jsx(Pt,{value:P,locale:y})}},{label:C("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:P=>P||"-"}},{label:C("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:P=>{const T=z[P],N=T.sourceProvider||q.USER_TYPE.WALLET,X={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[N]||N;return T.sourceAppPid?`${X} (${C("team.member.federated")})`:X}}},e==="blocklet"&&{label:C("team.member.activeUserSessions"),name:"userSessions",options:{customBodyRenderLite:P=>{var N,F,X;const T=z[P];return t.jsx(dr,{onClick:Yt=>{Yt.stopPropagation(),Wt(T)},children:t.jsx(jr,{badgeContent:(N=T==null?void 0:T.userSessions)==null?void 0:N.length,color:((F=T==null?void 0:T.userSessions)==null?void 0:F.length)>0?"primary":"default",sx:((X=T==null?void 0:T.userSessions)==null?void 0:X.length)>0?{}:{".MuiBadge-badge":{backgroundColor:"grey",color:"white"}},showZero:!0,children:t.jsx(gr,{})})})}}},{label:C("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:P=>{const T=z[P];return t.jsx(K,{permission:v?"":"mutate_team",role:v?G:[],children:t.jsx(rt,{type:e,user:T,onIssuePassport:()=>x({...T,initTab:"issuances"}),onRefresh:()=>Pe({teamDid:j})})})}}}].filter(Boolean),Re=[];qt&&(Re.push(t.jsxs(M,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:()=>{g(!0)},children:[t.jsx(Lt,{style:{height:"1em",marginRight:4}}),C("common.inviting"),O.length?` (${O.length})`:""]}),t.jsx(K,{permission:v?"":"mutate_team",role:v?G:[],children:t.jsxs(M,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:()=>o(!0),children:[t.jsx(he,{style:{fontSize:"1.3em",marginRight:4}}),C("team.invite")]})})),e==="server"&&Re.push(t.jsx(K,{role:"owner",children:t.jsxs(M,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:()=>c(!0),children:[t.jsx(fr,{style:{fontSize:"1.3em",marginRight:4}}),C("team.transferNode.name")]})})));const Kt=P=>{A||oe(T=>({...T,role:P,hideBlocked:!1,searchText:"",page:1}))},Vt=P=>{oe(T=>({...T,hideBlocked:P,page:1}))},Qt=({page:P,rowsPerPage:T,searchText:N})=>{k.pageSize!==T?oe(F=>({...F,pageSize:T,page:1})):k.page!==P+1?oe(F=>({...F,page:P+1})):k.searchText!==N&&oe(F=>({...F,searchText:N,page:1}))},it=S.useRef(null),Xt={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(P,{dataIndex:T},N){var F;if((F=it.current)!=null&&F.contains(N.target)){const X=z[T];x(X)}},page:k.page-1,rowsPerPage:k.pageSize,count:_,searchDebounceTime:600};return t.jsxs(On,{children:[i,t.jsxs(E,{className:"main",display:"flex",sx:{mt:v?4:0},children:[t.jsx("div",{className:"left",children:t.jsx("div",{className:"tabs",children:Ce.map(P=>t.jsxs("div",{className:`tab ${k.role===P.name?"active":""}`,onClick:()=>Kt(P.name),children:[t.jsx("span",{className:"text",children:P.title}),t.jsx("span",{className:pr("badge",{"is-rect":P.num>999}),children:P.num})]},P.name))})}),t.jsx("div",{ref:it,className:"right",children:t.jsx(It,{className:"main-table",verticalKeyWidth:100,locale:y,durable:nt,durableKeys:["page","rowsPerPage"],title:t.jsx("div",{className:"table-toolbar-left",children:t.jsx(Ir,{control:t.jsx(Dr,{sx:{display:"flex !important"},disabled:A,color:"primary",checked:k.hideBlocked,onChange:P=>Vt(P.target.checked)}),label:C("team.member.hideBlockedMember")})}),data:z,columns:Ht,customButtons:Re,options:Xt,loading:A,onChange:Qt})})]}),t.jsx(Y,{title:C("common.inviting"),onClose:()=>g(!1),open:u,maxWidth:"lg",fullWidth:!0,children:t.jsx(et,{})}),m&&t.jsx(Je,{onCancel:()=>x(null),userDid:m.did,createPassportSvg:r,initTab:m.initTab}),n&&t.jsx(Be,{teamDid:j,endpoint:w,roles:p,onCancel:()=>o(!1),onSuccess:()=>{h(),o(!1)}}),a&&t.jsx(Me,{teamDid:j,endpoint:w,roles:p,onCancel:()=>c(!1),onSuccess:()=>{h(),c(!1)}})]})}const On=W.div`
119
+ `;et.propTypes={};et.defaultProps={};var tt={},vn=cr;Object.defineProperty(tt,"__esModule",{value:!0});var Mt=tt.default=void 0,yn=vn(ar()),jn=t;Mt=tt.default=(0,yn.default)((0,jn.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");class Sn extends Error{constructor(r){super(),this.name="AbortError",this.message=r}}const bt=e=>globalThis.DOMException===void 0?new Sn(e):new DOMException(e),vt=e=>{const r=e.reason===void 0?bt("This operation was aborted."):e.reason;return r instanceof Error?r:bt(r)};async function wn(e,r,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:f}={}){return new Promise((j,O)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof r!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);const R=[],p=[],h=new Map;let d=!1,w=!1,l=!1,v=0,I=0;const C=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),y=o=>{d=!0,w=!0,O(o)};f&&(f.aborted&&y(vt(f)),f.addEventListener("abort",()=>{y(vt(f))}));const n=async()=>{if(w)return;const o=await C.next(),a=I;if(I++,o.done){if(l=!0,v===0&&!w){if(!i&&p.length>0){y(new AggregateError(p));return}if(w=!0,h.size===0){j(R);return}const c=[];for(const[u,g]of R.entries())h.get(u)!==yt&&c.push(g);j(c)}return}v++,(async()=>{try{const c=await o.value;if(w)return;const u=await r(c,a);u===yt&&h.set(a,u),R[a]=u,v--,await n()}catch(c){if(i)y(c);else{p.push(c),v--;try{await n()}catch(u){y(u)}}}})()};(async()=>{for(let o=0;o<s;o++){try{await n()}catch(a){y(a);break}if(l||d)break}})()})}const yt=Symbol("skip");async function Cn(e,r){return wn(e,s=>s(),r)}function rt({type:e,user:r,onIssuePassport:s,onRefresh:i}){const{teamDid:f,roles:j}=Q(),{confirmHolder:O,confirmApi:R}=Rt(),{t:p}=S.useContext(de),[h,d]=S.useState(!1),{api:w}=H(),l=Ee(async()=>{const{userSessions:v=[]}=r,I=v.map(C=>()=>w.logoutUser({input:{teamDid:f,appPid:f,userDid:r.did,visitorId:C.visitorId}}));await Cn(I,{concurrency:3,stopOnError:!1})});return t.jsxs(t.Fragment,{children:[O,t.jsx(Pr,{"data-cy":"member-actions",actions:[{icon:t.jsx(he,{fontSize:"small"}),text:p("team.passport.issue"),"data-cy":"action-issue-passport",onClick:v=>{v.stopPropagation(),d(!0)}},({close:v})=>t.jsx(we,{user:r,children:({open:I})=>t.jsxs(Ne,{dense:!0,onClick:C=>{C.stopPropagation(),v(),I(C)},"data-cy":"action-toggle-block",children:[t.jsx(Rr,{style:{minWidth:24,marginRight:8},children:r.approved?t.jsx(We,{}):t.jsx(Ke,{})}),t.jsx(Or,{primary:r.approved?p("team.member.forbidLogin"):p("team.member.allowLogin")})]})},"toggle-approval"),e==="blocklet"&&{icon:t.jsx(Mt,{fontSize:"small"}),text:p("team.member.forceLogout"),onClick:v=>{v.stopPropagation(),R.open({title:p("team.member.forceLogout"),content:p("team.member.forceLogoutDescription"),confirmButtonText:p("common.confirm"),cancelButtonText:p("common.cancel"),onClick:I=>I.stopPropagation(),onConfirm:async()=>{await l(),await R.close(),i()}})}}].filter(Boolean)}),h&&t.jsx(Se,{teamDid:f,ownerDid:r.did,needReceive:Xe(r)===r.did,roles:j,onCancel:()=>d(!1),onSuccess:()=>{s(),d(!1)}})]})}rt.propTypes={type:b.oneOf(["server","blocklet"]).isRequired,user:b.object.isRequired,onIssuePassport:b.func,onRefresh:b.func};rt.defaultProps={onIssuePassport:()=>{},onRefresh:()=>{}};const Ie="$all",jt="$none",De=(e,r)=>{const s=e.find(i=>i.key===r);return(s==null?void 0:s.value)||0},Pn=(e,r)=>{const s=e.passports||[];return s.length?!s.some(i=>{var f;return r.includes((f=i.issuer)==null?void 0:f.id)}):!1};function zt({user:e}){const{t:r}=S.useContext(de),s=t.jsxs("div",{className:"member-block",children:[t.jsxs("div",{className:"member-avatar",children:[t.jsx(mr,{src:`${e.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:e.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!e.approved&&t.jsx("did",{className:"badge-block"}),e.isFromExternal&&t.jsx(ge,{title:r("team.passport.externalPassport"),children:t.jsx(E,{ml:1,className:"icon",children:t.jsx(Ot,{})})})]}),t.jsxs("div",{className:"member-meta",children:[t.jsx("div",{className:"member-text",children:e.fullName}),Array.isArray(e.tags)&&e.tags.length>0&&t.jsx("div",{className:"member-tags",children:e.tags.map(i=>t.jsx(Tt,{style:{background:i.color,color:Ct(i.color),marginRight:4},children:i.title},i.id))})]})]});return e.approved?s:t.jsx(E,{display:"flex",alignItems:"center",children:t.jsx(ge,{title:r("team.member.forbidLoginDescription"),children:s})})}zt.propTypes={user:b.object.isRequired};function Rn({type:e,createPassportSvg:r}){const{confirmApi:s,confirmHolder:i}=Rt({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:f=[]}=St(),{teamDid:j,invitations:O,teamIssuerDid:R,roles:p,refresh:h,enablePassportIssuance:d,endpoint:w,api:l}=Q(),{inService:v,ws:{useSubscription:I}}=H(),{t:C,locale:y}=S.useContext(de),[n,o]=S.useState(!1),[a,c]=S.useState(!1),[u,g]=S.useState(!1),[m,x]=S.useState(!1),[A,U]=S.useState(!1),[z,$]=S.useState([]),[L,Z]=S.useState(),[D,B]=S.useState([]),[me]=Wr({did:void 0}),nt=`members-${j}`,ue=br(nt),[k,oe]=S.useState({role:Ie,searchText:ue.searchText||"",hideBlocked:!1,pageSize:ue.rowsPerPage||10,page:ue.page?ue.page+1:1});lr(async()=>{if(me.did){const{user:P}=await l.getUser({did:me.did});P&&x(P)}});const Ce=(p||[]).map(P=>({name:P.name,title:P.title,num:De(D,P.name)}));Ce.unshift({name:Ie,title:"All Members",num:De(D,Ie)}),Ce.push({name:jt,title:"Other",num:De(D,jt)});const st=()=>{const P={includeTags:!0,includeUserSessions:e==="blocklet"};k.hideBlocked&&(P.approved=!0),P.role=k.role,k.searchText&&(P.search=k.searchText),U(!0),l.getUsers({query:P,paging:{page:k.page,pageSize:k.pageSize}}).then(T=>{U(!1),(T.users||[]).forEach(N=>{N.isFromExternal=Pn(N,ur(f)?[R]:f),N.avatar=Bt(N.avatar,j,v),N.passports=(N.passports||[]).filter(F=>F.issuer)}),$(T.users||[]),Z(T.paging.total)}).catch(T=>{U(!1),se.error(T.message)})},ot=()=>{l.getUsersCountPerRole().then(P=>{B(P.counts||[])}).catch(P=>{se.error(P.message)})},Pe=P=>{P.teamDid===j&&(st(),ot())};S.useEffect(()=>{st()},[`${k.hideBlocked}-${k.role}-${k.page}-${k.pageSize}-${k.searchText}`]),S.useEffect(()=>{ot()},[]),I(le.TeamEvents.userUpdated,Pe,[k]),I(le.TeamEvents.userAdded,Pe,[k]);const Wt=d,qt=Ee(P=>{s.open({title:"User Sessions",content:t.jsx(yr,{user:P,showAction:!1,showUser:!1}),onConfirm(){s.close()},confirmButtonText:C("common.close"),showCancelButton:!1})}),Ht=[{label:C("common.name"),name:"fullName",options:{customBodyRenderLite:P=>{const T=z[P];return t.jsx("div",{"data-cy":`member-name-${T.fullName}`,children:t.jsx(zt,{user:T})},T.did)}}},{label:C("common.address"),name:"did",options:{customBodyRender:P=>t.jsx(_e,{size:14,responsive:!0,copyable:!1,did:P})}},{label:C("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:P=>t.jsx(Pt,{value:P,locale:y})}},{label:C("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:P=>P||"-"}},{label:C("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:P=>{const T=z[P],N=T.sourceProvider||W.USER_TYPE.WALLET,X={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[N]||N;return T.sourceAppPid?`${X} (${C("team.member.federated")})`:X}}},e==="blocklet"&&{label:C("team.member.activeUserSessions"),name:"userSessions",options:{customBodyRenderLite:P=>{var N,F,X;const T=z[P];return t.jsx(dr,{onClick:Yt=>{Yt.stopPropagation(),qt(T)},children:t.jsx(jr,{badgeContent:(N=T==null?void 0:T.userSessions)==null?void 0:N.length,color:((F=T==null?void 0:T.userSessions)==null?void 0:F.length)>0?"primary":"default",sx:((X=T==null?void 0:T.userSessions)==null?void 0:X.length)>0?{}:{".MuiBadge-badge":{backgroundColor:"grey",color:"white"}},showZero:!0,children:t.jsx(gr,{})})})}}},{label:C("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:P=>{const T=z[P];return t.jsx(K,{permission:v?"":"mutate_team",role:v?G:[],children:t.jsx(rt,{type:e,user:T,onIssuePassport:()=>x({...T,initTab:"issuances"}),onRefresh:()=>Pe({teamDid:j})})})}}}].filter(Boolean),Re=[];Wt&&(Re.push(t.jsxs(M,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:()=>{g(!0)},children:[t.jsx(_t,{style:{height:"1em",marginRight:4}}),C("common.inviting"),O.length?` (${O.length})`:""]}),t.jsx(K,{permission:v?"":"mutate_team",role:v?G:[],children:t.jsxs(M,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:()=>o(!0),children:[t.jsx(he,{style:{fontSize:"1.3em",marginRight:4}}),C("team.invite")]})})),e==="server"&&Re.push(t.jsx(K,{role:"owner",children:t.jsxs(M,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:()=>c(!0),children:[t.jsx(fr,{style:{fontSize:"1.3em",marginRight:4}}),C("team.transferNode.name")]})})));const Kt=P=>{A||oe(T=>({...T,role:P,hideBlocked:!1,searchText:"",page:1}))},Vt=P=>{oe(T=>({...T,hideBlocked:P,page:1}))},Qt=({page:P,rowsPerPage:T,searchText:N})=>{k.pageSize!==T?oe(F=>({...F,pageSize:T,page:1})):k.page!==P+1?oe(F=>({...F,page:P+1})):k.searchText!==N&&oe(F=>({...F,searchText:N,page:1}))},it=S.useRef(null),Xt={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(P,{dataIndex:T},N){var F;if((F=it.current)!=null&&F.contains(N.target)){const X=z[T];x(X)}},page:k.page-1,rowsPerPage:k.pageSize,count:L,searchDebounceTime:600};return t.jsxs(On,{children:[i,t.jsxs(E,{className:"main",display:"flex",sx:{mt:v?4:0},children:[t.jsx("div",{className:"left",children:t.jsx("div",{className:"tabs",children:Ce.map(P=>t.jsxs("div",{className:`tab ${k.role===P.name?"active":""}`,onClick:()=>Kt(P.name),children:[t.jsx("span",{className:"text",children:P.title}),t.jsx("span",{className:pr("badge",{"is-rect":P.num>999}),children:P.num})]},P.name))})}),t.jsx("div",{ref:it,className:"right",children:t.jsx(It,{className:"main-table",verticalKeyWidth:100,locale:y,durable:nt,durableKeys:["page","rowsPerPage"],title:t.jsx("div",{className:"table-toolbar-left",children:t.jsx(Ir,{control:t.jsx(Dr,{sx:{display:"flex !important"},disabled:A,color:"primary",checked:k.hideBlocked,onChange:P=>Vt(P.target.checked)}),label:C("team.member.hideBlockedMember")})}),data:z,columns:Ht,customButtons:Re,options:Xt,loading:A,onChange:Qt})})]}),t.jsx(Y,{title:C("common.inviting"),onClose:()=>g(!1),open:u,maxWidth:"lg",fullWidth:!0,children:t.jsx(et,{})}),m&&t.jsx(Ze,{onCancel:()=>x(null),userDid:m.did,createPassportSvg:r,initTab:m.initTab}),n&&t.jsx(Be,{teamDid:j,endpoint:w,roles:p,onCancel:()=>o(!1),onSuccess:()=>{h(),o(!1)}}),a&&t.jsx(Me,{teamDid:j,endpoint:w,roles:p,onCancel:()=>c(!1),onSuccess:()=>{h(),c(!1)}})]})}const On=q.div`
120
120
  .main {
121
121
  .left {
122
122
  width: 168px;
@@ -1,2 +1,2 @@
1
- import{aT as G}from"./index-qSYDZylC.js";class w{constructor(e,t,o){this.property=e,this.normal=t,o&&(this.space=o)}}w.prototype.property={};w.prototype.normal={};w.prototype.space=null;function B(l,e){const t={},o={};let c=-1;for(;++c<l.length;)Object.assign(t,l[c].property),Object.assign(o,l[c].normal);return new w(t,o,e)}function L(l){return l.toLowerCase()}class h{constructor(e,t){this.property=e,this.attribute=t}}h.prototype.space=null;h.prototype.boolean=!1;h.prototype.booleanish=!1;h.prototype.overloadedBoolean=!1;h.prototype.number=!1;h.prototype.commaSeparated=!1;h.prototype.spaceSeparated=!1;h.prototype.commaOrSpaceSeparated=!1;h.prototype.mustUseProperty=!1;h.prototype.defined=!1;let $=0;const r=k(),p=k(),H=k(),n=k(),u=k(),x=k(),g=k();function k(){return 2**++$}const P=Object.freeze(Object.defineProperty({__proto__:null,boolean:r,booleanish:p,commaOrSpaceSeparated:g,commaSeparated:x,number:n,overloadedBoolean:H,spaceSeparated:u},Symbol.toStringTag,{value:"Module"})),C=Object.keys(P);class E extends h{constructor(e,t,o,c){let s=-1;if(super(e,t),R(this,"space",c),typeof o=="number")for(;++s<C.length;){const d=C[s];R(this,C[s],(o&P[d])===P[d])}}}E.prototype.defined=!0;function R(l,e,t){t&&(l[e]=t)}const Z={}.hasOwnProperty;function S(l){const e={},t={};let o;for(o in l.properties)if(Z.call(l.properties,o)){const c=l.properties[o],s=new E(o,l.transform(l.attributes||{},o),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),e[o]=s,t[L(o)]=o,t[L(s.attribute)]=o}return new w(e,t,l.space)}const F=S({space:"xlink",transform(l,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),j=S({space:"xml",transform(l,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function N(l,e){return e in l?l[e]:e}function X(l,e){return N(l,e.toLowerCase())}const _=S({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:X,properties:{xmlns:null,xmlnsXLink:null}}),V=S({transform(l,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:p,ariaAutoComplete:null,ariaBusy:p,ariaChecked:p,ariaColCount:n,ariaColIndex:n,ariaColSpan:n,ariaControls:u,ariaCurrent:null,ariaDescribedBy:u,ariaDetails:null,ariaDisabled:p,ariaDropEffect:u,ariaErrorMessage:null,ariaExpanded:p,ariaFlowTo:u,ariaGrabbed:p,ariaHasPopup:null,ariaHidden:p,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:u,ariaLevel:n,ariaLive:null,ariaModal:p,ariaMultiLine:p,ariaMultiSelectable:p,ariaOrientation:null,ariaOwns:u,ariaPlaceholder:null,ariaPosInSet:n,ariaPressed:p,ariaReadOnly:p,ariaRelevant:null,ariaRequired:p,ariaRoleDescription:u,ariaRowCount:n,ariaRowIndex:n,ariaRowSpan:n,ariaSelected:p,ariaSetSize:n,ariaSort:null,ariaValueMax:n,ariaValueMin:n,ariaValueNow:n,ariaValueText:null,role:null}}),J=S({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:X,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:r,allowPaymentRequest:r,allowUserMedia:r,alt:null,as:null,async:r,autoCapitalize:null,autoComplete:u,autoFocus:r,autoPlay:r,capture:r,charSet:null,checked:r,cite:null,className:u,cols:n,colSpan:null,content:null,contentEditable:p,controls:r,controlsList:u,coords:n|x,crossOrigin:null,data:null,dateTime:null,decoding:null,default:r,defer:r,dir:null,dirName:null,disabled:r,download:H,draggable:p,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:r,formTarget:null,headers:u,height:n,hidden:r,high:n,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:r,itemId:null,itemProp:u,itemRef:u,itemScope:r,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:r,low:n,manifest:null,max:null,maxLength:n,media:null,method:null,min:null,minLength:n,multiple:r,muted:r,name:null,nonce:null,noModule:r,noValidate:r,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:r,optimum:n,pattern:null,ping:u,placeholder:null,playsInline:r,poster:null,preload:null,readOnly:r,referrerPolicy:null,rel:u,required:r,reversed:r,rows:n,rowSpan:n,sandbox:u,scope:null,scoped:r,seamless:r,selected:r,shape:null,size:n,sizes:null,slot:null,span:n,spellCheck:p,src:null,srcDoc:null,srcLang:null,srcSet:null,start:n,step:null,style:null,tabIndex:n,target:null,title:null,translate:null,type:null,typeMustMatch:r,useMap:null,value:p,width:n,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:n,borderColor:null,bottomMargin:n,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:r,declare:r,event:null,face:null,frame:null,frameBorder:null,hSpace:n,leftMargin:n,link:null,longDesc:null,lowSrc:null,marginHeight:n,marginWidth:n,noResize:r,noHref:r,noShade:r,noWrap:r,object:null,profile:null,prompt:null,rev:null,rightMargin:n,rules:null,scheme:null,scrolling:p,standby:null,summary:null,text:null,topMargin:n,valueType:null,version:null,vAlign:null,vLink:null,vSpace:n,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:r,disableRemotePlayback:r,prefix:null,property:null,results:n,security:null,unselectable:null}}),Q=S({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:N,properties:{about:g,accentHeight:n,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:n,amplitude:n,arabicForm:null,ascent:n,attributeName:null,attributeType:null,azimuth:n,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:n,by:null,calcMode:null,capHeight:n,className:u,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:n,diffuseConstant:n,direction:null,display:null,dur:null,divisor:n,dominantBaseline:null,download:r,dx:null,dy:null,edgeMode:null,editable:null,elevation:n,enableBackground:null,end:null,event:null,exponent:n,externalResourcesRequired:null,fill:null,fillOpacity:n,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:x,g2:x,glyphName:x,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:n,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:n,horizOriginX:n,horizOriginY:n,id:null,ideographic:n,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:n,k:n,k1:n,k2:n,k3:n,k4:n,kernelMatrix:g,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:n,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:n,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:n,overlineThickness:n,paintOrder:null,panose1:null,path:null,pathLength:n,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:u,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:n,pointsAtY:n,pointsAtZ:n,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:g,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:g,rev:g,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:g,requiredFeatures:g,requiredFonts:g,requiredFormats:g,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:n,specularExponent:n,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:n,strikethroughThickness:n,string:null,stroke:null,strokeDashArray:g,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:n,strokeOpacity:n,strokeWidth:null,style:null,surfaceScale:n,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:g,tabIndex:n,tableValues:null,target:null,targetX:n,targetY:n,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:g,to:null,transform:null,u1:null,u2:null,underlinePosition:n,underlineThickness:n,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:n,values:null,vAlphabetic:n,vMathematical:n,vectorEffect:null,vHanging:n,vIdeographic:n,version:null,vertAdvY:n,vertOriginX:n,vertOriginY:n,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:n,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),nn=/^data[-\w.:]+$/i,T=/-[a-z]/g,ln=/[A-Z]/g;function kn(l,e){const t=L(e);let o=e,c=h;if(t in l.normal)return l.property[l.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&nn.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(T,on);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!T.test(s)){let d=s.replace(ln,en);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}c=E}return new c(o,e)}function en(l){return"-"+l.toLowerCase()}function on(l){return l.charAt(1).toUpperCase()}const xn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Sn=B([j,F,_,V,J],"html"),wn=B([j,F,_,V,Q],"svg");function bn(l){const e=String(l||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Cn(l){return l.join(" ").trim()}function Ln(l){const e=[],t=String(l||"");let o=t.indexOf(","),c=0,s=!1;for(;!s;){o===-1&&(o=t.length,s=!0);const d=t.slice(c,o).trim();(d||!s)&&e.push(d),c=o+1,o=t.indexOf(",",c)}return e}function Pn(l,e){const t=e||{};return(l[l.length-1]===""?[...l,""]:l).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var O={exports:{}},A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tn=/\n/g,rn=/^\s*/,an=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,un=/^:\s*/,sn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cn=/^[;\s]*/,pn=/^\s+|\s+$/g,dn=`
1
+ import{aT as G}from"./index-vKbwcqV8.js";class w{constructor(e,t,o){this.property=e,this.normal=t,o&&(this.space=o)}}w.prototype.property={};w.prototype.normal={};w.prototype.space=null;function B(l,e){const t={},o={};let c=-1;for(;++c<l.length;)Object.assign(t,l[c].property),Object.assign(o,l[c].normal);return new w(t,o,e)}function L(l){return l.toLowerCase()}class h{constructor(e,t){this.property=e,this.attribute=t}}h.prototype.space=null;h.prototype.boolean=!1;h.prototype.booleanish=!1;h.prototype.overloadedBoolean=!1;h.prototype.number=!1;h.prototype.commaSeparated=!1;h.prototype.spaceSeparated=!1;h.prototype.commaOrSpaceSeparated=!1;h.prototype.mustUseProperty=!1;h.prototype.defined=!1;let $=0;const r=k(),p=k(),H=k(),n=k(),u=k(),x=k(),g=k();function k(){return 2**++$}const P=Object.freeze(Object.defineProperty({__proto__:null,boolean:r,booleanish:p,commaOrSpaceSeparated:g,commaSeparated:x,number:n,overloadedBoolean:H,spaceSeparated:u},Symbol.toStringTag,{value:"Module"})),C=Object.keys(P);class E extends h{constructor(e,t,o,c){let s=-1;if(super(e,t),R(this,"space",c),typeof o=="number")for(;++s<C.length;){const d=C[s];R(this,C[s],(o&P[d])===P[d])}}}E.prototype.defined=!0;function R(l,e,t){t&&(l[e]=t)}const Z={}.hasOwnProperty;function S(l){const e={},t={};let o;for(o in l.properties)if(Z.call(l.properties,o)){const c=l.properties[o],s=new E(o,l.transform(l.attributes||{},o),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),e[o]=s,t[L(o)]=o,t[L(s.attribute)]=o}return new w(e,t,l.space)}const F=S({space:"xlink",transform(l,e){return"xlink:"+e.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),j=S({space:"xml",transform(l,e){return"xml:"+e.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function N(l,e){return e in l?l[e]:e}function X(l,e){return N(l,e.toLowerCase())}const _=S({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:X,properties:{xmlns:null,xmlnsXLink:null}}),V=S({transform(l,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:p,ariaAutoComplete:null,ariaBusy:p,ariaChecked:p,ariaColCount:n,ariaColIndex:n,ariaColSpan:n,ariaControls:u,ariaCurrent:null,ariaDescribedBy:u,ariaDetails:null,ariaDisabled:p,ariaDropEffect:u,ariaErrorMessage:null,ariaExpanded:p,ariaFlowTo:u,ariaGrabbed:p,ariaHasPopup:null,ariaHidden:p,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:u,ariaLevel:n,ariaLive:null,ariaModal:p,ariaMultiLine:p,ariaMultiSelectable:p,ariaOrientation:null,ariaOwns:u,ariaPlaceholder:null,ariaPosInSet:n,ariaPressed:p,ariaReadOnly:p,ariaRelevant:null,ariaRequired:p,ariaRoleDescription:u,ariaRowCount:n,ariaRowIndex:n,ariaRowSpan:n,ariaSelected:p,ariaSetSize:n,ariaSort:null,ariaValueMax:n,ariaValueMin:n,ariaValueNow:n,ariaValueText:null,role:null}}),J=S({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:X,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:r,allowPaymentRequest:r,allowUserMedia:r,alt:null,as:null,async:r,autoCapitalize:null,autoComplete:u,autoFocus:r,autoPlay:r,capture:r,charSet:null,checked:r,cite:null,className:u,cols:n,colSpan:null,content:null,contentEditable:p,controls:r,controlsList:u,coords:n|x,crossOrigin:null,data:null,dateTime:null,decoding:null,default:r,defer:r,dir:null,dirName:null,disabled:r,download:H,draggable:p,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:r,formTarget:null,headers:u,height:n,hidden:r,high:n,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:r,itemId:null,itemProp:u,itemRef:u,itemScope:r,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:r,low:n,manifest:null,max:null,maxLength:n,media:null,method:null,min:null,minLength:n,multiple:r,muted:r,name:null,nonce:null,noModule:r,noValidate:r,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:r,optimum:n,pattern:null,ping:u,placeholder:null,playsInline:r,poster:null,preload:null,readOnly:r,referrerPolicy:null,rel:u,required:r,reversed:r,rows:n,rowSpan:n,sandbox:u,scope:null,scoped:r,seamless:r,selected:r,shape:null,size:n,sizes:null,slot:null,span:n,spellCheck:p,src:null,srcDoc:null,srcLang:null,srcSet:null,start:n,step:null,style:null,tabIndex:n,target:null,title:null,translate:null,type:null,typeMustMatch:r,useMap:null,value:p,width:n,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:n,borderColor:null,bottomMargin:n,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:r,declare:r,event:null,face:null,frame:null,frameBorder:null,hSpace:n,leftMargin:n,link:null,longDesc:null,lowSrc:null,marginHeight:n,marginWidth:n,noResize:r,noHref:r,noShade:r,noWrap:r,object:null,profile:null,prompt:null,rev:null,rightMargin:n,rules:null,scheme:null,scrolling:p,standby:null,summary:null,text:null,topMargin:n,valueType:null,version:null,vAlign:null,vLink:null,vSpace:n,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:r,disableRemotePlayback:r,prefix:null,property:null,results:n,security:null,unselectable:null}}),Q=S({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:N,properties:{about:g,accentHeight:n,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:n,amplitude:n,arabicForm:null,ascent:n,attributeName:null,attributeType:null,azimuth:n,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:n,by:null,calcMode:null,capHeight:n,className:u,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:n,diffuseConstant:n,direction:null,display:null,dur:null,divisor:n,dominantBaseline:null,download:r,dx:null,dy:null,edgeMode:null,editable:null,elevation:n,enableBackground:null,end:null,event:null,exponent:n,externalResourcesRequired:null,fill:null,fillOpacity:n,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:x,g2:x,glyphName:x,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:n,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:n,horizOriginX:n,horizOriginY:n,id:null,ideographic:n,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:n,k:n,k1:n,k2:n,k3:n,k4:n,kernelMatrix:g,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:n,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:n,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:n,overlineThickness:n,paintOrder:null,panose1:null,path:null,pathLength:n,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:u,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:n,pointsAtY:n,pointsAtZ:n,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:g,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:g,rev:g,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:g,requiredFeatures:g,requiredFonts:g,requiredFormats:g,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:n,specularExponent:n,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:n,strikethroughThickness:n,string:null,stroke:null,strokeDashArray:g,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:n,strokeOpacity:n,strokeWidth:null,style:null,surfaceScale:n,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:g,tabIndex:n,tableValues:null,target:null,targetX:n,targetY:n,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:g,to:null,transform:null,u1:null,u2:null,underlinePosition:n,underlineThickness:n,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:n,values:null,vAlphabetic:n,vMathematical:n,vectorEffect:null,vHanging:n,vIdeographic:n,version:null,vertAdvY:n,vertOriginX:n,vertOriginY:n,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:n,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),nn=/^data[-\w.:]+$/i,T=/-[a-z]/g,ln=/[A-Z]/g;function kn(l,e){const t=L(e);let o=e,c=h;if(t in l.normal)return l.property[l.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&nn.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(T,on);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!T.test(s)){let d=s.replace(ln,en);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}c=E}return new c(o,e)}function en(l){return"-"+l.toLowerCase()}function on(l){return l.charAt(1).toUpperCase()}const xn={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Sn=B([j,F,_,V,J],"html"),wn=B([j,F,_,V,Q],"svg");function bn(l){const e=String(l||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Cn(l){return l.join(" ").trim()}function Ln(l){const e=[],t=String(l||"");let o=t.indexOf(","),c=0,s=!1;for(;!s;){o===-1&&(o=t.length,s=!0);const d=t.slice(c,o).trim();(d||!s)&&e.push(d),c=o+1,o=t.indexOf(",",c)}return e}function Pn(l,e){const t=e||{};return(l[l.length-1]===""?[...l,""]:l).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var O={exports:{}},A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tn=/\n/g,rn=/^\s*/,an=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,un=/^:\s*/,sn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cn=/^[;\s]*/,pn=/^\s+|\s+$/g,dn=`
2
2
  `,I="/",U="*",y="",gn="comment",hn="declaration",mn=function(l,e){if(typeof l!="string")throw new TypeError("First argument must be a string");if(!l)return[];e=e||{};var t=1,o=1;function c(i){var a=i.match(tn);a&&(t+=a.length);var m=i.lastIndexOf(dn);o=~m?i.length-m:o+i.length}function s(){var i={line:t,column:o};return function(a){return a.position=new d(i),b(),a}}function d(i){this.start=i,this.end={line:t,column:o},this.source=e.source}d.prototype.content=l;function v(i){var a=new Error(e.source+":"+t+":"+o+": "+i);if(a.reason=i,a.filename=e.source,a.line=t,a.column=o,a.source=l,!e.silent)throw a}function f(i){var a=i.exec(l);if(a){var m=a[0];return c(m),l=l.slice(m.length),a}}function b(){f(rn)}function M(i){var a;for(i=i||[];a=D();)a!==!1&&i.push(a);return i}function D(){var i=s();if(!(I!=l.charAt(0)||U!=l.charAt(1))){for(var a=2;y!=l.charAt(a)&&(U!=l.charAt(a)||I!=l.charAt(a+1));)++a;if(a+=2,y===l.charAt(a-1))return v("End of comment missing");var m=l.slice(2,a-2);return o+=2,c(m),l=l.slice(a),o+=2,i({type:gn,comment:m})}}function K(){var i=s(),a=f(an);if(a){if(D(),!f(un))return v("property missing ':'");var m=f(sn),q=i({type:hn,property:z(a[0].replace(A,y)),value:m?z(m[0].replace(A,y)):y});return f(cn),q}}function Y(){var i=[];M(i);for(var a;a=K();)a!==!1&&(i.push(a),M(i));return i}return b(),Y()};function z(l){return l?l.replace(pn,y):y}var fn=mn;function W(l,e){var t=null;if(!l||typeof l!="string")return t;for(var o,c=fn(l),s=typeof e=="function",d,v,f=0,b=c.length;f<b;f++)o=c[f],d=o.property,v=o.value,s?e(d,v,o):v&&(t||(t={}),t[d]=v);return t}O.exports=W;O.exports.default=W;var vn=O.exports;const En=G(vn),On={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mn(l){const e=l&&typeof l=="object"&&l.type==="text"?l.value||"":l;return typeof e=="string"&&e.replace(/[ \t\n\f\r]/g,"")===""}export{En as S,Pn as a,Cn as b,xn as c,Mn as d,Ln as e,kn as f,Sn as h,L as n,bn as p,wn as s,On as w};
@@ -1,4 +1,4 @@
1
- import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as _,aH as C,bo as ee,B as w,X as W}from"./index-qSYDZylC.js";import{E as D}from"./fallback-stZRYYBF.js";import{R as oe,N as ne}from"./index-eHiuO6FO.js";import{i as te,a as re,B as G,S as ie,u as ae,f as K,g as R,p as se,m as Q,b as le,c as pe,H as de}from"./index-3gq6XeKX.js";import{d as ce}from"./ExpandMore-V-R7JsGL.js";import{A}from"./Avatar-xLWc5S5b.js";function N({icon:e,size:t,sx:r,...a}){const i=[...Array.isArray(r)?r:[r]];if(t&&i.push({width:t,height:t}),a.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),te(e))return n.jsx(A,{as:"span",...a,src:e,sx:i});if(re(e)){const u=t?.6*t+4:0;return n.jsx(A,{as:"span",...a,sx:i,children:n.jsx("iconify-icon",{icon:e,height:u||void 0})})}return e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),n.jsx(A,{as:"span",...a,sx:i,children:Array.from(e)[0]})):null}N.propTypes={icon:o.string.isRequired,size:o.number,sx:o.oneOfType([o.array,o.func,o.object])};N.defaultProps={size:null,sx:null};const ue=z();function S({theme:e,children:t}){const r=e?z(e):ue;return n.jsx(Z,{theme:r,children:t})}S.propTypes={children:o.any.isRequired,theme:o.object};S.defaultProps={theme:null};const fe=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const a=Q(e,s=>{var d,c;const p=s.icon?n.jsx(N,{icon:s.icon}):null;if(s.items)return{id:`${t++}`,label:s.title,icon:p,children:s.items};let l={};return((d=s.link)!=null&&d.startsWith("http://")||(c=s.link)!=null&&c.startsWith("https://"))&&(l={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:n.jsx("a",{href:s.link,...l,children:s.title}),icon:p,link:s.link}},"items"),i=le(a),u=pe(i.map(s=>s.link));return{navItems:a,activeId:u>=0?i[u].id:null}};function P({meta:e,addons:t,sessionManagerProps:r,homeLink:a,theme:i,hideNavMenu:u,...s}){var h,M;ae();const{locale:p}=B()||{},l=$.useMemo(()=>{const j=Object.assign({},window.blocklet,e);try{return K(j)}catch(J){return console.error("Failed to format blocklet info",J,j),j}},[e]);if(!l.appName)return null;const{appLogo:d,appLogoRect:c,theme:m}=l,f=R((h=l==null?void 0:l.navigation)==null?void 0:h.header,p),y=fe(f),{navItems:g,activeId:k}=y,v=typeof t=="function"?j=>t(j,{navigation:y}):t,x=n.jsx(de,{formattedBlocklet:l,addons:v,sessionManagerProps:r});return n.jsx(S,{theme:i,children:n.jsx(he,{homeLink:a,logo:n.jsx("img",{src:c||d,alt:"logo"}),addons:x,..._(s,["bordered"]),$bordered:s==null?void 0:s.bordered,$bgcolor:(M=m==null?void 0:m.background)==null?void 0:M.header,children:u||!(g!=null&&g.length)?null:({isMobile:j})=>n.jsx(ne,{mode:j?"inline":"horizontal",activeId:k,items:g,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}P.propTypes={meta:G,addons:o.oneOfType([o.func,o.node]),sessionManagerProps:ie,homeLink:o.string,theme:o.object,hideNavMenu:o.bool};P.defaultProps={meta:{},addons:null,sessionManagerProps:{showRole:!0},homeLink:se,theme:null,hideNavMenu:!1};const he=b(oe)`
1
+ import{P as o,j as n,d6 as z,d7 as Z,d8 as U,bP as b,G as q,u as B,r as $,d9 as _,aH as P,bn as ee,B as w,X as W}from"./index-vKbwcqV8.js";import{E as D}from"./fallback-7236Dku-.js";import{R as oe,N as ne}from"./index-1EGGKHCq.js";import{i as te,a as re,B as G,S as ie,u as ae,f as K,g as R,p as se,m as V,b as le,c as pe,H as de}from"./index-mbI6KzKO.js";import{d as ce}from"./ExpandMore-eZlZGcH3.js";import{A}from"./Avatar-uCUhCf_X.js";function N({icon:e,size:t,sx:r,...a}){const i=[...Array.isArray(r)?r:[r]];if(t&&i.push({width:t,height:t}),a.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),te(e))return n.jsx(A,{as:"span",...a,src:e,sx:i});if(re(e)){const u=t?.6*t+4:0;return n.jsx(A,{as:"span",...a,sx:i,children:n.jsx("iconify-icon",{icon:e,height:u||void 0})})}return e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),n.jsx(A,{as:"span",...a,sx:i,children:Array.from(e)[0]})):null}N.propTypes={icon:o.string.isRequired,size:o.number,sx:o.oneOfType([o.array,o.func,o.object])};N.defaultProps={size:null,sx:null};const ue=z();function S({theme:e,children:t}){const r=e?z(e):ue;return n.jsx(Z,{theme:r,children:t})}S.propTypes={children:o.any.isRequired,theme:o.object};S.defaultProps={theme:null};const fe=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const a=V(e,s=>{var d,c;const p=s.icon?n.jsx(N,{icon:s.icon}):null;if(s.items)return{id:`${t++}`,label:s.title,icon:p,children:s.items};let l={};return((d=s.link)!=null&&d.startsWith("http://")||(c=s.link)!=null&&c.startsWith("https://"))&&(l={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:n.jsx("a",{href:s.link,...l,children:s.title}),icon:p,link:s.link}},"items"),i=le(a),u=pe(i.map(s=>s.link));return{navItems:a,activeId:u>=0?i[u].id:null}};function C({meta:e,addons:t,sessionManagerProps:r,homeLink:a,theme:i,hideNavMenu:u,...s}){var h,M;ae();const{locale:p}=B()||{},l=$.useMemo(()=>{const j=Object.assign({},window.blocklet,e);try{return K(j)}catch(Q){return console.error("Failed to format blocklet info",Q,j),j}},[e]);if(!l.appName)return null;const{appLogo:d,appLogoRect:c,theme:m}=l,f=R((h=l==null?void 0:l.navigation)==null?void 0:h.header,p),y=fe(f),{navItems:g,activeId:k}=y,v=typeof t=="function"?j=>t(j,{navigation:y}):t,x=n.jsx(de,{formattedBlocklet:l,addons:v,sessionManagerProps:r});return n.jsx(S,{theme:i,children:n.jsx(he,{homeLink:a,logo:n.jsx("img",{src:c||d,alt:"logo"}),addons:x,..._(s,["bordered"]),$bordered:s==null?void 0:s.bordered,$bgcolor:(M=m==null?void 0:m.background)==null?void 0:M.header,children:u||!(g!=null&&g.length)?null:({isMobile:j})=>n.jsx(ne,{mode:j?"inline":"horizontal",activeId:k,items:g,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}C.propTypes={meta:G,addons:o.oneOfType([o.func,o.node]),sessionManagerProps:ie,homeLink:o.string,theme:o.object,hideNavMenu:o.bool};C.defaultProps={meta:{},addons:null,sessionManagerProps:{showRole:!0},homeLink:se,theme:null,hideNavMenu:!1};const he=b(oe)`
2
2
  ${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
3
3
  font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
4
4
  'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@@ -31,7 +31,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
31
31
  height: 20px;
32
32
  }
33
33
  }
34
- `,Te=U(P,{FallbackComponent:D});function F({name:e,logo:t,description:r,...a}){if(!e&&!t&&!r)return null;const i=$.isValidElement(t)?t:n.jsx("img",{src:t,alt:e});return n.jsxs(me,{...a,children:[n.jsxs("div",{children:[t&&n.jsx("div",{className:"footer-brand-logo",children:i}),e&&n.jsx("div",{className:"footer-brand-name",children:e})]}),r&&n.jsx("div",{className:"footer-brand-desc",children:r})]})}F.propTypes={name:o.node,logo:o.node,description:o.string};F.defaultProps={name:"",logo:"",description:""};const me=b("div")`
34
+ `,Te=U(C,{FallbackComponent:D});function F({name:e,logo:t,description:r,...a}){if(!e&&!t&&!r)return null;const i=$.isValidElement(t)?t:n.jsx("img",{src:t,alt:e});return n.jsxs(me,{...a,children:[n.jsxs("div",{children:[t&&n.jsx("div",{className:"footer-brand-logo",children:i}),e&&n.jsx("div",{className:"footer-brand-name",children:e})]}),r&&n.jsx("div",{className:"footer-brand-desc",children:r})]})}F.propTypes={name:o.node,logo:o.node,description:o.string};F.defaultProps={name:"",logo:"",description:""};const me=b("div")`
35
35
  display: flex;
36
36
  flex-direction: column;
37
37
  font-size: 14px;
@@ -76,7 +76,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
76
76
  }
77
77
  }
78
78
  }
79
- `;function I({links:e,flowLayout:t,...r}){const[a,i]=$.useState(-1);if(!(e!=null&&e.length))return null;const u=e.some(p=>{var l;return(l=p.items)==null?void 0:l.length}),s=({label:p,link:l,icon:d,render:c,props:m})=>{let f=p;return c?f=c({label:p,link:l,props:m}):l&&(f=n.jsx("a",{href:l,"aria-label":`Footer link for ${p}`,...m,children:p})),n.jsxs(n.Fragment,{children:[d&&n.jsx(N,{icon:d,size:20,sx:{mr:.5}}),f]})};return n.jsx(ge,{...r,className:C(r.className,{"footer-links--grouped":u,"footer-links--flow":t}),children:n.jsxs("div",{className:"footer-links-inner",children:[t&&e.map((p,l)=>n.jsx("span",{className:"footer-links-item",children:s(p)},l)),!t&&e.map((p,l)=>{const{items:d}=p,c=l===a;return n.jsxs("div",{className:C("footer-links-group",{"footer-links-group--active":c}),onClick:()=>i(a===l?-1:l),children:[n.jsxs("span",{className:"footer-links-item",children:[s(p),!!(d!=null&&d.length)&&n.jsx("span",{className:"footer-links-group-expand-icon",children:n.jsx(ce,{style:{transform:`rotate(${c?180:0}deg)`}})})]}),!!(d!=null&&d.length)&&n.jsx("div",{className:"footer-links-sub",children:d.map((m,f)=>n.jsx("span",{className:"footer-links-item",children:s(m)},f))})]},l)})]})})}I.propTypes={links:o.arrayOf(o.shape({label:o.string,link:o.string,render:o.func,props:o.object})),flowLayout:o.bool};I.defaultProps={links:[],flowLayout:!1};const ge=b("div")`
79
+ `;function I({links:e,flowLayout:t,...r}){const[a,i]=$.useState(-1);if(!(e!=null&&e.length))return null;const u=e.some(p=>{var l;return(l=p.items)==null?void 0:l.length}),s=({label:p,link:l,icon:d,render:c,props:m})=>{let f=p;return c?f=c({label:p,link:l,props:m}):l&&(f=n.jsx("a",{href:l,"aria-label":`Footer link for ${p}`,...m,children:p})),n.jsxs(n.Fragment,{children:[d&&n.jsx(N,{icon:d,size:20,sx:{mr:.5}}),f]})};return n.jsx(ge,{...r,className:P(r.className,{"footer-links--grouped":u,"footer-links--flow":t}),children:n.jsxs("div",{className:"footer-links-inner",children:[t&&e.map((p,l)=>n.jsx("span",{className:"footer-links-item",children:s(p)},l)),!t&&e.map((p,l)=>{const{items:d}=p,c=l===a;return n.jsxs("div",{className:P("footer-links-group",{"footer-links-group--active":c}),onClick:()=>i(a===l?-1:l),children:[n.jsxs("span",{className:"footer-links-item",children:[s(p),!!(d!=null&&d.length)&&n.jsx("span",{className:"footer-links-group-expand-icon",children:n.jsx(ce,{style:{transform:`rotate(${c?180:0}deg)`}})})]}),!!(d!=null&&d.length)&&n.jsx("div",{className:"footer-links-sub",children:d.map((m,f)=>n.jsx("span",{className:"footer-links-item",children:s(m)},f))})]},l)})]})})}I.propTypes={links:o.arrayOf(o.shape({label:o.string,link:o.string,render:o.func,props:o.object})),flowLayout:o.bool};I.defaultProps={links:[],flowLayout:!1};const ge=b("div")`
80
80
  overflow: hidden;
81
81
  color: ${e=>e.theme.palette.grey[600]};
82
82
  .footer-links-inner {
@@ -220,7 +220,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
220
220
  align-items: center;
221
221
  margin: 0;
222
222
  font-size: 13px;
223
- `;function T({children:e,autoCenter:t,...r}){return e?n.jsx(ye,{...r,className:C(r.className,{"footer-row-auto-center":t}),children:e}):null}T.propTypes={children:o.any,autoCenter:o.bool};T.defaultProps={children:null,autoCenter:!1};const ye=b(w)`
223
+ `;function T({children:e,autoCenter:t,...r}){return e?n.jsx(ye,{...r,className:P(r.className,{"footer-row-auto-center":t}),children:e}):null}T.propTypes={children:o.any,autoCenter:o.bool};T.defaultProps={children:null,autoCenter:!1};const ye=b(w)`
224
224
  display: flex;
225
225
  justify-content: space-between;
226
226
  & + & {
@@ -241,7 +241,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
241
241
  margin: 0 auto;
242
242
  }
243
243
  }
244
- `;function V({elements:e,data:t,...r}){var a;return n.jsx(ke,{...r,children:n.jsxs(W,{children:[n.jsxs(w,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[n.jsx(w,{children:e.brand}),n.jsx(w,{lineHeight:1,children:e.socialMedia})]}),!!((a=t.navigation)!=null&&a.length)&&n.jsx(w,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:e.navigation}),n.jsxs(T,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[e.copyright,e.links]})]})})}V.propTypes={elements:o.shape({brand:o.element,navigation:o.element,socialMedia:o.element,copyright:o.element,links:o.element}).isRequired,data:o.object.isRequired};const ke=b("div")`
244
+ `;function X({elements:e,data:t,...r}){var a;return n.jsx(ke,{...r,children:n.jsxs(W,{children:[n.jsxs(w,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[n.jsx(w,{children:e.brand}),n.jsx(w,{lineHeight:1,children:e.socialMedia})]}),!!((a=t.navigation)!=null&&a.length)&&n.jsx(w,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:e.navigation}),n.jsxs(T,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[e.copyright,e.links]})]})})}X.propTypes={elements:o.shape({brand:o.element,navigation:o.element,socialMedia:o.element,copyright:o.element,links:o.element}).isRequired,data:o.object.isRequired};const ke=b("div")`
245
245
  padding: 32px 0 24px 0;
246
246
  .footer-brand-name,
247
247
  .footer-brand-desc {
@@ -250,7 +250,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
250
250
  && .footer-brand-logo {
251
251
  margin-right: 0;
252
252
  }
253
- `;function X({elements:e,data:t,...r}){return n.jsx(ve,{...r,children:n.jsxs(W,{className:"plain-layout-container",children:[!!t.links&&n.jsxs(T,{sx:{width:1},autoCenter:!0,children:[e.copyright,e.links]}),!t.links&&n.jsxs(n.Fragment,{children:[$.cloneElement(e.brand,{name:null,description:null}),e.copyright]})]})})}X.propTypes={elements:o.shape({brand:o.element,navigation:o.element,socialMedia:o.element,copyright:o.element,links:o.element}).isRequired,data:o.object.isRequired};const ve=b("div")`
253
+ `;function Y({elements:e,data:t,...r}){return n.jsx(ve,{...r,children:n.jsxs(W,{className:"plain-layout-container",children:[!!t.links&&n.jsxs(T,{sx:{width:1},autoCenter:!0,children:[e.copyright,e.links]}),!t.links&&n.jsxs(n.Fragment,{children:[$.cloneElement(e.brand,{name:null,description:null}),e.copyright]})]})})}Y.propTypes={elements:o.shape({brand:o.element,navigation:o.element,socialMedia:o.element,copyright:o.element,links:o.element}).isRequired,data:o.object.isRequired};const ve=b("div")`
254
254
  padding: 24px 0;
255
255
  .plain-layout-container {
256
256
  display: flex;
@@ -259,7 +259,7 @@ import{P as o,j as n,d7 as z,d8 as Z,d9 as U,bQ as b,G as q,u as B,r as $,da as
259
259
  flex-wrap: wrap;
260
260
  gap: 8px;
261
261
  }
262
- `,Y=[{name:"plain",support:(e,t)=>{var r,a;return!((r=t.navigation)!=null&&r.length)&&!((a=t.socialMedia)!=null&&a.length)},component:X},{name:"standard",support:()=>!0,component:V}],je=Y.reduce((e,t)=>({...e,[t.name]:t}),{});function H(e){var k,v;const{brand:t,navigation:r,socialMedia:a,copyright:i,links:u,layout:s,...p}=e,l=()=>t?n.jsx(F,{...t}):null,d=()=>r!=null&&r.length?n.jsx(I,{links:r}):null,c=()=>a!=null&&a.length?n.jsx(L,{items:a}):null,m=()=>{const x=(i==null?void 0:i.owner)||(t==null?void 0:t.name);return x?n.jsx(E,{owner:x,year:(i==null?void 0:i.year)||void 0}):null},f=()=>u!=null&&u.length?n.jsx(I,{flowLayout:!0,links:u}):null,y={brand:l(),navigation:d(),socialMedia:c(),copyright:m(),links:f()};let g=null;if(s==="auto"?g=Y.find(x=>x.support(y,e)).component:g=(k=je[s])==null?void 0:k.component,!g)throw new Error(`layout ${s} is not supported.`);return n.jsxs(w,{position:"relative",...p,children:[n.jsx(g,{elements:y,data:e}),n.jsx(w,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:(v=window==null?void 0:window.blocklet)==null?void 0:v.version})]})}H.propTypes={brand:o.shape({name:o.node,description:o.string,logo:o.node}),navigation:o.arrayOf(o.shape({label:o.node,link:o.string})),socialMedia:o.arrayOf(o.shape({icon:o.node,link:o.string})),copyright:o.shape({owner:o.string,year:o.oneOfType([o.string,o.number])}),links:o.arrayOf(o.shape({label:o.node,link:o.string})),layout:o.oneOf(["auto","standard","plain"])};H.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};function O({meta:e,theme:t,...r}){var g,k,v,x;const{locale:a}=B()||{},i=$.useMemo(()=>{const h=Object.assign({},window.blocklet,e);try{return K(h)}catch(M){return console.error("Failed to format blocklet info",M,h),h}},[e]);if(!i.appName)return null;const{appLogo:u,appLogoRect:s,appName:p,appDescription:l,description:d,theme:c,copyright:m}=i,f={footerNav:R((g=i==null?void 0:i.navigation)==null?void 0:g.footer,a)||[],socialMedia:R((k=i==null?void 0:i.navigation)==null?void 0:k.social,a)||[],links:R((v=i==null?void 0:i.navigation)==null?void 0:v.bottom,a)||[]},y={brand:{name:p,description:l||d,logo:s||u},navigation:Q(f.footerNav,h=>({...h,label:h.title,link:h.link}),"items"),copyright:m,socialMedia:f.socialMedia,links:f.links.map(h=>({...h,label:h.title}))};return n.jsx(S,{theme:t,children:n.jsx(we,{...y,..._(r,["bordered"]),$bordered:r==null?void 0:r.bordered,$bgcolor:(x=c==null?void 0:c.background)==null?void 0:x.footer})})}O.propTypes={meta:G,theme:o.object};O.defaultProps={meta:{},theme:null};const we=b(H)`
262
+ `,J=[{name:"plain",support:(e,t)=>{var r,a;return!((r=t.navigation)!=null&&r.length)&&!((a=t.socialMedia)!=null&&a.length)},component:Y},{name:"standard",support:()=>!0,component:X}],je=J.reduce((e,t)=>({...e,[t.name]:t}),{});function H(e){var k,v;const{brand:t,navigation:r,socialMedia:a,copyright:i,links:u,layout:s,...p}=e,l=()=>t?n.jsx(F,{...t}):null,d=()=>r!=null&&r.length?n.jsx(I,{links:r}):null,c=()=>a!=null&&a.length?n.jsx(L,{items:a}):null,m=()=>{const x=(i==null?void 0:i.owner)||(t==null?void 0:t.name);return x?n.jsx(E,{owner:x,year:(i==null?void 0:i.year)||void 0}):null},f=()=>u!=null&&u.length?n.jsx(I,{flowLayout:!0,links:u}):null,y={brand:l(),navigation:d(),socialMedia:c(),copyright:m(),links:f()};let g=null;if(s==="auto"?g=J.find(x=>x.support(y,e)).component:g=(k=je[s])==null?void 0:k.component,!g)throw new Error(`layout ${s} is not supported.`);return n.jsxs(w,{position:"relative",...p,children:[n.jsx(g,{elements:y,data:e}),n.jsx(w,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:(v=window==null?void 0:window.blocklet)==null?void 0:v.version})]})}H.propTypes={brand:o.shape({name:o.node,description:o.string,logo:o.node}),navigation:o.arrayOf(o.shape({label:o.node,link:o.string})),socialMedia:o.arrayOf(o.shape({icon:o.node,link:o.string})),copyright:o.shape({owner:o.string,year:o.oneOfType([o.string,o.number])}),links:o.arrayOf(o.shape({label:o.node,link:o.string})),layout:o.oneOf(["auto","standard","plain"])};H.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};function O({meta:e,theme:t,...r}){var g,k,v,x;const{locale:a}=B()||{},i=$.useMemo(()=>{const h=Object.assign({},window.blocklet,e);try{return K(h)}catch(M){return console.error("Failed to format blocklet info",M,h),h}},[e]);if(!i.appName)return null;const{appLogo:u,appLogoRect:s,appName:p,appDescription:l,description:d,theme:c,copyright:m}=i,f={footerNav:R((g=i==null?void 0:i.navigation)==null?void 0:g.footer,a)||[],socialMedia:R((k=i==null?void 0:i.navigation)==null?void 0:k.social,a)||[],links:R((v=i==null?void 0:i.navigation)==null?void 0:v.bottom,a)||[]},y={brand:{name:p,description:l||d,logo:s||u},navigation:V(f.footerNav,h=>({...h,label:h.title,link:h.link}),"items"),copyright:m,socialMedia:f.socialMedia,links:f.links.map(h=>({...h,label:h.title}))};return n.jsx(S,{theme:t,children:n.jsx(we,{...y,..._(r,["bordered"]),$bordered:r==null?void 0:r.bordered,$bgcolor:(x=c==null?void 0:c.background)==null?void 0:x.footer})})}O.propTypes={meta:G,theme:o.object};O.defaultProps={meta:{},theme:null};const we=b(H)`
263
263
  ${({$bordered:e})=>`border-top: 1px solid ${e?q.strokeSep:"#eee"};`}
264
264
  color: ${e=>e.theme.palette.grey[600]};
265
265
  ${({$bgcolor:e})=>e&&`background-color: ${e};`}