@abtnode/blocklet-services 1.16.39-beta-20250218-132815-6baaf20e → 1.16.39-beta-20250220-212222-627e9ea7

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 (202) hide show
  1. package/api/index.js +1 -1
  2. package/api/libs/push-kit/index.js +2 -2
  3. package/api/services/auth/index.js +1 -2
  4. package/api/services/dashboard/index.js +32 -48
  5. package/api/services/notification/notification-queue.js +77 -165
  6. package/api/socket/channel/did.js +44 -32
  7. package/api/util/attach-shared-utils.js +11 -4
  8. package/dist/assets/{Add-meGhscd6.js → Add-qzAc2S9X.js} +1 -1
  9. package/dist/assets/{ArrowDropDown-B7S4xnEe.js → ArrowDropDown-CH-FgtE-.js} +1 -1
  10. package/dist/assets/{CheckCircle-CnvZ4oB1.js → CheckCircle-Bk5vNiEj.js} +1 -1
  11. package/dist/assets/{ChevronLeft-D1qkw0FM.js → ChevronLeft-CtdCxfvp.js} +1 -1
  12. package/dist/assets/{ChevronRight-CEkTH0up.js → ChevronRight-C0FYeIUm.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BjrgG_HY.js → DeleteOutline-DJPUGW0c.js} +1 -1
  14. package/dist/assets/{Done-7hvoRcVZ.js → Done-BBJndopl.js} +1 -1
  15. package/dist/assets/{Download-CMvqPsK9.js → Download-DR7jogQn.js} +1 -1
  16. package/dist/assets/{EditIcon-BOr0kf6I.js → EditIcon-Mm3W5DE6.js} +1 -1
  17. package/dist/assets/{Error-D3I1nNnO.js → Error-DtmzeQ7l.js} +1 -1
  18. package/dist/assets/{Google-TNOfJ3uU.js → Google-DLwblvhu.js} +1 -1
  19. package/dist/assets/{InfoOutlined-CwoytfGr.js → InfoOutlined-D5FF63tH.js} +1 -1
  20. package/dist/assets/{Launch-wyBVNKfb.js → Launch-CmFwRERO.js} +1 -1
  21. package/dist/assets/{LaunchOutlined-B2ZU9fkg.js → LaunchOutlined-DBHgr88s.js} +1 -1
  22. package/dist/assets/{LockIcon-D-W4Rph6.js → LockIcon-BbWIWjve.js} +1 -1
  23. package/dist/assets/{Loop-CQAI5rIS.js → Loop-Bca4uFY8.js} +1 -1
  24. package/dist/assets/{MoreHoriz-CyCcv2bV.js → MoreHoriz-Dye919yY.js} +1 -1
  25. package/dist/assets/{PlayArrow-B5ZFUKPq.js → PlayArrow-C2iusqXD.js} +1 -1
  26. package/dist/assets/{QuestionMarkCircle-BvUTckGB.js → QuestionMarkCircle-D5Im4T0u.js} +1 -1
  27. package/dist/assets/{ServerLogo-BDEZRDcg.js → ServerLogo-DWgX8KHy.js} +1 -1
  28. package/dist/assets/{ViewList-C8AcRueZ.js → ViewList-DKhSCuMV.js} +1 -1
  29. package/dist/assets/access-control-B0LaD0k_.js +13 -0
  30. package/dist/assets/{actions-C0a0eUYM.js → actions-yv07Sweq.js} +1 -1
  31. package/dist/assets/{add-component-core-CK3SAdlQ.js → add-component-core-C2j8WeZe.js} +35 -35
  32. package/dist/assets/add-resource-BqHzz2Ig.js +1 -0
  33. package/dist/assets/addon-B-oiJMyb.js +31 -0
  34. package/dist/assets/{analytics-CjaAB5m2.js → analytics-Djm-FxYj.js} +1 -1
  35. package/dist/assets/{ar-DoIWDL3Q.js → ar-BIivBIFd.js} +1 -1
  36. package/dist/assets/ar-COZYSjgL.js +3 -0
  37. package/dist/assets/{audit-logs-bl5st5Lr.js → audit-logs-e69kZ-on.js} +1 -1
  38. package/dist/assets/{base32-9oQoOkFy.js → base32-CD3Vv-Tv.js} +1 -1
  39. package/dist/assets/branding-BxqW8Sc9.js +40 -0
  40. package/dist/assets/{bundle-avatar-Dnk7mw7b.js → bundle-avatar-BHE5y99P.js} +1 -1
  41. package/dist/assets/button-DYvqAiv_.js +1 -0
  42. package/dist/assets/{click-to-copy-C9X-UQyL.js → click-to-copy-Do3l3xtT.js} +1 -1
  43. package/dist/assets/complete-BHA60Kfa.js +45 -0
  44. package/dist/assets/{component-B0WI6_H4.js → component-CkH8Sb15.js} +96 -88
  45. package/dist/assets/config-CGVl3CyQ.js +32 -0
  46. package/dist/assets/{config-C0wq7rMr.js → config-CZ4gUB4m.js} +1 -1
  47. package/dist/assets/{config-navigation-Dskr7Yic.js → config-navigation-B_PVAliu.js} +3 -3
  48. package/dist/assets/{config-space-BYYAVRcS.js → config-space-Cjs4lh6z.js} +1 -1
  49. package/dist/assets/{confirm-BmLsHbj9.js → confirm-HOW8FaxK.js} +1 -1
  50. package/dist/assets/{connect-06lWrPrR.js → connect--Oy8GGMA.js} +1 -1
  51. package/dist/assets/{connect-hhGPDSK8.js → connect-D4PAe19d.js} +1 -1
  52. package/dist/assets/{connect-to-DIJ57-hM.js → connect-to-aA5MeDcj.js} +1 -1
  53. package/dist/assets/{content-layout-cWwRTmIc.js → content-layout-CE2kjm54.js} +1 -1
  54. package/dist/assets/{dashboard-PlqPcVrd.js → dashboard-CiOynIcf.js} +10 -10
  55. package/dist/assets/de-C2zBBjYP.js +3 -0
  56. package/dist/assets/{de-BVgb1fEg.js → de-CQlYxUo4.js} +1 -1
  57. package/dist/assets/delete-confirm-CsLJksmh.js +1 -0
  58. package/dist/assets/{did-address-Bl2N44vc.js → did-address-5heyoc8D.js} +1 -1
  59. package/dist/assets/domain-DH9NJU3V.js +9 -0
  60. package/dist/assets/domain-action-card-COoKhuua.js +15 -0
  61. package/dist/assets/domains-CyoWnOlx.js +1 -0
  62. package/dist/assets/{email-9CbD02fM.js → email-kdvuQq1P.js} +1 -1
  63. package/dist/assets/es-BeW3ehjv.js +3 -0
  64. package/dist/assets/{es-CWcVPAna.js → es-CiFVrJLk.js} +1 -1
  65. package/dist/assets/{exchange-passport-ZTeqENxf.js → exchange-passport-DC5cSNtB.js} +1 -1
  66. package/dist/assets/{form-text-input-DEadnM80.js → form-text-input-Vg6k4hxG.js} +1 -1
  67. package/dist/assets/{fr-C8Jr_C8u.js → fr-ByVHFXxu.js} +1 -1
  68. package/dist/assets/fr-D2xyGusB.js +3 -0
  69. package/dist/assets/{fuel-AxStjHWS.js → fuel-BtUPmbM2.js} +1 -1
  70. package/dist/assets/{fullpage-BXvfrD1C.js → fullpage-9ClXH1L9.js} +1 -1
  71. package/dist/assets/{get-safe-url-BVjMxmwp.js → get-safe-url-BRR4RLgg.js} +1 -1
  72. package/dist/assets/{get-safe-url-BxZD1oA_.js → get-safe-url-bdLdP6Lf.js} +1 -1
  73. package/dist/assets/{hi-DTqZQNNB.js → hi-BIS_6XAM.js} +1 -1
  74. package/dist/assets/hi-OH9OAZfb.js +1 -0
  75. package/dist/assets/{home-CrkVy1DG.js → home-DERpglCy.js} +1 -1
  76. package/dist/assets/{id-CUsGyKYW.js → id-BK78HolG.js} +1 -1
  77. package/dist/assets/id-BNCctHPN.js +3 -0
  78. package/dist/assets/{iframe-BcWepstA.js → iframe-D3k1dg5d.js} +1 -1
  79. package/dist/assets/index-8p3WpvMR.js +192 -0
  80. package/dist/assets/{index-DIQ33Q8Z.js → index-B0unYdcz.js} +1 -1
  81. package/dist/assets/{index-BBOSdbE7.js → index-B3zo8s95.js} +1 -1
  82. package/dist/assets/{index-BtFCAsqh.js → index-BQSYz_Lo.js} +1 -1
  83. package/dist/assets/{index-DgaUl_lv.js → index-BbnozP7b.js} +1 -1
  84. package/dist/assets/index-BelkkFch.js +228 -0
  85. package/dist/assets/index-BtWvJbA-.js +52 -0
  86. package/dist/assets/{index-DkVoxpR-.js → index-BwEZdySL.js} +7 -7
  87. package/dist/assets/{index-Be9vrMiA.js → index-Bygo8biQ.js} +1 -1
  88. package/dist/assets/{index-CHFvfli7.js → index-CF4Aobpk.js} +1 -1
  89. package/dist/assets/{index-CDvqNewi.js → index-CR0qrcky.js} +1 -1
  90. package/dist/assets/{index-BSC2apzE.js → index-CfM3rPHl.js} +1 -1
  91. package/dist/assets/{index-DtwN19zv.js → index-DIP3om2u.js} +1 -1
  92. package/dist/assets/{index-C-D-nCB1.js → index-DQ3_atB3.js} +1 -1
  93. package/dist/assets/{index-DfBNyFsV.js → index-DV2omMe2.js} +1 -1
  94. package/dist/assets/{index-ChSPqVLh.js → index-DcvnbXW2.js} +1 -1
  95. package/dist/assets/index-H3wqK9-u.js +109 -0
  96. package/dist/assets/{index-BXlJ03I_.js → index-XiSmd1mo.js} +1 -1
  97. package/dist/assets/index-dZzRZ2ZY.js +104 -0
  98. package/dist/assets/{invitation-BzHMoDRH.js → invitation-CxmBuTs1.js} +6 -6
  99. package/dist/assets/{invite-BBcuJaUv.js → invite-B874TDmG.js} +1 -1
  100. package/dist/assets/{issue-passport-sgBfFZ4Y.js → issue-passport-D9TAuz7P.js} +1 -1
  101. package/dist/assets/item-Bl6VQtAH.js +2 -0
  102. package/dist/assets/ja-BP7svMm3.js +3 -0
  103. package/dist/assets/{ja-B0U7M2t1.js → ja-C_qbKn0g.js} +1 -1
  104. package/dist/assets/ko-Bucx3EaX.js +3 -0
  105. package/dist/assets/{ko-CpDA9JjF.js → ko-Dlp9c2u9.js} +1 -1
  106. package/dist/assets/{launch-result-message-keU5grqY.js → launch-result-message-B237vj_f.js} +1 -1
  107. package/dist/assets/{layout-CGas_HfS.js → layout--JdBWkq8.js} +1 -1
  108. package/dist/assets/{list-cZ-OXxN0.js → list-D6KYwBs8.js} +1 -1
  109. package/dist/assets/{list-header-Dd4BEf4y.js → list-header-CRB0LxnL.js} +1 -1
  110. package/dist/assets/localization-CfyOuYf8.js +1 -0
  111. package/dist/assets/{log-BFj6TDz5.js → log-CY8wNU8M.js} +1 -1
  112. package/dist/assets/{login-B-6s411x.js → login-B248a-js.js} +1 -1
  113. package/dist/assets/login-oauth-callback-BLrbomPI.js +1 -0
  114. package/dist/assets/{logo-uploader-pyVqJwKp.js → logo-uploader-CXyCerZA.js} +3 -3
  115. package/dist/assets/{lost-passport-DKkxzCH8.js → lost-passport-BviMxb1A.js} +1 -1
  116. package/dist/assets/{open-window-Cvetj9Mn.js → open-window-Ch1rgFaC.js} +1 -1
  117. package/dist/assets/overview-B6x2PVnm.js +12 -0
  118. package/dist/assets/{page-header--y63DY5K.js → page-header-BVxfqM_P.js} +1 -1
  119. package/dist/assets/{permission-Be_APIVZ.js → permission-Ct9GXCMW.js} +1 -1
  120. package/dist/assets/{preferences-D-NDmLhf.js → preferences-BhZaRM6Y.js} +1 -1
  121. package/dist/assets/pt-DWx2CRwy.js +1 -0
  122. package/dist/assets/{pt-7r06GaNd.js → pt-SFZ6JUYf.js} +1 -1
  123. package/dist/assets/publish-resource-DcoLPJys.js +1 -0
  124. package/dist/assets/{react-beautiful-dnd.esm-Czr1mmuu.js → react-beautiful-dnd.esm-Bj96SiFV.js} +1 -1
  125. package/dist/assets/{relative-time-D0P0AJUI.js → relative-time-cY8dsU43.js} +1 -1
  126. package/dist/assets/{ru-MS-ksi2g.js → ru-Bz5lOwmE.js} +1 -1
  127. package/dist/assets/ru-CCmcxEDp.js +1 -0
  128. package/dist/assets/sdk-DQoMrTNt.js +1 -0
  129. package/dist/assets/{session-CV6ez46v.js → session-CldqrK3N.js} +1 -1
  130. package/dist/assets/setup-AfPc0iVj.js +19 -0
  131. package/dist/assets/{shorten-label-J69eHfMN.js → shorten-label-la5sIm_0.js} +1 -1
  132. package/dist/assets/{simple-select-D06JmA0a.js → simple-select-Cu-p9eCv.js} +1 -1
  133. package/dist/assets/{slicedToArray-CXBLQZX4.js → slicedToArray-DBh5Z78L.js} +2 -2
  134. package/dist/assets/{start-BjFFihjS.js → start-D-vJAX65.js} +1 -1
  135. package/dist/assets/{step-actions-qXq3r5tX.js → step-actions-EEz4d7kn.js} +1 -1
  136. package/dist/assets/{studio-BNGylnt7.js → studio-BfuxFzVZ.js} +1 -1
  137. package/dist/assets/{switch-control-DmKC0hpm.js → switch-control-DkVbfEAf.js} +1 -1
  138. package/dist/assets/{th-gcuRSNHo.js → th-B1jLPjfm.js} +1 -1
  139. package/dist/assets/th-yhtyMUEz.js +1 -0
  140. package/dist/assets/{traffic-Djmt2Ph8.js → traffic-DIdLhQbQ.js} +1 -1
  141. package/dist/assets/{transfer-B9ohZjja.js → transfer-CSUEJJtc.js} +1 -1
  142. package/dist/assets/{unsubscribe-6xRksnNz.js → unsubscribe-Dma6eGwK.js} +1 -1
  143. package/dist/assets/{use-mobile-DnWfrhc7.js → use-mobile-B7gJcr5J.js} +1 -1
  144. package/dist/assets/{useAsync-Ua5iss51.js → useAsync-CEZQNMFX.js} +1 -1
  145. package/dist/assets/{useAsyncRetry-Bmo6a1Zp.js → useAsyncRetry-BEB-tWmQ.js} +2 -2
  146. package/dist/assets/{useLocalStorage-B5t6MEw6.js → useLocalStorage-CM7gP1Ni.js} +1 -1
  147. package/dist/assets/{user-center-DEGm9vzv.js → user-center-BkMU0Sgl.js} +1 -1
  148. package/dist/assets/util-C5G3YrVZ.js +1 -0
  149. package/dist/assets/{util-Bl4vyFsm.js → util-Dn2l5LdV.js} +1 -1
  150. package/dist/assets/{vendor-arcblock-BFUPp1Ez.js → vendor-arcblock-CLdpcBR_.js} +73 -73
  151. package/dist/assets/{vendor-hooks-BKxTDk_P.js → vendor-hooks-ZnvK17j8.js} +2 -2
  152. package/dist/assets/vendor-mui-core-DrGFkjqr.js +266 -0
  153. package/dist/assets/{vendor-mui-x-CSUdon8K.js → vendor-mui-x-vjsTA-wt.js} +1 -1
  154. package/dist/assets/vi-C8K3TxgS.js +1 -0
  155. package/dist/assets/{vi-CGYOhf_R.js → vi-RXH5xiEz.js} +1 -1
  156. package/dist/assets/wrap-locale-fZXg9Dsd.js +1 -0
  157. package/dist/assets/zh-BZ_tPxRT.js +4 -0
  158. package/dist/assets/{zh-BYS_9r4v.js → zh-NJ5wkDCG.js} +1 -1
  159. package/dist/assets/{zh-tw-BR5CO3an.js → zh-tw-BpuS6s2j.js} +1 -1
  160. package/dist/assets/zh-tw-DKnxL7q7.js +3 -0
  161. package/dist/index.html +4 -4
  162. package/dist/service-worker.js +1 -1
  163. package/package.json +34 -34
  164. package/dist/assets/access-control-ClVHa3J1.js +0 -13
  165. package/dist/assets/add-resource-hs_iM1xk.js +0 -1
  166. package/dist/assets/addon-C7fx4MJ0.js +0 -31
  167. package/dist/assets/ar-BFUPmTkR.js +0 -3
  168. package/dist/assets/branding-5S3zjZlC.js +0 -40
  169. package/dist/assets/button-BTVoaDd7.js +0 -1
  170. package/dist/assets/complete-C3yyjx_N.js +0 -45
  171. package/dist/assets/config-DINcJX6A.js +0 -32
  172. package/dist/assets/de-hV0yD3gq.js +0 -3
  173. package/dist/assets/domain-DDa_Ldun.js +0 -9
  174. package/dist/assets/domain-list-DXbfS21Z.js +0 -15
  175. package/dist/assets/es-BcSAobJW.js +0 -3
  176. package/dist/assets/fr-8qti32p1.js +0 -3
  177. package/dist/assets/hi-DDEUhQcX.js +0 -1
  178. package/dist/assets/id-DkUYINLx.js +0 -3
  179. package/dist/assets/index-BJA4YPaC.js +0 -243
  180. package/dist/assets/index-CoxJ8G1A.js +0 -77
  181. package/dist/assets/index-DcfIKM1A.js +0 -9
  182. package/dist/assets/index-DkufOgYs.js +0 -125
  183. package/dist/assets/index-MxM82EtU.js +0 -228
  184. package/dist/assets/index-uYcwdGZL.js +0 -104
  185. package/dist/assets/item-C5sAxGxS.js +0 -2
  186. package/dist/assets/ja-C2LP4WQG.js +0 -3
  187. package/dist/assets/ko-C-DMeONa.js +0 -3
  188. package/dist/assets/localization-Z_CTe1Z8.js +0 -1
  189. package/dist/assets/login-oauth-callback-aKbzfltj.js +0 -1
  190. package/dist/assets/overview-BxbJCUbS.js +0 -12
  191. package/dist/assets/pt-CbxvF__Z.js +0 -1
  192. package/dist/assets/publish-resource-CxkiI4_n.js +0 -1
  193. package/dist/assets/ru-DLHrAeE7.js +0 -1
  194. package/dist/assets/sdk-NKQJT0FS.js +0 -1
  195. package/dist/assets/setup-CF2VhAxD.js +0 -19
  196. package/dist/assets/th-Dil9kwjH.js +0 -1
  197. package/dist/assets/util-PzCAH0nE.js +0 -1
  198. package/dist/assets/vendor-mui-core-xF5F4eT7.js +0 -266
  199. package/dist/assets/vi-B46hyfUM.js +0 -1
  200. package/dist/assets/wrap-locale-6MxBCfA2.js +0 -1
  201. package/dist/assets/zh-DWWuPzr1.js +0 -4
  202. package/dist/assets/zh-tw-Ci21sS2Y.js +0 -3
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-BxbJCUbS.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-BFUPp1Ez.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-BBOSdbE7.js","assets/index-uYcwdGZL.js","assets/did-address-Bl2N44vc.js","assets/domain-list-DXbfS21Z.js","assets/Add-meGhscd6.js","assets/base32-9oQoOkFy.js","assets/LockIcon-D-W4Rph6.js","assets/CheckCircle-CnvZ4oB1.js","assets/util-PzCAH0nE.js","assets/useSetState-Crt4S51m.js","assets/permission-Be_APIVZ.js","assets/session-CV6ez46v.js","assets/useAsyncRetry-Bmo6a1Zp.js","assets/useAsync-Ua5iss51.js","assets/confirm-BmLsHbj9.js","assets/format-error-C0Ke3VXF.js","assets/InfoOutlined-CwoytfGr.js","assets/api-K65cLqol.js","assets/actions-C0a0eUYM.js","assets/MoreHoriz-CyCcv2bV.js","assets/useLocalStorage-B5t6MEw6.js","assets/PlayArrow-B5ZFUKPq.js","assets/get-safe-url-BVjMxmwp.js","assets/index-DIQ33Q8Z.js","assets/index-BtFCAsqh.js","assets/index-DoZ2YM4T.js","assets/Loop-CQAI5rIS.js","assets/ViewList-C8AcRueZ.js","assets/list-header-Dd4BEf4y.js","assets/click-to-copy-C9X-UQyL.js","assets/DeleteOutline-BjrgG_HY.js","assets/util-Bl4vyFsm.js","assets/sdk-NKQJT0FS.js","assets/index-BSC2apzE.js","assets/shorten-label-J69eHfMN.js","assets/index-BXlJ03I_.js","assets/EditIcon-BOr0kf6I.js","assets/Google-TNOfJ3uU.js","assets/cloneDeep-BRiLvZjr.js","assets/index-DkVoxpR-.js","assets/iframe-BcWepstA.js","assets/config-C0wq7rMr.js","assets/form-text-input-DEadnM80.js","assets/Done-7hvoRcVZ.js","assets/logo-uploader-pyVqJwKp.js","assets/ArrowDropDown-B7S4xnEe.js","assets/ChevronRight-CEkTH0up.js","assets/bundle-avatar-Dnk7mw7b.js","assets/simple-select-D06JmA0a.js","assets/isEmail-BWNRBSAy.js","assets/switch-control-DmKC0hpm.js","assets/audit-logs-bl5st5Lr.js","assets/index-ChSPqVLh.js","assets/index-D4PP6P2d.css","assets/relative-time-D0P0AJUI.js","assets/index-DtwN19zv.js","assets/index-CoxJ8G1A.js","assets/list-cZ-OXxN0.js","assets/index-CHFvfli7.js","assets/traffic-Djmt2Ph8.js","assets/LaunchOutlined-B2ZU9fkg.js","assets/ChevronLeft-D1qkw0FM.js","assets/index-C-D-nCB1.js","assets/vendor-mui-x-CSUdon8K.js","assets/log-BFj6TDz5.js","assets/Download-CMvqPsK9.js","assets/log-D33dFtt_.css","assets/index-MxM82EtU.js","assets/Error-D3I1nNnO.js","assets/react-beautiful-dnd.esm-Czr1mmuu.js","assets/raf-schd.esm-Cxhj8umC.js","assets/QuestionMarkCircle-BvUTckGB.js","assets/item-C5sAxGxS.js","assets/Launch-wyBVNKfb.js","assets/config-navigation-Dskr7Yic.js","assets/slicedToArray-CXBLQZX4.js","assets/index-C2fPoxDR.js","assets/index-Be9vrMiA.js","assets/use-mobile-DnWfrhc7.js","assets/connect-to-DIJ57-hM.js","assets/config-space-BYYAVRcS.js","assets/component-B0WI6_H4.js","assets/index-DcfIKM1A.js","assets/add-component-core-CK3SAdlQ.js","assets/launch-result-message-keU5grqY.js","assets/page-header--y63DY5K.js","assets/index-CDvqNewi.js","assets/content-layout-cWwRTmIc.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-CjaAB5m2.js"])))=>i.map(i=>d[i]);
2
- import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F as On,G as fe,H as $n,I as as,o as je,J as cs,K as ls,k as ln,g as us,j as ds,m as un,l as fs,n as ps,L as Oe,e as Re,M as hs,_ as B,O as ms,Q as dn,N as gs,c as fn}from"./index-uYcwdGZL.js";import{a1 as U,j as o,E as m,aa as te,I as vt,ak as xs,ad as Mn,ah as yt,al as vs,bm as ys,a2 as re,bn as bs,bq as js,T as N,bx as ws,aN as pn,by as hn,a3 as I,a4 as ze,bz as Ss,t as Q,Z as Qe,bA as Cs,a5 as _s,bB as Is,bp as bt,am as Nn,bC as Es,aq as Ls,as as Ts,bD as zn,bE as Bn,bF as Un,A as ae,aj as Hn,aK as Ps}from"./vendor-mui-core-xF5F4eT7.js";import{a0 as H,aa as Rs,a2 as jt,ab as Ds,a3 as wt,b as $,z as mn,j as ee,e as X,_ as ks,ac as As,ad as Fn,ae as Os,af as $s,E as St,ag as Vn,ah as Ms,ai as Ns,aj as zs,C as Be,ak as Bs,W as Us,al as Hs,am as Fs,H as Vs,R as qs,an as Ws}from"./vendor-arcblock-BFUPp1Ez.js";import{r as x,L as qn,k as Wn,f as Ks,l as Gs}from"./vendor-react-D-afvo_7.js";import{d as Ue,s as Qs}from"./vendor-hooks-BKxTDk_P.js";import{x as Ct,a6 as Zs,a7 as Xs,y as $e,w as Js}from"./vendor-utils-5TjOM6td.js";import{_ as gn}from"./useLocalStorage-B5t6MEw6.js";import{C as xn}from"./confirm-BmLsHbj9.js";import{d as Ys}from"./PlayArrow-B5ZFUKPq.js";import{g as vn}from"./get-safe-url-BVjMxmwp.js";import{f as _t}from"./format-error-C0Ke3VXF.js";import{c as ye,s as He,H as eo,h as Fe,f as Kn,p as Gn,B as to}from"./index-DIQ33Q8Z.js";import{u as Qn}from"./session-CV6ez46v.js";import{D as no,_ as Zn}from"./useAsyncRetry-Bmo6a1Zp.js";import{d as ro}from"./InfoOutlined-CwoytfGr.js";import{_ as Xn}from"./useSetState-Crt4S51m.js";var It={},so=U;Object.defineProperty(It,"__esModule",{value:!0});var Jn=It.default=void 0,oo=so(H()),io=o;Jn=It.default=(0,oo.default)((0,io.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Et={},ao=U;Object.defineProperty(Et,"__esModule",{value:!0});var Yn=Et.default=void 0,co=ao(H()),lo=o;Yn=Et.default=(0,co.default)((0,lo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Lt={},uo=U;Object.defineProperty(Lt,"__esModule",{value:!0});var er=Lt.default=void 0,fo=uo(H()),po=o;er=Lt.default=(0,fo.default)((0,po.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Tt={},ho=U;Object.defineProperty(Tt,"__esModule",{value:!0});var tr=Tt.default=void 0,mo=ho(H()),go=o;tr=Tt.default=(0,mo.default)((0,go.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Pt={},xo=U;Object.defineProperty(Pt,"__esModule",{value:!0});var nr=Pt.default=void 0,vo=xo(H()),yo=o;nr=Pt.default=(0,vo.default)((0,yo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Rt={},bo=U;Object.defineProperty(Rt,"__esModule",{value:!0});var rr=Rt.default=void 0,jo=bo(H()),wo=o;rr=Rt.default=(0,jo.default)((0,wo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Dt={},So=U;Object.defineProperty(Dt,"__esModule",{value:!0});var sr=Dt.default=void 0,Co=So(H()),_o=o;sr=Dt.default=(0,Co.default)((0,_o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var kt={};Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0;Io(x);var yn=o;function Io(e){return e&&e.__esModule?e:{default:e}}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){Eo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e,t,n){return(t=Lo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lo(e){var t=To(e,"string");return typeof t=="symbol"?t:t+""}function To(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var At=function(t){return(0,yn.jsx)("svg",jn(jn({},t),{},{children:(0,yn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};At.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};At.displayName="dashboard";or=kt.default=At;var Ot={},Po=U;Object.defineProperty(Ot,"__esModule",{value:!0});var ir=Ot.default=void 0,Ro=Po(H()),Do=o;ir=Ot.default=(0,Ro.default)((0,Do.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Ys,Stop:Jn,Restart:Yn,Reload:er,Remove:Rs,Config:tr,Log:nr,Group:rr,Cancel:sr,Dashboard:or,Overview:ir},ko=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(Ct(n.origin,t));return s.search=r.toString(),s.toString()},Ao="internal",Oo="external";function $t({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Ge(),[u,d]=x.useState(null),[f,p]=x.useState(null),[v,w]=x.useState(!1),[h,S]=x.useState(null),{t:y}=x.useContext(jt),[T]=gn("skip-blocklet-setup",!1),{loading:E,recommendedUrl:R}=a(e),[k]=gn("blocklet-type-filter",Ao),j=M.isInProgress(e.status),[b,C]=x.useState(!1);x.useEffect(()=>{var D,z;if(!(e!=null&&e.controller))return;C(((z=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:z.value)===Y.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,J,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(J=e==null?void 0:e.controller)==null?void 0:J.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}C([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(g,D,z=!1)=>async()=>{const q=async Le=>{var Pe;t({action:g,blocklet:e}),w(!0),p(g);let Te=!1;try{if(g==="remove")await D(Le);else if(g==="start"){if(!M.hasRunnableComponent(e)){ee.error(y("blocklet.noComponent"));return}if(!_&&!T&&!((Pe=e.settings)!=null&&Pe.initialized)&&e.mode!==Y.BLOCKLET_MODES.DEVELOPMENT){if(!R||!mn(R)){ee.error(y("blocklet.gotoVisitError"));return}const G=rs(l.info),cn=new URL(R);cn.searchParams.set("serverUrl",G),window.open(vn(cn.href,{allowDomains:null})),n({action:g,blocklet:e});return}const ie=e.children.filter(G=>!M.isInProgress(G.status)&&G.status!=="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else if(["stop","restart","reload"].includes(g)){const ie=e.children.filter(G=>G.status==="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else{const ie={did:e.meta.did};await D({input:ie})}g==="remove"?Te=!0:await ss(1e3),g==="reload"&&ee.success(y("blocklet.reloadSuccess")),S(null),n({action:g,blocklet:e})}catch(ie){const ue=`Blocklet ${g} failed: ${_t(ie)}`;throw n({action:g,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Te||w(!1)}},J=()=>{w(!1),S(null)},oe=M.getDisplayName(e,!0),W=e.mode===Y.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(N,{component:"div",children:o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Le,Te)=>o.jsxs(N,{component:"div",children:[o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(ws,{name:"removeType",value:Le.removeType,onChange:Pe=>Te({...Le,removeType:Pe.target.value}),children:[o.jsx(pn,{value:"backup",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(pn,{value:"complete",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ns={stop:{title:`${y("common.stop")} ${oe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:q,onCancel:J},restart:{title:`${y("common.restart")} ${oe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:q,onCancel:J},remove:{title:`${y("common.remove")} ${oe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:q,onCancel:J,...W},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:q,onCancel:J}};z?S(ns[g]):await q()},P=!!u,F=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(g.currentTarget)},V=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(null)},Ie=async(g,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof g.handler=="function")try{w(!0),p(g.action),await g.handler()}catch(z){console.error(`Blocklet ${g.name} failed: `,z)}finally{w(!1),d(null)}else d(null)},Jr=!_&&M.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:y("common.remove"),handler:L("remove",async({removeType:g})=>{g==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Yr={action:"remove",icon:({sx:g,...D})=>o.jsx(de.Cancel,{sx:{...g,paddingRight:"2px",zoom:.95},...D}),name:y("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},es=M.getAppMissingConfigs(e),ts=()=>{var q;const g=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:g,blocklet:e});if(!D||!mn(D)){ee.error(y("blocklet.gotoVisitError"));return}const z=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(vn(ko(D,".well-known/service/admin"),{allowDomains:z==null?void 0:z.map(J=>J.value)}))};let Ee=[{action:"start",icon:de.Start,inExternal:!0,name:y("common.start"),handler:L("start",l.api.startBlocklet),disabled:b||e.children.every(g=>g.status==="running")||et(e.status)||E||j},{action:"stop",icon:de.Stop,inExternal:!0,name:y("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:y("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:b||e.status!=="running"},et(e.status)?Yr:Jr,{separator:!0},_?null:{action:"dashboard",icon:({style:g,...D})=>o.jsx(de.Dashboard,{...D,style:{...g,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:ts}].filter(Boolean);return k===Oo&&(Ee=Ee.filter(g=>g.inExternal)),r==="menu"?o.jsxs(wn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:F,size:"small",disabled:!s||!et(e.status)&&v,children:o.jsx(Ds,{})}),o.jsxs(xs,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:P,onClose:V,PaperProps:{},children:[es.length>0&&o.jsxs(Mn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(qn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ee.map((g,D)=>g.separator?o.jsx(yt,{},`separator-${D}`):o.jsxs(vs,{dense:!0,onClick:z=>Ie(g,z),disabled:v||g.disabled,"data-cy":`${g.action}-blocklet`,children:[o.jsx(ys,{style:{minWidth:24},children:f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{fontSize:"small"})}),o.jsx(bs,{primary:g.name})]},g.name))]}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(wn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(js,{children:Ee.filter(g=>!g.separator&&!g.onlyInMenu).map(g=>o.jsxs(wt,{title:g.name,"data-cy":`${g.action}-blocklet`,onClick:()=>Ie(g),disabled:!!g.disabled||v,children:[f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:g.name})]},g.name))}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}$t.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};$t.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const wn=te.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-B6x2PVnm.js","assets/vendor-mui-core-DrGFkjqr.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-CLdpcBR_.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-hooks-ZnvK17j8.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-B3zo8s95.js","assets/index-dZzRZ2ZY.js","assets/did-address-5heyoc8D.js","assets/domains-CyoWnOlx.js","assets/domain-action-card-COoKhuua.js","assets/permission-Ct9GXCMW.js","assets/session-CldqrK3N.js","assets/useAsyncRetry-BEB-tWmQ.js","assets/useAsync-CEZQNMFX.js","assets/confirm-HOW8FaxK.js","assets/format-error-C0Ke3VXF.js","assets/actions-yv07Sweq.js","assets/MoreHoriz-Dye919yY.js","assets/delete-confirm-CsLJksmh.js","assets/click-to-copy-Do3l3xtT.js","assets/shorten-label-la5sIm_0.js","assets/util-C5G3YrVZ.js","assets/Add-qzAc2S9X.js","assets/useSetState-Crt4S51m.js","assets/InfoOutlined-D5FF63tH.js","assets/api-K65cLqol.js","assets/CheckCircle-Bk5vNiEj.js","assets/index-BQSYz_Lo.js","assets/index-DoZ2YM4T.js","assets/Loop-Bca4uFY8.js","assets/ViewList-DKhSCuMV.js","assets/list-header-CRB0LxnL.js","assets/DeleteOutline-DJPUGW0c.js","assets/util-Dn2l5LdV.js","assets/base32-CD3Vv-Tv.js","assets/sdk-DQoMrTNt.js","assets/index-CfM3rPHl.js","assets/useLocalStorage-CM7gP1Ni.js","assets/PlayArrow-C2iusqXD.js","assets/get-safe-url-BRR4RLgg.js","assets/index-B0unYdcz.js","assets/index-XiSmd1mo.js","assets/EditIcon-Mm3W5DE6.js","assets/LockIcon-BbWIWjve.js","assets/Google-DLwblvhu.js","assets/cloneDeep-BRiLvZjr.js","assets/index-BwEZdySL.js","assets/iframe-D3k1dg5d.js","assets/config-CZ4gUB4m.js","assets/form-text-input-Vg6k4hxG.js","assets/Done-BBJndopl.js","assets/logo-uploader-CXyCerZA.js","assets/ArrowDropDown-CH-FgtE-.js","assets/ChevronRight-C0FYeIUm.js","assets/bundle-avatar-BHE5y99P.js","assets/simple-select-Cu-p9eCv.js","assets/isEmail-BWNRBSAy.js","assets/switch-control-DkVbfEAf.js","assets/audit-logs-e69kZ-on.js","assets/index-DcvnbXW2.js","assets/index-D4PP6P2d.css","assets/relative-time-cY8dsU43.js","assets/index-DIP3om2u.js","assets/index-H3wqK9-u.js","assets/list-D6KYwBs8.js","assets/index-CF4Aobpk.js","assets/traffic-DIdLhQbQ.js","assets/LaunchOutlined-DBHgr88s.js","assets/ChevronLeft-CtdCxfvp.js","assets/index-DQ3_atB3.js","assets/vendor-mui-x-vjsTA-wt.js","assets/log-CY8wNU8M.js","assets/Download-DR7jogQn.js","assets/log-D33dFtt_.css","assets/index-BelkkFch.js","assets/Error-DtmzeQ7l.js","assets/react-beautiful-dnd.esm-Bj96SiFV.js","assets/raf-schd.esm-Cxhj8umC.js","assets/QuestionMarkCircle-D5Im4T0u.js","assets/item-Bl6VQtAH.js","assets/Launch-CmFwRERO.js","assets/config-navigation-B_PVAliu.js","assets/slicedToArray-DBh5Z78L.js","assets/index-C2fPoxDR.js","assets/index-Bygo8biQ.js","assets/use-mobile-B7gJcr5J.js","assets/connect-to-aA5MeDcj.js","assets/config-space-Cjs4lh6z.js","assets/component-CkH8Sb15.js","assets/add-component-core-C2j8WeZe.js","assets/launch-result-message-B237vj_f.js","assets/page-header-BVxfqM_P.js","assets/index-CR0qrcky.js","assets/content-layout-CE2kjm54.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-Djm-FxYj.js"])))=>i.map(i=>d[i]);
2
+ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F as On,G as fe,H as $n,I as as,o as je,J as cs,K as ls,k as ln,g as us,j as ds,m as un,l as fs,n as ps,L as Oe,e as Re,M as hs,_ as z,O as ms,Q as dn,N as gs,c as fn}from"./index-dZzRZ2ZY.js";import{a1 as U,j as o,E as m,aa as te,I as vt,ak as xs,ad as Mn,ah as yt,al as vs,bm as ys,a2 as re,bn as bs,bq as js,T as N,bx as ws,aN as pn,by as hn,a3 as I,a4 as ze,bz as Ss,t as Q,Z as Qe,bA as Cs,a5 as _s,bB as Is,bp as bt,am as Nn,bC as Es,aq as Ls,as as Ts,bD as zn,bE as Bn,bF as Un,A as ae,aj as Hn,aK as Ps}from"./vendor-mui-core-DrGFkjqr.js";import{a0 as H,aa as Rs,a2 as jt,ab as Ds,a3 as wt,b as $,z as mn,j as ee,e as X,_ as ks,ac as As,ad as Fn,ae as Os,af as $s,E as St,ag as Vn,ah as Ms,ai as Ns,aj as zs,C as Be,ak as Bs,W as Us,al as Hs,am as Fs,H as Vs,R as qs,an as Ws}from"./vendor-arcblock-CLdpcBR_.js";import{r as g,L as qn,k as Wn,f as Ks,l as Gs}from"./vendor-react-D-afvo_7.js";import{e as Ue,t as Qs}from"./vendor-hooks-ZnvK17j8.js";import{x as Ct,a6 as Zs,a7 as Xs,y as $e,w as Js}from"./vendor-utils-5TjOM6td.js";import{_ as gn}from"./useLocalStorage-CM7gP1Ni.js";import{C as xn}from"./confirm-HOW8FaxK.js";import{d as Ys}from"./PlayArrow-C2iusqXD.js";import{g as vn}from"./get-safe-url-BRR4RLgg.js";import{f as _t}from"./format-error-C0Ke3VXF.js";import{c as ye,s as He,H as eo,h as Fe,f as Kn,p as Gn,B as to}from"./index-B0unYdcz.js";import{u as Qn}from"./session-CldqrK3N.js";import{D as no,_ as Zn}from"./useAsyncRetry-BEB-tWmQ.js";import{d as ro}from"./InfoOutlined-D5FF63tH.js";import{_ as Xn}from"./useSetState-Crt4S51m.js";var It={},so=U;Object.defineProperty(It,"__esModule",{value:!0});var Jn=It.default=void 0,oo=so(H()),io=o;Jn=It.default=(0,oo.default)((0,io.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Et={},ao=U;Object.defineProperty(Et,"__esModule",{value:!0});var Yn=Et.default=void 0,co=ao(H()),lo=o;Yn=Et.default=(0,co.default)((0,lo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Lt={},uo=U;Object.defineProperty(Lt,"__esModule",{value:!0});var er=Lt.default=void 0,fo=uo(H()),po=o;er=Lt.default=(0,fo.default)((0,po.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Tt={},ho=U;Object.defineProperty(Tt,"__esModule",{value:!0});var tr=Tt.default=void 0,mo=ho(H()),go=o;tr=Tt.default=(0,mo.default)((0,go.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Pt={},xo=U;Object.defineProperty(Pt,"__esModule",{value:!0});var nr=Pt.default=void 0,vo=xo(H()),yo=o;nr=Pt.default=(0,vo.default)((0,yo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Rt={},bo=U;Object.defineProperty(Rt,"__esModule",{value:!0});var rr=Rt.default=void 0,jo=bo(H()),wo=o;rr=Rt.default=(0,jo.default)((0,wo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Dt={},So=U;Object.defineProperty(Dt,"__esModule",{value:!0});var sr=Dt.default=void 0,Co=So(H()),_o=o;sr=Dt.default=(0,Co.default)((0,_o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var kt={};Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0;Io(g);var yn=o;function Io(e){return e&&e.__esModule?e:{default:e}}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){Eo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e,t,n){return(t=Lo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lo(e){var t=To(e,"string");return typeof t=="symbol"?t:t+""}function To(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var At=function(t){return(0,yn.jsx)("svg",jn(jn({},t),{},{children:(0,yn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};At.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};At.displayName="dashboard";or=kt.default=At;var Ot={},Po=U;Object.defineProperty(Ot,"__esModule",{value:!0});var ir=Ot.default=void 0,Ro=Po(H()),Do=o;ir=Ot.default=(0,Ro.default)((0,Do.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Ys,Stop:Jn,Restart:Yn,Reload:er,Remove:Rs,Config:tr,Log:nr,Group:rr,Cancel:sr,Dashboard:or,Overview:ir},ko=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(Ct(n.origin,t));return s.search=r.toString(),s.toString()},Ao="internal",Oo="external";function $t({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Ge(),[u,d]=g.useState(null),[f,p]=g.useState(null),[v,w]=g.useState(!1),[h,S]=g.useState(null),{t:y}=g.useContext(jt),[T]=gn("skip-blocklet-setup",!1),{loading:E,recommendedUrl:R}=a(e),[k]=gn("blocklet-type-filter",Ao),j=M.isInProgress(e.status),[b,C]=g.useState(!1);g.useEffect(()=>{var D,B;if(!(e!=null&&e.controller))return;C(((B=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:B.value)===Y.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,J,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(J=e==null?void 0:e.controller)==null?void 0:J.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}C([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(x,D,B=!1)=>async()=>{const q=async Le=>{var Pe;t({action:x,blocklet:e}),w(!0),p(x);let Te=!1;try{if(x==="remove")await D(Le);else if(x==="start"){if(!M.hasRunnableComponent(e)){ee.error(y("blocklet.noComponent"));return}if(!_&&!T&&!((Pe=e.settings)!=null&&Pe.initialized)&&e.mode!==Y.BLOCKLET_MODES.DEVELOPMENT){if(!R||!mn(R)){ee.error(y("blocklet.gotoVisitError"));return}const G=rs(l.info),cn=new URL(R);cn.searchParams.set("serverUrl",G),window.open(vn(cn.href,{allowDomains:null})),n({action:x,blocklet:e});return}const ie=e.children.filter(G=>!M.isInProgress(G.status)&&G.status!=="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else if(["stop","restart","reload"].includes(x)){const ie=e.children.filter(G=>G.status==="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else{const ie={did:e.meta.did};await D({input:ie})}x==="remove"?Te=!0:await ss(1e3),x==="reload"&&ee.success(y("blocklet.reloadSuccess")),S(null),n({action:x,blocklet:e})}catch(ie){const ue=`Blocklet ${x} failed: ${_t(ie)}`;throw n({action:x,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Te||w(!1)}},J=()=>{w(!1),S(null)},oe=M.getDisplayName(e,!0),W=e.mode===Y.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(N,{component:"div",children:o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Le,Te)=>o.jsxs(N,{component:"div",children:[o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(ws,{name:"removeType",value:Le.removeType,onChange:Pe=>Te({...Le,removeType:Pe.target.value}),children:[o.jsx(pn,{value:"backup",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(pn,{value:"complete",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ns={stop:{title:`${y("common.stop")} ${oe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:q,onCancel:J},restart:{title:`${y("common.restart")} ${oe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:q,onCancel:J},remove:{title:`${y("common.remove")} ${oe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:q,onCancel:J,...W},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:q,onCancel:J}};B?S(ns[x]):await q()},P=!!u,F=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}d(x.currentTarget)},V=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}d(null)},Ie=async(x,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof x.handler=="function")try{w(!0),p(x.action),await x.handler()}catch(B){console.error(`Blocklet ${x.name} failed: `,B)}finally{w(!1),d(null)}else d(null)},Jr=!_&&M.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:y("common.remove"),handler:L("remove",async({removeType:x})=>{x==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Yr={action:"remove",icon:({sx:x,...D})=>o.jsx(de.Cancel,{sx:{...x,paddingRight:"2px",zoom:.95},...D}),name:y("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},es=M.getAppMissingConfigs(e),ts=()=>{var q;const x=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:x,blocklet:e});if(!D||!mn(D)){ee.error(y("blocklet.gotoVisitError"));return}const B=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(vn(ko(D,".well-known/service/admin"),{allowDomains:B==null?void 0:B.map(J=>J.value)}))};let Ee=[{action:"start",icon:de.Start,inExternal:!0,name:y("common.start"),handler:L("start",l.api.startBlocklet),disabled:b||e.children.every(x=>x.status==="running")||et(e.status)||E||j},{action:"stop",icon:de.Stop,inExternal:!0,name:y("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:y("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:b||e.status!=="running"},et(e.status)?Yr:Jr,{separator:!0},_?null:{action:"dashboard",icon:({style:x,...D})=>o.jsx(de.Dashboard,{...D,style:{...x,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:ts}].filter(Boolean);return k===Oo&&(Ee=Ee.filter(x=>x.inExternal)),r==="menu"?o.jsxs(wn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:F,size:"small",disabled:!s||!et(e.status)&&v,children:o.jsx(Ds,{})}),o.jsxs(xs,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:P,onClose:V,PaperProps:{},children:[es.length>0&&o.jsxs(Mn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(qn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ee.map((x,D)=>x.separator?o.jsx(yt,{},`separator-${D}`):o.jsxs(vs,{dense:!0,onClick:B=>Ie(x,B),disabled:v||x.disabled,"data-cy":`${x.action}-blocklet`,children:[o.jsx(ys,{style:{minWidth:24},children:f===x.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(x.icon,{fontSize:"small"})}),o.jsx(bs,{primary:x.name})]},x.name))]}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(wn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(js,{children:Ee.filter(x=>!x.separator&&!x.onlyInMenu).map(x=>o.jsxs(wt,{title:x.name,"data-cy":`${x.action}-blocklet`,onClick:()=>Ie(x),disabled:!!x.disabled||v,children:[f===x.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(x.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:x.name})]},x.name))}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}$t.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};$t.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const wn=te.div`
3
3
  display: flex;
4
4
  align-items: center;
5
5
 
@@ -9,7 +9,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
9
9
  font-size: 10px;
10
10
  }
11
11
  }
12
- `,$o=x.memo($t),Mo=e=>{const t={};let n=null;return M.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=M.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},No=(e,t,n)=>{var i;const{hostname:r,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return s;const l=c[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith($.DEFAULT_DID_DOMAIN))||"").replace(`.${$.DEFAULT_DID_DOMAIN}`,"");return d?s.replace(r,`${d}-${l}.${$.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function ar(){const{t:e}=X(),{api:t}=Qn(),{blocklet:n}=os(),{inService:r}=Ge(),[s,i]=x.useState(!1),[a,c]=x.useState(5),l=n&&n.structVersion!==$.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){ee.error(e("blocklet.migrate.tip.running"));return}const p=Mo(n);if(p){ee.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){ee.error(_t(p))}},d=()=>{const p=No(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(v=>v-1)},1e3)},f=()=>i(!1);return[l&&o.jsxs(Mn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(I,{display:"flex",alignItems:"center",children:[o.jsx(wt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>o.jsx(I,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&o.jsx(ks,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:is(n,!0),title:M.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:f},"connect")]}ar.propTypes={};function Mt({children:e,style:t,...n}){return o.jsx(As,{style:t,...n,children:e})}Mt.propTypes={children:m.any.isRequired,style:m.object};Mt.defaultProps={style:{}};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function Nt({isResource:e,status:t,variant:n,source:r,progress:s,...i}){const{t:a}=x.useContext(jt),c={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},u=M.isInProgress(t),d=e&&t==="stopped"?"resource":t,f=a(`blocklet.status.${d}`);return n==="pin"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsxs(I,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(I,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:l[d],style:{opacity:.15}}),o.jsx(I,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:l[d]})]})}):n==="dot"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsx(no,{color:l[d],...i})}):o.jsxs(Mt,{type:c[d],...i,children:[u&&o.jsx(re,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Nt.propTypes={status:m.string.isRequired,variant:m.oneOf(["dot","tag","pin"]),source:m.string,progress:m.number,isResource:m.bool};Nt.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const cr=x.createContext({});function zt({children:e,type:t}){const[n,r]=x.useState([]),s=x.useRef([]),i=l=>{if(!s.current.includes(l)){const u=[...s.current,l];r(u),s.current=u}},a=l=>{if(s.current.includes(l)){const u=s.current.filter(d=>d!==l);r(u),s.current=u}},c=l=>{const u=n.filter(f=>l.find(p=>p===f));Zs(u,n).forEach(f=>a(f))};return o.jsx(cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}zt.propTypes={type:m.string,children:m.node.isRequired};zt.defaultProps={type:"blocklets"};function Ac(){return x.useContext(cr)}function zo(){const e=Ss();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=Q(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function Bo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Uo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ho(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Fo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const De={fontSize:20,marginInlineEnd:8},Vo={success:o.jsx(Bo,{style:De}),warning:o.jsx(Uo,{style:De}),error:o.jsx(Ho,{style:De}),info:o.jsx(Fo,{style:De})},qo=Cs(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${_s[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Is[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function Bt({keyId:e,notification:t={},viewAllUrl:n,content:r},s){const i=qo({breakpoint:zo()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Vo[t.severity],{closeSnackbar:l}=Fn(),u=()=>l(e),d=Wn(),f=()=>{l(e),d(n)};return o.jsxs(Os,{ref:s,className:a,children:[o.jsxs("div",{className:i.message,children:[c,o.jsxs(Ko,{onClick:f,children:[o.jsx("span",{className:"title",children:t.title}),r||o.jsx("span",{className:"desc",children:t.description})]})]}),o.jsx("div",{className:i.action,children:o.jsx(vt,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:o.jsx($s,{className:i.icon})},"close")})]})}const Wo=x.forwardRef(Bt);Bt.propTypes={viewAllUrl:m.string.isRequired,keyId:m.number.isRequired,notification:m.object.isRequired,content:m.node};Bt.defaultProps={content:null};const Ko=te.div`
12
+ `,$o=g.memo($t),Mo=e=>{const t={};let n=null;return M.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=M.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},No=(e,t,n)=>{var i;const{hostname:r,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return s;const l=c[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith($.DEFAULT_DID_DOMAIN))||"").replace(`.${$.DEFAULT_DID_DOMAIN}`,"");return d?s.replace(r,`${d}-${l}.${$.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function ar(){const{t:e}=X(),{api:t}=Qn(),{blocklet:n}=os(),{inService:r}=Ge(),[s,i]=g.useState(!1),[a,c]=g.useState(5),l=n&&n.structVersion!==$.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){ee.error(e("blocklet.migrate.tip.running"));return}const p=Mo(n);if(p){ee.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){ee.error(_t(p))}},d=()=>{const p=No(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(v=>v-1)},1e3)},f=()=>i(!1);return[l&&o.jsxs(Mn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(I,{display:"flex",alignItems:"center",children:[o.jsx(wt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>o.jsx(I,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&o.jsx(ks,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:is(n,!0),title:M.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:f},"connect")]}ar.propTypes={};function Mt({children:e,style:t,...n}){return o.jsx(As,{style:t,...n,children:e})}Mt.propTypes={children:m.any.isRequired,style:m.object};Mt.defaultProps={style:{}};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function Nt({isResource:e,status:t,variant:n,source:r,progress:s,...i}){const{t:a}=g.useContext(jt),c={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},u=M.isInProgress(t),d=e&&t==="stopped"?"resource":t,f=a(`blocklet.status.${d}`);return n==="pin"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsxs(I,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(I,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:l[d],style:{opacity:.15}}),o.jsx(I,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:l[d]})]})}):n==="dot"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsx(no,{color:l[d],...i})}):o.jsxs(Mt,{type:c[d],...i,children:[u&&o.jsx(re,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Nt.propTypes={status:m.string.isRequired,variant:m.oneOf(["dot","tag","pin"]),source:m.string,progress:m.number,isResource:m.bool};Nt.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const cr=g.createContext({});function zt({children:e,type:t}){const[n,r]=g.useState([]),s=g.useRef([]),i=l=>{if(!s.current.includes(l)){const u=[...s.current,l];r(u),s.current=u}},a=l=>{if(s.current.includes(l)){const u=s.current.filter(d=>d!==l);r(u),s.current=u}},c=l=>{const u=n.filter(f=>l.find(p=>p===f));Zs(u,n).forEach(f=>a(f))};return o.jsx(cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}zt.propTypes={type:m.string,children:m.node.isRequired};zt.defaultProps={type:"blocklets"};function Oc(){return g.useContext(cr)}function zo(){const e=Ss();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=Q(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function Bo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Uo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ho(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Fo(e){return o.jsx(Qe,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const De={fontSize:20,marginInlineEnd:8},Vo={success:o.jsx(Bo,{style:De}),warning:o.jsx(Uo,{style:De}),error:o.jsx(Ho,{style:De}),info:o.jsx(Fo,{style:De})},qo=Cs(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${_s[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Is[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function Bt({keyId:e,notification:t={},viewAllUrl:n,content:r},s){const i=qo({breakpoint:zo()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Vo[t.severity],{closeSnackbar:l}=Fn(),u=()=>l(e),d=Wn(),f=()=>{l(e),d(n)};return o.jsxs(Os,{ref:s,className:a,children:[o.jsxs("div",{className:i.message,children:[c,o.jsxs(Ko,{onClick:f,children:[o.jsx("span",{className:"title",children:t.title}),r||o.jsx("span",{className:"desc",children:t.description})]})]}),o.jsx("div",{className:i.action,children:o.jsx(vt,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:o.jsx($s,{className:i.icon})},"close")})]})}const Wo=g.forwardRef(Bt);Bt.propTypes={viewAllUrl:m.string.isRequired,keyId:m.number.isRequired,notification:m.object.isRequired,content:m.node};Bt.defaultProps={content:null};const Ko=te.div`
13
13
  cursor: pointer;
14
14
  display: flex;
15
15
  flex-direction: column;
@@ -29,7 +29,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
29
29
  -webkit-box-orient: vertical;
30
30
  word-break: break-word;
31
31
  }
32
- `;function lr({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return o.jsxs(bt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},children:[!!n&&o.jsx("span",{className:"url",children:n}),!!t.title&&o.jsx(I,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(I,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&o.jsx("img",{src:An.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}lr.propTypes={attachment:m.object.isRequired};function ur({attachment:e}){const{data:t}=e;return o.jsx("img",{src:An.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}ur.propTypes={attachment:m.object.isRequired};function Ut({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,s=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return s==="small"?a="12px":s==="normal"?a="14px":s==="big"?a="16px":s==="large"&&(a="18px"),o.jsx("span",{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}Ut.propTypes={attachment:m.object.isRequired};Ht.propTypes={locale:m.string,data:m.object.isRequired};Ht.defaultProps={locale:"en"};function Ht({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:o.jsxs(I,{display:"flex",flexDirection:"column",children:[o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),o.jsxs(N,{component:"div",align:"right",style:He.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",style:{...He.remarkStyle,fontSize:14},children:n}),o.jsx(I,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Ft.propTypes={locale:m.string,data:m.object.isRequired};Ft.defaultProps={locale:"en"};function Ft({locale:e,data:t}){var l,u;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId),i=t.did||((u=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:u.id)||"",a=`https://${s}/explorer/assets/${i}`,c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(I,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},rel:"noreferrer",children:o.jsxs(I,{display:"flex",flexDirection:"column",children:[o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),o.jsx(N,{component:"div",align:"right",style:He.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",style:{...He.remarkStyle,fontSize:14},children:r}),o.jsx(I,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}dr.propTypes={data:m.object.isRequired,locale:m.string};function dr({data:e,locale:t="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:o.jsx(St,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Vt.propTypes={locale:m.string,data:m.object.isRequired};Vt.defaultProps={locale:"en"};function Vt({locale:e,data:t}){const n=ye.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,s={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function fr({data:e,isMd:t=!1}){return o.jsx(I,{display:"flex",flexDirection:t?"row":"column",justifyContent:"space-between",sx:{width:t?"100%":"auto"},children:e.items.map((n,r)=>o.jsx(Ut,{attachment:n,color:r===0?"rgba(156, 163, 175, 1)":"",size:r===0?"normal":"big",fontWeight:r===0?400:600},r))})}fr.propTypes={data:m.array.isRequired,isMd:m.bool};function pr({attachment:e,...t}){const{local:n}=x.useContext(jt),r=Q(s=>s.breakpoints.down("md"));return o.jsxs(Go,{"data-testid":"attachment-preview",...t,isMd:r,children:[e.type==="link"&&o.jsx(lr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(ur,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(Ut,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Ht,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?o.jsx(Ft,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&o.jsx(dr,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(Vt,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(yt,{sx:{mb:1,mt:1},style:{color:Vn.dividerColor}}),e.type==="combined"&&o.jsx(fr,{data:e,isMd:r})]})}const Go=te.div`
32
+ `;function lr({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return o.jsxs(bt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},children:[!!n&&o.jsx("span",{className:"url",children:n}),!!t.title&&o.jsx(I,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(I,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&o.jsx("img",{src:An.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}lr.propTypes={attachment:m.object.isRequired};function ur({attachment:e}){const{data:t}=e;return o.jsx("img",{src:An.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}ur.propTypes={attachment:m.object.isRequired};function Ut({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,s=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return s==="small"?a="12px":s==="normal"?a="14px":s==="big"?a="16px":s==="large"&&(a="18px"),o.jsx("span",{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}Ut.propTypes={attachment:m.object.isRequired};Ht.propTypes={locale:m.string,data:m.object.isRequired};Ht.defaultProps={locale:"en"};function Ht({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:o.jsxs(I,{display:"flex",flexDirection:"column",children:[o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),o.jsxs(N,{component:"div",align:"right",style:He.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",style:{...He.remarkStyle,fontSize:14},children:n}),o.jsx(I,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Ft.propTypes={locale:m.string,data:m.object.isRequired};Ft.defaultProps={locale:"en"};function Ft({locale:e,data:t}){var l,u;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId),i=t.did||((u=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:u.id)||"",a=`https://${s}/explorer/assets/${i}`,c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(I,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},rel:"noreferrer",children:o.jsxs(I,{display:"flex",flexDirection:"column",children:[o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),o.jsx(N,{component:"div",align:"right",style:He.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(I,{sx:c,children:[o.jsx(N,{component:"div",style:{...He.remarkStyle,fontSize:14},children:r}),o.jsx(I,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}dr.propTypes={data:m.object.isRequired,locale:m.string};function dr({data:e,locale:t="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:o.jsx(St,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Vt.propTypes={locale:m.string,data:m.object.isRequired};Vt.defaultProps={locale:"en"};function Vt({locale:e,data:t}){const n=ye.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,s={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function fr({data:e,isMd:t=!1}){return o.jsx(I,{display:"flex",flexDirection:t?"row":"column",justifyContent:"space-between",sx:{width:t?"100%":"auto"},children:e.items.map((n,r)=>o.jsx(Ut,{attachment:n,color:r===0?"rgba(156, 163, 175, 1)":"",size:r===0?"normal":"big",fontWeight:r===0?400:600},r))})}fr.propTypes={data:m.array.isRequired,isMd:m.bool};function pr({attachment:e,...t}){const{local:n}=g.useContext(jt),r=Q(s=>s.breakpoints.down("md"));return o.jsxs(Go,{"data-testid":"attachment-preview",...t,isMd:r,children:[e.type==="link"&&o.jsx(lr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(ur,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(Ut,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Ht,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?o.jsx(Ft,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&o.jsx(dr,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(Vt,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(yt,{sx:{mb:1,mt:1},style:{color:Vn.dividerColor}}),e.type==="combined"&&o.jsx(fr,{data:e,isMd:r})]})}const Go=te.div`
33
33
  display: ${({sx:e={}})=>e.display||"flex"};
34
34
  flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
35
35
  gap: ${({sx:e={}})=>e.gap||1};
@@ -63,7 +63,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
63
63
  &:last-child {
64
64
  margin-bottom: 0;
65
65
  }
66
- `;qt.propTypes={data:m.object.isRequired,feedType:m.string};qt.defaultProps={feedType:"data-tracker"};const Xo=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Jo=e=>e.every(t=>t.type==="text"),Yo=e=>e.every(t=>t.type==="image"),ei=e=>Xs(e,2).map(t=>({type:"combined",items:t})),ti=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},ni=async(e,t)=>{const r=new Ms().user;if(r)try{return await r.getUserPublicInfo({did:e})?await r.getProfileUrl({did:e,locale:t}):void 0}catch(s){console.error(s);return}};function Wt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...i}=e,a=Q(d=>d.breakpoints.down("md"));if((!r||!r.length)&&$e(s))return null;const c=Xo(t),l=(d,f=!1)=>{if(!d&&!Array.isArray(d))return null;let p=d,v={},w="horizontal";f&&Jo(d)&&(p=ei(d),w="vertical",v={display:"flex",gap:1,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const h=ti(p);return o.jsx(I,{sx:{display:"flex",gap:1,flexDirection:f?"row":"column",justifyContent:"flex-start",alignItems:f?"center":"unset",flexWrap:"wrap"},children:p.map((S,y)=>S.type==="section"?o.jsx(x.Fragment,{children:l(S.fields,!0)},y):o.jsxs(x.Fragment,{children:[o.jsx(pr,{attachment:S,sx:v,...i}),!(a&&w==="vertical")&&h&&p.length>1&&y!==p.length-1?o.jsx(yt,{orientation:w,style:{color:Vn.dividerColor},sx:w==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},y))})},u=Yo(r);return o.jsx(ri,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",children:u?l(r):o.jsx(Nn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!$e(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(qt,{data:s,feedType:e.feedType})})}),r.length===0&&$e(s)&&n&&o.jsx(Ts,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const ri=te.div`
66
+ `;qt.propTypes={data:m.object.isRequired,feedType:m.string};qt.defaultProps={feedType:"data-tracker"};const Xo=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Jo=e=>e.every(t=>t.type==="text"),Yo=e=>e.every(t=>t.type==="image"),ei=e=>Xs(e,2).map(t=>({type:"combined",items:t})),ti=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},ni=async(e,t)=>{const r=new Ms().user;if(r)try{return await r.getUserPublicInfo({did:e})?await r.getProfileUrl({did:e,locale:t}):void 0}catch(s){console.error(s);return}};function Wt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...i}=e,a=Q(d=>d.breakpoints.down("md"));if((!r||!r.length)&&$e(s))return null;const c=Xo(t),l=(d,f=!1)=>{if(!d&&!Array.isArray(d))return null;let p=d,v={},w="horizontal";f&&Jo(d)&&(p=ei(d),w="vertical",v={display:"flex",gap:1,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const h=ti(p);return o.jsx(I,{sx:{display:"flex",gap:1,flexDirection:f?"row":"column",justifyContent:"flex-start",alignItems:f?"center":"unset",flexWrap:"wrap"},children:p.map((S,y)=>S.type==="section"?o.jsx(g.Fragment,{children:l(S.fields,!0)},y):o.jsxs(g.Fragment,{children:[o.jsx(pr,{attachment:S,sx:v,...i}),!(a&&w==="vertical")&&h&&p.length>1&&y!==p.length-1?o.jsx(yt,{orientation:w,style:{color:Vn.dividerColor},sx:w==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},y))})},u=Yo(r);return o.jsx(ri,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",children:u?l(r):o.jsx(Nn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!$e(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(qt,{data:s,feedType:e.feedType})})}),r.length===0&&$e(s)&&n&&o.jsx(Ts,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const ri=te.div`
67
67
  display: flex;
68
68
  flex-direction: column;
69
69
  .message-in-list {
@@ -115,7 +115,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
115
115
  margin-right: 8px;
116
116
  }
117
117
  }
118
- `;Wt.propTypes={severity:m.string.isRequired,notification:m.object.isRequired,showSke:m.bool};Wt.defaultProps={showSke:!0};const tt=e=>Ns.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),si=async(e,t)=>{const{type:n,did:r}=e;return Kn.isSameAddr(n,"did")?await ni(r,t)||Fe.getLink(e):Fe.getLink(e)},oi=async(e,t,n=!0)=>{const r=Fe.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof Fe.Link){if(n){const a=await si(i,t),{type:c,chainId:l,did:u}=i;return Kn.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};gr.propTypes={notification:m.object,rows:m.number,minimal:m.bool};function gr({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=x.useState(!1),[i,a]=x.useState(""),{t:c,locale:l}=X(),u=x.useMemo(()=>{const{attachments:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),d=x.useMemo(()=>{const{blocks:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),f=x.useMemo(()=>{const{description:S}=e||{};return!!S},[e]),p=x.useMemo(()=>{const{data:S}=e||{};return!$e(S)},[e]),v=x.useMemo(()=>u||d||f||p,[u,d,f,p]);if(x.useEffect(()=>{oi((e==null?void 0:e.description)??"",l).then(S=>{a(S)})},[e==null?void 0:e.description,l]),!v)return null;const w=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,h=S=>{const{target:y}=S;y.getAttribute("data-name")==="toggle-expanded"&&s(!r)};return o.jsxs(ii,{color:n?"#fff":"",children:[o.jsx(I,{className:"text-container",children:o.jsx(I,{component:"div",sx:{marginBottom:"4px"},onClick:h,children:i&&(!r&&t>0?o.jsx(eo,{basedOn:"letters",unsafeHTML:tt(i),maxLine:t,ellipsisHTML:tt(w())}):o.jsx(N,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important",fontSize:"14px"},dangerouslySetInnerHTML:{__html:tt(`${i}${w()}`)}}))})}),!n&&(u||p)?o.jsx(Wt,{severity:e.severity,notification:e}):null]})}const ii=te(I)`
118
+ `;Wt.propTypes={severity:m.string.isRequired,notification:m.object.isRequired,showSke:m.bool};Wt.defaultProps={showSke:!0};const tt=e=>Ns.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),si=async(e,t)=>{const{type:n,did:r}=e;return Kn.isSameAddr(n,"did")?await ni(r,t)||Fe.getLink(e):Fe.getLink(e)},oi=async(e,t,n=!0)=>{const r=Fe.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof Fe.Link){if(n){const a=await si(i,t),{type:c,chainId:l,did:u}=i;return Kn.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};gr.propTypes={notification:m.object,rows:m.number,minimal:m.bool};function gr({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=g.useState(!1),[i,a]=g.useState(""),{t:c,locale:l}=X(),u=g.useMemo(()=>{const{attachments:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),d=g.useMemo(()=>{const{blocks:S}=e||{};if(!S)return!1;try{return S.length>0}catch{return!1}},[e]),f=g.useMemo(()=>{const{description:S}=e||{};return!!S},[e]),p=g.useMemo(()=>{const{data:S}=e||{};return!$e(S)},[e]),v=g.useMemo(()=>u||d||f||p,[u,d,f,p]);if(g.useEffect(()=>{oi((e==null?void 0:e.description)??"",l).then(S=>{a(S)})},[e==null?void 0:e.description,l]),!v)return null;const w=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,h=S=>{const{target:y}=S;y.getAttribute("data-name")==="toggle-expanded"&&s(!r)};return o.jsxs(ii,{color:n?"#fff":"",children:[o.jsx(I,{className:"text-container",children:o.jsx(I,{component:"div",sx:{marginBottom:"4px"},onClick:h,children:i&&(!r&&t>0?o.jsx(eo,{basedOn:"letters",unsafeHTML:tt(i),maxLine:t,ellipsisHTML:tt(w())}):o.jsx(N,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important",fontSize:"14px"},dangerouslySetInnerHTML:{__html:tt(`${i}${w()}`)}}))})}),!n&&(u||p)?o.jsx(Wt,{severity:e.severity,notification:e}):null]})}const ii=te(I)`
119
119
  margin-bottom: 6px;
120
120
  color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
121
121
  .text-container {
@@ -140,7 +140,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
140
140
  -webkit-line-clamp: 2;
141
141
  }
142
142
  }
143
- `,ai=x.memo(gr);function O(e,t,n){return zn.call(t,"css")?o.jsx(Bn,Un(e,t),n):o.jsx(e,t,n)}function nt(e,t,n){return zn.call(t,"css")?o.jsxs(Bn,Un(e,t),n):o.jsxs(e,t,n)}/**
143
+ `,ai=g.memo(gr);function O(e,t,n){return zn.call(t,"css")?o.jsx(Bn,Un(e,t),n):o.jsx(e,t,n)}function nt(e,t,n){return zn.call(t,"css")?o.jsxs(Bn,Un(e,t),n):o.jsxs(e,t,n)}/**
144
144
  * (c) Iconify
145
145
  *
146
146
  * For the full copyright and license information, please view the license.txt or license.gpl.txt
@@ -160,7 +160,7 @@ import{z as Ge,f as M,h as Y,A as et,B as rs,b as ss,C as os,D as is,E as An,F a
160
160
  ${r}
161
161
  * Page: ${window.location.href}
162
162
  -->
163
- `),O(I,{sx:{mx:{xs:0,md:2}},children:O(bt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}en.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};en.defaultProps={infos:[]};var tn={},Na=U;Object.defineProperty(tn,"__esModule",{value:!0});var xt=tn.default=void 0,za=Na(H()),kn=o;xt=tn.default=(0,za.default)([(0,kn.jsx)("path",{d:"M11.99 2C6.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"},"0"),(0,kn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ne({children:e}){return Q(n=>n.breakpoints.down("md"))?o.jsx(ze,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(I,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(xt,{fontSize:"small"})})}):o.jsxs(I,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(xt,{fontSize:"small"}),e]})}ne.propTypes={children:m.node.isRequired};const Ba="https://launcher.arcblock.io/",Ua=30*24*60*60*1e3;function nn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var k,j,b,C,_,L;const{t:i,locale:a}=X(),c=Ge(),[l,u]=Xn({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),f=Q(P=>P.breakpoints.down("md")),{sx:p={},...v}=s,w=f?"mobile":"desktop",h=Zn(async()=>{const[P,F]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),On({launcherUrl:e||Ba,nftDid:n,launcherSessionId:r,locale:a})]);if(P!=null&&P.error)throw new Error(P.error);return{launcherSession:P.launcherSession,subscriptionURL:F}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!f&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const S=P=>{u({popoverAnchorEl:P.currentTarget})},y=()=>{u({popoverAnchorEl:null})},T=(k=h.value)==null?void 0:k.launcherSession;let E="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((b=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:b.status)&&(E="error");let R=null;if(T.expirationDate&&!T.subscription){const P=fe(T.expirationDate).diff(fe(),"ms");R=i(`expiration.${w}.tips.${E}`,{validity:Gn(P,{locale:$n(a),compact:!0,verbose:!0})}),P>0&&P<=Ua&&(E="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(ne,{children:R||((_=(C=T==null?void 0:T.subscription)==null?void 0:C.product)==null?void 0:_.name)||i("common.subscription")}),color:E,variant:E!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:S}),o.jsx(Hn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(L=h.value)==null?void 0:L.subscriptionURL})})]})}nn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};nn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Ha=30*24*60*60*1e3,Fa="https://launcher.arcblock.io/";function rn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,b,C,_,L,P,F;const{t:i,locale:a}=X(),[c,l]=Xn({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=Q(V=>V.breakpoints.down("md")),f=Ge(),{sx:p={},...v}=s,w=d?"mobile":"desktop",h=Zn(async()=>{const[V,Ie]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),On({launcherUrl:e||Fa,nftDid:n,launcherSessionId:r,locale:a})]);if(V!=null&&V.error)throw new Error(V.error);return{launcherSession:V.launcherSession,subscriptionURL:Ie}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!d&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const S=(b=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:b.expirationDate,y=fe(S).isBefore(fe()),T=fe(S).diff(fe(),"ms");let E="success";T<=Ha&&(E="warning"),y&&(E="error");const R=V=>{l({popoverAnchorEl:V.currentTarget})},k=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((_=(C=h.value)==null?void 0:C.launcherSession)==null?void 0:_.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i("expiration.desktop.nextInvoice",{date:as(S,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:R}),!((P=(L=h.value)==null?void 0:L.launcherSession)!=null&&P.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.tips.${E}`,{validity:Gn(T,{locale:$n(a),compact:!0,verbose:!0})})}),color:E,variant:E!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:R}),o.jsx(Hn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(F=h.value)==null?void 0:F.subscriptionURL})})]})}rn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};rn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var sn={},Va=U;Object.defineProperty(sn,"__esModule",{value:!0});var Qr=sn.default=void 0,qa=Va(H()),Wa=o;Qr=sn.default=(0,qa.default)((0,Wa.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var on={},Ka=U;Object.defineProperty(on,"__esModule",{value:!0});var Zr=on.default=void 0,Ga=Ka(H()),Qa=o;Zr=on.default=(0,Ga.default)((0,Qa.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Za(){const{inFullPage:e,toggleFullPage:t}=Hs();return O(vt,{onClick:t,children:e?O(Zr,{sx:{transform:"scale(1.3)"}}):O(Qr,{sx:{transform:"scale(1.3)"}})})}function an({children:e}){var E,R,k;const{t}=X(),{loading:n,error:r,actions:{refreshBlocklet:s},env:i,blocklet:a}=je(),{info:c}=cs(),l=Ks(),u=Q(j=>j.breakpoints.down("md")),[d,f]=x.useState(null),{appId:p,version:v}=i,w=[{label:"App ID",value:p},{label:"App Version",value:v},{label:"App Bundle Name",value:(E=a==null?void 0:a.meta)==null?void 0:E.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=j=>{var C,_,L,P;const b=Array.isArray(j)?j:[j];if(u||b.unshift(O(Za,{})),a){const F={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};ls(a)?b.unshift(O(nn,{chainHost:(C=a==null?void 0:a.controller)==null?void 0:C.chainHost,nftId:(_=a==null?void 0:a.controller)==null?void 0:_.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(P=a==null?void 0:a.controller)==null?void 0:P.launcherUrl,sx:F})):c.ownerNft&&c.launcher&&b.unshift(O(rn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:F}))}return b},S=(R=((a==null?void 0:a.environments)||[]).find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:R.value,y=(k=((a==null?void 0:a.environments)||[]).find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:k.value;return x.useEffect(()=>{if(u)f(null);else{const{appLogo:j,appLogoRect:b}=window.blocklet??{};(b||j)&&f(`${b||j}&v=${Date.now()}`)}},[S,y,u]),nt(Xa,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:{logo:d?O("img",{src:d,alt:"logo"}):null},isMobile:u,footerProps:{addon:O(en,{infos:w})},children:[!a&&n&&O(Be,{relative:"parent",children:O(re,{})}),!a&&r&&nt(Be,{relative:"parent",children:[nt(I,{display:"flex",alignItems:"center",children:[O(Gr,{color:"error",sx:{marginRight:1}}),_t(r)]}),O(wt,{onClick:()=>s(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(I,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(Bs,{FallbackComponent:Us,resetKeys:[l.pathname],children:e})})]})}an.propTypes={children:m.any};an.defaultProps={children:null};const Xa=te(zs)`
163
+ `),O(I,{sx:{mx:{xs:0,md:2}},children:O(bt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}en.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};en.defaultProps={infos:[]};var tn={},Na=U;Object.defineProperty(tn,"__esModule",{value:!0});var xt=tn.default=void 0,za=Na(H()),kn=o;xt=tn.default=(0,za.default)([(0,kn.jsx)("path",{d:"M11.99 2C6.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"},"0"),(0,kn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ne({children:e}){return Q(n=>n.breakpoints.down("md"))?o.jsx(ze,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(I,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(xt,{fontSize:"small"})})}):o.jsxs(I,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(xt,{fontSize:"small"}),e]})}ne.propTypes={children:m.node.isRequired};const Ba="https://launcher.arcblock.io/",Ua=30*24*60*60*1e3;function nn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var k,j,b,C,_,L;const{t:i,locale:a}=X(),c=Ge(),[l,u]=Xn({safeIframeRef:null,popoverAnchorEl:null}),d=g.useRef(null),f=Q(P=>P.breakpoints.down("md")),{sx:p={},...v}=s,w=f?"mobile":"desktop",h=Zn(async()=>{const[P,F]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),On({launcherUrl:e||Ba,nftDid:n,launcherSessionId:r,locale:a})]);if(P!=null&&P.error)throw new Error(P.error);return{launcherSession:P.launcherSession,subscriptionURL:F}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!f&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const S=P=>{u({popoverAnchorEl:P.currentTarget})},y=()=>{u({popoverAnchorEl:null})},T=(k=h.value)==null?void 0:k.launcherSession;let E="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((b=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:b.status)&&(E="error");let R=null;if(T.expirationDate&&!T.subscription){const P=fe(T.expirationDate).diff(fe(),"ms");R=i(`expiration.${w}.tips.${E}`,{validity:Gn(P,{locale:$n(a),compact:!0,verbose:!0})}),P>0&&P<=Ua&&(E="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(ne,{children:R||((_=(C=T==null?void 0:T.subscription)==null?void 0:C.product)==null?void 0:_.name)||i("common.subscription")}),color:E,variant:E!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:S}),o.jsx(Hn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(L=h.value)==null?void 0:L.subscriptionURL})})]})}nn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};nn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Ha=30*24*60*60*1e3,Fa="https://launcher.arcblock.io/";function rn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,b,C,_,L,P,F;const{t:i,locale:a}=X(),[c,l]=Xn({safeIframeRef:null,popoverAnchorEl:null}),u=g.useRef(null),d=Q(V=>V.breakpoints.down("md")),f=Ge(),{sx:p={},...v}=s,w=d?"mobile":"desktop",h=Zn(async()=>{const[V,Ie]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),On({launcherUrl:e||Fa,nftDid:n,launcherSessionId:r,locale:a})]);if(V!=null&&V.error)throw new Error(V.error);return{launcherSession:V.launcherSession,subscriptionURL:Ie}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!d&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const S=(b=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:b.expirationDate,y=fe(S).isBefore(fe()),T=fe(S).diff(fe(),"ms");let E="success";T<=Ha&&(E="warning"),y&&(E="error");const R=V=>{l({popoverAnchorEl:V.currentTarget})},k=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((_=(C=h.value)==null?void 0:C.launcherSession)==null?void 0:_.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i("expiration.desktop.nextInvoice",{date:as(S,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:R}),!((P=(L=h.value)==null?void 0:L.launcherSession)!=null&&P.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.tips.${E}`,{validity:Gn(T,{locale:$n(a),compact:!0,verbose:!0})})}),color:E,variant:E!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:R}),o.jsx(Hn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(F=h.value)==null?void 0:F.subscriptionURL})})]})}rn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};rn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var sn={},Va=U;Object.defineProperty(sn,"__esModule",{value:!0});var Qr=sn.default=void 0,qa=Va(H()),Wa=o;Qr=sn.default=(0,qa.default)((0,Wa.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var on={},Ka=U;Object.defineProperty(on,"__esModule",{value:!0});var Zr=on.default=void 0,Ga=Ka(H()),Qa=o;Zr=on.default=(0,Ga.default)((0,Qa.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Za(){const{inFullPage:e,toggleFullPage:t}=Hs();return O(vt,{onClick:t,children:e?O(Zr,{sx:{transform:"scale(1.3)"}}):O(Qr,{sx:{transform:"scale(1.3)"}})})}function an({children:e}){var E,R,k;const{t}=X(),{loading:n,error:r,actions:{refreshBlocklet:s},env:i,blocklet:a}=je(),{info:c}=cs(),l=Ks(),u=Q(j=>j.breakpoints.down("md")),[d,f]=g.useState(null),{appId:p,version:v}=i,w=[{label:"App ID",value:p},{label:"App Version",value:v},{label:"App Bundle Name",value:(E=a==null?void 0:a.meta)==null?void 0:E.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=j=>{var C,_,L,P;const b=Array.isArray(j)?j:[j];if(u||b.unshift(O(Za,{})),a){const F={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};ls(a)?b.unshift(O(nn,{chainHost:(C=a==null?void 0:a.controller)==null?void 0:C.chainHost,nftId:(_=a==null?void 0:a.controller)==null?void 0:_.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(P=a==null?void 0:a.controller)==null?void 0:P.launcherUrl,sx:F})):c.ownerNft&&c.launcher&&b.unshift(O(rn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:F}))}return b},S=(R=((a==null?void 0:a.environments)||[]).find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:R.value,y=(k=((a==null?void 0:a.environments)||[]).find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:k.value;return g.useEffect(()=>{if(u)f(null);else{const{appLogo:j,appLogoRect:b}=window.blocklet??{};(b||j)&&f(`${b||j}&v=${Date.now()}`)}},[S,y,u]),nt(Xa,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:{logo:d?O("img",{src:d,alt:"logo"}):null},isMobile:u,footerProps:{addon:O(en,{infos:w})},children:[!a&&n&&O(Be,{relative:"parent",children:O(re,{})}),!a&&r&&nt(Be,{relative:"parent",children:[nt(I,{display:"flex",alignItems:"center",children:[O(Gr,{color:"error",sx:{marginRight:1}}),_t(r)]}),O(wt,{onClick:()=>s(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(I,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(Bs,{FallbackComponent:Us,resetKeys:[l.pathname],children:e})})]})}an.propTypes={children:m.any};an.defaultProps={children:null};const Xa=te(zs)`
164
164
  div.dashboard-content {
165
165
  padding: 0;
166
166
  }
@@ -168,7 +168,7 @@ ${r}
168
168
  max-height: 400px;
169
169
  overflow-y: auto;
170
170
  }
171
- `;function Ja(){const{t:e,locale:t}=X(),{blocklet:n,launcherSession:r}=je(),[s,i]=Qs({subscriptionURL:"#"});if(x.useEffect(()=>{var l,u;ln(n,r)&&us({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(u=n==null?void 0:n.controller)==null?void 0:u.launcherUrl,locale:t}).then(d=>{i({subscriptionURL:d})}).catch(d=>{console.error("get subscription url error:",d)})},[n,r]),!n||!r||!ds(n)||r.status===$.LAUNCH_SESSION_STATUS.installed)return"";let a=null,c="";return ln(n,r)?(a=o.jsx(bt,{href:s.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:un(r==null?void 0:r.reservedUntil,t)})):fs(n,r)&&(a=o.jsx(qn,{to:Ct($.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:un(r==null?void 0:r.terminatedAt,t),deadline:ps(r==null?void 0:r.terminatedAt,t)})),o.jsxs(I,{component:Fs,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,o.jsx(N,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const Xr=x.createContext({});function Oc(){return x.useContext(Xr)}const{Provider:Ya,Consumer:$c}=Xr,{did:K,appId:ec}=window.env;function tc({children:e}){var j,b;const{t,locale:n}=X(),{blocklet:r}=je(),[s,i]=x.useState([]),[a,c]=x.useState([]),[l,u]=x.useState([]),d=M.getDisplayName(r),f=((j=((r==null?void 0:r.environments)||[]).find(C=>C.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:j.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],v=(r==null?void 0:r.trustedFactories)||[],w=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const C=await Re.doBatchQuery({getRoles:{input:{teamDid:K}},getPermissions:{input:{teamDid:K}},getInvitations:{input:{teamDid:K}}});c((C.getRoles.roles||[]).filter(_=>!$.RBAC_CONFIG.roles.some(L=>L.name===_.name&&(!L.passport||L.ci))).map(_=>(_.hasDescription=!!_.description,_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),_))),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){ee.error(C.message)}},S=({did:C}={})=>{const _={teamDid:K,user:{did:C}};return Re.getUser({input:_})},y=({query:C,paging:_}={})=>{const L={teamDid:K};return _&&(L.paging=_),C&&(L.query=C),L.sort={lastLoginAt:-1},Re.getUsers({input:L})},T=()=>Re.getUsersCountPerRole({input:{teamDid:K}}),E=()=>h();x.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&h()},[(b=r==null?void 0:r.meta)==null?void 0:b.did]),x.useEffect(()=>{c(C=>C.map(_=>(_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),{..._})))},[t,n]);const R=C=>{C.teamDid===K&&h()};Oe(Y.TeamEvents.userAdded,R,[K]),Oe(Y.TeamEvents.userRemoved,R,[K]),Oe(Y.TeamEvents.userUpdated,R,[K]);const k={teamDid:K,teamIssuerDid:ec,teamName:d,invitations:s,roles:a,permissions:l,trustedPassports:p,trustedFactories:v,isNodeTeam:!1,enablePassportIssuance:w,refresh:E,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:S,getUsers:y,getUsersCountPerRole:T}};return o.jsx(Ya,{value:k,children:e})}const nc=x.lazy(()=>B(()=>import("./overview-BxbJCUbS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))),rc=x.lazy(()=>B(()=>import("./index-BtFCAsqh.js"),__vite__mapDeps([32,2,1,4,33,3,5,6,12,34,35,36,9,10,18,19,37,23,21,8,38,22,39,13,40,41,26,27,42,28,29,30,31,20,24,17]))),sc=x.lazy(()=>B(()=>import("./index-BXlJ03I_.js"),__vite__mapDeps([43,2,1,12,3,4,5,6,44,14,36,9,18,19,22,23,45,46,10,17,28,29,30,31,20,21,24]))),oc=x.lazy(()=>B(()=>import("./index-DkVoxpR-.js"),__vite__mapDeps([47,2,1,48,3,4,5,6,49,50,51,52,9,33,44,53,54,55,31,34,18,19,22,23,17,37,56,57,58,7,12,8,13,28,29,30,20,21,24]))),ic=x.lazy(()=>B(()=>import("./audit-logs-bl5st5Lr.js"),__vite__mapDeps([59,3,2,4,1,5,6,39,13,28,9,60,61,24,62,31,42,63,22,23,29,30,19,20,21,17]))),ac=x.lazy(()=>B(()=>import("./index-CoxJ8G1A.js"),__vite__mapDeps([64,2,1,4,3,5,6,9,39,13,10,42,8,33,65,66,55,31,62,24,67,20,21,48,68,69,54,70,23,71,28,22,29,30,19,17]))),cc=x.lazy(()=>B(()=>import("./log-BFj6TDz5.js"),__vite__mapDeps([72,1,2,28,3,4,5,6,9,73,55,74]))),lc=x.lazy(()=>B(()=>import("./index-MxM82EtU.js"),__vite__mapDeps([75,2,1,9,3,4,5,6,12,76,22,23,19,10,77,78,55,42,73,79,17,33,66,41,25,54,71,38,80,81,51,37,30,53,60,61,63]))),uc=x.lazy(()=>B(()=>import("./config-navigation-Dskr7Yic.js"),__vite__mapDeps([82,2,3,4,1,5,6,83,9,56,46,84,31,23,28,22,29,30,19,20,21,24,17]))),dc=x.lazy(()=>B(()=>import("./index-Be9vrMiA.js"),__vite__mapDeps([85,1,2,5,4,9,3,6,86,25,87,88,38,23,8,27,30,58,28,22,29,31,19,20,21,24,17]))),fc=x.lazy(()=>B(()=>import("./component-B0WI6_H4.js"),__vite__mapDeps([89,1,2,4,3,5,6,12,50,51,52,9,33,44,53,58,18,19,90,83,70,78,37,54,69,23,91,80,81,38,42,22,30,10,92,93,88,25,94,45,46,60,61,84,8,28,16,86,95,87,96,14,24,55,29,26,27,31,20,21,17]))),pc=x.lazy(()=>B(()=>import("./analytics-CjaAB5m2.js"),__vite__mapDeps([97,1,2,3,4,5,6,67,9,20,21,48,68,69,54,70,23,71,31,55,28,22,29,30,19,24,17]))),hc=Ct($.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications");function mc(){var k,j;const e=Wn(),{tab:t="overview"}=Gs(),{blocklet:n,actions:{refreshBlocklet:r}}=je(),{t:s}=X(),{session:i}=Qn(),a=Ue(()=>{var b;return(b=i==null?void 0:i.user)==null?void 0:b.did},[i]),{enqueueSnackbar:c}=Fn(),l=Ue(()=>{var b;return((b=i.user)==null?void 0:b.role)&&ms.includes(i.user.role)},[i]),u=(k=n==null?void 0:n.meta)==null?void 0:k.did,d=b=>{e(`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${b}`)},f=()=>{r()},p=!n||dn(n.status)?[]:M.getAppMissingConfigs(n),v=[{label:s("common.overview"),value:"overview"},{label:o.jsx(Ps,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!p.length,children:s("common.components")}),value:"components"}];dn(n==null?void 0:n.status)||v.push({label:s("common.configuration"),value:"configuration"}),v.push({label:s("common.auditLogs"),value:"audit-logs"}),l&&v.push({label:s("common.notificationRecords"),value:"notifications"}),n&&((j=n.children)!=null&&j.length)&&n.structVersion===$.APP_STRUCT_VERSION&&v.push({label:s("common.logs"),value:"logs"}),v.push({label:s("common.configNavigation"),value:"navigation"});const w=o.jsx(ic,{scope:u,categories:["blocklet","team","security","certificates","gateway"]}),h=x.useCallback(b=>Js(hc,{id:b.id,severity:b.severity,componentDid:b.source==="system"?"":b.componentDid}),[]);Oe(`${a}/${$.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,b=>{const C=h(b),{severity:_,description:L}=b||{},P=["error","warning"].includes(_)||b.sticky;c(L,{variant:_,autoHideDuration:P?null:5e3,content:F=>o.jsx(Wo,{viewAllUrl:C,keyId:F,notification:b,content:o.jsx(ai,{notification:b,minimal:!0,rows:0})})})},[],"user");const S=x.useCallback(()=>l?o.jsx(ac,{blocklet:n}):o.jsx(qs,{status:403}),[n,l]),y={overview:o.jsx(nc,{}),members:o.jsx(I,{mt:-5,children:o.jsx(rc,{type:"blocklet",createPassportSvg:fn})}),passports:o.jsx(I,{mt:-4.5,children:o.jsx(sc,{createPassportSvg:fn})}),components:fc,configuration:o.jsx(oc,{blocklet:n,onUpdate:f}),"audit-logs":w,notifications:S,logs:cc,navigation:uc,"did-spaces":o.jsx(dc,{navOrientation:"horizontal",sx:{mt:-4}}),analytics:o.jsx(I,{mt:-5,children:o.jsx(pc,{})}),publish:o.jsx(I,{mt:-3,children:o.jsx(lc,{})})},T=y[t]||y.overview,E=!["members","passports","analytics","publish","did-spaces"].includes(t),R=n?o.jsxs(zt,{type:"components",children:[E&&o.jsx(I,{pt:3,children:o.jsx(Ws,{tabs:v,current:t,onChange:d,scrollButtons:"auto"})}),o.jsx("div",{className:"page-content",children:o.jsx(x.Suspense,{fallback:o.jsx(Be,{relative:"parent",children:o.jsx(re,{})}),children:x.isValidElement(T)?T:o.jsx(T,{blocklet:n})})})]}):o.jsx(Be,{relative:"parent",children:o.jsx(re,{})});return o.jsx(gs,{children:o.jsx(tc,{children:o.jsx(an,{children:o.jsxs(xc,{children:[E&&o.jsxs(I,{component:"div",className:"page-header",children:[o.jsxs(N,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?o.jsx(to,{blocklet:n,style:{marginRight:16}}):null,n?o.jsxs(I,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(I,{children:M.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&o.jsx(Nt,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${s("common.blocklet")} ${s("common.detail")}`]}),n?o.jsx($o,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:b}={})=>{b&&ee.error(b.message)},variant:"group"}):null]}),o.jsx(ar,{}),o.jsx(Ja,{}),R]})})})})}function gc(){var r;const{blocklet:e}=je(),{t}=X(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const s=hs();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(Vs,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(mc,{})]})}const xc=te.main`
171
+ `;function Ja(){const{t:e,locale:t}=X(),{blocklet:n,launcherSession:r}=je(),[s,i]=Qs({subscriptionURL:"#"});if(g.useEffect(()=>{var l,u;ln(n,r)&&us({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(u=n==null?void 0:n.controller)==null?void 0:u.launcherUrl,locale:t}).then(d=>{i({subscriptionURL:d})}).catch(d=>{console.error("get subscription url error:",d)})},[n,r]),!n||!r||!ds(n)||r.status===$.LAUNCH_SESSION_STATUS.installed)return"";let a=null,c="";return ln(n,r)?(a=o.jsx(bt,{href:s.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:un(r==null?void 0:r.reservedUntil,t)})):fs(n,r)&&(a=o.jsx(qn,{to:Ct($.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:un(r==null?void 0:r.terminatedAt,t),deadline:ps(r==null?void 0:r.terminatedAt,t)})),o.jsxs(I,{component:Fs,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,o.jsx(N,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const Xr=g.createContext({});function $c(){return g.useContext(Xr)}const{Provider:Ya,Consumer:Mc}=Xr,{did:K,appId:ec}=window.env;function tc({children:e}){var j,b;const{t,locale:n}=X(),{blocklet:r}=je(),[s,i]=g.useState([]),[a,c]=g.useState([]),[l,u]=g.useState([]),d=M.getDisplayName(r),f=((j=((r==null?void 0:r.environments)||[]).find(C=>C.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:j.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],v=(r==null?void 0:r.trustedFactories)||[],w=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const C=await Re.doBatchQuery({getRoles:{input:{teamDid:K}},getPermissions:{input:{teamDid:K}},getInvitations:{input:{teamDid:K}}});c((C.getRoles.roles||[]).filter(_=>!$.RBAC_CONFIG.roles.some(L=>L.name===_.name&&(!L.passport||L.ci))).map(_=>(_.hasDescription=!!_.description,_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),_))),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){ee.error(C.message)}},S=({did:C}={})=>{const _={teamDid:K,user:{did:C}};return Re.getUser({input:_})},y=({query:C,paging:_}={})=>{const L={teamDid:K};return _&&(L.paging=_),C&&(L.query=C),L.sort={lastLoginAt:-1},Re.getUsers({input:L})},T=()=>Re.getUsersCountPerRole({input:{teamDid:K}}),E=()=>h();g.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&h()},[(b=r==null?void 0:r.meta)==null?void 0:b.did]),g.useEffect(()=>{c(C=>C.map(_=>(_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),{..._})))},[t,n]);const R=C=>{C.teamDid===K&&h()};Oe(Y.TeamEvents.userAdded,R,[K]),Oe(Y.TeamEvents.userRemoved,R,[K]),Oe(Y.TeamEvents.userUpdated,R,[K]);const k={teamDid:K,teamIssuerDid:ec,teamName:d,invitations:s,roles:a,permissions:l,trustedPassports:p,trustedFactories:v,isNodeTeam:!1,enablePassportIssuance:w,refresh:E,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:S,getUsers:y,getUsersCountPerRole:T}};return o.jsx(Ya,{value:k,children:e})}const nc=g.lazy(()=>z(()=>import("./overview-B6x2PVnm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),rc=g.lazy(()=>z(()=>import("./domains-CyoWnOlx.js"),__vite__mapDeps([11,2,3,4,1,5,6,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,8,29]))),sc=g.lazy(()=>z(()=>import("./index-BQSYz_Lo.js"),__vite__mapDeps([30,2,1,4,31,3,5,6,25,32,33,34,9,10,13,14,22,18,16,8,35,17,36,37,38,39,19,20,23,40,41,42,43,15,27,26]))),oc=g.lazy(()=>z(()=>import("./index-XiSmd1mo.js"),__vite__mapDeps([44,2,1,25,3,4,5,6,45,46,34,9,13,14,17,18,47,48,10,26,40,41,42,43,15,16,27]))),ic=g.lazy(()=>z(()=>import("./index-BwEZdySL.js"),__vite__mapDeps([49,2,1,50,3,4,5,6,51,52,53,54,9,31,45,55,56,57,43,32,13,14,17,18,26,22,58,59,60,7,25,8,37,40,41,42,15,16,27]))),ac=g.lazy(()=>z(()=>import("./audit-logs-e69kZ-on.js"),__vite__mapDeps([61,3,2,4,1,5,6,36,37,40,9,62,63,27,64,43,23,65,17,18,41,42,14,15,16,26]))),cc=g.lazy(()=>z(()=>import("./index-H3wqK9-u.js"),__vite__mapDeps([66,2,1,4,3,5,6,9,23,8,67,68,57,43,64,27,10,36,37,69,15,16,50,70,71,56,72,18,73,40,17,41,42,14,26]))),lc=g.lazy(()=>z(()=>import("./log-CY8wNU8M.js"),__vite__mapDeps([74,1,2,40,3,4,5,6,9,75,57,76]))),uc=g.lazy(()=>z(()=>import("./index-BelkkFch.js"),__vite__mapDeps([77,2,1,9,3,4,5,6,25,78,17,18,14,10,79,80,57,23,75,22,81,26,31,68,39,28,56,73,35,82,83,53,21,42,55,62,63,65]))),dc=g.lazy(()=>z(()=>import("./config-navigation-B_PVAliu.js"),__vite__mapDeps([84,2,3,4,1,5,6,85,9,58,48,86,43,18,40,17,41,42,14,15,16,27,26]))),fc=g.lazy(()=>z(()=>import("./index-Bygo8biQ.js"),__vite__mapDeps([87,1,2,5,4,9,3,6,88,28,89,90,35,18,8,20,42,60,40,17,41,43,14,15,16,27,26]))),pc=g.lazy(()=>z(()=>import("./component-CkH8Sb15.js"),__vite__mapDeps([91,1,2,4,3,5,6,25,52,53,54,9,31,45,55,60,13,14,85,72,80,22,56,71,18,92,82,83,35,21,23,17,42,10,93,94,90,28,95,47,48,62,63,86,8,40,24,88,96,89,97,46,27,57,41,19,20,43,15,16,26]))),hc=g.lazy(()=>z(()=>import("./analytics-Djm-FxYj.js"),__vite__mapDeps([98,1,2,3,4,5,6,69,9,15,16,50,70,71,56,72,18,73,43,57,40,17,41,42,14,27,26]))),mc=Ct($.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications");function gc(){var k,j;const e=Wn(),{tab:t="overview"}=Gs(),{blocklet:n,actions:{refreshBlocklet:r}}=je(),{t:s}=X(),{session:i}=Qn(),a=Ue(()=>{var b;return(b=i==null?void 0:i.user)==null?void 0:b.did},[i]),{enqueueSnackbar:c}=Fn(),l=Ue(()=>{var b;return((b=i.user)==null?void 0:b.role)&&ms.includes(i.user.role)},[i]),u=(k=n==null?void 0:n.meta)==null?void 0:k.did,d=b=>{e(`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${b}`)},f=()=>{r()},p=!n||dn(n.status)?[]:M.getAppMissingConfigs(n),v=[{label:s("common.overview"),value:"overview"},{label:s("common.domains"),value:"domains"},{label:o.jsx(Ps,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!p.length,children:s("common.components")}),value:"components"}];dn(n==null?void 0:n.status)||v.push({label:s("common.configuration"),value:"configuration"}),v.push({label:s("common.auditLogs"),value:"audit-logs"}),l&&v.push({label:s("common.notificationRecords"),value:"notifications"}),n&&((j=n.children)!=null&&j.length)&&n.structVersion===$.APP_STRUCT_VERSION&&v.push({label:s("common.logs"),value:"logs"}),v.push({label:s("common.configNavigation"),value:"navigation"});const w=o.jsx(ac,{scope:u,categories:["blocklet","team","security","certificates","gateway"]}),h=g.useCallback(b=>Js(mc,{id:b.id,severity:b.severity,componentDid:b.source==="system"?"":b.componentDid}),[]);Oe(`${a}/${$.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,b=>{const C=h(b),{severity:_,description:L}=b||{},P=["error","warning"].includes(_)||b.sticky;c(L,{variant:_,autoHideDuration:P?null:5e3,content:F=>o.jsx(Wo,{viewAllUrl:C,keyId:F,notification:b,content:o.jsx(ai,{notification:b,minimal:!0,rows:0})})})},[],"user");const S=g.useCallback(()=>l?o.jsx(cc,{blocklet:n}):o.jsx(qs,{status:403}),[n,l]),y={overview:o.jsx(nc,{}),domains:o.jsx(rc,{}),members:o.jsx(I,{mt:-5,children:o.jsx(sc,{type:"blocklet",createPassportSvg:fn})}),passports:o.jsx(I,{mt:-4.5,children:o.jsx(oc,{createPassportSvg:fn})}),components:pc,configuration:o.jsx(ic,{blocklet:n,onUpdate:f}),"audit-logs":w,notifications:S,logs:lc,navigation:dc,"did-spaces":o.jsx(fc,{navOrientation:"horizontal",sx:{mt:-4}}),analytics:o.jsx(I,{mt:-5,children:o.jsx(hc,{})}),publish:o.jsx(I,{mt:-3,children:o.jsx(uc,{})})},T=y[t]||y.overview,E=!["members","passports","analytics","publish","did-spaces"].includes(t),R=n?o.jsxs(zt,{type:"components",children:[E&&o.jsx(I,{pt:3,children:o.jsx(Ws,{tabs:v,current:t,onChange:d,scrollButtons:"auto"})}),o.jsx("div",{className:"page-content",children:o.jsx(g.Suspense,{fallback:o.jsx(Be,{relative:"parent",children:o.jsx(re,{})}),children:g.isValidElement(T)?T:o.jsx(T,{blocklet:n})})})]}):o.jsx(Be,{relative:"parent",children:o.jsx(re,{})});return o.jsx(gs,{children:o.jsx(tc,{children:o.jsx(an,{children:o.jsxs(vc,{children:[E&&o.jsxs(I,{component:"div",className:"page-header",children:[o.jsxs(N,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?o.jsx(to,{blocklet:n,style:{marginRight:16}}):null,n?o.jsxs(I,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(I,{children:M.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&o.jsx(Nt,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${s("common.blocklet")} ${s("common.detail")}`]}),n?o.jsx($o,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:b}={})=>{b&&ee.error(b.message)},variant:"group"}):null]}),o.jsx(ar,{}),o.jsx(Ja,{}),R]})})})})}function xc(){var r;const{blocklet:e}=je(),{t}=X(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return g.useEffect(()=>{const s=hs();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(Vs,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(gc,{})]})}const vc=te.main`
172
172
  .page-header {
173
173
  display: flex;
174
174
  justify-content: space-between;
@@ -214,4 +214,4 @@ ${r}
214
214
  margin-bottom: 15px;
215
215
  }
216
216
  }
217
- `,Mc=Object.freeze(Object.defineProperty({__proto__:null,default:gc},Symbol.toStringTag,{value:"Module"}));export{Nt as B,Mt as W,rr as a,Yn as b,Jn as c,Gr as d,de as e,Ac as f,Mc as g,Oc as u};
217
+ `,Nc=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"}));export{Nt as B,Mt as W,rr as a,Yn as b,Jn as c,Gr as d,de as e,Oc as f,Nc as g,$c as u};