@abtnode/webapp 1.16.29-beta-88bdefe8 → 1.16.29-beta-db5c4ed6

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 (180) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-C7T4l8Gn.js → Add-DQn3cqMW.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-xKgJDEqt.js → ArrowDropDown-DgSq2iBW.js} +1 -1
  5. package/dist/assets/{Autocomplete-C3WalQVV.js → Autocomplete-D45bpyUt.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-DiRwLDj9.js → Breadcrumbs-vXPlhiXQ.js} +1 -1
  7. package/dist/assets/{ButtonGroup-9uv0Ooq-.js → ButtonGroup-BJxZnIfi.js} +1 -1
  8. package/dist/assets/{CheckCircle-BAlxEMPQ.js → CheckCircle-CSrK3P5m.js} +1 -1
  9. package/dist/assets/{ChevronLeft-CgKR1kBR.js → ChevronLeft-Cka_f59Q.js} +1 -1
  10. package/dist/assets/{ChevronRight-BaIDXj-9.js → ChevronRight-BGYzd2RP.js} +1 -1
  11. package/dist/assets/{Close-DezaeAwH.js → Close-CwmvmaYY.js} +1 -1
  12. package/dist/assets/{Delete-BowxIQ2G.js → Delete-DD7mLtbV.js} +1 -1
  13. package/dist/assets/DeleteOutline-Cb2SX8N_.js +1 -0
  14. package/dist/assets/{Done-CU5E5wfS.js → Done-DwujAils.js} +1 -1
  15. package/dist/assets/{Edit-C8H0dz0H.js → Edit-C50TQSDX.js} +1 -1
  16. package/dist/assets/{EditIcon-CVWLBr12.js → EditIcon-kalr65uP.js} +1 -1
  17. package/dist/assets/{FilterList-Cg3ZLCqO.js → FilterList-DQ4qv4dK.js} +1 -1
  18. package/dist/assets/{Google-C4EY8MZF.js → Google-3BfCV8G_.js} +1 -1
  19. package/dist/assets/{Https-fzXY6T48.js → Https-BmyDNa7Y.js} +1 -1
  20. package/dist/assets/{InputAdornment-DEjon0jx.js → InputAdornment-Ca2Af6jh.js} +1 -1
  21. package/dist/assets/{InputLabel--N-sf10A.js → InputLabel-D4R09Jce.js} +1 -1
  22. package/dist/assets/{LastPage-Bxb1l4rW.js → LastPage-GxCoDWrp.js} +1 -1
  23. package/dist/assets/{Launch-BYR-opH7.js → Launch-CgKKCuVE.js} +1 -1
  24. package/dist/assets/{Link-S1oS3eUR.js → Link-DRvMIooJ.js} +1 -1
  25. package/dist/assets/{LoadingButton-B4rGIi7i.js → LoadingButton-BkYiSDzb.js} +1 -1
  26. package/dist/assets/{LockIcon-C2Y-MNOG.js → LockIcon-CF3-It7s.js} +1 -1
  27. package/dist/assets/{Loop-D3gmJHoj.js → Loop-z2LWMmIN.js} +1 -1
  28. package/dist/assets/{MoreVert-D9URE0XQ.js → MoreVert-DUbpisWb.js} +1 -1
  29. package/dist/assets/{Pagination-Dm9dYmcU.js → Pagination-R49NcVMS.js} +1 -1
  30. package/dist/assets/{Public-De2nIgej.js → Public-Bsj8SC7o.js} +1 -1
  31. package/dist/assets/{SchemaReference.es-DrQygD3_.js → SchemaReference.es-iQvrSN65.js} +1 -1
  32. package/dist/assets/{Search-Cc01SYnZ.js → Search-BJQlC2tf.js} +1 -1
  33. package/dist/assets/{Select-DoQcGrX-.js → Select-Dir7Eleh.js} +1 -1
  34. package/dist/assets/{Skeleton-CIWFpRU-.js → Skeleton-C1foIJDy.js} +1 -1
  35. package/dist/assets/{Slider-DRcICbfc.js → Slider-DUhMdZ8E.js} +1 -1
  36. package/dist/assets/{Stepper-BRAY6Izr.js → Stepper-BmHFaVU-.js} +1 -1
  37. package/dist/assets/{TextField-C9bTzhlw.js → TextField-DrpVwtbW.js} +1 -1
  38. package/dist/assets/{ToggleButtonGroup-puPvtUnk.js → ToggleButtonGroup-B-GBbZiA.js} +1 -1
  39. package/dist/assets/{ViewList-CvkmEUQS.js → ViewList-Du_jkxCT.js} +1 -1
  40. package/dist/assets/actions-C3sU2Ddh.js +11 -0
  41. package/dist/assets/{actions-BeFI0W-v.js → actions-aBeGAWlf.js} +1 -1
  42. package/dist/assets/agreement-CZNFuXRD.js +231 -0
  43. package/dist/assets/api-hFKJ6jO0.js +1 -0
  44. package/dist/assets/{app-avatar-C44MPSmF.js → app-avatar-C8eXlLv7.js} +1 -1
  45. package/dist/assets/{audit-logs-C4Bkb7ih.js → audit-logs-MEDvpc7h.js} +1 -1
  46. package/dist/assets/blocklet-DbaWAVgP.js +1 -0
  47. package/dist/assets/{brace-fold.es-D29aZcEW.js → brace-fold.es-B9fSdEU8.js} +1 -1
  48. package/dist/assets/{bundle-avatar-DLDLpTjG.js → bundle-avatar-OSJKvWqT.js} +1 -1
  49. package/dist/assets/{chart-D3IJWJTo.js → chart-CH8M9EVl.js} +1 -1
  50. package/dist/assets/{click-to-copy-BZk-riG0.js → click-to-copy-DXvKjv09.js} +1 -1
  51. package/dist/assets/{closebrackets.es-BtbnCp8E.js → closebrackets.es-BXZB1Qr2.js} +1 -1
  52. package/dist/assets/{codemirror.es-Bg0J_Vhd.js → codemirror.es-eOhYWqBu.js} +1 -1
  53. package/dist/assets/{comment.es-KgrOxmKR.js → comment.es-kwvrJJEn.js} +1 -1
  54. package/dist/assets/{config-navigation-W-s37kH4.js → config-navigation-Ctjl7Q09.js} +2 -2
  55. package/dist/assets/delete-confirm-BQlN8F7p.js +1 -0
  56. package/dist/assets/{detail-DMi56K6Z.js → detail-DF7saIlF.js} +4 -4
  57. package/dist/assets/{dialog.es-Btz2OrY2.js → dialog.es-nrprHWg2.js} +1 -1
  58. package/dist/assets/{download-ky0BUIxG.js → download-CJFZXJUK.js} +1 -1
  59. package/dist/assets/{foldgutter.es-Byi2WM5Z.js → foldgutter.es-DarIv8r7.js} +1 -1
  60. package/dist/assets/getValidReactChildren-DC9QCktM.js +1 -0
  61. package/dist/assets/{hint.es-bXHOvgiA.js → hint.es-BRl3gS64.js} +1 -1
  62. package/dist/assets/{hint.es2-BuXXm3d7.js → hint.es2-C6RN76yx.js} +1 -1
  63. package/dist/assets/{iframe-DFAAx8uu.js → iframe-Cay9rSYx.js} +1 -1
  64. package/dist/assets/{index-D7MQ5-AL.js → index--HL1x2Ao.js} +1 -1
  65. package/dist/assets/index-2z9-wC0z.js +2491 -0
  66. package/dist/assets/index-5a8_1U30.js +21 -0
  67. package/dist/assets/{index-DuWuyaHf.js → index-B-D5pRTJ.js} +2 -2
  68. package/dist/assets/{index-B_C7Ukrz.js → index-BFaWpopy.js} +1 -1
  69. package/dist/assets/{index-BPjkkjfw.js → index-BHUo4xfz.js} +1 -1
  70. package/dist/assets/{index--LZZdVAf.js → index-BNQ7lPMP.js} +1 -1
  71. package/dist/assets/{index-CO7eWdfJ.js → index-BO13G4BO.js} +24 -24
  72. package/dist/assets/index-BQIiWzqe.js +54 -0
  73. package/dist/assets/{index-DqcTovzf.js → index-BcHL3W7d.js} +1 -1
  74. package/dist/assets/{index-Dp6pATta.js → index-BpbNBF5W.js} +3 -3
  75. package/dist/assets/{index-BDE88jyc.js → index-Bq7tYdVD.js} +1 -1
  76. package/dist/assets/{index-C_F9o0jW.js → index-Btn4YKyJ.js} +1 -1
  77. package/dist/assets/{index-CG9nBfwn.js → index-C30eBcf3.js} +14 -14
  78. package/dist/assets/{index-Dqxd0b83.js → index-C6_9iL4I.js} +1 -1
  79. package/dist/assets/{index-C3gTEzW2.js → index-CABSlD6A.js} +1 -1
  80. package/dist/assets/{index-CV3SX2WR.js → index-CFGfdRbL.js} +3 -3
  81. package/dist/assets/{index-r0bswAIE.js → index-CFKgBVg-.js} +1 -1
  82. package/dist/assets/{index-BPpN0lNJ.js → index-CFSUHZ6I.js} +3 -3
  83. package/dist/assets/{index-BdYHpT6r.js → index-CMfXUntK.js} +1 -1
  84. package/dist/assets/{index-DnQZI3GF.js → index-CW48XZK8.js} +4 -4
  85. package/dist/assets/{index-7Me1Cz-7.js → index-CcrJJ2au.js} +1 -1
  86. package/dist/assets/index-Cd6JqFfP.js +1 -0
  87. package/dist/assets/{index-umXw3jlJ.js → index-CrL1aK9F.js} +1 -1
  88. package/dist/assets/{index-BJCSughs.js → index-D-Vuoioo.js} +1 -1
  89. package/dist/assets/{index-BPa9nOoF.js → index-D2i4ZR4J.js} +1 -1
  90. package/dist/assets/{index-Cxap6zBz.js → index-DIE6fYSQ.js} +1 -1
  91. package/dist/assets/{index-D2squebi.js → index-DIXftOyc.js} +1 -1
  92. package/dist/assets/{index-DNPIbpGG.js → index-DSMNya_x.js} +1 -1
  93. package/dist/assets/{index-MJrUxd75.js → index-DT2_9fGF.js} +1 -1
  94. package/dist/assets/{index-D7cQz7_Z.js → index-DaJYuGOJ.js} +1 -1
  95. package/dist/assets/{index-DyJXzwsm.js → index-DlOF8Gqo.js} +1 -1
  96. package/dist/assets/{index-C6MLTD6I.js → index-DroD8EXA.js} +1 -1
  97. package/dist/assets/{index-Bh7w8cMA.js → index-Dyq4IyeC.js} +1 -1
  98. package/dist/assets/{index-BwuLBlzz.js → index-Gy1QJcJ2.js} +10 -10
  99. package/dist/assets/{index-1lHVG0J4.js → index-NuGKx8L8.js} +1 -1
  100. package/dist/assets/{index-BjPXP-LF.js → index-S4EMvNri.js} +1 -1
  101. package/dist/assets/{index-xo0TJDhj.js → index-Wzigi2fg.js} +1 -1
  102. package/dist/assets/{index-CC9w0fHg.js → index-k_fGqveR.js} +1 -1
  103. package/dist/assets/{index-kfiCvbxf.js → index-mn6_lk6h.js} +5 -5
  104. package/dist/assets/{index-pxiyYxy4.js → index-qMPXnPuV.js} +3 -3
  105. package/dist/assets/index-qqXmVMwc.js +231 -0
  106. package/dist/assets/{index-y-DD9Mzo.js → index-r7R5IelG.js} +1 -1
  107. package/dist/assets/{index-CQf7Z4so.js → index-tEOo6QqD.js} +9 -9
  108. package/dist/assets/{index.es-B2L-IBL1.js → index.es-D1C7OtmS.js} +1 -1
  109. package/dist/assets/{index.esm-C5nq6pfE.js → index.esm-BUiTPKrv.js} +1 -1
  110. package/dist/assets/{info-addon.es-CCQiccea.js → info-addon.es-C6yRBU5l.js} +1 -1
  111. package/dist/assets/{info.es-D2fdwp1x.js → info.es-DN_l0kaO.js} +1 -1
  112. package/dist/assets/{install-from-url-EkPiGZjl.js → install-from-url-MsescETE.js} +1 -1
  113. package/dist/assets/{invitation-D-sDraGF.js → invitation-C2gEFjl6.js} +1 -1
  114. package/dist/assets/{is-path-prefix-equal-D073Bxne.js → is-path-prefix-equal-Du3BuD2Q.js} +1 -1
  115. package/dist/assets/{isEqual-BScl5EI5.js → isEqual-iiwY4iir.js} +1 -1
  116. package/dist/assets/item-BRRPCHyk.js +414 -0
  117. package/dist/assets/{javascript.es-CNx1DVdE.js → javascript.es-mbpWdj5A.js} +1 -1
  118. package/dist/assets/{jump-to-line.es-DKBOLLFr.js → jump-to-line.es-DFRr7i_x.js} +1 -1
  119. package/dist/assets/{jump.es-C4h7D0Yt.js → jump.es-BvCvZeFx.js} +1 -1
  120. package/dist/assets/{line-B97TVPTR.js → line-DVrvRbGP.js} +3 -3
  121. package/dist/assets/{lint.es-CKXF2FYr.js → lint.es-DMdq-Y-g.js} +1 -1
  122. package/dist/assets/{lint.es2-BxGfi6X7.js → lint.es2-Dqt3569F.js} +1 -1
  123. package/dist/assets/{lint.es3-B12DVmNt.js → lint.es3-D3U2VWsd.js} +1 -1
  124. package/dist/assets/{list-header-DelQMctR.js → list-header-BDxctf6E.js} +1 -1
  125. package/dist/assets/{log-Y4UQmvxx.js → log-CSpSWkjX.js} +1 -1
  126. package/dist/assets/{lottie-CyI6L8JT.js → lottie-CbqhvmtY.js} +1 -1
  127. package/dist/assets/{matchbrackets.es-Do6AWdK4.js → matchbrackets.es-BPOu4LMM.js} +1 -1
  128. package/dist/assets/{memory-BLzA7ZEK.js → memory-BISFPxDW.js} +1 -1
  129. package/dist/assets/{mode.es-D8LjDWYU.js → mode.es-Z1DAbN8t.js} +1 -1
  130. package/dist/assets/{mode.es2-CRmRh6re.js → mode.es2-CHQiAyxP.js} +1 -1
  131. package/dist/assets/{mode.es3-DEi3kmJe.js → mode.es3-Cj_KuR6d.js} +1 -1
  132. package/dist/assets/{onlineParser.es-pusjEINe.js → onlineParser.es-B9MCqAnq.js} +1 -1
  133. package/dist/assets/overview-C6LgKKEI.js +23 -0
  134. package/dist/assets/{react-cXpxtC8N.js → react-WuDSAoir.js} +3 -3
  135. package/dist/assets/{redux-pf-VcEfR.js → redux-CD2ncFeP.js} +1 -1
  136. package/dist/assets/{resource-dialog-BTNy_Oow.js → resource-dialog-BQqHx66M.js} +1 -1
  137. package/dist/assets/runtime-CpSf_4mO.js +1 -0
  138. package/dist/assets/{search.es-C1_2ny1P.js → search.es-D1a1zW9L.js} +1 -1
  139. package/dist/assets/{searchcursor.es-yZD5Ys71.js → searchcursor.es-Ch8qmAsh.js} +1 -1
  140. package/dist/assets/service-CGBEuf5u.js +1 -0
  141. package/dist/assets/shorten-label-C4kZR0n4.js +1 -0
  142. package/dist/assets/{show-hint.es-oyOlXLi7.js → show-hint.es-u6p2CZ_T.js} +1 -1
  143. package/dist/assets/{slicedToArray-Ce9LLBq3.js → slicedToArray-CbnyPXnm.js} +1 -1
  144. package/dist/assets/{spaces-Dbjo2WCq.js → spaces-BiapvYKU.js} +1 -1
  145. package/dist/assets/{sublime.es-B3yg_Xen.js → sublime.es-U_aIS_89.js} +1 -1
  146. package/dist/assets/{switch-control-C0TEfCiJ.js → switch-control-DkswRhHo.js} +1 -1
  147. package/dist/assets/{table-icons-CjO-fhj2.js → table-icons-B2SKzxW9.js} +2 -2
  148. package/dist/assets/{tag-c4l-gLNY.js → tag-BfKVgkWM.js} +1 -1
  149. package/dist/assets/team-D-J7HAOY.js +1 -0
  150. package/dist/assets/{toUpper-CXm9kpSD.js → toUpper-DVlFUiz7.js} +1 -1
  151. package/dist/assets/{traffic-DtFFDlh6.js → traffic-Uf5GnmE4.js} +1 -1
  152. package/dist/assets/{url-evaluation-D_jo15CE.js → url-evaluation-Db5FZwb_.js} +1 -1
  153. package/dist/assets/{url-join-C7-zBUdN.js → url-join-Du3smYaq.js} +1 -1
  154. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BAUuYPIl.js → use-blocklet-info-for-connect-did-spaces-DH0VryKJ.js} +1 -1
  155. package/dist/assets/{useLocalStorage-4kEeUWaD.js → useLocalStorage-BrzpK517.js} +1 -1
  156. package/dist/assets/{util-DHUp8byb.js → util-BNwGe21a.js} +1 -1
  157. package/dist/assets/wait-container-DPHYN0Ie.js +181 -0
  158. package/dist/assets/{withStyles-viKl7Y2N.js → withStyles-DN7-rDVx.js} +1 -1
  159. package/dist/assets/{wrap-locale-BFLBF298.js → wrap-locale-BefWbM-O.js} +1 -1
  160. package/dist/index.html +1 -1
  161. package/dist/service-worker.js +1 -1
  162. package/package.json +1 -1
  163. package/dist/assets/DeleteOutline-B7YDwBp1.js +0 -1
  164. package/dist/assets/DeleteOutline-DtDq0PRx.js +0 -1
  165. package/dist/assets/actions-Hh89UiOD.js +0 -11
  166. package/dist/assets/agreement-EpNiWD7U.js +0 -231
  167. package/dist/assets/api-BG4nC5Xk.js +0 -1
  168. package/dist/assets/delete-confirm-CSZ3OQjS.js +0 -1
  169. package/dist/assets/getValidReactChildren-Bgc9rgRS.js +0 -1
  170. package/dist/assets/index-4rMgZX4U.js +0 -231
  171. package/dist/assets/index-BF8aCpwD.js +0 -2485
  172. package/dist/assets/index-Bm8EtRPV.js +0 -21
  173. package/dist/assets/index-Cbo401VV.js +0 -1
  174. package/dist/assets/index-DBaPghHu.js +0 -54
  175. package/dist/assets/item-yETh_FJZ.js +0 -408
  176. package/dist/assets/overview-8H6-ZDnY.js +0 -23
  177. package/dist/assets/runtime-Cq_Acbof.js +0 -1
  178. package/dist/assets/service-C2WlGo6H.js +0 -1
  179. package/dist/assets/team-wvWuVfZc.js +0 -1
  180. package/dist/assets/wait-container-BTUIgvS9.js +0 -171
@@ -1,4 +1,4 @@
1
- import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-BF8aCpwD.js";import{T as de}from"./index-Cbo401VV.js";import pe from"./audit-logs-C4Bkb7ih.js";import{P as ue,M as fe}from"./index-4rMgZX4U.js";import ye from"./index-CV3SX2WR.js";import{T as ge}from"./team-wvWuVfZc.js";import{E as xe}from"./index-DNPIbpGG.js";import{d as he}from"./Add-C7T4l8Gn.js";import{T as N}from"./TextField-C9bTzhlw.js";import{F as H,S as V}from"./Select-DoQcGrX-.js";import{I as J}from"./InputLabel--N-sf10A.js";import{C as W}from"./click-to-copy-BZk-riG0.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-BowxIQ2G.js";import{C as Ce}from"./delete-confirm-CSZ3OQjS.js";import{d as ke}from"./Edit-C8H0dz0H.js";import"./index-Dqxd0b83.js";import"./useLocalStorage-4kEeUWaD.js";import"./Pagination-Dm9dYmcU.js";import"./LastPage-Bxb1l4rW.js";import"./index-7Me1Cz-7.js";import"./Loop-D3gmJHoj.js";import"./ViewList-CvkmEUQS.js";import"./list-header-DelQMctR.js";import"./Search-Cc01SYnZ.js";import"./index-CO7eWdfJ.js";import"./FilterList-Cg3ZLCqO.js";import"./index--LZZdVAf.js";import"./redux-pf-VcEfR.js";import"./MoreVert-D9URE0XQ.js";import"./index-D7cQz7_Z.js";import"./resource-dialog-BTNy_Oow.js";import"./index-C3gTEzW2.js";import"./index-MJrUxd75.js";import"./tag-c4l-gLNY.js";import"./index-D7MQ5-AL.js";import"./actions-BeFI0W-v.js";import"./index-C6MLTD6I.js";import"./ButtonGroup-9uv0Ooq-.js";import"./getValidReactChildren-Bgc9rgRS.js";import"./EditIcon-CVWLBr12.js";import"./LockIcon-C2Y-MNOG.js";import"./Google-C4EY8MZF.js";import"./index-umXw3jlJ.js";import"./isEqual-BScl5EI5.js";import"./index-BJCSughs.js";import"./InputAdornment-DEjon0jx.js";import"./ToggleButtonGroup-puPvtUnk.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},R={},Ae=Y;Object.defineProperty(R,"__esModule",{value:!0});var X=R.default=void 0,we=Ae(Q()),Ie=e;X=R.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function T(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(L,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}T.propTypes={remark:j.string,onCreate:j.func};T.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
1
+ import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-2z9-wC0z.js";import{T as de}from"./index-Cd6JqFfP.js";import pe from"./audit-logs-MEDvpc7h.js";import{P as ue,M as fe}from"./index-qqXmVMwc.js";import ye from"./index-CFGfdRbL.js";import{T as ge}from"./team-D-J7HAOY.js";import{E as xe}from"./index-DSMNya_x.js";import{d as he}from"./Add-DQn3cqMW.js";import{T as N}from"./TextField-DrpVwtbW.js";import{F as H,S as V}from"./Select-Dir7Eleh.js";import{I as J}from"./InputLabel-D4R09Jce.js";import{C as W}from"./click-to-copy-DXvKjv09.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-DD7mLtbV.js";import{C as Ce}from"./delete-confirm-BQlN8F7p.js";import{d as ke}from"./Edit-C50TQSDX.js";import"./index-C6_9iL4I.js";import"./useLocalStorage-BrzpK517.js";import"./Pagination-R49NcVMS.js";import"./LastPage-GxCoDWrp.js";import"./index-CcrJJ2au.js";import"./Loop-z2LWMmIN.js";import"./ViewList-Du_jkxCT.js";import"./list-header-BDxctf6E.js";import"./Search-BJQlC2tf.js";import"./index-BO13G4BO.js";import"./FilterList-DQ4qv4dK.js";import"./index-BNQ7lPMP.js";import"./redux-CD2ncFeP.js";import"./MoreVert-DUbpisWb.js";import"./index-DaJYuGOJ.js";import"./resource-dialog-BQqHx66M.js";import"./index-CABSlD6A.js";import"./index-DT2_9fGF.js";import"./tag-BfKVgkWM.js";import"./blocklet-DbaWAVgP.js";import"./index--HL1x2Ao.js";import"./actions-aBeGAWlf.js";import"./shorten-label-C4kZR0n4.js";import"./index-DroD8EXA.js";import"./ButtonGroup-BJxZnIfi.js";import"./getValidReactChildren-DC9QCktM.js";import"./EditIcon-kalr65uP.js";import"./LockIcon-CF3-It7s.js";import"./Google-3BfCV8G_.js";import"./index-CrL1aK9F.js";import"./isEqual-iiwY4iir.js";import"./index-D-Vuoioo.js";import"./InputAdornment-Ca2Af6jh.js";import"./ToggleButtonGroup-B-GBbZiA.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},R={},Ae=Y;Object.defineProperty(R,"__esModule",{value:!0});var X=R.default=void 0,we=Ae(Q()),Ie=e;X=R.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function T(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(L,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}T.propTypes={remark:j.string,onCreate:j.func};T.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -72,7 +72,7 @@ import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L
72
72
  }
73
73
  }
74
74
  }
75
- `;function wt(){const o=ce(),{t:s}=A(),{info:p}=G(),{tab:r="members"}=ie(),c=h=>me(h,p),{data:t}=le(),n=u.useCallback(h=>{const d=t.find(i=>[i.meta.did,i.appDid,i.appPid].includes(h));return d?d.meta.title:"Server"},[t]),l=u.useCallback(()=>e.jsx(pe,{showScope:!0,scopeFormatter:n}),[n]),m=u.useCallback(()=>e.jsx(fe,{type:"server",createPassportSvg:c}),[]),a=p.did,f=h=>{o(`/team/${h}`)},y={members:{label:s("common.members"),value:"members",component:m},passports:{label:s("common.passport"),value:"passports",component:ye},"access-keys":{label:s("common.accessKey"),value:"access-keys",component:Pe},"audit-logs":{label:s("common.auditLogs"),value:"audit-logs",component:l}},g=Object.values(y).map(({label:h,value:d})=>({label:h,value:d})),x=y[r]||y.member;return e.jsx(ge,{teamDid:a,children:e.jsxs(Re,{children:[e.jsx(L,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:s("common.team")}),e.jsx(de,{tabs:g,current:r,onChange:f,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(x.component,{createPassportSvg:c})})]})})}const Re=S.main`
75
+ `;function Nt(){const o=ce(),{t:s}=A(),{info:p}=G(),{tab:r="members"}=ie(),c=h=>me(h,p),{data:t}=le(),n=u.useCallback(h=>{const d=t.find(i=>[i.meta.did,i.appDid,i.appPid].includes(h));return d?d.meta.title:"Server"},[t]),l=u.useCallback(()=>e.jsx(pe,{showScope:!0,scopeFormatter:n}),[n]),m=u.useCallback(()=>e.jsx(fe,{type:"server",createPassportSvg:c}),[]),a=p.did,f=h=>{o(`/team/${h}`)},y={members:{label:s("common.members"),value:"members",component:m},passports:{label:s("common.passport"),value:"passports",component:ye},"access-keys":{label:s("common.accessKey"),value:"access-keys",component:Pe},"audit-logs":{label:s("common.auditLogs"),value:"audit-logs",component:l}},g=Object.values(y).map(({label:h,value:d})=>({label:h,value:d})),x=y[r]||y.member;return e.jsx(ge,{teamDid:a,children:e.jsxs(Re,{children:[e.jsx(L,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:s("common.team")}),e.jsx(de,{tabs:g,current:r,onChange:f,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(x.component,{createPassportSvg:c})})]})})}const Re=S.main`
76
76
  .page-header {
77
77
  display: flex;
78
78
  justify-content: space-between;
@@ -82,4 +82,4 @@ import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L
82
82
  .page-content {
83
83
  margin-top: 24px;
84
84
  }
85
- `;export{wt as default};
85
+ `;export{Nt as default};
@@ -0,0 +1,231 @@
1
+ import{r as D,j as t,fu as jn,ci as X,fv as wn,fb as ue,O,as as Me,ax as Z,m as M,eB as Sn,d8 as Ct,fw as Cn,q as H,fx as qe,fy as In,aG as Pn,ch as An,dO as It,R as ve,bk as q,cn as Vt,S as ye,fz as Dn,fA as Ve,at as me,D as Y,B as U,C as oe,w as He,J as se,K as ee,P as C,fB as Rn,k as Fe,aR as On,x as En,y as Tn,n as V,fa as kn,f as pe,ad as Se,U as Q,cc as te,A as ie,fC as Ln,aK as Ht,aL as Kt,b as J,dc as Nn,t as Qt,F as W,a1 as Pt,W as Ke,ce as Fn,fD as Gt,aN as Bn,aD as _n,a9 as $n,cJ as Un,a2 as zn,bp as Wn,aW as Mn,aX as qn,Q as Vn}from"./index-2z9-wC0z.js";import{c as Hn}from"./index-CcrJJ2au.js";import{d as be}from"./Add-DQn3cqMW.js";import{d as Kn}from"./Loop-z2LWMmIN.js";import{d as Qn}from"./ViewList-Du_jkxCT.js";import{L as Gn,S as Xn,d as Xt}from"./list-header-BDxctf6E.js";import{D as Qe,g as Yn}from"./index-BO13G4BO.js";import"./index-DaJYuGOJ.js";import{c as Ee,U as Te,d as Yt}from"./resource-dialog-BQqHx66M.js";import{T as Jn}from"./index-Cd6JqFfP.js";import{E as Jt}from"./index-DSMNya_x.js";import"./index-DT2_9fGF.js";import{W as Zt}from"./tag-BfKVgkWM.js";import{a as G}from"./team-D-J7HAOY.js";import{u as en}from"./blocklet-DbaWAVgP.js";import{C as Ce}from"./click-to-copy-DXvKjv09.js";import{F as Be,S as _e}from"./Select-Dir7Eleh.js";import{I as $e}from"./InputLabel-D4R09Jce.js";import{T as tn}from"./TextField-DrpVwtbW.js";import{I as Ue}from"./index--HL1x2Ao.js";import{d as Zn}from"./Delete-DD7mLtbV.js";import{A as er}from"./actions-aBeGAWlf.js";import{S as tr}from"./shorten-label-C4kZR0n4.js";var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});var nn=Ge.default=void 0;nr(D);var re=t;function nr(e){return e&&e.__esModule?e:{default:e}}function At(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function Dt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?At(Object(r),!0).forEach(function(i){rr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function rr(e,n,r){return n=sr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function sr(e){var n=or(e,"string");return typeof n=="symbol"?n:String(n)}function or(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Xe=function(n){return(0,re.jsxs)("svg",Dt(Dt({},n),{},{children:[(0,re.jsx)("g",{clipPath:"url(#clip0)",children:(0,re.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,re.jsx)("defs",{children:(0,re.jsx)("clipPath",{id:"clip0",children:(0,re.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Xe.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Xe.displayName="person";nn=Ge.default=Xe;var xe={},ir=e=>encodeURIComponent(e).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`),rn="%[a-f0-9]{2}",Rt=new RegExp("("+rn+")|([^%]+?)","gi"),Ot=new RegExp("("+rn+")+","gi");function ze(e,n){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;n=n||1;var r=e.slice(0,n),i=e.slice(n);return Array.prototype.concat.call([],ze(r),ze(i))}function ar(e){try{return decodeURIComponent(e)}catch{for(var n=e.match(Rt)||[],r=1;r<n.length;r++)e=ze(n,r).join(""),n=e.match(Rt)||[];return e}}function lr(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},r=Ot.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch{var i=ar(r[0]);i!==r[0]&&(n[r[0]]=i)}r=Ot.exec(e)}n["%C2"]="�";for(var d=Object.keys(n),S=0;S<d.length;S++){var P=d[S];e=e.replace(new RegExp(P,"g"),n[P])}return e}var cr=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,n)=>{if(!(typeof e=="string"&&typeof n=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n==="")return[e];const r=e.indexOf(n);return r===-1?[e]:[e.slice(0,r),e.slice(r+n.length)]},dr=function(e,n){for(var r={},i=Object.keys(e),d=Array.isArray(n),S=0;S<i.length;S++){var P=i[S],p=e[P];(d?n.indexOf(P)!==-1:n(P,p,e))&&(r[P]=p)}return r};(function(e){const n=ir,r=cr,i=ur,d=dr,S=s=>s==null;function P(s){switch(s.arrayFormat){case"index":return o=>(a,c)=>{const u=a.length;return c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[",u,"]"].join("")]:[...a,[y(o,s),"[",y(u,s),"]=",y(c,s)].join("")]};case"bracket":return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[]"].join("")]:[...a,[y(o,s),"[]=",y(c,s)].join("")];case"comma":case"separator":return o=>(a,c)=>c==null||c.length===0?a:a.length===0?[[y(o,s),"=",y(c,s)].join("")]:[[a,y(c,s)].join(s.arrayFormatSeparator)];default:return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,y(o,s)]:[...a,[y(o,s),"=",y(c,s)].join("")]}}function p(s){let o;switch(s.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 j=typeof c=="string"&&c.includes(s.arrayFormatSeparator),x=typeof c=="string"&&!j&&l(c,s).includes(s.arrayFormatSeparator);c=x?l(c,s):c;const R=j||x?c.split(s.arrayFormatSeparator).map(_=>l(_,s)):c===null?c:l(c,s);u[a]=R};default:return(a,c,u)=>{if(u[a]===void 0){u[a]=c;return}u[a]=[].concat(u[a],c)}}}function f(s){if(typeof s!="string"||s.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function y(s,o){return o.encode?o.strict?n(s):encodeURIComponent(s):s}function l(s,o){return o.decode?r(s):s}function I(s){return Array.isArray(s)?s.sort():typeof s=="object"?I(Object.keys(s)).sort((o,a)=>Number(o)-Number(a)).map(o=>s[o]):s}function m(s){const o=s.indexOf("#");return o!==-1&&(s=s.slice(0,o)),s}function b(s){let o="";const a=s.indexOf("#");return a!==-1&&(o=s.slice(a)),o}function h(s){s=m(s);const o=s.indexOf("?");return o===-1?"":s.slice(o+1)}function A(s,o){return o.parseNumbers&&!Number.isNaN(Number(s))&&typeof s=="string"&&s.trim()!==""?s=Number(s):o.parseBooleans&&s!==null&&(s.toLowerCase()==="true"||s.toLowerCase()==="false")&&(s=s.toLowerCase()==="true"),s}function v(s,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),f(o.arrayFormatSeparator);const a=p(o),c=Object.create(null);if(typeof s!="string"||(s=s.trim().replace(/^[?#&]/,""),!s))return c;for(const u of s.split("&")){if(u==="")continue;let[j,x]=i(o.decode?u.replace(/\+/g," "):u,"=");x=x===void 0?null:["comma","separator"].includes(o.arrayFormat)?x:l(x,o),a(l(j,o),x,c)}for(const u of Object.keys(c)){const j=c[u];if(typeof j=="object"&&j!==null)for(const x of Object.keys(j))j[x]=A(j[x],o);else c[u]=A(j,o)}return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((u,j)=>{const x=c[j];return x&&typeof x=="object"&&!Array.isArray(x)?u[j]=I(x):u[j]=x,u},Object.create(null))}e.extract=h,e.parse=v,e.stringify=(s,o)=>{if(!s)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),f(o.arrayFormatSeparator);const a=x=>o.skipNull&&S(s[x])||o.skipEmptyString&&s[x]==="",c=P(o),u={};for(const x of Object.keys(s))a(x)||(u[x]=s[x]);const j=Object.keys(u);return o.sort!==!1&&j.sort(o.sort),j.map(x=>{const R=s[x];return R===void 0?"":R===null?y(x,o):Array.isArray(R)?R.reduce(c(x),[]).join("&"):y(x,o)+"="+y(R,o)}).filter(x=>x.length>0).join("&")},e.parseUrl=(s,o)=>{o=Object.assign({decode:!0},o);const[a,c]=i(s,"#");return Object.assign({url:a.split("?")[0]||"",query:v(h(s),o)},o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:l(c,o)}:{})},e.stringifyUrl=(s,o)=>{o=Object.assign({encode:!0,strict:!0},o);const a=m(s.url).split("?")[0]||"",c=e.extract(s.url),u=e.parse(c,{sort:!1}),j=Object.assign(u,s.query);let x=e.stringify(j,o);x&&(x=`?${x}`);let R=b(s.url);return s.fragmentIdentifier&&(R=`#${y(s.fragmentIdentifier,o)}`),`${a}${x}${R}`},e.pick=(s,o,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:c,query:u,fragmentIdentifier:j}=e.parseUrl(s,a);return e.stringifyUrl({url:c,query:d(u,o),fragmentIdentifier:j},a)},e.exclude=(s,o,a)=>{const c=Array.isArray(o)?u=>!o.includes(u):(u,j)=>!o(u,j);return e.pick(s,c,a)}})(xe);const ce=wn,mr={parseNumbers:!1,parseBooleans:!1},pr={skipNull:!1,skipEmptyString:!1},fr=(e,n)=>{var r,i;const{navigateMode:d="push",parseOptions:S,stringifyOptions:P}=n||{},p=Object.assign(Object.assign({},mr),S),f=Object.assign(Object.assign({},pr),P),y=ce.useLocation(),l=(r=ce.useHistory)===null||r===void 0?void 0:r.call(ce),I=(i=ce.useNavigate)===null||i===void 0?void 0:i.call(ce),m=jn(),b=D.useRef(typeof e=="function"?e():e||{}),h=D.useMemo(()=>xe.parse(y.search,p),[y.search]),A=D.useMemo(()=>Object.assign(Object.assign({},b.current),h),[h]);return[A,X(s=>{const o=typeof s=="function"?s(A):s;m(),l&&l[d]({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},y.state),I&&I({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},{replace:d==="replace",state:y.state})})]},gr=fr;let hr=class extends Error{constructor(n){super(),this.name="AbortError",this.message=n}};const Et=e=>globalThis.DOMException===void 0?new hr(e):new DOMException(e),Tt=e=>{const n=e.reason===void 0?Et("This operation was aborted."):e.reason;return n instanceof Error?n:Et(n)};async function xr(e,n,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:d}={}){return new Promise((S,P)=>{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 n!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const p=[],f=[],y=new Map;let l=!1,I=!1,m=!1,b=0,h=0;const A=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),v=o=>{l=!0,I=!0,P(o)};d&&(d.aborted&&v(Tt(d)),d.addEventListener("abort",()=>{v(Tt(d))}));const s=async()=>{if(I)return;const o=await A.next(),a=h;if(h++,o.done){if(m=!0,b===0&&!I){if(!i&&f.length>0){v(new AggregateError(f));return}if(I=!0,y.size===0){S(p);return}const c=[];for(const[u,j]of p.entries())y.get(u)!==kt&&c.push(j);S(c)}return}b++,(async()=>{try{const c=await o.value;if(I)return;const u=await n(c,a);u===kt&&y.set(a,u),p[a]=u,b--,await s()}catch(c){if(i)v(c);else{f.push(c),b--;try{await s()}catch(u){v(u)}}}})()};(async()=>{for(let o=0;o<r;o++){try{await s()}catch(a){v(a);break}if(m||l)break}})()})}const kt=Symbol("skip");async function vr(e,n){return xr(e,r=>r(),n)}function yr({user:e,sessionUser:n}){const r=ue(()=>{var i;return(i=(e==null?void 0:e.passports)||[])==null?void 0:i.find(d=>d.name===n.role)},[e==null?void 0:e.passports,n==null?void 0:n.role]);return t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{size:40,variant:"circle",shape:"circle",src:n.avatar,did:n.did,sx:{flexShrink:0}}),t.jsxs(O,{sx:{flex:1,overflow:"hidden"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Z,{title:n.fullName,children:t.jsx(M,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:n.fullName})}),t.jsx(Sn,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Ct.textBase,borderColor:Ct.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),t.jsx(Z,{title:n.email,children:t.jsx(M,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n.email})})]})]})}const br={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},sn="Reserved IP",Lt="ip-region-cache";async function jr(e){const n=`https://ipapi.co/${e}/json/`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country_name,i.region,i.city].filter(Boolean).join("/"),d}async function wr(e){const n=`https://api.ip.sb/geoip/${e}`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country,i.region,i.city].filter(Boolean).join("/"),d}async function Sr(e){let n="",r={};try{const i=localStorage.getItem(Lt);i&&(r=JSON.parse(i))}catch{r={}}if(r[e])n=r[e];else{try{n=await wr(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!n)try{n=await jr(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(n){const i=Object.keys(r);i.length>100&&delete r[i[0]],r[e]&&delete r[e],r[e]=n,localStorage.setItem(Lt,JSON.stringify(r))}return n}async function Cr(e){return Promise.all(e.map(n=>Sr(n)))}const Nt=e=>new Te(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Te.BROWSER.NAME,Te.BROWSER.VERSION]]}).getResult();function Ir({user:e,showAction:n=!0,showUser:r=!0}){const i=Cn(),{locale:d}=H(),{confirmApi:S,confirmHolder:P}=qe(),p=X((o,a={})=>In(br,o,d,"en",a)),f=X(async()=>{let o=e==null?void 0:e.userSessions;o||(o=await Ee.userSession.getUserSessions({did:e.did}));try{const c=o==null?void 0:o.map((x,R)=>[R,x.lastLoginIp]).filter(x=>!!x[1]),u=c==null?void 0:c.map(x=>x[1]),j=await Cr(u);for(let x=0;x<j.length;x++){const R=j[x],_=c[x],z=o[_[0]];z.ipRegion=R}}catch(c){console.warn("Failed to convert ip to region"),console.error(c)}const a=new Date().getTime();return Pn(o,c=>c.visitorId===i?-1:a-new Date(c.updatedAt).getTime())}),y=An(f),l=ue(()=>y.data||[],[y.data]),I=ue(()=>l.reduce((o,a)=>(o[a.lastLoginIp]=a.ipRegion,o),{}),[l]),m=X(({visitorId:o})=>{S.open({title:p("logoutThisSession"),content:p("logoutThisSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{await Ee.user.logout({visitorId:o}),y.refresh(),S.close()}})}),b=ue(()=>l.filter(a=>a.visitorId!==i),[l]),h=X(()=>{S.open({title:p("logoutAllSession"),content:p("logoutAllSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{const o=b.map(a=>()=>Ee.user.logout({visitorId:a.visitorId}));await vr(o,{concurrency:3,stopOnError:!1}),y.refresh(),S.close()}})}),A=[];n&&A.push(t.jsx(Z,{title:p("logoutAllTips"),children:t.jsx(It,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:h,disabled:b.length===0,children:p("logoutAll")})},"logoutAll"));const v=ue(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),s=[{label:p("platform"),name:"platform",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.os)==null?void 0:u.name,(j=c.os)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("deviceType"),name:"deviceType",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.browser)==null?void 0:u.name,(j=c.browser)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("walletOS"),name:"walletOS",options:{customBodyRenderLite:o=>{var c;const a=l[o];return t.jsx(O,{children:((c=a.extra)==null?void 0:c.walletOS)||p("unknown")})}}},r&&{label:p("user"),name:"user",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{sx:{minWidth:150,maxWidth:250},children:t.jsx(yr,{sessionUser:a.user,user:e})})}}},{label:p("createdAt"),name:"createdAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.createdAt?t.jsx(ve,{value:a.createdAt,relativeRange:3*86400*1e3,locale:d}):p("unknown")}}},{label:p("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.status==="expired"?p("expired"):t.jsx(ve,{value:a.updatedAt,relativeRange:3*86400*1e3,locale:d})}}},{label:p("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:I[a.lastLoginIp]?t.jsxs(t.Fragment,{children:[t.jsx(M,{variant:"body2",children:I[a.lastLoginIp]}),t.jsx(M,{variant:"body2",color:"grey",children:a.lastLoginIp||p("unknown")})]}):t.jsx(M,{children:a.lastLoginIp||p("unknown")})})}}},n&&{label:p("actions"),name:"actions",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:t.jsx(It,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:i===a.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>m({visitorId:a.visitorId}),children:a.status==="expired"?p("remove"):i===a.visitorId?p("currentSession"):p("logout")})})}}}].filter(Boolean);return t.jsxs(O,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[P,t.jsx(Qe,{locale:d,data:l,columns:s,customButtons:A,options:v,loading:y.loading})]})}function Ye({teamDid:e,roles:n,apps:r,onCancel:i,onSuccess:d,onError:S,endpoint:P}){const{api:p}=q(),{t:f,locale:y}=H(),l=Vt({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:r.length>0?r[0].appId:null}),I=async()=>{if(!l.role){l.error=f("team.member.error.passportEmpty");return}const h=l.remark.trim();l.error=null,l.loading=!0;try{const{inviteInfo:A}=await p.createMemberInvitation({input:{teamDid:e,role:l.role,remark:h,sourceAppPid:l.sourceAppPid}});l.inviteInfo=A,l.activeStep=1}catch(A){const v=ee(A);l.error=v,S(A)}finally{l.loading=!1}},b=[{body:t.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:3},children:[r.length>1?t.jsxs(Be,{fullWidth:!0,children:[t.jsx($e,{children:f("common.sourceApp")}),t.jsx(_e,{value:l.sourceAppPid,onChange:h=>{l.error=null,l.sourceAppPid=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,children:r.map(h=>t.jsx(ye,{value:h.appId,children:t.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{did:h.appId,size:28}),h.appName]}),t.jsx(Dn,{did:h.appId,compact:!0,responsive:!1})]})},h.appId))})]}):null,t.jsxs(Be,{fullWidth:!0,variant:"outlined",children:[t.jsx($e,{children:f("common.passport")}),t.jsx(_e,{"data-cy":"invite-member-select-role",value:l.role,onChange:h=>{l.error=null,l.role=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,onKeyPress:h=>{h.key==="Enter"&&(h.preventDefault(),I())},children:n.filter(h=>h.name!=="owner").map(h=>t.jsx(ye,{value:h.name,"data-cy":`invite-member-select-option-${h.name}`,children:t.jsx("span",{children:h.title||h.name})},h.name))})]}),t.jsx(tn,{label:f("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:l.remark,onChange:h=>{l.error=null,l.remark=h.target.value},disabled:l.loading,"data-cy":"invite-member-input-remark"})]}),cancel:f("common.cancel"),confirm:f("team.member.inviteDialog.createInviteLink"),onCancel:i,onConfirm:I},{body:()=>{var A,v;const h=Ve({inviteId:(A=l.inviteInfo)==null?void 0:A.inviteId,endpoint:P});return t.jsxs("div",{children:[t.jsx(O,{sx:{fontSize:16,fontWeight:"bold"},children:f("team.member.inviteDialog.createSuccessTip",{expireDate:me((v=l.inviteInfo)==null?void 0:v.expireDate,y)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:h})]})},confirm:f("common.confirm"),onConfirm:d}][l.activeStep];return t.jsxs(Y,{title:f("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[b.cancel&&t.jsx(U,{onClick:b.onCancel,color:"inherit",children:b.cancel}),t.jsxs(U,{onClick:b.onConfirm,color:"primary",disabled:l.loading||!l.role,variant:"contained",autoFocus:!0,children:[l.loading&&t.jsx(oe,{size:16}),b.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof b.body=="function"?b.body():b.body}),!!l.error&&t.jsx(se,{severity:"error",variant:"icon",children:l.error})]})}Ye.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,roles:C.array,apps:C.array,endpoint:C.string};Ye.defaultProps={onError:()=>{},roles:[],apps:[],endpoint:""};function Je({teamDid:e,onCancel:n,onSuccess:r,onError:i,endpoint:d}){const{api:S,info:P}=q(),{api:p}=D.useContext(Rn),[f,y]=D.useState(!1),{t:l,locale:I}=H(),[m,b]=D.useState(""),[h,A]=D.useState(!1),[v,s]=D.useState(0),[o,a]=D.useState(""),[c,u]=D.useState(""),j=!!Fe(P,"ownerNft.did"),x=On(async()=>{if(j){const{state:k}=await S.getDelegationState();return k}return{delegated:!0}});if(x.loading)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx("div",{style:{display:"flex",justifyContent:"center"},children:t.jsx(oe,{})})});if(x.error)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx(se,{severity:"error",variant:"icon",children:ee(x.error)})});const R=async()=>{b(null),y(!0);try{const{inviteInfo:k}=await S.createTransferInvitation({input:{teamDid:e,role:"owner",remark:c.trim()}});a(k),s(K.length-1)}catch(k){const ne=ee(k);b(ne),i(k)}finally{y(!1)}},_=()=>{A(!0),s(1)},z=()=>{A(!1),s(0)},K=[{body:t.jsxs(M,{component:"div",children:[t.jsxs(se,{severity:"warning",children:[t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.progress")}),t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),t.jsx(se,{severity:"warning",children:t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.revoke")})}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(tn,{label:l("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:c,onChange:k=>{b(null),u(k.target.value)},disabled:f,"data-cy":"transfer-node-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:l("common.cancel"),confirm:l("team.transferNode.inviteDialog.createInviteLink"),onCancel:n,onConfirm:j&&!Fe(x,"value.delegated")?_:R},{body:()=>t.jsx(En,{action:"delegate-transfer-nft",open:h,locale:I,checkFn:p.get,onClose:z,onSuccess:R,checkTimeout:5*60*1e3,webWalletUrl:Tn(P),extraParams:{targetDID:P.did},messages:{title:l("team.transferNode.delegateDialog.title"),scan:l("team.transferNode.delegateDialog.scan"),confirm:l("team.transferNode.delegateDialog.confirm"),success:l("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const k=Ve({inviteId:o.inviteId,endpoint:d});return t.jsxs("div",{children:[t.jsx(Pr,{children:l("team.transferNode.inviteDialog.createSuccessTip",{expireDate:me(o.expireDate,I)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:k})]})},confirm:l("common.confirm"),onConfirm:r}],F=K[v];return t.jsxs(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[F.cancel&&t.jsx(U,{onClick:F.onCancel,color:"inherit",children:F.cancel}),t.jsxs(U,{onClick:F.onConfirm,color:"primary",disabled:f,variant:"contained",autoFocus:!0,children:[f&&t.jsx(oe,{size:16}),F.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof F.body=="function"?F.body():F.body}),!!m&&t.jsx(se,{severity:"error",variant:"icon",children:m})]})}Je.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,endpoint:C.string};Je.defaultProps={onError:()=>{},endpoint:""};const Pr=V.div`
2
+ font-size: 16px;
3
+ font-weight: bold;
4
+ `;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});var et=Ze.default=void 0;Ar(D);var ke=t;function Ar(e){return e&&e.__esModule?e:{default:e}}function Ft(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function Bt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Ft(Object(r),!0).forEach(function(i){Dr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Dr(e,n,r){return n=Rr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Rr(e){var n=Or(e,"string");return typeof n=="symbol"?n:String(n)}function Or(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var tt=function(n){return(0,ke.jsxs)("svg",Bt(Bt({},n),{},{children:[(0,ke.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,ke.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};tt.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};tt.displayName="forbid-login";et=Ze.default=tt;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});var rt=nt.default=void 0;Er(D);var he=t;function Er(e){return e&&e.__esModule?e:{default:e}}function _t(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function $t(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_t(Object(r),!0).forEach(function(i){Tr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Tr(e,n,r){return n=kr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function kr(e){var n=Lr(e,"string");return typeof n=="symbol"?n:String(n)}function Lr(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var st=function(n){return(0,he.jsxs)("svg",$t($t({},n),{},{children:[(0,he.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,he.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,he.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};st.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};st.displayName="allow-login";rt=nt.default=st;function je(e){const{passport:n,onDelete:r,...i}=e;return t.jsxs(Nr,{...i,children:[n.title||n.name," ",!!r&&t.jsx(kn,{"data-cy":"delete-issuance",className:"delete",onClick:r})]})}je.propTypes={passport:C.object.isRequired,onDelete:C.func};je.defaultProps={onDelete:null};const Nr=V.span`
5
+ display: inline-flex;
6
+ padding: 2px 8px;
7
+ background: ${e=>e.theme.palette.primary.main};
8
+ border-radius: 100vw;
9
+ font-weight: 400;
10
+ font-size: 12px;
11
+ line-height: 22px;
12
+ color: #fff;
13
+ align-items: center;
14
+ .delete {
15
+ font-size: 1em;
16
+ margin-left: 6px;
17
+ cursor: pointer;
18
+ }
19
+ `;function ot({issuances:e,teamDid:n,onRefresh:r}){const{api:i,inService:d}=q(),{t:S,locale:P}=D.useContext(pe),[p,f]=D.useState(null),[y,l]=D.useState(!1),{endpoint:I}=G(),m=async({id:v})=>{if(!y){l(!0);try{await i.deletePassportIssuance({input:{teamDid:n,sessionId:v}}),r()}catch(s){ie.error(s.message)}finally{l(!1),f(null)}}},b=()=>{l(!1),f(null)},h=v=>I?Ln({id:v.id,endpoint:I}):"";function A({data:v}){return t.jsxs("div",{className:"issuance",children:[t.jsxs(O,{display:"flex",justifyContent:"space-between",children:[t.jsx(Q,{permission:d?"":"mutate_team",role:d?te:[],children:s=>s?t.jsx(je,{passport:{title:v.title,name:v.name},onDelete:()=>f({title:S("team.passport.issuance.delete.title"),description:S("team.passport.issuance.delete.description",{link:h(v)}),confirm:S("common.delConfirm"),cancel:S("common.cancel"),onConfirm:()=>{m(v)},onCancel:b})}):t.jsx(je,{passport:{title:v.title,name:v.name}})}),t.jsxs("div",{style:{color:"#999"},children:[S("common.expires"),": ",me(v.expireDate,P)]})]}),t.jsx(O,{mt:2,children:t.jsx(Ce,{children:h(v)})})]})}return t.jsxs(Fr,{children:[e.map(v=>t.jsx(A,{data:v})),p&&t.jsx(Se,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel})]})}const Fr=V.div`
20
+ .MuiTableHead-root {
21
+ display: none;
22
+ }
23
+ .issuance {
24
+ padding: 16px 0;
25
+ border-bottom: 1px solid #f0f0f0;
26
+ .MuiTypography-root {
27
+ display: inline-block;
28
+ width: 100%;
29
+ background: #f3f3f3;
30
+ border-radius: 4px;
31
+ padding-top: 6px;
32
+ padding-bottom: 6px;
33
+ }
34
+ }
35
+ `;ot.propTypes={teamDid:C.string.isRequired,issuances:C.array,onRefresh:C.func};ot.defaultProps={issuances:[],onRefresh:()=>{}};var it={},Br=Kt;Object.defineProperty(it,"__esModule",{value:!0});var We=it.default=void 0,_r=Br(Ht()),$r=t;We=it.default=(0,_r.default)((0,$r.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");var B={};Object.defineProperty(B,"__esModule",{value:!0});B.getSourceProviders=B.getSourceProvider=at=B.getWalletDid=B.getWallet=B.getConnectedDids=B.getConnectedAccounts=B.getPermanentDid=void 0;const on=J;function Ur(e){return e==null?void 0:e.did}B.getPermanentDid=Ur;function Ie(e){return(e==null?void 0:e.connectedAccounts)||[]}B.getConnectedAccounts=Ie;function zr(e){return Ie(e).map(i=>i.did)}B.getConnectedDids=zr;function an(e){return Ie(e).find(i=>i.provider===on.LOGIN_PROVIDER.WALLET)}B.getWallet=an;function Wr(e){const n=an(e);return n==null?void 0:n.did}var at=B.getWalletDid=Wr;function Mr(e){return(e==null?void 0:e.sourceProvider)||on.LOGIN_PROVIDER.WALLET}B.getSourceProvider=Mr;function qr(e){return Ie(e).map(r=>r.provider)}B.getSourceProviders=qr;function Pe({teamDid:e,ownerDid:n,needReceive:r,roles:i,onCancel:d,onSuccess:S,onError:P,showOwnerPassport:p}){const{api:f}=q(),[y,l]=D.useState(!1),[I,m]=D.useState(""),{t:b}=H(),[h,A]=D.useState(""),v=async()=>{if(!h){m(b("team.member.error.passportEmpty"));return}m(null),l(!0);try{await f.createPassportIssuance({input:{teamDid:e,name:h,ownerDid:n}}),S()}catch(s){const o=ee(s);m(o),P(s)}finally{l(!1)}};return t.jsxs(Y,{title:b("team.passport.issue"),fullWidth:!0,open:!0,onClick:s=>s.stopPropagation(),onClose:d,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:t.jsxs(t.Fragment,{children:[t.jsx(U,{onClick:d,color:"inherit",size:"small",children:b("common.cancel")}),t.jsxs(U,{onClick:v,color:"primary",size:"small",disabled:y||!h,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[y&&t.jsx(oe,{size:16}),b(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[t.jsx(He,{component:"div",children:t.jsx(M,{component:"div",children:t.jsxs(Be,{style:{width:"100%"},variant:"outlined",children:[t.jsx($e,{children:b("common.passport")}),t.jsx(_e,{"data-cy":"issue-passport-select-passport",value:h,onChange:s=>{m(null),A(s.target.value)},fullWidth:!0,label:b("common.passport"),disabled:y,onKeyPress:s=>{s.key==="Enter"&&(s.preventDefault(),v())},children:i.filter(s=>p||s.name!=="owner").map(s=>t.jsx(ye,{value:s.name,"data-cy":`issue-passport-select-option-${s.name}`,children:t.jsx("span",{children:s.title||s.name})},s.name))})]})})}),!!I&&t.jsx(se,{severity:"error",variant:"icon",children:I})]})}Pe.propTypes={teamDid:C.string.isRequired,ownerDid:C.string.isRequired,needReceive:C.bool,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,roles:C.array,showOwnerPassport:C.bool};Pe.defaultProps={onError:()=>{},roles:[],showOwnerPassport:!1,needReceive:!0};function lt({passport:e,user:n,color:r,width:i,icon:d,children:S,createPassportSvg:P,...p}){const{t:f}=H();return t.jsxs(Vr,{display:"flex",alignItems:"center",...p,children:[t.jsx("div",{dangerouslySetInnerHTML:{__html:P({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:n.fullName,ownerDid:n.did,ownerAvatarUrl:n.avatar,revoked:e.revoked,preferredColor:r,width:i})}}),t.jsxs("div",{className:"body",children:[t.jsxs(O,{className:"title",display:"flex",alignItems:"center",children:[Nn(e.title),t.jsxs("div",{className:"status-icons",children:[d,e.revoked&&t.jsx(Yt,{})]})]}),e.expirationDate&&t.jsx(O,{className:"title",display:"flex",alignItems:"center",children:f("team.passport.validUntil",{date:e.expirationDate})}),S]})]})}lt.propTypes={passport:C.any.isRequired,user:C.any.isRequired,color:C.string.isRequired,createPassportSvg:C.func.isRequired,icon:C.any,children:C.any,width:C.number};lt.defaultProps={icon:null,children:null,width:150};const Vr=V(O)`
36
+ .body {
37
+ padding: 0;
38
+ margin-left: 24px;
39
+ margin-top: 0;
40
+ }
41
+ .title {
42
+ font-weight: 400;
43
+ font-size: 16px;
44
+ line-height: 19px;
45
+ color: #222222;
46
+ }
47
+ .tip {
48
+ display: flex;
49
+ align-items: center;
50
+ font-size: 14px;
51
+ margin-top: 6px;
52
+ color: #bbb;
53
+ }
54
+ .status-icons {
55
+ svg {
56
+ fill: #bfbfbf;
57
+ height: 1.2em;
58
+ margin-left: 0.4em;
59
+ }
60
+ }
61
+ `;function we({action:e,passport:n}){const{t:r}=H(),{roles:i}=G(),d=i.find(S=>S.name===n.role);return t.jsxs("div",{children:[t.jsx("div",{children:r(e==="enable"?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),d&&t.jsx(O,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),d&&t.jsx(O,{mt:1,children:d.description})]})}we.propTypes={action:C.string.isRequired,passport:C.object.isRequired};we.defaultProps={};function ct({user:e,onCreate:n,createPassportSvg:r}){var ne;const{t:i}=H(),{session:d}=Qt(),{roles:S,teamDid:P,teamIssuerDid:p,refresh:f,enablePassportIssuance:y,trustedPassports:l,passportColor:I,blocklet:m}=G(),{appIdList:b}=en(),{api:h,inService:A}=q(),[v,s]=D.useState(!1),[o,a]=D.useState(null),[c,u]=D.useState(!1),[j,x]=D.useState(""),R=[p,...b||[]].filter(Boolean),_=(Fe(e,"passports")||[]).map(E=>({...E,revoked:E.status===W.PASSPORT_STATUS.REVOKED})),z=async E=>{if(!v){s(!0);try{const $=E.status===W.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport";await h[$]({input:{teamDid:P,userDid:e.did,passportId:E.id}}),f()}catch($){ie.error(ee($))}finally{s(!1),a(null)}}},K=E=>E.status===W.PASSPORT_STATUS.REVOKED?a({title:i("team.member.enablePassport"),description:t.jsx(we,{action:"enable",passport:E}),confirm:i("common.enable"),cancel:i("common.cancel"),onConfirm:()=>{z(E)},onCancel:()=>{s(!1),a(null)},color:"primary"}):a({title:i("team.member.revokePassport"),description:t.jsx(we,{action:"revoke",passport:E}),confirm:i("common.revoke"),cancel:i("common.cancel"),onConfirm:()=>{z(E)},onCancel:()=>{s(!1),a(null)}}),F=(E,$)=>e.did===d.user.did&&d.user.passportId&&d.user.passportId===$.id?{revokable:!1,message:i("team.passport.shouldNotDeleteCurrent")}:E?P===$.issuer.id&&$.name==="owner"?{revokable:!1,message:i("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:i("team.passport.noPermission")},k=_.filter(E=>!j||E.title.includes(j)||E.name.includes(j));return t.jsxs(Hr,{children:[t.jsxs(Gn,{children:[t.jsx("div",{className:"left",children:t.jsx(Xn,{placeholder:i("team.passport.search"),value:j,onChange:E=>x(E.target.value)})}),t.jsx("div",{className:"right",children:y&&!!e.approved&&t.jsx(Q,{permission:A?"":"mutate_team",role:A?te:[],children:t.jsxs(U,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:()=>u(!0),children:[t.jsx(be,{style:{fontSize:16,marginRight:4}}),i("team.passport.issue")]})})})]}),t.jsxs(O,{children:[k.map(E=>t.jsx(Q,{permission:A?"":"mutate_team",role:A?te:[],children:$=>t.jsxs(O,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[t.jsx(lt,{passport:E,user:e,color:I,createPassportSvg:r,icon:R.length&&!R.includes(E.issuer.id)?t.jsx(Xt,{}):null,children:!!R.length&&!R.includes(E.issuer.id)&&t.jsxs("div",{className:"tip",children:[E.issuer.id!==p&&!l.some(ae=>ae.issuerDid===E.issuer.id)&&t.jsx(Z,{title:i("team.passport.notTrustedIssuerTip"),children:t.jsx(O,{component:We,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),t.jsx("span",{children:i("team.passport.issueBy",{name:E.issuer.name})})]})}),t.jsx(O,{children:F($,E).revokable?t.jsxs(U,{variant:"outlined",color:E.revoked?"primary":"secondary",onClick:()=>K(E),children:[E.revoked?t.jsx(be,{style:{fontSize:16,marginRight:4}}):t.jsx(Yt,{style:{height:16,marginRight:4}}),E.revoked?i("common.enable"):i("common.revoke")]}):t.jsx(Z,{title:F($,E).message,children:t.jsx(We,{style:{color:"#ddd"}})})})]})},E.id)),!k.length&&t.jsx(Jt,{children:i("common.empty")})]}),c&&t.jsx(Pe,{teamDid:P,ownerDid:e.did,needReceive:at(e)===e.did,roles:S,onCancel:()=>u(!1),onSuccess:()=>{n(),u(!1)},showOwnerPassport:m&&!((ne=m.settings)!=null&&ne.owner)}),o&&t.jsx(Se,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel,color:o.color})]})}ct.propTypes={user:C.object.isRequired,createPassportSvg:C.func.isRequired,onCreate:C.func};ct.defaultProps={onCreate:()=>{}};const Hr=V.div`
62
+ .passport-item {
63
+ .MuiButton-outlinedSecondary {
64
+ color: #f16e6e;
65
+ fill: #f16e6e;
66
+ background: #fcf3f3;
67
+ border: 0;
68
+ &:hover {
69
+ border: 0;
70
+ }
71
+ }
72
+ }
73
+ `,{ROLES:Kr,PASSPORT_STATUS:Qr}=W,Gr=e=>((e==null?void 0:e.passports)||[]).some(n=>n.role===Kr.OWNER&&n.status===Qr.VALID);var Xr={hasActiveOwnerPassport:Gr};const Yr=(e,n)=>e.nodeOwner&&e.nodeOwner.did===n,Ut=(e,n)=>e&&e.did===n;function Ae({user:e,onCancel:n,onSuccess:r,onError:i,children:d}){const{api:S,info:P,inService:p}=q(),{session:f}=Qt(),{teamDid:y,refresh:l}=G(),{t:I}=H(),[m,b]=D.useState(!1),[h,A]=D.useState(!1),v=()=>A(!0),s=async c=>{const{did:u,approved:j}=c;if(!m){b(!0);try{await S.updateUserApproval({input:{teamDid:y,user:{did:u,approved:!j}}}),A(!1),r(),l()}catch(x){ie.error(ee(x)),i()}finally{b(!1)}}},o={title:e.approved?I("team.member.forbidLogin"):I("team.member.allowLogin"),description:e.approved?I("team.member.forbidLoginDescription"):I("team.member.allowLoginDescription"),confirm:I("common.confirm"),cancel:I("common.cancel"),onConfirm:()=>{s(e)},onCancel:()=>{b(!1),A(!1),n()},color:e.approved?"error":"primary"};let a;return Xr.hasActiveOwnerPassport(e)?a=!1:p?a=!Ut(f.user,e.did):a=P.nodeOwner&&!Yr(P,e.did)&&!Ut(f.user,e.did),a?t.jsxs(t.Fragment,{children:[typeof d=="function"?d({can:a,open:v}):d,h?t.jsx(Se,{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}Ae.propTypes={user:C.object,onSuccess:C.func,onCancel:C.func,onError:C.func,children:C.oneOfType([C.object,C.func])};Ae.defaultProps={user:{},onSuccess:()=>{},onCancel:()=>{},onError:()=>{},children:null};function ln(e,n,r){if(e&&e.startsWith(W.USER_AVATAR_URL_PREFIX)){const i=window.env.apiPrefix||"/";return r?Pt(i,W.USER_AVATAR_PATH_PREFIX,e.replace(W.USER_AVATAR_URL_PREFIX,"")):Pt(i,W.USER_AVATAR_PATH_PREFIX,n,e.replace(W.USER_AVATAR_URL_PREFIX,""))}return e}function ut({user:e}){return(e.connectedAccounts||[]).map(r=>t.jsx(Ue,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.provider,children:t.jsx(Ke,{did:r.did,showQrcode:!0})},r.did))}ut.propTypes={user:C.object.isRequired};ut.defaultProps={};C.string.isRequired;const de="info";function dt({userDid:e,onCancel:n,initTab:r,createPassportSvg:i}){const{api:d,ws:{useSubscription:S},inService:P}=q(),{roles:p,teamDid:f,enablePassportIssuance:y}=G(),{t:l,locale:I}=H(),m=Vt({user:null,issuances:null,tab:r||de}),b=async(u,j)=>{try{const x=await d.doBatchQuery({getUser:{input:{teamDid:u,user:{did:j},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:u,ownerDid:j}}});x.getUser.user&&(x.getUser.user.avatar=ln(x.getUser.user.avatar,u,P),x.getUser.user.passports=(x.getUser.user.passports||[]).filter(R=>R.issuer)),m.user=x.getUser.user||{},m.issuances=x.getPassportIssuances.list||[]}catch(x){ie.error(ee(x))}};D.useEffect(()=>{f&&b(f,e)},[e,f]);const h=u=>{u.teamDid===f&&u.user&&u.user.did===e&&b(f,e)};S(J.TeamEvents.userUpdated,h,[e,f]),D.useEffect(()=>{m.issuances&&!m.issuances.length&&m.tab==="issuances"&&(m.tab=de)},[m.issuances]);const A=async u=>{await b(f,u.did),m.tab=de},v=()=>{var j,x;return(m.user?[{name:l("team.member.name"),value:m.user.fullName},{name:l("common.email"),value:m.user.email},{name:l("team.member.source"),value:t.jsx(O,{display:"flex",alignItems:"center",children:J.PROVIDER_NAME[((j=m.user)==null?void 0:j.sourceProvider)||W.USER_TYPE.WALLET]||((x=m.user)==null?void 0:x.sourceProvider)})},{name:l("team.member.allowLogin"),value:m.user.approved?l("common.yes"):l("common.no")},{name:l("team.member.lastLogin"),value:me(m.user.lastLoginAt,I)},{name:l("team.member.lastLoginIp"),value:m.user.lastLoginIp||""},{name:l("common.createdAt"),value:me(m.user.createdAt,I)},{name:l("common.remark"),value:m.user.remark||"--"},Array.isArray(m.user.tags)&&m.user.tags.length>0?{name:l("common.tags"),value:m.user.tags.map(R=>t.jsx(Zt,{style:{background:R.color,color:Gt(R.color),marginRight:4},children:R.title},R.id))}:null].filter(Boolean):[]).map(R=>R.name===l("common.did")?t.jsx(Ue,{valueComponent:"div",nameWidth:120,name:R.name,nameFormatter:()=>l("common.did"),children:R.value},R.name):t.jsx(Ue,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:R.name,children:R.value},R.name))},s={info:{label:l("common.basicInfo"),value:de,component:v},oauth:{label:l("team.member.connectedAccounts"),value:"oauth",component:()=>t.jsx(ut,{user:m.user,onChangeUser:A})},passports:{label:l("common.passport"),value:"passports",component:()=>t.jsx(ct,{user:m.user,teamDid:f,roles:p,createPassportSvg:i,onCreate:()=>{b(f,e).then(()=>{y&&m.issuances&&m.issuances.length&&(m.tab="issuances")})},onRefresh:()=>{b(f,e)}})},issuances:{label:l("team.passport.issuance.pending"),value:"issuances",component:()=>t.jsx(ot,{issuances:m.issuances||[],teamDid:f,onRefresh:()=>b(f,e)})}},o=Object.values(s).map(({label:u,value:j})=>({label:u,value:j})).filter(u=>{var j;return u.value==="issuances"?y&&m.issuances&&!!m.issuances.length:u.value==="oauth"?(((j=m.user)==null?void 0:j.connectedAccounts)||[]).find(R=>{var _;return R.provider!==(((_=m.user)==null?void 0:_.sourceProvider)||J.LOGIN_PROVIDER.WALLET)}):!0}),a=s[m.tab]||s.info,c=u=>{m.tab=u};return t.jsx(Y,{title:l("common.member"),onClose:n,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:m.user&&t.jsx(Q,{permission:P?"":"mutate_team",role:P?te:[],children:t.jsx(Ae,{user:m.user,children:({open:u})=>t.jsxs(es,{onClick:u,children:[m.user.approved?t.jsx(et,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):t.jsx(rt,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),m.user.approved?l("team.member.forbidLogin"):l("team.member.allowLogin")]})})}),children:t.jsxs(Jr,{children:[!m.user&&t.jsx(Zr,{children:t.jsx(oe,{})}),m.user&&t.jsxs("div",{children:[t.jsxs(O,{display:"flex",alignItems:"center",className:"info",children:[t.jsx(Fn,{src:m.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(O,{children:[t.jsx(O,{className:"name",children:m.user.fullName}),t.jsx(O,{className:"did",mt:1,children:t.jsx(Ke,{did:m.user.did,showQrcode:!0})})]})]}),t.jsx(O,{mx:3,className:"tabs",children:t.jsx(Jn,{tabs:o,current:m.tab,onChange:c,scrollButtons:"auto"})}),t.jsx("div",{className:"body",children:t.jsx(a.component,{})})]})]})})}dt.propTypes={userDid:C.string.isRequired,onCancel:C.func.isRequired,createPassportSvg:C.func.isRequired,initTab:C.string};dt.defaultProps={initTab:de};const Jr=V.div`
74
+ .info {
75
+ .name {
76
+ font-weight: 400;
77
+ font-size: 18px;
78
+ line-height: 25px;
79
+ color: #222222;
80
+ }
81
+ }
82
+
83
+ .tabs {
84
+ margin-top: 24px;
85
+ margin-left: 0;
86
+ margin-right: 0;
87
+ }
88
+
89
+ .body {
90
+ margin-top: 24px;
91
+ }
92
+ `,Zr=V.div`
93
+ flex: 1;
94
+ display: flex;
95
+ justify-content: center;
96
+ align-items: center;
97
+ height: 200px;
98
+ `,es=V.div`
99
+ flex-shrink: 0;
100
+ width: 100%;
101
+ height: 64px;
102
+ display: flex;
103
+ justify-content: center;
104
+ align-items: center;
105
+ cursor: pointer;
106
+ color: #999;
107
+ fill: #999;
108
+ font-size: 16px;
109
+ border-top: 1px solid #f0f0f0;
110
+ position: sticky;
111
+ bottom: 0;
112
+ background: #fff;
113
+ z-index: 10;
114
+ `;function mt(){const{api:e,inService:n}=q(),{t:r,locale:i}=D.useContext(pe),{teamDid:d,invitations:S,refresh:P,endpoint:p}=G(),[f,y]=D.useState(null),[l,I]=D.useState(!1),m=async({inviteId:v})=>{if(!l){I(!0);try{await e.deleteInvitation({input:{teamDid:d,inviteId:v}}),P(),await Bn(800)}catch(s){console.error(s)}finally{I(!1),y(null)}}},b=()=>{I(!1),y(null)},h=v=>p?Ve({inviteId:v.inviteId,endpoint:p}):"",A=[{label:r("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:v=>{const s=S[v];return p?t.jsx(Ce,{children:h(s)}):t.jsx(oe,{size:16})}}},{label:r("common.role"),name:"role",widtn:70},{label:r("common.remark"),name:"remark",options:{customBodyRender:v=>v||"--"}},{label:r("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:(v,{rowIndex:s})=>{var a;const o=S[s];return(a=o==null?void 0:o.inviter)==null?void 0:a.fullName}}},{label:r("common.expires"),name:"expireDate",options:{customBodyRender:v=>t.jsx(ve,{value:v,locale:i})}},{label:r("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:v=>{const s=S[v];return t.jsx(Q,{permission:n?"":"mutate_team",role:n?te:[],children:t.jsxs(U,{onClick:()=>y({title:r("team.inviting.delete.title"),description:r("team.inviting.delete.description",{link:h(s)}),confirm:r("common.delConfirm"),cancel:r("common.cancel"),onConfirm:()=>m(s),onCancel:b}),size:"small",color:"error",variant:"text",children:[t.jsx(Zn,{style:{fontSize:"1.2em"}}),r("common.delete")]})})}}}];return t.jsxs(ts,{children:[S.length?t.jsx(Qe,{locale:i,data:[...S],columns:A,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):t.jsx(Jt,{children:r("common.empty")}),f&&t.jsx(Se,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]})}const ts=V.div`
115
+ margin-top: -20px;
116
+ `;mt.propTypes={};mt.defaultProps={};var pt={},ns=Kt;Object.defineProperty(pt,"__esModule",{value:!0});var cn=pt.default=void 0,rs=ns(Ht()),ss=t;cn=pt.default=(0,rs.default)((0,ss.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 os extends Error{constructor(n){super(),this.name="AbortError",this.message=n}}const zt=e=>globalThis.DOMException===void 0?new os(e):new DOMException(e),Wt=e=>{const n=e.reason===void 0?zt("This operation was aborted."):e.reason;return n instanceof Error?n:zt(n)};async function is(e,n,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:d}={}){return new Promise((S,P)=>{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 n!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const p=[],f=[],y=new Map;let l=!1,I=!1,m=!1,b=0,h=0;const A=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),v=o=>{l=!0,I=!0,P(o)};d&&(d.aborted&&v(Wt(d)),d.addEventListener("abort",()=>{v(Wt(d))}));const s=async()=>{if(I)return;const o=await A.next(),a=h;if(h++,o.done){if(m=!0,b===0&&!I){if(!i&&f.length>0){v(new AggregateError(f));return}if(I=!0,y.size===0){S(p);return}const c=[];for(const[u,j]of p.entries())y.get(u)!==Mt&&c.push(j);S(c)}return}b++,(async()=>{try{const c=await o.value;if(I)return;const u=await n(c,a);u===Mt&&y.set(a,u),p[a]=u,b--,await s()}catch(c){if(i)v(c);else{f.push(c),b--;try{await s()}catch(u){v(u)}}}})()};(async()=>{for(let o=0;o<r;o++){try{await s()}catch(a){v(a);break}if(m||l)break}})()})}const Mt=Symbol("skip");async function as(e,n){return is(e,r=>r(),n)}function ft({type:e,user:n,onIssuePassport:r,onRefresh:i}){const{teamDid:d,roles:S}=G(),{confirmHolder:P,confirmApi:p}=qe(),{t:f}=D.useContext(pe),[y,l]=D.useState(!1),{api:I}=q(),m=X(async()=>{const{userSessions:b=[]}=n,h=b.map(A=>()=>I.logoutUser({input:{teamDid:d,appPid:d,userDid:n.did,visitorId:A.visitorId}}));await as(h,{concurrency:3,stopOnError:!1})});return t.jsxs(t.Fragment,{children:[P,t.jsx(er,{"data-cy":"member-actions",actions:[{icon:t.jsx(be,{fontSize:"small"}),text:f("team.passport.issue"),"data-cy":"action-issue-passport",onClick:b=>{b.stopPropagation(),l(!0)}},({close:b})=>t.jsx(Ae,{user:n,children:({open:h})=>t.jsxs(ye,{dense:!0,onClick:A=>{A.stopPropagation(),b(),h(A)},"data-cy":"action-toggle-block",children:[t.jsx(_n,{style:{minWidth:24,marginRight:8},children:n.approved?t.jsx(et,{}):t.jsx(rt,{})}),t.jsx($n,{primary:n.approved?f("team.member.forbidLogin"):f("team.member.allowLogin")})]})},"toggle-approval"),e==="blocklet"&&{icon:t.jsx(cn,{fontSize:"small"}),text:f("team.member.forceLogout"),onClick:b=>{b.stopPropagation(),p.open({title:f("team.member.forceLogout"),content:f("team.member.forceLogoutDescription"),confirmButtonText:f("common.confirm"),cancelButtonText:f("common.cancel"),onClick:h=>h.stopPropagation(),onConfirm:async()=>{await m(),await p.close(),i()}})}}].filter(Boolean)}),y&&t.jsx(Pe,{teamDid:d,ownerDid:n.did,needReceive:at(n)===n.did,roles:S,onCancel:()=>l(!1),onSuccess:()=>{r(),l(!1)}})]})}ft.propTypes={type:C.oneOf(["server","blocklet"]).isRequired,user:C.object.isRequired,onIssuePassport:C.func,onRefresh:C.func};ft.defaultProps={onIssuePassport:()=>{},onRefresh:()=>{}};const Le="$all",qt="$none",Ne=(e,n)=>{const r=e.find(i=>i.key===n);return(r==null?void 0:r.value)||0},ls=(e,n)=>{const r=e.passports||[];return r.length?!r.some(i=>{var d;return n.includes((d=i.issuer)==null?void 0:d.id)}):!1};function un({user:e}){const{t:n}=D.useContext(pe),r=t.jsxs("div",{className:"member-block",children:[t.jsxs("div",{className:"member-avatar",children:[t.jsx(Me,{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(Z,{title:n("team.passport.externalPassport"),children:t.jsx(O,{ml:1,className:"icon",children:t.jsx(Xt,{})})})]}),t.jsxs("div",{className:"member-meta",children:[t.jsx("div",{className:"member-text",children:t.jsx(tr,{children:e.fullName})}),Array.isArray(e.tags)&&e.tags.length>0&&t.jsx("div",{className:"member-tags",children:e.tags.map(i=>t.jsx(Zt,{style:{background:i.color,color:Gt(i.color),marginRight:4},children:i.title},i.id))})]})]});return e.approved?r:t.jsx(O,{display:"flex",alignItems:"center",children:t.jsx(Z,{title:n("team.member.forbidLoginDescription"),children:r})})}un.propTypes={user:C.object.isRequired};function dn({type:e,createPassportSvg:n}){var bt,jt,wt,St;const{confirmApi:r,confirmHolder:i}=qe({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:d=[],blocklet:S}=en(),{teamDid:P,invitations:p,teamIssuerDid:f,roles:y,refresh:l,enablePassportIssuance:I,endpoint:m,api:b}=G(),{inService:h,ws:{useSubscription:A}}=q(),v=[];if(S){const g=(((jt=(bt=S.settings)==null?void 0:bt.federated)==null?void 0:jt.sites)||[]).find(T=>T.isMaster!==!1),w=(((St=(wt=S.settings)==null?void 0:wt.federated)==null?void 0:St.sites)||[]).find(T=>T.appId===S.appDid);(w==null?void 0:w.status)==="approved"&&v.push({appId:g==null?void 0:g.appId,appName:g==null?void 0:g.appName,appDescription:g==null?void 0:g.appDescription,appLogo:g==null?void 0:g.appLogo,appPid:g==null?void 0:g.appPid,appUrl:g==null?void 0:g.appUrl,version:g==null?void 0:g.version,sourceAppPid:g==null?void 0:g.appPid,provider:"wallet"}),v.push({appId:w==null?void 0:w.appId,appName:w==null?void 0:w.appName,appDescription:w==null?void 0:w.appDescription,appLogo:w==null?void 0:w.appLogo,appPid:w==null?void 0:w.appPid,appUrl:w==null?void 0:w.appUrl,version:w==null?void 0:w.version,sourceAppPid:null,provider:"wallet"})}const{t:s,locale:o}=D.useContext(pe),[a,c]=D.useState(!1),[u,j]=D.useState(!1),[x,R]=D.useState(!1),[_,z]=D.useState(!1),[K,F]=D.useState(!1),[k,ne]=D.useState([]),[E,$]=D.useState(),[ae,mn]=D.useState([]),[gt]=gr({did:void 0}),ht=`members-${P}`,fe=Yn(ht),[L,le]=D.useState({role:Le,searchText:fe.searchText||"",hideBlocked:!1,pageSize:fe.rowsPerPage||10,page:fe.page?fe.page+1:1});Un(async()=>{if(gt.did){const{user:g}=await b.getUser({did:gt.did});g&&z(g)}});const De=(y||[]).map(g=>({name:g.name,title:g.title,num:Ne(ae,g.name)}));De.unshift({name:Le,title:"All Members",num:Ne(ae,Le)}),De.push({name:qt,title:"Other",num:Ne(ae,qt)});const xt=()=>{const g={includeTags:!0,includeUserSessions:e==="blocklet"};L.hideBlocked&&(g.approved=!0),g.role=L.role,L.searchText&&(g.search=L.searchText),F(!0),b.getUsers({query:g,paging:{page:L.page,pageSize:L.pageSize}}).then(w=>{F(!1),(w.users||[]).forEach(T=>{T.isFromExternal=ls(T,Vn(d)?[f]:d),T.avatar=ln(T.avatar,P,h),T.passports=(T.passports||[]).filter(N=>N.issuer)}),ne(w.users||[]),$(w.paging.total)}).catch(w=>{F(!1),ie.error(w.message)})},vt=()=>{b.getUsersCountPerRole().then(g=>{mn(g.counts||[])}).catch(g=>{ie.error(g.message)})},Re=g=>{g.teamDid===P&&(xt(),vt())};D.useEffect(()=>{xt()},[`${L.hideBlocked}-${L.role}-${L.page}-${L.pageSize}-${L.searchText}`]),D.useEffect(()=>{vt()},[]),A(J.TeamEvents.userUpdated,Re,[L]),A(J.TeamEvents.userAdded,Re,[L]);const pn=I,fn=X(g=>{r.open({title:"User Sessions",content:t.jsx(Ir,{user:g,showAction:!1,showUser:!1}),onConfirm(){r.close()},confirmButtonText:s("common.close"),showCancelButton:!1})}),gn=[{label:s("common.name"),name:"fullName",options:{customBodyRenderLite:g=>{const w=k[g];return t.jsx("div",{"data-cy":`member-name-${w.fullName}`,children:t.jsx(un,{user:w})},w.did)}}},{label:s("common.address"),name:"did",options:{customBodyRender:g=>t.jsx(Ke,{size:14,responsive:!1,compact:!0,copyable:!1,did:g})}},{label:s("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:g=>t.jsx(O,{sx:{minWidth:"100px"},children:t.jsx(ve,{value:g,locale:o})})}},{label:s("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:g=>g||"-"}},{label:s("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:g=>{const w=k[g],T=w.sourceProvider||W.USER_TYPE.WALLET,N=J.PROVIDER_NAME[T]||T;return w.sourceAppPid?`${N} (${s("team.member.federated")})`:N}}},e==="blocklet"&&{label:s("team.member.activeUserSessions"),name:"userSessions",options:{customBodyRenderLite:g=>{var T,N,ge;const w=k[g];return t.jsx(zn,{onClick:bn=>{bn.stopPropagation(),fn(w)},children:t.jsx(Wn,{badgeContent:(T=w==null?void 0:w.userSessions)==null?void 0:T.length,color:((N=w==null?void 0:w.userSessions)==null?void 0:N.length)>0?"primary":"default",sx:((ge=w==null?void 0:w.userSessions)==null?void 0:ge.length)>0?{}:{".MuiBadge-badge":{backgroundColor:"grey",color:"white"}},showZero:!0,children:t.jsx(Qn,{})})})}}},{label:s("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:g=>{const w=k[g];return t.jsx(Q,{permission:h?"":"mutate_team",role:h?te:[],children:t.jsx(ft,{type:e,user:w,onIssuePassport:()=>z({...w,initTab:"issuances"}),onRefresh:()=>Re({teamDid:P})})})}}}].filter(Boolean),Oe=[];pn&&(Oe.push(t.jsxs(U,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:()=>{R(!0)},children:[t.jsx(nn,{style:{height:"1em",marginRight:4}}),s("common.inviting"),p.length?` (${p.length})`:""]}),t.jsx(Q,{permission:h?"":"mutate_team",role:h?te:[],children:t.jsxs(U,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:()=>c(!0),children:[t.jsx(be,{style:{fontSize:"1.3em",marginRight:4}}),s("team.invite")]})})),e==="server"&&Oe.push(t.jsx(Q,{role:"owner",children:t.jsxs(U,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:()=>j(!0),children:[t.jsx(Kn,{style:{fontSize:"1.3em",marginRight:4}}),s("team.transferNode.name")]})})));const hn=g=>{K||le(w=>({...w,role:g,hideBlocked:!1,searchText:"",page:1}))},xn=g=>{le(w=>({...w,hideBlocked:g,page:1}))},vn=({page:g,rowsPerPage:w,searchText:T})=>{L.pageSize!==w?le(N=>({...N,pageSize:w,page:1})):L.page!==g+1?le(N=>({...N,page:g+1})):L.searchText!==T&&le(N=>({...N,searchText:T,page:1}))},yt=D.useRef(null),yn={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(g,{dataIndex:w},T){var N;if((N=yt.current)!=null&&N.contains(T.target)){const ge=k[w];z(ge)}},page:L.page-1,rowsPerPage:L.pageSize,count:E,searchDebounceTime:600};return t.jsxs(cs,{children:[i,t.jsxs(O,{className:"main",display:"flex",sx:{mt:h?4:0},children:[t.jsx("div",{className:"left",children:t.jsx("div",{className:"tabs",children:De.map(g=>t.jsxs("div",{className:`tab ${L.role===g.name?"active":""}`,onClick:()=>hn(g.name),children:[t.jsx("span",{className:"text",children:g.title}),t.jsx("span",{className:Hn("badge",{"is-rect":g.num>999}),children:g.num})]},g.name))})}),t.jsx("div",{ref:yt,className:"right",children:t.jsx(Qe,{className:"main-table",verticalKeyWidth:100,locale:o,durable:ht,durableKeys:["page","rowsPerPage"],title:t.jsx("div",{className:"table-toolbar-left",children:t.jsx(Mn,{control:t.jsx(qn,{sx:{display:"flex !important"},disabled:K,color:"primary",checked:L.hideBlocked,onChange:g=>xn(g.target.checked)}),label:s("team.member.hideBlockedMember")})}),data:k,columns:gn,customButtons:Oe,options:yn,loading:K,onChange:vn})})]}),t.jsx(Y,{title:s("common.inviting"),onClose:()=>R(!1),open:x,maxWidth:"lg",fullWidth:!0,children:t.jsx(mt,{})}),_&&t.jsx(dt,{onCancel:()=>z(null),userDid:_.did,createPassportSvg:n,initTab:_.initTab}),a&&t.jsx(Ye,{teamDid:P,endpoint:m,roles:y,apps:v,onCancel:()=>c(!1),onSuccess:()=>{l(),c(!1)}}),u&&t.jsx(Je,{teamDid:P,endpoint:m,roles:y,onCancel:()=>j(!1),onSuccess:()=>{l(),j(!1)}})]})}const cs=V.div`
117
+ .main {
118
+ .left {
119
+ width: 168px;
120
+ flex-shrink: 0;
121
+ margin-right: 65px;
122
+ .tabs {
123
+ padding-top: 16px;
124
+ .tab {
125
+ display: flex;
126
+ justify-content: space-between;
127
+ align-items: center;
128
+ padding: 8px 16px;
129
+ transition: background 0.4s;
130
+
131
+ width: 168px;
132
+ height: 36px;
133
+ border-radius: 8px;
134
+
135
+ cursor: pointer;
136
+ user-select: none;
137
+
138
+ &:nth-child(n + 2) {
139
+ margin-top: 24px;
140
+ }
141
+
142
+ &.active {
143
+ background: #f2f2f2;
144
+ }
145
+
146
+ &:hover {
147
+ background: #f2f2f2;
148
+ }
149
+
150
+ .text {
151
+ font-weight: 400;
152
+ font-size: 16px;
153
+ line-height: 19px;
154
+
155
+ color: #222222;
156
+ }
157
+
158
+ .badge {
159
+ display: flex;
160
+ flex-shrink: 0;
161
+ justify-content: center;
162
+ align-items: center;
163
+ width: 20px;
164
+ height: 20px;
165
+ border-radius: 100%;
166
+ color: #fff;
167
+ background: #666666;
168
+ font-size: 10px;
169
+ font-weight: 400;
170
+ &.is-rect {
171
+ width: auto;
172
+ border-radius: 8px;
173
+ padding: 0 4px;
174
+ }
175
+ }
176
+ }
177
+ }
178
+ @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
179
+ display: none;
180
+ }
181
+ }
182
+ .right {
183
+ flex: 1;
184
+ overflow: auto;
185
+ }
186
+ }
187
+
188
+ .member-block {
189
+ display: flex;
190
+ justify-content: flex-start;
191
+ align-items: center;
192
+ .member-avatar {
193
+ position: relative;
194
+ display: flex;
195
+ justify-content: center;
196
+ align-items: center;
197
+ }
198
+ .member-meta {
199
+ margin-left: 10px;
200
+ display: flex;
201
+ flex-direction: column;
202
+ justify-content: center;
203
+ align-items: flex-start;
204
+ }
205
+ .badge-block {
206
+ width: 14px;
207
+ height: 14px;
208
+ position: absolute;
209
+ right: -4px;
210
+ top: -4px;
211
+ background: #ff5757;
212
+ border-radius: 100%;
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ &::after {
217
+ content: '';
218
+ width: 6px;
219
+ height: 2px;
220
+ background: #fefefe;
221
+ }
222
+ }
223
+ }
224
+
225
+ .table-toolbar-left {
226
+ display: flex;
227
+ justify-content: center;
228
+ align-items: center;
229
+ padding: 7px 0;
230
+ }
231
+ `;dn.propTypes={type:C.oneOf(["server","blocklet"]).isRequired,createPassportSvg:C.func.isRequired};const Ls=Object.freeze(Object.defineProperty({__proto__:null,default:dn},Symbol.toStringTag,{value:"Module"}));export{dn as M,je as P,Ls as i};
@@ -1 +1 @@
1
- import{r as E,q as j,z as I,j as e,V as W,C as k,cs as T,O as v,x as L,A as h,F as N,u as R,y as S,am as U,ae as b}from"./index-BF8aCpwD.js";import{w as F}from"./wrap-locale-BFLBF298.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function O(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{O as default};
1
+ import{r as E,q as j,z as I,j as e,V as W,C as k,cs as T,O as v,x as L,A as h,F as N,u as R,y as S,am as U,ae as b}from"./index-2z9-wC0z.js";import{w as F}from"./wrap-locale-BefWbM-O.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:m}=j(),w=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?w(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function O(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{O as default};