@abtnode/blocklet-services 1.17.4-beta-20251202-034514-637cd8e2 → 1.17.4-beta-20251202-122551-267b614d

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 (211) hide show
  1. package/api/routes/user.js +2 -0
  2. package/api/services/notification/queue.js +100 -37
  3. package/api/socket/channel/did.js +48 -0
  4. package/api/util/user-util.js +6 -1
  5. package/dist/assets/{AdapterDayjs-OZNn2tpO.js → AdapterDayjs-BuAhqT20.js} +1 -1
  6. package/dist/assets/{Google-PoHjNVzr.js → Google-Dp7qGnxg.js} +1 -1
  7. package/dist/assets/{access-control-BpDf5eCc.js → access-control-B9EJ5tQF.js} +1 -1
  8. package/dist/assets/{actions-CIp6hu8_.js → actions-DhSvOHy-.js} +1 -1
  9. package/dist/assets/{add-component-core-DZMleaf7.js → add-component-core-VVqL08Uq.js} +21 -21
  10. package/dist/assets/{add-resource-fReirUEj.js → add-resource-DPXu2LFD.js} +1 -1
  11. package/dist/assets/{addon-CD2tT3Vk.js → addon-DimuRKXu.js} +1 -1
  12. package/dist/assets/{advanced-D_HYmeDL.js → advanced-C-M8n1zk.js} +1 -1
  13. package/dist/assets/{aigne-DKzLdZPY.js → aigne-Blnb_Xmg.js} +1 -1
  14. package/dist/assets/{appearance-DoI_K1yx.js → appearance-DcbXeaDh.js} +1 -1
  15. package/dist/assets/ar-C89Z16Ql.js +7 -0
  16. package/dist/assets/{arrow-down.svg-mj2eIUoA.js → arrow-down.svg-CNh-MHKv.js} +1 -1
  17. package/dist/assets/{audit-logs-CBeb46aa.js → audit-logs-D0mYj6Ut.js} +1 -1
  18. package/dist/assets/{authorize-BQTDaD7S.js → authorize-CZdmLVec.js} +1 -1
  19. package/dist/assets/{base-chart-DvlyWvB2.js → base-chart-DJyGks5q.js} +1 -1
  20. package/dist/assets/{base32-AX-I0UaR.js → base32-CnxuWLTI.js} +1 -1
  21. package/dist/assets/{bind-account--wlCwoIh.js → bind-account-GnACtKqD.js} +1 -1
  22. package/dist/assets/{branding-Sd6X0YqE.js → branding-CFP8OuF1.js} +1 -1
  23. package/dist/assets/branding-CihykCDo.js +1 -0
  24. package/dist/assets/{branding-CMNxsyrp.js → branding-DmNLEN0a.js} +4 -4
  25. package/dist/assets/{bundle-avatar-DACPWlAj.js → bundle-avatar-D3mFZG-3.js} +1 -1
  26. package/dist/assets/button-pTTwNqRf.js +1 -0
  27. package/dist/assets/{click-to-copy-DZ_4RDjR.js → click-to-copy-CAd3nEo4.js} +1 -1
  28. package/dist/assets/{collapse-CHg4yEHL.js → collapse-CzqKk-Uw.js} +1 -1
  29. package/dist/assets/{complete-BIrSCTBJ.js → complete-BDYaBiHT.js} +1 -1
  30. package/dist/assets/{component-BrH7uZv7.js → component-D_iXTtDp.js} +2 -2
  31. package/dist/assets/{config-BbbJtsEK.js → config--X9TgCMx.js} +1 -1
  32. package/dist/assets/{config-C0IukdMa.js → config-C_UzRk_x.js} +3 -3
  33. package/dist/assets/{config-navigation-CPqSm2b8.js → config-navigation-zOEBEK_N.js} +2 -2
  34. package/dist/assets/{config-space-B6ikfnoY.js → config-space-D1vOxWrR.js} +1 -1
  35. package/dist/assets/{config-BlvlFPnu.js → config-xLf7B5vm.js} +1 -1
  36. package/dist/assets/{confirm-Dge1BR0a.js → confirm-CC1M9sYT.js} +1 -1
  37. package/dist/assets/{connect-DwftqrTP.js → connect-4mXUuWwC.js} +1 -1
  38. package/dist/assets/{connect-DwfU2nBg.js → connect-BpoYmTzp.js} +1 -1
  39. package/dist/assets/{connect-to-D3Fxg-mH.js → connect-to-YDMOcSyq.js} +1 -1
  40. package/dist/assets/{content-layout-RghQFMLL.js → content-layout-B-2tfq3i.js} +1 -1
  41. package/dist/assets/{create-passport-svg-BZVXsAoP.js → create-passport-svg-BLBQxsEK.js} +1 -1
  42. package/dist/assets/{createClass-dlbhjEVd.js → createClass-mqcDPFI4.js} +1 -1
  43. package/dist/assets/{dashboard-BZMyxtap.js → dashboard-DeaTlS85.js} +2 -2
  44. package/dist/assets/de-BsCDrfBl.js +7 -0
  45. package/dist/assets/{delete-confirm-CaK42Rqi.js → delete-confirm-DF03c_mf.js} +1 -1
  46. package/dist/assets/{did-address-CihvGtuj.js → did-address-BOsJWqi1.js} +1 -1
  47. package/dist/assets/{domain-DZhOKUFR.js → domain-DdkBc4bt.js} +1 -1
  48. package/dist/assets/{domain-action-card-KBcfeUDt.js → domain-action-card-B8tM4_TO.js} +1 -1
  49. package/dist/assets/domains-CdpvlDLA.js +1 -0
  50. package/dist/assets/{email-mM-fSS-l.js → email-DOKW1a_7.js} +1 -1
  51. package/dist/assets/{empty-spinner-2ylB84wv.js → empty-spinner-G6osPzkH.js} +1 -1
  52. package/dist/assets/engine-BsqbrwXE.js +1 -0
  53. package/dist/assets/es-BJh_XsEm.js +9 -0
  54. package/dist/assets/{exchange-passport-CL0-QMoV.js → exchange-passport-Dnbu3e66.js} +1 -1
  55. package/dist/assets/{form-BQvsWiOt.js → form-mmswDYpL.js} +1 -1
  56. package/dist/assets/form-text-input-BFJU5Psq.js +11 -0
  57. package/dist/assets/{form-wrapper-CqFSijKV.js → form-wrapper-CU8kJXy5.js} +1 -1
  58. package/dist/assets/fr-DRJMwn7V.js +7 -0
  59. package/dist/assets/{fuel-BpMa6xEp.js → fuel-CpCUHgkW.js} +1 -1
  60. package/dist/assets/{gen-access-key-BLtBtR5W.js → gen-access-key-OHc0npoi.js} +1 -1
  61. package/dist/assets/{gen-simple-access-key-9tFWfYxA.js → gen-simple-access-key-C6tIufX7.js} +1 -1
  62. package/dist/assets/get-safe-url-DUB5fSqh.js +1 -0
  63. package/dist/assets/hi-h-9Yl5g9.js +5 -0
  64. package/dist/assets/{home-BG4Bn0-p.js → home-BFI-HNBw.js} +1 -1
  65. package/dist/assets/id-BDWggRsa.js +7 -0
  66. package/dist/assets/{iframe-BjsS1KQR.js → iframe-DB0OcQ6i.js} +1 -1
  67. package/dist/assets/{index-B00Da_zr.js → index-3hHmW6B5.js} +1 -1
  68. package/dist/assets/{index-DsQDfClt.js → index-7uZYu-Ep.js} +1 -1
  69. package/dist/assets/{index-bbu7QFpz.js → index-BIJNkmLb.js} +1 -1
  70. package/dist/assets/{index-sfOXn4Gu.js → index-BMkJtBkv.js} +2 -2
  71. package/dist/assets/{index-C40tsw4I.js → index-Bj8J6jnM.js} +1 -1
  72. package/dist/assets/{index-D6MFQa2J.js → index-Bksy_mMO.js} +1 -1
  73. package/dist/assets/{index-B8mnhcds.js → index-Bns8G6yV.js} +2 -2
  74. package/dist/assets/{index-DEDj0oVc.js → index-BphmxdkH.js} +1 -1
  75. package/dist/assets/index-BsP0-mXD.js +124 -0
  76. package/dist/assets/{index-B8uWH9ks.js → index-BuIBrsUM.js} +1 -1
  77. package/dist/assets/index-Bw9XS3Zt.js +7 -0
  78. package/dist/assets/{index-CxJOg5jI.js → index-C3BK6ln_.js} +1 -1
  79. package/dist/assets/{index-B9Igf2rm.js → index-C3cD5fjJ.js} +1 -1
  80. package/dist/assets/{index-h0Os_ox8.js → index-CDE0c6ul.js} +1 -1
  81. package/dist/assets/{index-BmuOS9l2.js → index-CDFYQ7q2.js} +1 -1
  82. package/dist/assets/{index-5hr4oNRS.js → index-CEyMJtzZ.js} +3 -3
  83. package/dist/assets/{index-KUb_kVWp.js → index-CHbWK92_.js} +2 -2
  84. package/dist/assets/{index-BF7MtybM.js → index-Ca4Ccmqm.js} +1 -1
  85. package/dist/assets/{index-lFDZOk_k.js → index-CeWTwSLE.js} +66 -66
  86. package/dist/assets/{index-B4Q4y_7n.js → index-CtouYMiN.js} +1 -1
  87. package/dist/assets/{index-D9UpcFKi.js → index-D0pDhWRx.js} +1 -1
  88. package/dist/assets/{index-BVYUGxzR.js → index-D8w8SYuc.js} +1 -1
  89. package/dist/assets/{index-Cy73v3o9.js → index-DUFdTykg.js} +1 -1
  90. package/dist/assets/{index-BIlfbBZ2.js → index-DWuLUiY3.js} +1 -1
  91. package/dist/assets/index-Duwa2sz8.js +1 -0
  92. package/dist/assets/{index-CO3X6G_g.js → index-Dx6HKVtJ.js} +1 -1
  93. package/dist/assets/{index-yGC4DbEU.js → index-Dy3yCmIK.js} +1 -1
  94. package/dist/assets/{index-BUomsang.js → index-V1TR40-z.js} +1 -1
  95. package/dist/assets/{index-BoeLorfn.js → index-WCk612vr.js} +1 -1
  96. package/dist/assets/{index-BzCDxVOL.js → index-Xg-It3qI.js} +1 -1
  97. package/dist/assets/{index-CgTWMV4T.js → index-ohq48KFN.js} +1 -1
  98. package/dist/assets/{index-V83VNrab.js → index-wS_uPsSR.js} +1 -1
  99. package/dist/assets/{invitation-LJOuA09f.js → invitation-BqyhoSaQ.js} +1 -1
  100. package/dist/assets/{invitations-DtmYY9Tr.js → invitations-Dmx5LkD1.js} +1 -1
  101. package/dist/assets/{invite-DrIYCYzj.js → invite-E-ZdmNWy.js} +1 -1
  102. package/dist/assets/{isURL-fcz3vuMN.js → isURL-HS60va5G.js} +1 -1
  103. package/dist/assets/{issue-passport-Dv9gH2LH.js → issue-passport-DhA2Aw2n.js} +1 -1
  104. package/dist/assets/{item-weuCOdTL.js → item-B8ah25gH.js} +1 -1
  105. package/dist/assets/ja-R9EF3xbB.js +9 -0
  106. package/dist/assets/ko-C_QLPZyk.js +9 -0
  107. package/dist/assets/{landing-page-Djj9jDve.js → landing-page-DQBBERn_.js} +1 -1
  108. package/dist/assets/{launch-result-message-AcBN2VCj.js → launch-result-message-CO-R7GIB.js} +1 -1
  109. package/dist/assets/{layout-0zU7a-3v.js → layout-DUsIwJhf.js} +1 -1
  110. package/dist/assets/{list-DXe9E4ws.js → list-C6OYD0M-.js} +3 -3
  111. package/dist/assets/{list-Co62gn7d.js → list-CLMUEykk.js} +1 -1
  112. package/dist/assets/{list-header-CA-QkwGq.js → list-header-Cv_gaaAc.js} +1 -1
  113. package/dist/assets/localization-CutEJG9u.js +1 -0
  114. package/dist/assets/{log-BCC7blv9.js → log-CaIfb_mj.js} +1 -1
  115. package/dist/assets/logger-CjpdOowp.js +1 -0
  116. package/dist/assets/{login-DlWL3WVr.js → login-N9lwWO_e.js} +1 -1
  117. package/dist/assets/{login-oauth-callback-CQFS2s22.js → login-oauth-callback-U2rdasmV.js} +1 -1
  118. package/dist/assets/{logo-uploader-Dz85eY-W.js → logo-uploader-BgXq5jHQ.js} +1 -1
  119. package/dist/assets/{lost-passport-pRlBbp2M.js → lost-passport-CPwExoAp.js} +1 -1
  120. package/dist/assets/{observability-Bzq6nAvX.js → observability-SEfRhcXj.js} +1 -1
  121. package/dist/assets/{open-window-X4W6wF0y.js → open-window-BPgl9r9H.js} +1 -1
  122. package/dist/assets/{over-due-invoice-payment-CvKa0suc.js → over-due-invoice-payment-Hi-FNl9O.js} +1 -1
  123. package/dist/assets/{overview-d6xffU9N.js → overview-DPJo9CyG.js} +2 -2
  124. package/dist/assets/{page-header-B4MDj6gy.js → page-header-BkgoSN-0.js} +1 -1
  125. package/dist/assets/{passport-DHiNUeVn.js → passport-DMZiwbhL.js} +1 -1
  126. package/dist/assets/{passport-item-BkmVlAdr.js → passport-item-yqBy6NcY.js} +1 -1
  127. package/dist/assets/{permission-B3_OQqtH.js → permission-CiiVpApl.js} +1 -1
  128. package/dist/assets/{playground-C71u8_tm.js → playground-Bo63Spph.js} +1 -1
  129. package/dist/assets/preferences-YgFBqLbX.js +1 -0
  130. package/dist/assets/profile-embed-C35dSucs.js +1 -0
  131. package/dist/assets/pt-DpYO8djd.js +5 -0
  132. package/dist/assets/{publish-resource-Aoo5xCZX.js → publish-resource-DUDgKqzf.js} +1 -1
  133. package/dist/assets/{react-beautiful-dnd.esm--C1KYPc1.js → react-beautiful-dnd.esm-Clor-N66.js} +1 -1
  134. package/dist/assets/{react-stripe.esm-DlJMzZK2.js → react-stripe.esm-C-04j7I2.js} +1 -1
  135. package/dist/assets/{required-glXJjYm5.js → required-Btg6mEmX.js} +1 -1
  136. package/dist/assets/ru-DkZtar3s.js +5 -0
  137. package/dist/assets/{runtime-xK-SJ1cq.js → runtime-B_yu4wL5.js} +1 -1
  138. package/dist/assets/sdk-D9qYMy_G.js +1 -0
  139. package/dist/assets/{section-4gVAq_Fp.js → section-Cyr0YvGa.js} +1 -1
  140. package/dist/assets/{security-B3q0KDVH.js → security-YhrYNktK.js} +1 -1
  141. package/dist/assets/{session-DR7jqIW5.js → session-CJQ7HeL8.js} +1 -1
  142. package/dist/assets/{setup-CPrn9v2_.js → setup-DVxC6L1D.js} +1 -1
  143. package/dist/assets/{shorten-label-Cf--RqV-.js → shorten-label-D6jbe4l0.js} +1 -1
  144. package/dist/assets/{simple-select-SyYgbCc2.js → simple-select-BW6-FLlf.js} +1 -1
  145. package/dist/assets/{spaces-C_pXJSzm.js → spaces-DB-xtAK9.js} +1 -1
  146. package/dist/assets/{start-BUxgx8Ah.js → start-CnOduVio.js} +1 -1
  147. package/dist/assets/{starting-progress-BP_Sqg1X.js → starting-progress-Qp2T3eDZ.js} +1 -1
  148. package/dist/assets/{status-CE6iXPs_.js → status-B2iiuI6t.js} +1 -1
  149. package/dist/assets/{step-actions-tRQyAl6A.js → step-actions-D7ku0W0o.js} +1 -1
  150. package/dist/assets/{studio-bbXFMut7.js → studio-DtnYEBjZ.js} +1 -1
  151. package/dist/assets/switch-CjOUxynL.js +1 -0
  152. package/dist/assets/{switch-control-DdOZdvsu.js → switch-control-BFsTsyuN.js} +1 -1
  153. package/dist/assets/{table-tips-cVuoMOXE.js → table-tips-EHWVzPWe.js} +1 -1
  154. package/dist/assets/{team-KWOyNaWn.js → team-CKeHAIQC.js} +1 -1
  155. package/dist/assets/th-04iX5CrT.js +5 -0
  156. package/dist/assets/{traffic-ChddnVTm.js → traffic-NcU-KhYi.js} +1 -1
  157. package/dist/assets/{transfer-CcCi6t4X.js → transfer-CB2s8PFZ.js} +1 -1
  158. package/dist/assets/{unsubscribe-Bp5VQCnR.js → unsubscribe-a8AJuSFd.js} +1 -1
  159. package/dist/assets/{use-app-logo-hGlkw2d_.js → use-app-logo-D38VoM1R.js} +1 -1
  160. package/dist/assets/{use-mobile-BpPz1bKz.js → use-mobile-C5RjvO7g.js} +1 -1
  161. package/dist/assets/{use-mobile-DoKVMODs.js → use-mobile-ajdJIsoX.js} +1 -1
  162. package/dist/assets/{use-server-logo-UGU40YsW.js → use-server-logo-D4Yh4atf.js} +1 -1
  163. package/dist/assets/{use-window-close-CbUhh9L6.js → use-window-close-Bo92fPIm.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-DHTJ61Jg.js → useAsyncRetry-a2Wewn3F.js} +1 -1
  165. package/dist/assets/{useLocalStorage-UFpv-3wa.js → useLocalStorage-BBhMedc2.js} +1 -1
  166. package/dist/assets/{user-center-CXduwafJ.js → user-center-BNMJJTvG.js} +2 -2
  167. package/dist/assets/{user-follower-CmGz7Inx.js → user-follower-BXm4RUI2.js} +1 -1
  168. package/dist/assets/{util-MbDHkO8z.js → util-DPC-rfKa.js} +1 -1
  169. package/dist/assets/{util-D-cKMKUM.js → util-MwdZAHoO.js} +1 -1
  170. package/dist/assets/{vendor-arcblock-3xKfH3F1.js → vendor-arcblock-BL_VyzmH.js} +1 -1
  171. package/dist/assets/{vendor-mui-core-DHT36AZL.js → vendor-mui-core-BPQ6AEW_.js} +2 -2
  172. package/dist/assets/{vendor-mui-x-B4OOX5Es.js → vendor-mui-x-CWNb8fsW.js} +1 -1
  173. package/dist/assets/{vendor-ux-sqP3hEhY.js → vendor-ux-D507n6h6.js} +1 -1
  174. package/dist/assets/vi-kOP0E9Ga.js +5 -0
  175. package/dist/assets/{wait-connect-DDyEqw4h.js → wait-connect-Of13xq9u.js} +1 -1
  176. package/dist/assets/{wizard-B588KidT.js → wizard-BXTkkerl.js} +1 -1
  177. package/dist/assets/{wizard-components-DP7Z_TTm.js → wizard-components-BZ6jYzgt.js} +1 -1
  178. package/dist/assets/wrap-locale-CPp4ppiN.js +1 -0
  179. package/dist/assets/{zh-C_L8CY4f.js → zh-8l1HXCDx.js} +1 -1
  180. package/dist/assets/{zh-98nxdLeR.js → zh-DZI4Yy2m.js} +3 -3
  181. package/dist/assets/{zh-tw-BdDE7n5E.js → zh-tw-BLapUUeq.js} +2 -2
  182. package/dist/index.html +1 -1
  183. package/dist/service-worker.js +1 -1
  184. package/package.json +23 -23
  185. package/dist/assets/ar-BJZY7v5z.js +0 -7
  186. package/dist/assets/branding-Bs3FNZ79.js +0 -1
  187. package/dist/assets/button-8Nchte_6.js +0 -1
  188. package/dist/assets/de-BF0NHTXz.js +0 -7
  189. package/dist/assets/domains-Dr63r27w.js +0 -1
  190. package/dist/assets/engine-BCYKeHn7.js +0 -1
  191. package/dist/assets/es-Dv2m4LXp.js +0 -9
  192. package/dist/assets/form-text-input-CBL3JAev.js +0 -11
  193. package/dist/assets/fr-BGhg9oO3.js +0 -7
  194. package/dist/assets/get-safe-url-CxrqaBih.js +0 -1
  195. package/dist/assets/hi-CPfDhW8g.js +0 -5
  196. package/dist/assets/id-9TUzKF6k.js +0 -7
  197. package/dist/assets/index-88gdbkao.js +0 -1
  198. package/dist/assets/index-B6-5SXSy.js +0 -7
  199. package/dist/assets/index-CNE3uN5c.js +0 -124
  200. package/dist/assets/ja-DT5bRsBF.js +0 -9
  201. package/dist/assets/ko-CJn9PyPz.js +0 -9
  202. package/dist/assets/localization-CufkU3et.js +0 -1
  203. package/dist/assets/logger-DQUu6ucJ.js +0 -1
  204. package/dist/assets/preferences-D321ZAU1.js +0 -1
  205. package/dist/assets/profile-embed-Ba3F6nXm.js +0 -1
  206. package/dist/assets/pt-K9FK6Ube.js +0 -5
  207. package/dist/assets/ru-C_RwukUu.js +0 -5
  208. package/dist/assets/sdk-DAuiCSLy.js +0 -1
  209. package/dist/assets/th-Bhii_FfA.js +0 -5
  210. package/dist/assets/vi-DVF2tjOG.js +0 -5
  211. package/dist/assets/wrap-locale-CFMie_Pc.js +0 -1
@@ -0,0 +1,124 @@
1
+ import{j as e,y as br,bc as ye,M as ne,ak as m,Q as G,W as u,J as ve,c1 as yr,I as D,aN as vr,T as A,aj as wr,b5 as Pe,P as Ie,b6 as Te,a5 as Re,z as Ue,A as Fe,cj as jr,bh as Cr,U as Me,cR as kr,cS as Sr,at as Z,cT as Pr,a6 as V,n as oe,D as Ir,cU as Tr,ar as Ae,b1 as we,cV as Rr,aX as Mr,a$ as Ar,cW as Er}from"./vendor-mui-core-BPQ6AEW_.js";import{r as y,a as zr,u as Wr,j as Lr}from"./vendor-react-CUXIiAnY.js";import{t as _e,Z as Dr,a4 as Br,R as Ee,D as $r,C as se,n as H,A as Or}from"./vendor-utils-BSZ4yJws.js";import{a as Nr,G as Ur,bf as Fr,c as je,ad as _r,Z as qr,bc as qe,bg as Hr,aA as He,X as le,bh as Gr,a9 as Kr,aa as Vr,bi as Yr}from"./index-CeWTwSLE.js";import{a as R,h as Zr,k as ce,g as Q,b as M,j as Qr}from"./vendor-hooks-fhL5FJET.js";import{l as Ge}from"./arrow-down.svg-CNh-MHKv.js";import{p as Ce,U as z,V as W,at as Xr,i as Ke,au as Jr,H as O,av as et,aw as rt,ax as ze,e as tt,n as Ve,d as ke,ay as nt,az as T,D as ot,C as st,$ as it,aA as at,aB as lt,o as Ye}from"./vendor-ux-D507n6h6.js";import{N as ct}from"./list-C6OYD0M-.js";import{d as dt}from"./search-4YYphs0l.js";import{B as We}from"./bundle-avatar-D3mFZG-3.js";import{h as Le,T as ut}from"./team-CKeHAIQC.js";import{b as pt,d as ft,a as ht,c as Ze,e as xt,f as mt,h as gt,$ as bt}from"./user-center-BNMJJTvG.js";import{T as ge,O as yt}from"./index-BMkJtBkv.js";import{c as vt}from"./passport-DMZiwbhL.js";import{N as Qe,U as Xe}from"./index-ohq48KFN.js";import{u as de}from"./use-mobile-C5RjvO7g.js";import wt from"./index-D0pDhWRx.js";import{U as jt,a as Ct}from"./user-follower-BXm4RUI2.js";import{f as Y}from"./index-DBs9Ljax.js";import{S as Je}from"./switch-CjOUxynL.js";import{u as De}from"./index-C3cD5fjJ.js";import kt from"./index-V1TR40-z.js";import{o as St}from"./vendor-arcblock-BL_VyzmH.js";import{c as Pt,b as ie,a as It,S as Tt}from"./index-C3BK6ln_.js";import"./index-BIJNkmLb.js";import"./index-BojVbZw0.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-DHxZ1bRk.js";import"./util-DPC-rfKa.js";import"./base32-CnxuWLTI.js";import"./session-CJQ7HeL8.js";import"./isURL-HS60va5G.js";import"./use-app-logo-D38VoM1R.js";import"./index-DUFdTykg.js";import"./revoke.svg-CuiCGfVW.js";import"./use-mobile-ajdJIsoX.js";import"./actions-DhSvOHy-.js";import"./index-Ca4Ccmqm.js";import"./form-text-input-BFJU5Psq.js";import"./required-Btg6mEmX.js";import"./form-wrapper-CU8kJXy5.js";import"./edit.svg-Dz9cVo7r.js";import"./lock.svg-BPCZ0CT3.js";import"./index-Bksy_mMO.js";import"./permission-CiiVpApl.js";import"./confirm-CC1M9sYT.js";import"./click-to-copy-CAd3nEo4.js";import"./invitations-Dmx5LkD1.js";import"./create-passport-svg-BLBQxsEK.js";import"./api-DIucIOLX.js";import"./table-tips-EHWVzPWe.js";import"./ua-parser-DP5omx3I.js";import"./sdk-D9qYMy_G.js";import"./passport-item-yqBy6NcY.js";import"./did-address-BOsJWqi1.js";import"./index-WCk612vr.js";import"./vendor-mui-x-CWNb8fsW.js";import"./AdapterDayjs-BuAhqT20.js";import"./delete-confirm-DF03c_mf.js";import"./index-DRYJ0xIl.js";function Rt(){let r=new Map;function i({root:s,rootMargin:t,threshold:n}){let f=r.get(s);f||(f=new Map,r.set(s,f));let a=JSON.stringify({rootMargin:t,threshold:n}),p=f.get(a);if(!p){let l=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(o=>{l.get(o.target)?.(o)})},{root:s,rootMargin:t,threshold:n}),entryCallbacks:l},f.set(a,p)}return{observe:(l,x)=>{p.entryCallbacks.set(l,x),p.observer.observe(l)},unobserve:l=>{p.entryCallbacks.delete(l),p.observer.unobserve(l)}}}return{getObserver:i}}var Mt="0px",At=[0],Et=Rt();function zt(r){let i=r?.rootMargin??Mt,s=r?.threshold??At,t=y.useRef(null),n=y.useRef(null),f=y.useRef(null),[a,p]=y.useState(),l=y.useCallback(()=>{let C=t.current;if(!C){p(void 0);return}let v=Et.getObserver({root:n.current,rootMargin:i,threshold:s});v.observe(C,d=>{p(d)}),f.current=v},[i,s]),x=y.useCallback(()=>{let C=f.current,v=t.current;v&&C?.unobserve(v),f.current=null},[]),o=y.useCallback(C=>{x(),t.current=C,l()},[l,x]),h=y.useCallback(C=>{x(),n.current=C,l()},[l,x]);return[o,{entry:a,rootRef:h}]}var Wt=zt;function Lt(r){let[i,s]=Wt(r),t=!!s.entry?.isIntersecting,[n,f]=y.useState(t);return t&&!n&&f(!0),[i,{...s,isVisible:t,wasEverVisible:n}]}var Dt=Lt,Bt=100;function $t({loading:r,hasNextPage:i,onLoadMore:s,rootMargin:t,disabled:n,delayInMs:f=Bt}){let a=y.useRef(s),[p,{rootRef:l,isVisible:x}]=Dt({rootMargin:t});y.useEffect(()=>{a.current=s},[s]);let o=!n&&!r&&x&&i;return y.useEffect(()=>{if(o){let h=setTimeout(()=>{a.current()},f);return()=>{clearTimeout(h)}}},[o,f]),[p,{rootRef:l}]}var Ot=$t;const me={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};ae.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function ae({severity:r,size:i=8}){return me[r]?e.jsx(m,{component:"span",sx:{display:"inline-block",width:i,height:i,borderRadius:"50%",backgroundColor:me[r]||me.info}}):null}er.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function er({theme:r="dark",type:i="button",onSelectType:s,extra:t=void 0,currentTab:n="",loading:f=!1,...a}){const{t:p}=y.useContext(Ce),l=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==n||!f)&&s(g)},o=y.useMemo(()=>{const g={width:"100%",bgcolor:r==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:i==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return i==="line"?Object.assign(g,{}):g},[i,r]),h=(g,j,S)=>e.jsx(G,{disabled:f,onClick:()=>x(g.value),className:`profile-button ${j?"active":""}`,...a,children:g.label},g.value||S),C=(g,j,S)=>e.jsx(G,{variant:"text",disabled:f,onClick:()=>x(g.value),className:`profile-line-button ${j?"active":""}`,...a,children:g.label},g.value||S),v=()=>l?.map((g,j)=>{const S=n===g?.value;return i==="line"?e.jsx(y.Fragment,{children:C(g,S,j)},g.value||j):e.jsx(y.Fragment,{children:h(g,S,j)},g.value||j)}),d=g=>{const{value:j}=g.target;x(j==="all"?"":j)};return i==="select"?e.jsx(br,{sx:{maxWidth:300},children:e.jsx(ye,{value:n||"all",onChange:d,size:"small",label:"Severity",IconComponent:g=>e.jsx(Ge,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:l.map((g,j)=>e.jsx(ne,{value:g.value||"all",children:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ae,{severity:g.value}),g.label]})},g.value||j))})}):e.jsxs(m,{className:"severity-tabs",sx:o,children:[e.jsx(m,{sx:{...i==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),t]})}rr.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function rr({loading:r,paging:i,onChange:s}){const{t}=y.useContext(Ce),n=ve(l=>l.breakpoints.down("md"));if(i.pageCount<=0||n)return null;const f=(l,x)=>{s({page:x+1})},a=l=>{const x=Number(l.target.value);s({page:1,pageSize:x})},p=i.page-1<=0?0:i.page-1;return e.jsx(m,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(yr,{component:"div",disabled:r,count:i.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:t("pagination.rowsPerPage"),labelDisplayedRows:({from:l,to:x,count:o})=>`${l}–${x} / ${o!==-1?o:`${t()}more than ${x}`}`,rowsPerPage:i.pageSize,onPageChange:f,onRowsPerPageChange:a})})}const Nt=y.memo(rr),Ut={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},Be=6,$e={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Ft={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},Oe=()=>({...Ft,width:"calc(50% - 8px)"});tr.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function tr({onFilterChange:r=()=>{},loading:i=!1,type:s="service",blockletMap:t={},filterType:n="component",selectedId:f=[],severity:a=[],enableMarkAllAsRead:p=!0,unReadCount:l=0,onReadFilterChange:x=()=>{},currentReadFilter:o="all"}){const{t:h}=y.useContext(Ce),[C,v]=y.useState(null),d=!!C,[g,j]=y.useState(f),[S,L]=y.useState(a),[b,k]=y.useState(!1),[P,_]=y.useState(""),[B,N]=y.useState([]);y.useEffect(()=>{j(f),L(a)},[f,a]);const U=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],X=c=>{(c!==o||!i)&&x(c)},K=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],J=c=>{v(c.currentTarget),_(""),k(!1)},pe=()=>{v(null)},ee=c=>{const w=g.includes(c)?g.filter(I=>I!==c):[...g,c];j(w),r({id:w,severity:S})},re=c=>{const w=S.includes(c)?S.filter(I=>I!==c):[...S,c];L(w),r({severity:w,id:g})},fe=c=>{_(c.target.value)},he=()=>{k(!b)},q=zr.useMemo(()=>{if(!t.size)return[];const c=[];return n==="component"&&c.push({label:h("notification.system"),id:"system"}),Array.from(t).forEach(([,w])=>{const I=w.did||w.meta?.did,E=w.title||w.meta?.title||"",$=w.appPid||w.appDid;(n==="component"&&$!==I||n==="entity"&&$===I)&&c.push({label:E,id:I,blocklet:w,ancestors:w.ancestors})}),c},[t,n,h]);y.useEffect(()=>{if(P.trim()==="")N(q);else{const c=P.toLowerCase(),w=q.filter(I=>I.label.toLowerCase().includes(c));N(w)}},[P,q]);const xe=P.trim()!==""||b?B:B.slice(0,Be);return e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(m,{sx:{display:"flex",gap:1.5},children:U.map(c=>e.jsxs(G,{disabled:i,onClick:()=>X(c.value),className:`profile-button ${o===c.value?"active":""}`,sx:{...s==="service"&&o===c.value?{color:"secondary.main"}:{},color:"red",fontWeight:o===c.value?"bold":"normal"},children:[c.label,c.value==="unread"&&l>0&&` (${l})`]},c.value))}),e.jsxs(m,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(D,{size:"small",onClick:J,disabled:i,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(z,{icon:Ut,hFlip:!0})}),e.jsx(vr,{open:d,anchorEl:C,onClose:pe,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(m,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||S.length>0)&&e.jsx(G,{size:"small",onClick:()=>{j([]),L([]),r({severity:[],id:[]})},startIcon:e.jsx(wr,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:K.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(S.includes(c.value)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...$e},control:e.jsx(Re,{checked:S.includes(c.value),onChange:()=>re(c.value),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(ae,{severity:c.value}),c.label]})})},c.value))})}),e.jsxs(m,{sx:{mb:2},children:[e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(m,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ue,{size:"small",placeholder:"search",value:P,onChange:fe,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Fe,{position:"start",sx:{marginRight:"2px"},children:e.jsx(z,{icon:dt})})}}})})]}),e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:xe.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(g.includes(c.id)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...$e},control:e.jsx(Re,{checked:g.includes(c.id),onChange:()=>ee(c.id),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[c.blocklet&&e.jsx(We,{size:20,blocklet:c.blocklet,ancestors:c.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(A,{noWrap:!0,variant:"body2",component:"span",title:c.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:c.label})]})})},c.id))}),B.length>Be&&P.trim()===""&&e.jsx(G,{fullWidth:!0,size:"small",onClick:he,sx:{mt:1},endIcon:b?e.jsx(jr,{}):e.jsx(Cr,{})})]})]})})]})]}),g.length>0||S.length>0?e.jsxs(m,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[S.map(c=>{const w=K.find(I=>I.value===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(ae,{severity:c}),w?w.label:c]}),onDelete:()=>re(c),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${c}`)}),g.map(c=>{const w=q.find(I=>I.id===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(We,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:c]}),variant:"outlined",onDelete:()=>ee(c),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${c}`)})]}):null]})}const _t=Z(Pr)`
2
+ position: fixed;
3
+ bottom: 20px;
4
+ right: 20px;
5
+ z-index: 1000;
6
+ @media (max-width: 600px) {
7
+ bottom: 16px;
8
+ right: 16px;
9
+ transform: scale(0.9);
10
+ }
11
+ `;function qt(){const[r,i]=y.useState(!1);y.useEffect(()=>{const t=_e(()=>{i(window.pageYOffset>300)},200);return window.addEventListener("scroll",t),t(),()=>window.removeEventListener("scroll",t)},[]);const s=()=>{try{"scrollTo"in window?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0)}catch{window.scrollTo(0,0)}};return e.jsx(kr,{in:r,children:e.jsx(_t,{color:"primary",size:"small","aria-label":"scroll back to top",onClick:s,children:e.jsx(Sr,{})})})}const Ht=Z.div`
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: ${r=>r.inDialog?0:"24px"};
15
+ .MuiContainer-root {
16
+ padding-right: 0;
17
+ }
18
+
19
+ .profile-button.MuiButtonBase-root {
20
+ border-radius: 9999px;
21
+ margin-right: 2px;
22
+ padding: 5px 12px;
23
+ line-height: 22px;
24
+ font-size: 13px;
25
+ border: 1px solid transparent;
26
+ background-color: ${({theme:r})=>r.palette.background.default};
27
+ color: ${({theme:r})=>r.palette.text.primary};
28
+ font-weight: 400;
29
+ border: 1px solid ${({theme:r})=>r.palette.divider} !important;
30
+ }
31
+ .profile-button.active.MuiButtonBase-root,
32
+ .profile-button.active.MuiButtonBase-root:hover {
33
+ color: ${({theme:r})=>r.palette.primary.main};
34
+ font-weight: 600;
35
+ background-color: ${({theme:r})=>oe(r.palette.primary.main,.1)};
36
+ border: 1px solid ${({theme:r})=>oe(r.palette.primary.main,.24)} !important;
37
+ }
38
+
39
+ .profile-button.MuiButtonBase-root:hover {
40
+ background-color: rgba(0, 0, 0, 0.04);
41
+ }
42
+
43
+ .profile-line-button.MuiButtonBase-root {
44
+ margin-right: 2px;
45
+ color: ${({theme:r})=>r.palette.text.secondary};
46
+ padding: 5px 12px;
47
+ line-height: 22px;
48
+ font-size: 13px;
49
+ border: none !important;
50
+ border-radius: 0;
51
+ }
52
+
53
+ .profile-line-button.active.MuiButtonBase-root {
54
+ color: ${({theme:r})=>r.palette.text.primary};
55
+ border-bottom: 1px solid ${({theme:r})=>r.palette.text.primary} !important;
56
+ }
57
+
58
+ .profile-button.MuiButtonBase-root:last-of-type,
59
+ .profile-line-button.MuiButtonBase-root {
60
+ margin-right: 0;
61
+ }
62
+
63
+ .profile-line-button.MuiButtonBase-root:hover {
64
+ color: ${({theme:r})=>r.palette.text.primary};
65
+ background-color: unset;
66
+ }
67
+
68
+ * {
69
+ scrollbar-width: none; /* Firefox */
70
+ -ms-overflow-style: none; /* IE and Edge */
71
+ }
72
+
73
+ *::-webkit-scrollbar {
74
+ display: none; /* Chrome, Safari and Opera */
75
+ }
76
+ `;nr.propTypes={blocklets:u.array,context:u.object,pagination:u.bool,inDialog:u.bool,filterType:u.oneOf(["component","entity"]),toViewAll:u.func,type:u.oneOf(["server","service"])};function nr({blocklets:r=[],context:i,pagination:s=!0,inDialog:t=!1,filterType:n="component",toViewAll:f=()=>{},type:a="service"}){const{data:p,paging:l,refresh:x,loading:o,params:h,onReadNotification:C,componentDids:v,filterUnReadCount:d,initial:g}=i,j=c=>{x({...h,severity:c&&typeof c=="string"?[c]:c||[],paging:{...h.paging,page:1}})},[S]=Wr(),L=R(()=>S.get("id"),[S]),b=ve(c=>c.breakpoints.down("md")),[k,P]=y.useState(0),[_,B]=y.useState(!1),N=y.useMemo(()=>h.read===!1?"unread":"all",[h.read]),U=R(()=>_e(c=>{if(o)return;const w=p.length,I=p.filter($=>!Le($)).length;let E={...h,append:!0,paging:{...h.paging,...c,currentPage:(l.currentPage||0)+1}};N==="unread"&&I<w&&c.page>h.paging.page&&(E={...h,append:!0,paging:{...h.paging,...c,page:h.paging.page||1,currentPage:(l.currentPage||0)+1}}),x(E)},500),[p,h,N,l,o,x]);Zr(()=>{g&&typeof g=="function"&&g()}),y.useEffect(()=>{(!l.currentPage||l.currentPage===1)&&P(l.total)},[l.total,l.currentPage]),y.useEffect(()=>{setTimeout(()=>{const c=document.getElementById(L);c&&c.scrollIntoView({behavior:"smooth",block:"center"}),B(!0)},100),setTimeout(()=>{B(!1)},3e3)},[L]);const X=R(()=>p?.length>0&&p.length<k,[p,k]),K=y.useCallback(c=>{const{blocklet:w={}}=window,I=[w?.did,...(w?.ancestors||[]).map(E=>E)];return v?.includes(c)||I.findIndex(E=>E===c)>-1},[v]),J=y.useMemo(()=>{const c=new Map;return r.length&&r.forEach(w=>{const I=w?.did||w.meta?.did;I&&!c.has(I)&&(w.ancestors=[],c.set(I,w),w?.alsoKnownAs?.length>0&&w.alsoKnownAs.forEach(E=>{c.has(E)||c.set(E,w)})),w?.children?.length>0&&w.children.forEach(E=>{const $=E?.did||E.meta?.did;$&&!c.has($)&&K($)&&(E.ancestors=[w],c.set($,E))})}),c},[r,K]),pe=y.useCallback(()=>{o||U({page:l.page+1})},[l.page,o,U]),[ee]=Ot({loading:o,hasNextPage:X,onLoadMore:pe}),re=c=>{!c||Le(c)||C(c.id).then(()=>{t&&f()})},fe=({severity:c,id:w})=>{if(o)return;let I={};n==="component"?I={entityId:[],componentDid:w}:n==="entity"&&(I={componentDid:[],entityId:w}),x({...h,severity:c,...I,paging:{...h.paging,page:1}})},he=c=>{if(o)return;let w={...h,paging:{...h.paging,page:1}};c==="unread"?(w.read=!1,w.paging.currentPage=1):w=Dr(w,"read"),x(w)},q=R(()=>n==="component"?Array.isArray(h.componentDid)?h.componentDid:[]:n==="entity"?Array.isArray(h.entityId)?h.entityId:[]:[],[h,n]),xe=R(()=>(Array.isArray(h.severity)?h.severity:[])[0]||"",[h.severity]);return e.jsxs(Ht,{inDialog:!!t,children:[t?e.jsx(er,{currentTab:xe,type:"line",theme:"light",onSelectType:j}):e.jsx(tr,{loading:o,blockletMap:J,unReadCount:d,filterType:n,type:a,selectedId:q,onFilterChange:fe,severity:h.severity,onReadFilterChange:he,currentReadFilter:N}),!b&&o?e.jsx(m,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:e.jsx(V,{})}):e.jsx(ct,{data:p,blockletMap:J,onReadNotification:re,onReadBatch:C,inDialog:t,highlightId:L,highlight:!t&&_,type:a}),s&&!b?e.jsx(Nt,{loading:o,paging:l,onChange:U}):null,s&&b&&(o||X)?e.jsx(m,{ref:ee,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:e.jsx(V,{})}):null,!t&&b?e.jsx(qt,{}):null]})}const Gt=y.memo(nr),F=new Fr;function ue(r){const{userDid:i=""}={},{session:s}=Nr(),t=R(()=>{if(i)return i;const l=window.location.href,x=Br(l);return x?.did?Array.isArray(x.did)?x.did[0]:x.did:s?.user?.did},[s?.user?.did,i]),n=R(()=>s.user,[s]),f=R(()=>n?t===n?.did:!1,[t,n?.did]),a=ce(async()=>{if(await Ur(()=>s?.initialized),f)return s.user;if(t)return F.user.getUserPublicInfo({did:t})},{refreshDeps:[t,f,s?.initialized,n]}),p=R(()=>n?.passports?.some(l=>l.role===je.ROLES.OWNER),[n]);return{currentDid:t,session:s,isMyself:f,user:n,viewUser:a.data,isOwner:p}}function or({user:r,...i}){const{t:s}=W(),t=Ir(),n=R(()=>{const p=(r?.passports||[]).map(l=>({...l,revoked:l.status===Xr.REVOKED}));return p.sort((l,x)=>l.revoked===x.revoked?0:l.revoked?1:-1),Ee(p.filter(l=>!l.display),"role").concat(Ee(p.filter(l=>l.display),"display.content"))},[r?.passports]),f=R(()=>n?.find(p=>p.name===r.role),[n,r?.role]),a=t.palette.primary.main;return n.length===0?e.jsx(m,{children:e.jsx(Ke,{children:s("userCenter.noPassport")})}):e.jsx(m,{...i,sx:{display:"grid",justifyItems:"start",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(5, 1fr)"},gap:2.5,...i.sx},children:n.map(p=>e.jsx(pt,{passport:p,user:r,color:window.blocklet.passportColor,createPassportSvg:vt,title:f&&f.role===p.role?s("userCenter.currentPassport"):"",sx:{flexDirection:"column",alignItems:"center",gap:1,".passport-item__display":{width:166,height:166,borderRadius:1,px:2,display:"flex",justifyContent:"center",backgroundColor:"grey.50",boxShadow:f&&f.role===p.role?`0px 2px 4px 0px ${a}, 0px 1px 2px -1px ${a}, 0px 0px 0px 1px ${a} !important`:"unset"},".passport-item__body":{marginLeft:"0 !important"}}},p.id))})}or.propTypes={user:u.object.isRequired};function Kt({visible:r,onClose:i,nft:s}){return!r||!s?null:e.jsx(Vt,{children:e.jsx(Tr,{open:r,onClose:i,children:e.jsx(Yt,{onClick:i,children:e.jsx(Qe,{data:Xe(s),address:s.address,inset:!0})})})})}const Vt=Z.div`
77
+ position: relative;
78
+ width: 100%;
79
+ height: 100%;
80
+ cursor: pointer;
81
+
82
+ &:hover {
83
+ .mask {
84
+ opacity: 1;
85
+ }
86
+ }
87
+
88
+ .mask {
89
+ position: absolute;
90
+ top: 0;
91
+ left: 0;
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ width: 100%;
96
+ height: 100%;
97
+ background: rgba(0, 0, 0, 0.6);
98
+ opacity: 0;
99
+ transition: opacity 0.2s;
100
+ }
101
+ `,Yt=Z.div`
102
+ display: flex;
103
+ justify-content: center;
104
+ align-items: center;
105
+ height: 100vh;
106
+ width: 100vw;
107
+
108
+ img,
109
+ object {
110
+ max-width: 90vw;
111
+ max-height: 75vh;
112
+ }
113
+
114
+ .nft-display--inset {
115
+ > .MuiBox-root,
116
+ .nft-display__loading {
117
+ width: 75vmin;
118
+ height: 75vmin;
119
+ }
120
+ }
121
+ `,Zt=r=>({position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",opacity:0,transition:"opacity 0.3s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1,"& .mask-item":{backgroundColor:oe(r.palette.background.paper,.9),color:"text.primary","&:hover":{backgroundColor:oe(r.palette.background.paper,1)}}}),Qt={position:"absolute",bottom:0,left:0,right:0,height:24,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",gap:1,zIndex:1,"& .mask-item":{width:20,height:20,color:"white"}},Ne="https://main.abtnetwork.io/explorer";function sr({user:r}){const{t:i,locale:s}=W(),t=de(),[n,f]=y.useState({visible:!1,nft:null}),[a,p]=y.useState({anchorEl:null,props:null}),l=b=>{const k=se(Ne,"assets",b);window.open(k,"_blank")},x=(b,k)=>{let P="";typeof k.data?.value=="string"?P=JSON.parse(k.data?.value)?.domain:P=k.data?.value?.domain,p({anchorEl:b,props:{title:P?`Hey, I just won an NFT at the ${P} event!`:"Hey, I just won an NFT!",url:se(Ne,"assets",k.address)}})},o=b=>{f({visible:!0,nft:b})},h=Q({page:1,size:20}),C=ce(async(b=h)=>(await $r.get(`${je.WELLKNOWN_SERVICE_PATH_PREFIX}/ocap/listAssets`,{params:{ownerAddress:r.did,...b}})).data,{ready:r?.did&&h,defaultParams:[h],refreshDeps:[r?.did,h]}),{loading:v,data:d}=C,g=d?.page??{cursor:0,next:!1,total:0},j=(b,k)=>{h.page=k,C.run(h)},S=M(b=>[e.jsx(D,{size:"small",className:"mask-item",onClick:k=>{k.stopPropagation(),l(b.address)},children:e.jsx(z,{icon:"tabler:link",fontSize:18})},"link"),e.jsx(D,{size:"small",onClick:k=>{k.stopPropagation(),x(k.currentTarget,b)},className:"mask-item",children:e.jsx(z,{icon:"tabler:share-2",fontSize:18})},"share"),e.jsx(D,{size:"small",onClick:k=>{k.stopPropagation(),o(b)},className:"mask-item",children:e.jsx(z,{icon:"tabler:eye",fontSize:18})},"view")]),L=R(()=>{if(v){const b=["skeleton-1","skeleton-2","skeleton-3","skeleton-4","skeleton-5"].map(k=>e.jsx(Ae,{variant:"rectangular",width:"15%",height:166,sx:{borderRadius:1,flexShrink:0}},k));return e.jsxs(m,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(Ae,{width:"20%"}),e.jsx(m,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"nowrap"},children:b})]})}return e.jsxs(e.Fragment,{children:[e.jsx(A,{sx:{color:"grey.A700",fontWeight:600,mb:2.5},children:i("userCenter.common.nft")}),d?.assets?.length===0&&!v&&e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:e.jsx(Ke,{children:i("userCenter.common.noNFT")})}),e.jsx(m,{className:"nft-list-wrapper",sx:{display:"grid",justifyItems:"start",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(3, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(5, 1fr)"},gap:2.5},children:d?.assets?.map(b=>e.jsxs(m,{sx:{flexShrink:0,width:{xs:120,sm:120,md:120,lg:166},height:{xs:120,sm:120,md:120,lg:166},position:"relative",borderRadius:1,overflow:"hidden",cursor:"pointer",...t?{}:{"&:hover .mask":{opacity:1}}},children:[e.jsx(Qe,{data:Xe(b),address:b.address,inset:!0,imageFilter:{imageFilter:"resize",w:"500",f:"webp"}}),t?e.jsx(m,{className:"footer-mask",sx:Qt,children:S(b)}):e.jsx(m,{className:"mask",sx:Zt,children:e.jsx(we,{direction:"row",spacing:1,children:S(b)})})]},b.address))}),g.next||h.page>1?e.jsx(Rr,{sx:{display:"flex",justifyContent:"center",mt:2},page:h.page,onChange:j,count:Math.ceil(g.total/h.size),size:"small"}):null,e.jsx(Kt,{visible:n.visible&&!!n.nft,nft:n.nft,onClose:()=>{f({visible:!1,nft:null})}}),e.jsx(Jr,{locale:s,anchorEl:a.anchorEl,onClose:()=>{p({anchorEl:null,props:null})},sharedProps:a.props||{title:"",url:""}})]})},[v,g,h.page,h.size,j,a,n]);return e.jsx(m,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:2,mb:5},children:L})}sr.propTypes={user:u.object.isRequired};function Xt(){const{t:r}=W(),{user:i,isMyself:s,viewUser:t}=ue();return e.jsxs(m,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[s?e.jsxs(m,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,p:2},children:[e.jsx(A,{sx:{color:"text.primary",fontWeight:600,mb:2.5},children:r("userCenter.passport")}),e.jsx(or,{user:i})]}):null,e.jsx(sr,{user:s?i:t})]})}const Jt=[{name:"English",code:"en"},{name:"中文",code:"zh"}];function ir({user:r,onSave:i}){const{t:s,changeLocale:t}=W(),n=Q({locale:r.locale,loading:!1}),f=M(async a=>{try{const{value:p}=a.target;n.loading=!0,await F.user.saveProfile({locale:p}),await i("profile"),t(p),n.locale=p}catch(p){O.error(Y(p))}finally{n.loading=!1}});return e.jsxs(m,{sx:{gap:1,display:"grid",alignItems:"center",gridTemplateColumns:{xs:"1fr",sm:"max-content 1fr"}},children:[e.jsx(m,{children:s("userCenter.commonSetting.locale")}),e.jsx(m,{children:e.jsx(ye,{value:n.locale,onChange:f,size:"small",IconComponent:a=>e.jsx(Ge,{...a,width:20,height:20}),sx:{minWidth:200,"&:hover":{"fieldset.MuiOutlinedInput-notchedOutline":{borderColor:"divider"}},fieldset:{borderColor:"divider"}},children:(window.blocklet.languages||Jt).map(a=>e.jsx(ne,{value:a.code,children:a.name},a.code))})})]})}ir.propTypes={user:u.shape({locale:u.string}).isRequired,onSave:u.func.isRequired};function ar({type:r,url:i,enabled:s,onEdit:t,onChange:n,onDelete:f}){return e.jsxs(m,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",py:1,px:1.5,gap:.75,borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1,flex:1,minWidth:0,cursor:"pointer"},onClick:t,children:[e.jsx(ge,{title:r,children:e.jsx(z,{icon:r==="slack"?"logos:slack-icon":"material-symbols:link-rounded"})}),e.jsx(A,{sx:{color:"text.primary",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]}),e.jsxs(m,{sx:{minWidth:72,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1},children:[e.jsx(D,{color:"error",onClick:f,size:"small",sx:{p:0},children:e.jsx(z,{icon:Ze})}),e.jsx(Je,{checked:s,onChange:n})]})]})}ar.propTypes={type:u.string.isRequired,url:u.string.isRequired,onEdit:u.func.isRequired,onChange:u.func.isRequired,enabled:u.bool.isRequired,onDelete:u.func.isRequired};function be({onTest:r=H,onDelete:i=H,onSave:s=H,onCancel:t=H,type:n="slack",url:f="",enabled:a=!0,edit:p=!1,webhooks:l=[]}){const{t:x}=W(),o=Q({type:n||"slack",url:f||"",edit:p??!1,enabled:a??!0,error:"",loading:!1}),h=M(()=>o.url?o.type==="slack"&&!_r.isSlackWebhookUrl(o.url)||!qr(o.url)?(o.error=x("common.invalid"),!1):l.some(S=>S.url===f&&o.url===f?!1:S.url===o.url)?(o.error=x("common.duplicate"),!1):(o.error="",!0):(o.error=x("common.required"),!1)),C=M(()=>{o.edit=!1,o.url=f||"",o.type=n||"slack",o.error="",o.loading=!1,t()}),v=M(async j=>{o.loading=!0,await r(j),o.loading=!1}),d=M(j=>()=>{h()&&j({type:o.type,url:o.url,enabled:o.enabled})}),g=R(()=>o.error?e.jsx(A,{component:"span",color:"error",children:o.error}):o.edit?o.loading?e.jsx(V,{size:16}):e.jsx(D,{size:"small",onClick:d(v),sx:{mr:-1},children:e.jsx(z,{icon:ft})}):null,[o.error,o.edit,o.loading]);return o.edit?e.jsxs(m,{sx:{display:"flex",gap:1.5,px:1.5,width:"100%",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(ye,{sx:{borderRadius:1,"&.Mui-disabled":{backgroundColor:"grey.50"}},disabled:!o.edit||o.loading,size:"small",value:o.type,onChange:j=>{o.type=j.target.value},children:[e.jsx(ne,{value:"api",children:x("userCenter.webhook.url")}),e.jsx(ne,{value:"slack",children:x("userCenter.webhook.slack")})]}),e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"},children:[e.jsx(Ue,{sx:{flex:1,".MuiInputBase-root":{borderRadius:1,"&.Mui-disabled":{backgroundColor:"grey.50"}}},disabled:!o.edit||o.loading,fullWidth:!0,size:"small",required:!0,value:o.url,onChange:j=>{o.url=j.target.value,o.error="",h()},error:!!o.error,slotProps:{input:{endAdornment:e.jsx(Fe,{position:"end",children:g})}}}),e.jsx(m,{sx:{display:"flex",gap:.5},children:o.edit?e.jsxs(e.Fragment,{children:[e.jsx(D,{color:"success",onClick:d((...j)=>{s(...j),o.edit=!1}),sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(z,{icon:et})}),e.jsx(D,{color:"error",onClick:C,sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(z,{icon:rt})})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{onClick:()=>{o.edit=!0},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(z,{icon:ht})}),e.jsx(D,{color:"error",onClick:()=>{i({type:o.type,url:o.url})},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(z,{icon:Ze})})]})})]})]}):e.jsx(ar,{type:o.type,url:o.url,enabled:o.enabled,onEdit:()=>{o.edit=!0},onChange:j=>{o.enabled=j,d((...S)=>s(...S))()},onDelete:()=>{i({type:o.type,url:o.url})}})}be.propTypes={onTest:u.func,onDelete:u.func,onSave:u.func,onCancel:u.func,type:u.oneOf(["api","slack"]),url:u.string,edit:u.bool,webhooks:u.array,enabled:u.bool};function te({title:r=void 0,description:i=void 0,value:s,onChange:t,isMobile:n,type:f}){const a=M(p=>{p.stopPropagation()});return e.jsxs(m,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",py:1,px:1.5,gap:.75,borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1},children:[f==="push"?e.jsx(z,{icon:"tabler:bell"}):e.jsx(qe,{provider:f,sx:{width:"1em",height:"1em",flexShrink:0,fontSize:16}}),e.jsxs(A,{component:"div",onClick:a,sx:{color:"text.primary",fontSize:14,display:"flex",flexWrap:n?"wrap":"nowrap",columnGap:1,flex:1,whiteSpace:n?"normal":"nowrap"},children:[r,i]})]}),e.jsx(Je,{sx:{minWidth:36,flexShrink:0},checked:s,onChange:t})]})}te.propTypes={title:u.string,description:u.node,value:u.bool.isRequired,onChange:u.func.isRequired,isMobile:u.bool.isRequired,type:u.oneOf(["wallet","email","push"]).isRequired};function lr({user:r,isMobile:i}){const{t:s}=W(),t=Q({showAdd:!1}),n=ce(async()=>await F.user.getUserNotificationConfig(),{refreshDeps:[r],loadingDelay:300}),f=R(()=>({wallet:!0,email:!0,phone:!1,push:!0,...n?.data?.notifications||{}}),[n?.data?.notifications]),a=R(()=>n?.data?.webhooks||[],[n?.data?.webhooks]),p=M(async v=>{try{await F.user.saveUserNotificationConfig(v),O.success(s("userCenter.saveSuccess")),n.run()}catch(d){O.error(Y(d))}}),l=M(async(v,d)=>{await p({notifications:{[v]:d}})}),x=async v=>{try{await F.user.testNotificationWebhook(v),O.success(s("userCenter.webhookTested"))}catch(d){O.error(Y(d))}},o=M(async v=>{await p({webhooks:a.filter((d,g)=>g!==v)})}),h=M(async(v,d)=>{await p({webhooks:a.map((g,j)=>j===v?d:g)})}),C=M(async v=>{await p({webhooks:[...a,v]}),t.showAdd=!1});return n.error?e.jsx(Mr,{severity:"error",children:n.error.message}):n.loading||!n.data?e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px"},children:e.jsx(V,{})}):e.jsxs(m,{sx:{display:"flex",flexDirection:"column",".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:[e.jsxs(m,{sx:{display:"flex",flexDirection:"column",alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}}},children:[e.jsx(te,{value:f.wallet,isMobile:i,type:"wallet",title:s("userCenter.walletNotification"),onChange:v=>l("wallet",v),description:ze(r)&&e.jsx(tt,{did:ze(r),showQrcode:!1,showAvatar:!i,copyable:!0,compact:!0,responsive:!0,startChars:i?2:6})}),e.jsx(te,{value:f.email,isMobile:i,type:"email",onChange:v=>l("email",v),title:s("userCenter.emailNotification"),description:r?.email&&e.jsx(A,{component:"span",sx:{color:"text.secondary",fontSize:13},children:r?.email})}),e.jsx(te,{isMobile:i,value:f.push,type:"push",title:s("userCenter.pushNotification"),onChange:v=>l("push",v)})]}),e.jsxs(we,{useFlexGap:!0,direction:"column",sx:{alignItems:"start"},children:[a.map((v,d)=>e.jsx(be,{enabled:v.enabled,onTest:x,onDelete:()=>o(d),onSave:(...g)=>h(d,...g),type:v.type,url:v.url,edit:!1,webhooks:a},`${d}_${v.url}`)),t.showAdd&&e.jsx(be,{onTest:x,onCancel:()=>{t.showAdd=!1},onSave:(...v)=>C(...v),edit:!0,webhooks:a},"add"),e.jsx(Ve,{variant:"outlined",size:"small",sx:{color:"text.primary",borderColor:"divider","&:hover":{borderColor:"divider"},py:.5,borderRadius:1,mt:1,ml:1.5},startIcon:e.jsx(z,{icon:xt}),onClick:()=>{t.showAdd=!0},children:s("userCenter.addWebhook")})]})]})}lr.propTypes={user:u.object.isRequired,isMobile:u.bool.isRequired};function cr({item:r}){const i=ke(),{blocklet:s}=Hr(),{confirmApi:t,confirmHolder:n}=He(),f=Q({loading:!1}),{t:a}=W(),{session:p}=y.use(le),{bindOAuth:l,unbindOAuth:x,setBaseUrl:o,baseUrl:h}=p.useOAuth(),{disconnectPasskey:C,setTargetAppPid:v}=p.usePasskey(),d=R(()=>nt[r?.provider]||"unknown",[r?.provider]),g=M(b=>b?._bind?b.provider===T.WALLET&&b.did?a("userCenter.thirdPartyLogin.walletAccountCantRemove"):b.provider===T.PASSKEY&&i.arcSphere?a("userCenter.thirdPartyLogin.dontSupportRemoveinArcSphere"):b._mainProvider&&i.arcSphere?a("userCenter.thirdPartyLogin.mainProviderCantRemove"):"":""),j=M(async()=>{if(r?.provider===T.PASSKEY){await new Promise((b,k)=>{t.open({title:a("userCenter.thirdPartyLogin.disconnectPasskey",{name:d}),content:a("userCenter.thirdPartyLogin.disconnectPasskeyDescription",{name:d}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:a("common.cancel"),onConfirm(P){C({session:p,connectedAccount:r}).then(b).catch(k),P()},onCancel:b})});return}try{f.loading=!0,await new Promise((b,k)=>{if(r?._bind)t.open({title:a("userCenter.thirdPartyLogin.confirmUnbind",{name:d}),content:a("userCenter.thirdPartyLogin.confirmUnbindDescription",{name:d}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:a("common.cancel"),onConfirm(P){x({session:p,connectedAccount:{...Or(r,["did","pk"]),showProvider:r.provider,provider:r._rawProvider}}).then(b).catch(k),P()},onCancel:b});else if(r.provider===T.WALLET)t.open({title:a("userCenter.thirdPartyLogin.confirmBindWallet",{name:d}),content:a("userCenter.thirdPartyLogin.confirmBindWalletDescription",{name:d}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"primary"},cancelButtonText:a("common.cancel"),onConfirm:P=>{p.bindWallet({onSuccess:b,onCancel:k}),P()},onCancel:b});else{const P=h,_=window?.blocklet;let B="/";const N=ot(_),U=st(_);N&&U?.appPid&&p?.user?.sourceAppPid&&(B=U.appUrl),o(B),v(s?.appPid),l({session:p,oauthItem:{...r,provider:r._rawProvider}}).then(b).catch(k).finally(()=>{o(P),v()})}})}catch(b){console.error(`Failed to ${r?._bind?"unbind":"bind"} oauth account`,b)}finally{f.loading=!1}}),S=M(b=>b.provider===T.WALLET&&b.did?a("userCenter.thirdPartyLogin.walletAccount"):b._mainProvider?a("userCenter.thirdPartyLogin.mainAccount"):b?._bind?a("userCenter.thirdPartyLogin.disconnect"):a("userCenter.thirdPartyLogin.connect")),L=M(b=>b.provider===T.WALLET&&b.did||b.provider===T.PASSKEY&&(i.arcSphere||i.wallet)?!0:!!r._mainProvider,[i.arcSphere]);return e.jsxs(e.Fragment,{children:[e.jsxs(m,{sx:{borderRadius:1,border:"1px solid",borderColor:"divider",backgroundColor:"grey.50",display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1,overflow:"hidden"},children:[e.jsx(qe,{provider:r?.provider,sx:{width:"1em",height:"1em",flexShrink:0,fontSize:16}}),e.jsx(m,{sx:{flex:1,display:{xs:r.userInfo?.email||r.did?"none":"block",sm:"block"}},children:d}),r.userInfo?.email||r.did?e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5,overflow:"hidden"},children:[e.jsx(m,{sx:{flex:1,textOverflow:"ellipsis",overflow:"hidden",lineHeight:"normal"},children:r.userInfo?.email||r.did}),r.userInfo?.name?e.jsx(ge,{title:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(it,{size:36,variant:"circle",shape:"circle",src:r.userInfo?.picture,did:r.did}),e.jsxs(m,{children:[e.jsx(A,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:r.userInfo?.name}),e.jsx(A,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:r.userInfo?.email})]})]}),children:e.jsx(m,{component:z,icon:Gr,sx:{color:"text.secondary",fontSize:16,cursor:"pointer",flexShrink:0}})}):null]}):null]}),e.jsx(ge,{title:g(r),placement:"auto",children:e.jsx(m,{children:e.jsx(Ve,{variant:"outlined",size:"small",sx:b=>{const k=b.palette.error.main,P=b.palette.primary.main;return{color:r?._bind?k:P,borderColor:r?._bind?k:P,backgroundColor:"background.default","&:hover":{borderColor:r?._bind?k:P,backgroundColor:"action.hover"},py:.5,borderRadius:1,fontWeight:500,whiteSpace:"nowrap"}},fullWidth:!0,startIcon:f.loading?null:e.jsx(z,{icon:mt}),onClick:j,disabled:L(r),loading:f.loading,children:S(r)})})}),n]})}cr.propTypes={item:u.shape({provider:u.string,did:u.string,pk:u.string,userInfo:u.object,id:u.string,_bind:u.bool,_rawProvider:u.string,_mainProvider:u.bool}).isRequired};function dr({user:r}){const{session:i}=y.use(le),[s,t]=y.useState({}),{getOAuthConfigs:n}=i.useOAuth(),f=ke();Qr(async()=>{const l=await n({sourceAppPid:r?.sourceAppPid});t(l)},[r?.sourceAppPid]);const a=R(()=>{const l=Object.keys(s).map(x=>({...s[x],provider:x})).filter(x=>x.enabled);return[{provider:T.WALLET,order:-1},...l,{provider:T.PASSKEY,order:1/0}]},[s]),p=R(()=>{const l=at(r);let x=!1,o="",h=lt(r);const C=l.find(d=>d.provider===T.AUTH0);return C&&(C.id.startsWith("google-oauth2|")&&(l.some(d=>d.provider==="google")||(x=!0,o=T.GOOGLE,h===T.AUTH0&&(h=T.GOOGLE))),C.id.startsWith("appleid|")&&(l.some(d=>d.provider===T.APPLE)||(x=!0,o=T.APPLE,h===T.AUTH0&&(h=T.APPLE))),C.id.startsWith("github|")&&(l.some(d=>d.provider===T.GITHUB)||(x=!0,o=T.GITHUB,h===T.AUTH0&&(h=T.GITHUB)))),a.map(d=>{if(d.provider===T.AUTH0&&x)return null;const g=x&&d.provider===o?l.find(j=>j.provider===T.AUTH0):l.find(j=>j.provider===d.provider);return g?{...d,provider:d.provider,did:g.did,pk:g.pk,userInfo:g.userInfo,_bind:!0,_rawProvider:g.provider,_mainProvider:d.provider===h}:{...d,provider:d.provider,_rawProvider:d.provider,_mainProvider:d.provider===h}}).filter(d=>!(!d||d.provider===T.PASSKEY&&!d.did)).sort((d,g)=>d._mainProvider?-1:d?.order!==void 0&&g?.order!==void 0?d.order-g.order:d?.order!==void 0?-1:1)},[r?.connectedAccounts,a]);return e.jsxs(m,{sx:{gap:1,display:"grid",gridTemplateColumns:"1fr min-content"},children:[p.map(l=>e.jsx(cr,{item:l},l?.provider)),f.wallet||f.arcSphere?null:e.jsx(Kr,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add New Passkey",onSuccess:H,onError:H,dense:!0,sx:{px:1.5,py:1,gap:.75}})]})}dr.propTypes={user:u.object.isRequired};function ur({configList:r,onSave:i}){const[s,t]=y.useState(r),{t:n}=W(),f=M(async(a,p)=>{try{const l=await F.user.saveUserPrivacyConfig({[a]:typeof p=="string"?p:!p});t(s.map(x=>({...x,value:l?.[x.key]??x.value}))),O.success(n("userCenter.saveSuccess")),i("privacy")}catch(l){O.error(Y(l))}});return y.useEffect(()=>{t(r)},[r]),e.jsx(m,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:s.map(a=>{if(a.isPrivate)return null;const p=!a.value||["all","follower-only"].includes(a.value);return e.jsxs(m,{children:[e.jsx(De,{checked:p,labelProps:{label:e.jsx(A,{sx:{color:"text.primary",fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:n("userCenter.toPublic",{name:a.name})})},size:"small",onChange:l=>{const{checked:x}=l.target;a.followersOnly?f(a.key,x?"all":"private"):f(a.key,x)}},a.key),a.followersOnly&&p&&e.jsx(m,{sx:{pl:3,pt:1},children:e.jsx(De,{checked:a.value==="follower-only",labelProps:{label:e.jsx(A,{sx:{color:"text.primary",fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:n("team.userFollowers.followersOnly")})},size:"small",onChange:l=>{const{checked:x}=l.target;f(a.key,x?"follower-only":"all")}})})]})})})}ur.propTypes={configList:u.arrayOf(u.shape({key:u.string.isRequired,name:u.string.isRequired,value:u.bool.isRequired,isPrivate:u.bool})).isRequired,onSave:u.func.isRequired};function pr({onDestroySelf:r=void 0}){const{confirmHolder:i}=He(),{t:s}=W(),{session:t}=y.use(le),n=M(async()=>{if(!r||typeof r!="function")return;const f=t.withSecondaryAuth(r,{extraParams:{removeUserDid:t?.user?.did,input:{user:{did:t?.user?.did},teamDid:window?.blocklet?.did}},operation:"destroySelf"});try{await f(),t.logout()}catch(a){O.error(a?.message||s("userCenter.destroyMyself.error"))}});return e.jsxs(e.Fragment,{children:[e.jsx(m,{children:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"space-between",flexWrap:"wrap"},children:[e.jsxs(m,{children:[e.jsx(A,{variant:"h6",sx:{fontSize:"0.875rem !important",fontWeight:"bold"},children:s("userCenter.dangerZone.deleteAccount")}),e.jsx(A,{variant:"caption",sx:{color:"text.secondary"},children:s("userCenter.dangerZone.deleteAccountDescription")})]}),e.jsx(G,{variant:"contained",color:"error",size:"small",onClick:n,children:s("userCenter.dangerZone.delete")})]})}),i]})}pr.propTypes={onDestroySelf:u.func};function en(){const r=de({key:"md"}),i=ve(n=>n.breakpoints.down("lg")),s={display:"flex",justifyContent:"flex-end",flexWrap:"wrap",textAlign:"right","&.expired-at > div":{maxWidth:160,justifyContent:"flex-end",flexWrap:"wrap"}},t=R(()=>Ye({},r?s:{}),[r]);return e.jsx(m,{id:"user-center-access-key-setting",sx:{maxWidth:r?"unset":i?"calc(100vw - 300px)":"100%",...r&&{".pc-access-key-table > div:nth-child(2)":{border:"1px solid",borderColor:"divider",borderRadius:1}},".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableRow-root":{border:"unset","&:nth-child(even)":{backgroundColor:"grey.50","&:hover":{backgroundColor:n=>`${n.palette.grey[50]} !important`}}},".MuiTableRow-hover":{"&:hover":{backgroundColor:"inherit !important"}},".MuiTableCell-root":{paddingRight:"8px",paddingLeft:"8px",color:"text.secondary",...r&&{padding:"8px !important","&:first-child":{paddingTop:"20px!important"},"&:last-child":{paddingBottom:"20px!important"}}}},children:e.jsx(kt,{isSelf:!0,columnSx:t})})}function fr({onDestroySelf:r=void 0,userCenterTabs:i=[]}){const{t:s}=W(),{user:t,session:n,isMyself:f,isOwner:a}=ue(),l=ke().arcSphere,x=de({key:"md"}),o=ce(async()=>t&&f?await F.user.getUserPrivacyConfig({did:t.did}):null,{refreshDeps:[t,f],loadingDelay:300}),h=R(()=>i.map(d=>({key:d.value,name:d.label,value:d.protected,isPrivate:d.isPrivate,followersOnly:d.followersOnly})),[i]),C=M(async d=>d==="privacy"?(await o.runAsync(),o.data):(d==="profile"&&await n.refresh(),null));y.useEffect(()=>{const d=window.location.hash.slice(1);d&&document.getElementById(d)?.scrollIntoView({behavior:"smooth"})},[]);const v=R(()=>[l?void 0:{label:s("userCenter.commonSetting.title"),value:"common",content:e.jsx(ir,{user:t,onSave:C})},{label:s("userCenter.notificationManagement"),value:"notification",content:e.jsx(lr,{user:t,isMobile:x})},{label:s("userCenter.thirdPartyLogin.title"),value:"thirdPartyLogin",content:e.jsx(dr,{user:t})},{label:s("common.accessKeys"),value:"accessKeys",content:e.jsx(en,{isSelf:!0})},{label:s("common.mcpServers"),value:"mcpServers",content:e.jsx(wt,{})},{label:s("userCenter.privacyManagement"),value:"privacy",content:e.jsx(ur,{configList:h,onSave:C})},{label:s("userCenter.sessionManagement"),value:"session",content:e.jsx(jt,{user:t,showUser:!1,getUserSessions:d=>F.userSession.getMyLoginSessions({},d)})},!a&&r&&typeof r=="function"?{label:s("userCenter.dangerZone.title"),value:"dangerZone",content:e.jsx(pr,{onDestroySelf:r}),sx:{borderColor:"error.main"}}:null].filter(Boolean),[t,h,x,a,r]);return f?e.jsx(m,{className:"user-center-settings",sx:{display:"flex",flexDirection:"column",gap:2.5,minWidth:{md:500},"@media (min-width: 1200px) and (max-width: 1260px)":{maxWidth:750},"@media (min-width: 1100px) and (max-width: 1199px)":{maxWidth:650},"@media (min-width: 1000px) and (max-width: 1099px)":{maxWidth:600},"@media (max-width: 1049px)":{maxWidth:"100%"}},children:v.map(d=>d?e.jsxs(m,{id:d.value,sx:Ye({border:"1px solid",borderColor:"divider",borderRadius:1,p:2,"&:last-child":{mb:5}},d.sx),children:[e.jsx(A,{sx:{color:"text.primary",fontWeight:600},children:d.label}),e.jsx(m,{sx:{mt:2.5},children:d.content})]},d.value):null)}):null}fr.propTypes={onDestroySelf:u.func,userCenterTabs:u.array};const hr=y.createContext({}),{Provider:rn,Consumer:go}=hr;function xr({children:r}){const[i]=y.useState(!1),{session:s}=y.use(le),{user:t}=s,[n,f]=y.useState(),a=y.useMemo(()=>t?.didSpace?.endpoint,[t?.didSpace]);y.useEffect(()=>{f(t?.didSpace)},[t?.didSpace]);const p=async()=>{f(void 0)},l=h=>{},x=async h=>{f(h),await l(h.endpoint)},o=!!(a&&n);return e.jsx(rn,{value:{loading:i,spaceGateway:n,session:s,deleteSpaceGateway:p,updateSpaceGateway:x,storageEndpoint:a,settingStorageEndpoint:l,hasStorageEndpoint:o},children:r})}function Se(){return y.use(hr)}xr.propTypes={children:u.node.isRequired};function tn(r){const i=r.replace(/\/api\/space\/.+/,""),t=r.replace(/\/$/,"").split("/").at(-4);return se(i,"space",t)}function mr({session:r,spaceGateway:i,spaceStatus:s,refresh:t}){return e.jsxs(we,{direction:"row",spacing:1,children:[s===Pt.DISCONNECTED&&e.jsx(ie,{reconnect:!0,variant:"outlined",session:r,spaceDid:r.user?.didSpace?.did,spaceGatewayUrl:r.user?.didSpace?.url,connectScope:"user",onSuccess:async()=>{await t()},onError:n=>{console.error(n),O.error(Y(n))}}),e.jsx(D,{size:"small",LinkComponent:Ar,href:tn(i.endpoint),target:"_blank",children:e.jsx(Er,{})})]})}mr.propTypes={session:u.object.isRequired,spaceGateway:u.object.isRequired,spaceStatus:u.string.isRequired,refresh:u.func.isRequired};function gr({spaceGateway:r=void 0}){const{t:i}=W(),{updateSpaceGateway:s,session:t}=Se(),n=de(),f=({spaceGateway:a})=>s(a);return e.jsxs(m,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(m,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[e.jsx(A,{sx:{fontSize:"16px",fontWeight:"bold"},children:i("userCenter.storage.spaces.connected.title")}),!n&&e.jsx(ie,{connectScope:"user",connectText:i("userCenter.storage.spaces.connected.switch"),session:t,onSuccess:f})]}),e.jsx(m,{children:r&&e.jsx(It,{endpoint:r.endpoint,deps:[r],selected:!0,footer:!0,action:a=>e.jsx(mr,{session:t,...a})},r.endpoint)}),n&&e.jsx(m,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2},children:e.jsx(ie,{connectScope:"user",connectText:i("userCenter.storage.spaces.connected.switch"),session:t,onSuccess:f})})]})}gr.propTypes={spaceGateway:u.object};function nn(){const{t:r}=W(),{updateSpaceGateway:i,session:s}=Se(),t=({spaceGateway:n})=>i(n);return e.jsxs(m,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(A,{sx:{fontSize:"16px",fontWeight:"bold"},children:r("userCenter.storage.spaces.connect.providerForStorage")}),e.jsx(Tt,{viewBox:"0 0 228 258",style:{width:"156px",height:"156px",margin:"16px 0"}}),e.jsx(m,{children:e.jsx(ie,{session:s,onSuccess:t})})]})}function on(){const{spaceGateway:r,hasStorageEndpoint:i,loading:s}=Se(),{isMyself:t}=ue();return t?s?e.jsx(St,{relative:"parent",children:e.jsx(V,{})}):e.jsx(an,{children:e.jsx(m,{sx:{maxWidth:"720px"},children:i?e.jsx(gr,{spaceGateway:r}):e.jsx(nn,{})})}):null}function sn(){return e.jsx(xr,{children:e.jsx(on,{})})}const an=Z(m)`
122
+ height: 100%;
123
+ overflow-y: auto;
124
+ `;function ln(){const{user:r,isMyself:i,viewUser:s}=ue(),{followed:t}=gt();return e.jsx(m,{children:e.jsx(Ct,{teamDid:window?.blocklet?.did||"",user:i?r:s,showInvitees:i,followed:t})})}function cn({tab:r=""}){const{api:i}=Vr(),s=y.useRef(null),t=Lr(),n=r||t.tab,a=new URLSearchParams(window.location.search).get("embed")||window.sessionStorage?.getItem("embed"),p=Yr(),l=R(()=>({...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:window?.blocklet?.componentMountPoints.map(o=>({...o,meta:{...o,did:o.did,name:o.name||o.title||"",logo:"logo.png"}}))})),x=async o=>{const{input:h,sessionId:C}=o;try{await i.destroySelf({input:{...h,sessionId:C}})}catch(v){console.error("destroy myself error",v)}};return e.jsx(ut,{mode:"user-center",children:e.jsxs(bt,{ref:s,embed:a==="1",currentTab:n?se(je.WELLKNOWN_SERVICE_PATH_PREFIX,"user",n):"",disableAutoRedirect:n==="settings",children:[n==="notifications"?e.jsx(Gt,{blocklets:[l],context:p}):null,n==="nfts"?e.jsx(Xt,{}):null,n==="settings"?e.jsx(fr,{onDestroySelf:x}):null,n==="did-spaces"?e.jsx(sn,{}):null,n==="user-followers"?e.jsx(ln,{}):null,n==="orgs"?e.jsx(yt,{id:t.id||""}):null]})})}cn.propTypes={tab:u.string};export{cn as default};
@@ -1,4 +1,4 @@
1
- import{r as u}from"./vendor-react-CUXIiAnY.js";import{W as o,j as e,ak as j,aN as L,z as A,at as K,bn as B,I as P,a6 as W,bF as M,aj as X,bG as G}from"./vendor-mui-core-DHT36AZL.js";import{C as H}from"./Google-PoHjNVzr.js";import{p as U}from"./vendor-ux-sqP3hEhY.js";import{c as Y}from"./create-passport-svg-BZVXsAoP.js";import{A as $}from"./vendor-arcblock-3xKfH3F1.js";import{e as J}from"./index-lFDZOk_k.js";import{R as Q}from"./required-glXJjYm5.js";import{F as Z}from"./form-wrapper-CqFSijKV.js";import{L as v}from"./logo-uploader-Dz85eY-W.js";import{A as ee,a as ne,b as te}from"./collapse-CHg4yEHL.js";const S={description:o.string,editing:o.bool,onChange:o.func,required:o.bool,value:o.any,componentProps:o.object,render:o.func,renderFormItem:o.func};function T({editing:n,value:s,onChange:l}){const[i,c]=u.useState(!1),m=u.useRef(),f=u.useRef(s);u.useEffect(()=>{let a=null;return n&&(a=setTimeout(()=>{c(!0)},50)),()=>{clearTimeout(a)}},[n]);const h=a=>{f.current=a,l(a)},b=()=>{c(!1),l(f.current)},y=e.jsx(j,{className:"form-item-input slot",sx:{px:1},children:e.jsxs(j,{sx:{display:"flex",alignItems:"center"},children:[s,s!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:s,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),p=e.jsxs(j,{onKeyDown:b,sx:{display:"flex",flexGrow:1,alignItems:"center",height:"40px"},children:[e.jsx(j,{onClick:()=>c(!0),sx:{display:"flex",alignItems:"center"},children:e.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:s,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:s==="auto"?"default":"pointer"}})}),e.jsx(L,{open:i,anchorEl:m.current,onClose:()=>c(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(H,{color:s,onChange:a=>h(a.hex)})})]});return n?p:y}T.propTypes=S;function D({editing:n,description:s,value:l,onChange:i,componentProps:c={},...m}){const{placeholder:f}=c,h=u.useRef(l),{t:b}=u.useContext(U),y=a=>{a.key==="Enter"&&i(h.current,"confirm")},p=a=>{h.current=a,i(a)};return n?e.jsx(A,{style:{flex:1},fullWidth:!0,value:l,onChange:a=>{a.persist(),p(a.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:s||f,onKeyDown:y,...m}):e.jsx(j,{className:"form-item-input slot",sx:{px:1},children:l||e.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:s||f})})})}D.propTypes=S;function O({editing:n,value:s,onChange:l,componentProps:i,...c}){const{blocklet:m}=i,f=s==="auto"?$(m.appDid):s;return e.jsxs(j,{sx:{display:"flex",alignItems:"center"},children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Y({title:"Owner",issuer:J.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:s||"auto"})}}),e.jsx(T,{...c,editing:n,value:n?f:s,onChange:l,componentProps:i})]})}O.propTypes={...S,componentProps:o.shape({blocklet:o.object.isRequired}).isRequired};const re=G`
1
+ import{r as u}from"./vendor-react-CUXIiAnY.js";import{W as o,j as e,ak as j,aN as L,z as A,at as K,bn as B,I as P,a6 as W,bF as M,aj as X,bG as G}from"./vendor-mui-core-BPQ6AEW_.js";import{C as H}from"./Google-Dp7qGnxg.js";import{p as U}from"./vendor-ux-D507n6h6.js";import{c as Y}from"./create-passport-svg-BLBQxsEK.js";import{A as $}from"./vendor-arcblock-BL_VyzmH.js";import{e as J}from"./index-CeWTwSLE.js";import{R as Q}from"./required-Btg6mEmX.js";import{F as Z}from"./form-wrapper-CU8kJXy5.js";import{L as v}from"./logo-uploader-BgXq5jHQ.js";import{A as ee,a as ne,b as te}from"./collapse-CzqKk-Uw.js";const S={description:o.string,editing:o.bool,onChange:o.func,required:o.bool,value:o.any,componentProps:o.object,render:o.func,renderFormItem:o.func};function T({editing:n,value:s,onChange:l}){const[i,c]=u.useState(!1),m=u.useRef(),f=u.useRef(s);u.useEffect(()=>{let a=null;return n&&(a=setTimeout(()=>{c(!0)},50)),()=>{clearTimeout(a)}},[n]);const h=a=>{f.current=a,l(a)},b=()=>{c(!1),l(f.current)},y=e.jsx(j,{className:"form-item-input slot",sx:{px:1},children:e.jsxs(j,{sx:{display:"flex",alignItems:"center"},children:[s,s!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:s,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),p=e.jsxs(j,{onKeyDown:b,sx:{display:"flex",flexGrow:1,alignItems:"center",height:"40px"},children:[e.jsx(j,{onClick:()=>c(!0),sx:{display:"flex",alignItems:"center"},children:e.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:s,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:s==="auto"?"default":"pointer"}})}),e.jsx(L,{open:i,anchorEl:m.current,onClose:()=>c(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(H,{color:s,onChange:a=>h(a.hex)})})]});return n?p:y}T.propTypes=S;function D({editing:n,description:s,value:l,onChange:i,componentProps:c={},...m}){const{placeholder:f}=c,h=u.useRef(l),{t:b}=u.useContext(U),y=a=>{a.key==="Enter"&&i(h.current,"confirm")},p=a=>{h.current=a,i(a)};return n?e.jsx(A,{style:{flex:1},fullWidth:!0,value:l,onChange:a=>{a.persist(),p(a.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:s||f,onKeyDown:y,...m}):e.jsx(j,{className:"form-item-input slot",sx:{px:1},children:l||e.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:s||f})})})}D.propTypes=S;function O({editing:n,value:s,onChange:l,componentProps:i,...c}){const{blocklet:m}=i,f=s==="auto"?$(m.appDid):s;return e.jsxs(j,{sx:{display:"flex",alignItems:"center"},children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Y({title:"Owner",issuer:J.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:s||"auto"})}}),e.jsx(T,{...c,editing:n,value:n?f:s,onChange:l,componentProps:i})]})}O.propTypes={...S,componentProps:o.shape({blocklet:o.object.isRequired}).isRequired};const re=G`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -0,0 +1,7 @@
1
+ import{V as B,H as q,U as N,k as Y,i as Ce,h as Se,a2 as Te}from"./vendor-ux-D507n6h6.js";import{q as Ie,k as ae,t as Re}from"./vendor-hooks-fhL5FJET.js";import{r as v,a as ce}from"./vendor-react-CUXIiAnY.js";import{D as We,J as de,j as e,Y as ze,bC as De,$ as Oe,ak as d,z as se,T as C,a6 as F,aX as te,R as Ae,Q as H,b6 as ie,am as P,bf as _,a5 as J,V as G,S as Z,b4 as $e,U as L,I as M,cj as Pe,bh as qe,a7 as Le,F as Be,W as t,b1 as W,a3 as pe,c2 as ee,ck as Me,aO as Fe,aP as He,cl as Ne,cm as Ue,cn as _e,s as oe,aU as Ve,aj as Ke,cc as Ye,bb as Je,cb as Qe}from"./vendor-mui-core-BPQ6AEW_.js";import{_ as V,c as ue,a1 as Xe,ac as Ge,b4 as Q,ar as xe,as as he,at as me}from"./index-CeWTwSLE.js";import{S as Ze}from"./switch-CjOUxynL.js";import{u as K}from"./team-CKeHAIQC.js";import{u as et}from"./use-mobile-ajdJIsoX.js";import{u as tt,C as X}from"./index.esm-DTmS4tth.js";import{C as ge,a as fe,J as ot}from"./vendor-utils-BSZ4yJws.js";import{C as nt}from"./confirm-CC1M9sYT.js";import{A as st}from"./actions-DhSvOHy-.js";import{T as re}from"./table-tips-EHWVzPWe.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BL_VyzmH.js";import"./session-CJQ7HeL8.js";import"./isURL-HS60va5G.js";import"./use-app-logo-D38VoM1R.js";import"./index-DBs9Ljax.js";const it=s=>{const[p,c]=v.useState(null),[b,r]=v.useState(!0),[w,u]=v.useState(null),j=window.blocklet?.appUrl,a=v.useMemo(()=>{const g={};return p&&(p.sources.forEach(y=>{g[y.did]={source:y,events:[],count:0}}),p.events.forEach(y=>{g[y.source]&&(g[y.source].events.push(y),g[y.source].count+=1)})),g},[p]),f=async()=>{try{if(r(!0),!j)return;const y=await(await fetch(ge(j,ue.WELLKNOWN_SERVICE_PATH_PREFIX,"/openevent.json"))).json();c(y),u(null)}catch(g){u(g instanceof Error?g:new Error(String(g)))}finally{r(!1)}};return v.useEffect(()=>{f()},[j]),{openEvent:p,setOpenEvent:c,eventsBySource:a,loading:b,error:w,loadData:f}};function be({eventsBySource:s,selectedEvents:p,setSelectedEvents:c,error:b=null}){const{t:r}=B(),[w,u]=v.useState({}),j=v.useMemo(()=>{const n={};return Object.entries(s).forEach(([l,{events:m}])=>{const k=m.filter(S=>p[`${S.type}-${S.source}`]).length;n[l]=k}),n},[s,p]),a=v.useMemo(()=>Object.values(j).reduce((n,l)=>n+l,0),[j]),f=v.useMemo(()=>Object.values(s).reduce((n,{events:l})=>n+l.length,0),[s]),g=(n,l)=>{l.stopPropagation(),u({...w,[n]:!w[n]})},y=n=>{const l=`${n.type}-${n.source}`;c(m=>({...m,[l]:!m[l]}))},z=(n,l)=>{const m={};n.forEach(k=>{const S=`${k.type}-${k.source}`;m[S]=!l}),c(k=>({...k,...m}))},I=n=>{const l={};Object.values(s).forEach(({events:m})=>{m.forEach(k=>{const S=`${k.type}-${k.source}`;l[S]=n.target.checked})}),c(l)};return e.jsxs(d,{sx:{width:"100%"},children:[e.jsxs(d,{sx:{display:"flex",alignItems:"center",mb:1,mt:1},children:[e.jsx(ie,{control:e.jsx(J,{onChange:I,checked:a>0&&a===f}),label:e.jsxs(d,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[r("webhookEndpoint.selectAllEvents"),e.jsx(d,{sx:{display:"flex",alignItems:"center"},children:e.jsx(P,{title:r("webhookEndpoint.selectAllEventsTooltip"),placement:"right",children:e.jsx(_,{fontSize:"small",sx:{ml:.5,cursor:"help"}})})})]}),sx:{m:0}}),a>0&&e.jsx(C,{variant:"body2",color:"primary",sx:{ml:"auto"},children:r("webhookEndpoint.selectedEventsCount",{count:a})})]}),e.jsx(d,{className:"webhook-event-selector",sx:{maxHeight:"50vh",overflowY:"auto",overflowX:"hidden"},children:e.jsx(G,{disablePadding:!0,sx:{border:"1px solid",borderColor:"divider",borderRadius:.5},children:Object.entries(s).map(([n,{source:l,events:m,count:k}],S)=>{const D=j[n]>0,R=j[n]===m.length&&m.length>0,O=w[n];return e.jsxs(ce.Fragment,{children:[e.jsx(Z,{sx:{borderBottom:({palette:i})=>S<Object.keys(s).length-1?`1px solid ${i.divider}`:"none",px:0,py:1,"&:hover":{bgcolor:"rgba(0, 0, 0, 0.02)"}},children:e.jsxs(d,{sx:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},onClick:i=>{i.target.closest(".MuiFormControlLabel-root")||g(n,i)},children:[e.jsx(d,{sx:{display:"flex",alignItems:"center"},children:m.length>0&&e.jsx(ie,{control:e.jsx(J,{checked:R,indeterminate:D&&!R,onChange:i=>{i.stopPropagation(),z(m,R)}}),label:e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.logo&&e.jsx($e,{src:l.logo,sx:{width:24,height:24}}),e.jsx(d,{children:l.title||n}),D&&e.jsx(L,{label:r("webhookEndpoint.selectedCount",{count:j[n]}),size:"small",sx:{mt:"2px",height:"20px",fontSize:"12px",bgcolor:i=>`${i.palette.primary.main}20`,color:"primary.main",fontWeight:500}})]}),sx:{m:0,"& .MuiFormControlLabel-label":{flex:1}}})}),e.jsxs(d,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(C,{variant:"body2",sx:{color:"text.secondary",mr:1},children:r("webhookEndpoint.eventsCount",{count:k})}),m.length>0&&e.jsx(M,{size:"small",edge:"end",children:O?e.jsx(Pe,{}):e.jsx(qe,{})})]})]})}),m.length>0&&e.jsx(Le,{in:O,timeout:"auto",unmountOnExit:!0,children:e.jsx(G,{disablePadding:!0,sx:{p:0,bgcolor:"rgba(0, 0, 0, 0.01)"},children:m.map(i=>{const h=`${i.type}-${i.source}`,o=!!p[h];return e.jsx(Z,{dense:!0,sx:{py:.75,px:1},onClick:()=>y(i),children:e.jsxs(d,{sx:{display:"flex",alignItems:"flex-start",width:"100%"},children:[e.jsx(J,{checked:o,sx:{flexShrink:0}}),e.jsxs(d,{sx:{flex:1,minWidth:0},children:[e.jsx(C,{variant:"body1",className:"webhook-event-type",sx:{cursor:"pointer",color:"text.primary",wordBreak:"break-word",overflowWrap:"break-word"},children:i.type}),e.jsx(C,{variant:"caption",sx:{color:"text.secondary",display:"block",cursor:"pointer",wordBreak:"break-word",overflowWrap:"break-word"},children:i.description})]})]})},h)})})})]},n)})})}),b&&e.jsx(Be,{error:!0,sx:{mt:1},children:b})]})}be.propTypes={eventsBySource:t.objectOf(t.shape({source:t.shape({did:t.string.isRequired,title:t.string,description:t.string,version:t.string,logo:t.string}).isRequired,events:t.arrayOf(t.shape({type:t.string.isRequired,description:t.string.isRequired,source:t.string.isRequired})).isRequired,count:t.number.isRequired})).isRequired,selectedEvents:t.objectOf(t.bool).isRequired,setSelectedEvents:t.func.isRequired,error:t.string};function je({id:s=null,url:p="",description:c="",enabledEvents:b=[],onSubmit:r,onClose:w=()=>{}}){const{t:u}=B(),[j,a]=v.useState({}),{teamDid:f}=K(),{api:g}=V(),{loading:y,error:z,eventsBySource:I}=it(),n=We(),{control:l,handleSubmit:m,formState:{errors:k},reset:S,setValue:D,trigger:R}=tt({defaultValues:{url:"",description:""}}),O=de(n.breakpoints.down("md"));v.useEffect(()=>{const o=Object.values(j).some(x=>x);D("selectedEvents",o?"valid":""),R("selectedEvents")},[j,D,R]);const i=()=>{a({}),S(),w()},h=async o=>{const x=Object.keys(j).filter(T=>j[T]),E={url:o.url,description:o.description,enabledEvents:x.map(T=>{const[A,ne]=T.split("-");return!A||!ne?null:{type:A,source:ne}}).filter(Boolean)};try{if(s){const T=await g.updateWebhookEndpoint({input:{teamDid:f,id:s,data:E}});q.success(`${u("webhookEndpoint.updateWebhook")} ${u("webhookEndpoint.success")}`),r(T)}else{const T=await g.createWebhookEndpoint({input:{teamDid:f,input:E}});q.success(`${u("webhookEndpoint.createWebhook")} ${u("webhookEndpoint.success")}`),r(T)}}catch(T){q.error(T?.message)}i()};return v.useEffect(()=>{S({url:p,description:c}),a(b.reduce((o,x)=>(o[`${x.type}-${x.source}`]=!0,o),{}))},[S,a,p,c,b]),e.jsx(ze,{open:!0,onClose:i,maxWidth:"lg",fullWidth:!0,fullScreen:O,sx:{"& .MuiDialog-paper":{minHeight:600}},children:e.jsxs("form",{onSubmit:m(h),children:[e.jsx(De,{children:u(s?"webhookEndpoint.editWebhookTitle":"webhookEndpoint.createWebhookTitle")}),e.jsx(Oe,{children:e.jsxs(d,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[e.jsx(X,{name:"url",control:l,rules:{required:u("webhookEndpoint.validation.urlRequired"),pattern:{value:/^(http|https):\/\/[^ "]+$/,message:u("webhookEndpoint.validation.urlInvalid")}},render:({field:o})=>e.jsx(se,{...o,label:u("webhookEndpoint.url.label"),fullWidth:!0,error:!!k.url,helperText:k.url?.message})}),e.jsx(X,{name:"description",control:l,rules:{required:u("webhookEndpoint.validation.descriptionRequired")},render:({field:o})=>e.jsx(se,{...o,label:u("webhookEndpoint.description.label"),fullWidth:!0,multiline:!0,minRows:2,maxRows:4,error:!!k.description,helperText:k.description?.message})}),e.jsx(X,{name:"selectedEvents",control:l,rules:{required:u("webhookEndpoint.validation.eventRequired")},render:({field:o})=>e.jsx("input",{type:"hidden",...o})}),!y&&I&&Object.keys(I).length>0&&e.jsx(be,{eventsBySource:I,selectedEvents:j,setSelectedEvents:a,error:k.selectedEvents?.message}),!y&&(!I||Object.keys(I).length===0)&&e.jsx(C,{sx:{color:"text.secondary"},children:u("webhookEndpoint.noAvailableEvents")}),y&&e.jsx(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px",width:"100%"},children:e.jsx(F,{size:20})}),z&&e.jsx(te,{severity:"error",children:u("webhookEndpoint.loadingError",{message:z?.message})})]})}),e.jsxs(Ae,{sx:{p:"8px 24px 24px"},children:[e.jsx(H,{onClick:i,children:u("common.cancel")}),e.jsx(H,{type:"submit",variant:"contained",color:"primary",children:u(s?"webhookEndpoint.updateWebhook":"webhookEndpoint.saveWebhook")})]})]})})}je.propTypes={onSubmit:t.func.isRequired,id:t.string,url:t.string,description:t.string,enabledEvents:t.arrayOf(t.shape({type:t.string.isRequired,source:t.string.isRequired})),onClose:t.func};function rt(s){switch(s){case"enabled":return"success";case"disabled":default:return"default"}}const lt=(s="en")=>s==="tw"?"zh":s;function U(s,p="YYYY-MM-DD HH:mm:ss",c="en"){return s?Xe(s).locale(lt(c)).format(p):"-"}function at(s){return typeof s=="number"?!1:fe(s)}function ct(s){return s>=200&&s<300}function $({value:s,label:p,tip:c="",divider:b=!1}){const r=at(s);return e.jsxs(e.Fragment,{children:[e.jsxs(W,{direction:"column",alignItems:"flex-start",children:[e.jsxs(C,{component:"div",variant:"body1",mb:1,color:"text.primary",sx:{fontWeight:500},children:[p,!!c&&e.jsx(P,{title:c,children:e.jsx(_,{fontSize:"small"})})]}),e.jsx(C,{component:"div",variant:"body1",color:r?"text.disabled":"text.secondary",sx:{width:"100%",minHeight:"24px"},children:r?"-":s})]}),b&&e.jsx(pe,{orientation:"vertical",flexItem:!0})]})}$.propTypes={label:t.oneOfType([t.string,t.node]).isRequired,value:t.oneOfType([t.string,t.node]).isRequired,tip:t.oneOfType([t.string,t.node]),divider:t.bool};function ye({title:s,children:p=null,mb:c=1.5,mt:b=1.5}){return e.jsxs(W,{className:"section-header",direction:"row",sx:{justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1,mb:c,mt:b,pb:1},children:[e.jsx(C,{variant:"h3",sx:{fontSize:{xs:"18px",md:"1.09375rem"}},component:"div",children:s}),p]})}ye.propTypes={title:t.oneOfType([t.string,t.node]).isRequired,children:t.node,mb:t.number,mt:t.number};const dt={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'},pt=s=>{const p={};return s.forEach(c=>{const b=new Date(c.createdAt).toLocaleDateString();p[b]||(p[b]=[]),p[b]?.push(c)}),p};function we({eventId:s="",webhookEndpointId:p="",event:c=null}){const{api:b,ws:{useSubscription:r}}=V(),{t:w}=B(),{teamDid:u}=K(),{blocklet:j}=Ge(),{data:a,loadMore:f,loadingMore:g,loading:y,mutate:z}=Ie(o=>{const E=o?Math.ceil(o.list.length/15)+1:1;return b.getWebhookAttempts({input:{teamDid:u,input:{eventId:s,webhookId:p},paging:{page:E,pageSize:15}}})},{reloadDeps:[s,p]}),I=a?.list||[],[n,l]=v.useState(null),[m,k]=v.useState(!1),S=pt(I);if(v.useEffect(()=>{!n&&a?.list.length&&l(a.list[0])},[a?.list.length,n]),r(ue.EVENTS.WEBHOOK_ATTEMPT,o=>{z(x=>{if(x.list.find(T=>T.id===o.id)){const T=x.list.map(A=>A.id===o.id?{...A,...o}:A);return{...x,list:T}}return o.endpoint=x.list[0]?.endpoint,o.event=x.list[0]?.event,{...x,list:[o,...x.list]}})},[]),y)return e.jsx(F,{});const D=a&&a.list.length<a.paging.total,R=async()=>{n&&(k(!0),await b.retryWebhookAttempt({input:{teamDid:u,eventId:n.event.id,webhookId:p,attemptId:n.id}}).finally(()=>{setTimeout(()=>{k(!1)},1e3)}))},O=o=>{if(o.responseBody&&o.responseBody?.sessionId&&o.responseBody?.projectId&&o.responseBody?.agentId){const x=j?.site?.domainAliases[0]?.value,E=(j.children||[]).find(A=>A?.meta?.name==="ai-studio"),T=ot(ge(`https://${x}`,E?.mountPoint||"","projects",o.responseBody.projectId,"logs/main"),{sessionId:o.responseBody.sessionId,agentId:o.responseBody.agentId});return e.jsx(M,{sx:{fontSize:20},onClick:()=>window.open(T,"_blank"),children:e.jsx(d,{component:N,icon:Q})})}return null},i=o=>o.status==="pending"?e.jsx(Ne,{color:"warning"}):ct(o.responseStatus)?e.jsx(Ue,{color:"success"}):e.jsx(_e,{color:"error"}),h=n?.triggeredFrom&&(a?.list||[]).find(o=>o.id===n.triggeredFrom);return e.jsxs(ut,{container:!0,spacing:{xs:0,md:1},sx:{height:1},children:[e.jsx(ee,{size:{xs:12,md:4},sx:{height:1},children:fe(Object.keys(S))?e.jsx(C,{sx:{color:"text.secondary"},children:w("webhookEndpoint.waitingForEvents")}):e.jsxs(e.Fragment,{children:[e.jsx(G,{sx:{maxHeight:"calc(100% - 40px)",py:0,overflowY:"auto"},children:Object.entries(S).map(([o,x])=>e.jsxs(ce.Fragment,{children:[e.jsx(Me,{sx:{p:0},children:o}),x.map(E=>e.jsxs(Z,{sx:{cursor:"pointer",px:1},onClick:()=>l(E),selected:n&&n?.id===E?.id,secondaryAction:e.jsx(C,{sx:{color:"text.secondary"},children:U(E.createdAt,"HH:mm:ss")}),children:[e.jsx(Fe,{sx:{minWidth:0,mr:1.5},children:i(E)}),e.jsx(He,{primary:e.jsx(C,{sx:{color:"text.primary"},children:E.event.type})})]},E.id))]},o))}),D&&e.jsx(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:1},children:e.jsx(H,{variant:"text",type:"button",color:"inherit",onClick:f,disabled:g,sx:{color:o=>o.palette.text.disabled},children:w(g?"webhookEndpoint.loadingMore":"webhookEndpoint.loadMore")})})]})}),e.jsxs(ee,{size:{xs:12,md:8},sx:{height:1},children:[n&&e.jsxs(W,{direction:"column",spacing:2,sx:{height:1,overflow:"auto",pl:{xs:0,md:1},mt:{xs:2,md:0},borderLeft:{xs:"none"}},children:[e.jsxs(d,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"h4",children:w(`common.${n.status}`)}),e.jsx(d,{children:O(n)})]}),e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:1},children:[h&&e.jsx(P,{placement:"left",title:e.jsxs(W,{onClick:()=>l(h),sx:{gap:1,cursor:"pointer",".did-address-text":{color:"common.white"}},children:[e.jsx(xe,{showDid:!0,did:n.triggeredBy,cardType:me.Detailed,infoType:he.Minimal,sx:{border:0,padding:0,minWidth:0,".MuiTypography-root":{color:"common.white",fontWeight:400}}}),e.jsx(pe,{}),e.jsxs(d,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(C,{variant:"body2",sx:{color:"primary.main"},children:w("webhookEndpoint.triggeredFrom")}),e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"body2",children:n.id}),e.jsx(M,{onClick:()=>l(h),children:e.jsx(d,{component:N,icon:Q,sx:{fontSize:16,color:"common.white"}})})]})]})]}),slotProps:{tooltip:{sx:{maxWidth:400}}},children:e.jsx(M,{onClick:()=>l(h),children:e.jsx(d,{component:N,icon:Q,sx:{fontSize:16}})})}),e.jsxs(H,{variant:"outlined",color:"primary",size:"small",onClick:R,disabled:m,children:[e.jsx(d,{component:N,icon:dt,sx:{fontSize:16,animation:m?"spin 1s linear infinite":"none",mr:.5}}),w("notification.resend")]})]})]}),e.jsxs(d,{children:[e.jsxs(C,{variant:"h6",children:[w("webhookEndpoint.response")," (",n.responseStatus,")"]}),e.jsx(Y,{language:"json",children:JSON.stringify(n.responseBody,null,2)})]}),e.jsxs(d,{children:[e.jsx(W,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.request")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(n.event,null,2)})]})]}),a?.list.length===0&&c&&e.jsxs(d,{children:[e.jsx(W,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.eventData")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(c.data,null,2)})]})]})]})}we.propTypes={eventId:t.string,webhookEndpointId:t.string,event:t.shape({type:t.string,data:t.object,request:t.object,requestInfo:t.object})};const ut=oe(ee)`
2
+ @keyframes spin {
3
+ to {
4
+ transform: rotate(360deg);
5
+ }
6
+ }
7
+ `;function ke({id:s,onClose:p}){const{t:c}=B(),{api:b}=V(),{teamDid:r}=K(),{loading:w,error:u,data:j}=ae(()=>b.getWebhookEndpoint({input:{teamDid:r,id:s}})),a=j?.data;return u?e.jsx(te,{severity:"error",children:u.message}):w||!a?e.jsx(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:1,width:1},children:e.jsx(F,{})}):e.jsxs(xt,{direction:"column",sx:{height:{xs:"auto",md:1}},children:[e.jsxs(d,{children:[e.jsxs(W,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[e.jsx(W,{sx:{flex:1,width:0},children:e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"h5",sx:{fontWeight:600,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:a.description}),e.jsx(P,{title:a.url,children:e.jsx(_,{sx:{fontSize:"16px",marginTop:"2px"}})})]})}),e.jsx(W,{direction:"row",sx:{alignItems:"center"},children:e.jsx(M,{edge:"end",color:"inherit",onClick:p,children:e.jsx(Ke,{})})})]}),e.jsx(d,{sx:{mt:2},children:e.jsxs(W,{className:"section-body",direction:{xs:"column",md:"row"},spacing:{xs:1,md:3},sx:{justifyContent:"flex-start",flexWrap:"wrap",pt:2,mt:2,borderTop:"1px solid #eee"},children:[e.jsx($,{label:c("common.status"),value:e.jsx(L,{size:"small",variant:"filled",label:a.status,color:rt(a.status),sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}}),divider:!0}),e.jsx($,{label:c("webhookEndpoint.listen"),value:e.jsx(P,{arrow:!0,title:e.jsx("ul",{style:{padding:0,margin:0},children:a.enabledEvents.map(f=>e.jsx("li",{style:{fontSize:"0.7875rem"},children:f?.type},f))}),children:e.jsx(L,{size:"small",variant:"filled",label:c("webhookEndpoint.eventsCount",{count:a.enabledEvents.length}),sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})}),divider:!0}),e.jsx($,{label:c("webhookEndpoint.version"),value:a.apiVersion,divider:!0}),e.jsx($,{label:c("common.createdAt"),value:U(a.createdAt),divider:!0}),e.jsx($,{label:c("common.updatedAt"),value:U(a.updatedAt),divider:!0}),e.jsx($,{label:c("common.createdBy"),value:e.jsx(P,{arrow:!0,title:a.createUser?.did,children:e.jsx(L,{size:"small",variant:"filled",label:a.createUser?.fullName,sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})}),divider:!0}),e.jsx($,{label:c("common.updatedBy"),value:e.jsx(P,{arrow:!0,title:a.updateUser?.did,children:e.jsx(L,{size:"small",variant:"filled",label:a.updateUser?.fullName,sx:{borderRadius:"4px",lineHeight:"20px",textTransform:"capitalize"}})})})]})})]}),e.jsxs(W,{className:"section",sx:{flex:1,height:0,overflow:"hidden"},children:[e.jsx(ye,{title:c("webhookEndpoint.attempts"),mb:0,mt:4}),e.jsx(W,{sx:{height:0,flex:1,overflow:"hidden"},children:e.jsx(we,{webhookEndpointId:a.id})})]})]})}ke.propTypes={id:t.string.isRequired,onClose:t.func.isRequired};const xt=oe(W)``;function Ee({open:s,onClose:p,id:c}){return e.jsx(Ve,{anchor:"right",open:s,onClose:p,slotProps:{paper:{sx:{width:"90vw",maxWidth:"1200px"}}},children:e.jsx(d,{sx:{height:"100vh",p:3},children:e.jsx(ke,{id:c,onClose:p})})})}Ee.propTypes={open:t.bool.isRequired,onClose:t.func.isRequired,id:t.string.isRequired};function le(){return null}function ve({options:s={},columns:p=[],toolbar:c=!0,footer:b=!0,hasRowLink:r=!1,emptyNodeText:w="",durable:u="",durableKeys:j=[],data:a=[],loading:f=!1,...g}){const{locale:y}=B(),z=de(l=>l.breakpoints.down("md")),I={print:!1,download:!1,filter:!1,selectableRows:"none",rowsPerPage:z?5:10,rowsPerPageOptions:[5,10,20,50,100],searchDebounceTime:300,tableBodyHeight:"100%",loading:!0},n={};return c||(n.TableToolbar=le),b||(n.TableFooter=le),e.jsx(ht,{locale:y,options:{...I,...s},columns:(p||[]).map(l=>(l.options=l.options||{},l.options.filter=l.options.filter||!1,l.options.sort=l.options.sort||!1,l)),emptyNode:e.jsx(Ce,{children:w}),...g,durable:u,durableKeys:j,data:a,loading:f,components:n,hasRowLink:r,isMobile:z})}ve.propTypes={options:t.object,columns:t.array,toolbar:t.bool,footer:t.bool,hasRowLink:t.bool,emptyNodeText:t.node,durable:t.string,durableKeys:t.array,data:t.array,loading:t.bool,onChange:t.func,title:t.node,components:t.object};const ht=oe(Se)``,mt=v.memo(ve);function $t(){const{teamDid:s}=K(),p=et(),c=`webhook-endpoints-${s}`,b=Te(c),{t:r,locale:w}=B(),{api:u}=V(),[j,a]=v.useState(""),[f,g]=v.useState({webhookDetail:{open:!1,id:null},createEdit:{open:!1,id:null,url:"",description:"",enabledEvents:[]},deleteConfirm:null}),[y,z]=Re(c,{defaultValue:{pageSize:b.rowsPerPage||20,page:b.page?b.page+1:1}}),{loading:I,error:n,data:l,refresh:m}=ae(()=>u.getWebhookEndpoints({input:{teamDid:s,paging:{page:y.page,pageSize:y.pageSize}}}));v.useEffect(()=>{m()},[y,m]);const k=v.useCallback(async(i,h)=>{try{await u.updateWebhookEndpoint({input:{teamDid:s,id:i.id,data:{status:h?"disabled":"enabled"}}}),m(),q.success(`${r(h?"webhookEndpoint.disable":"webhookEndpoint.enable")}${r("webhookEndpoint.success")}`)}catch(o){q.error(o?.message)}},[u,s,m,r]),S=v.useCallback(async i=>{try{await u.deleteWebhookEndpoint({input:{teamDid:s,id:i}}),m(),g(h=>({...h,deleteConfirm:null})),q.success(`${r("common.delete")}${r("webhookEndpoint.success")}`)}catch(h){q.error(h?.message)}},[u,s,m,r]),D=(i,h)=>{let o=i.page+1;const x=i.searchText||"";if(x!==j){a(x);return}if(h==="changePage"||h==="changeRowsPerPage"){h!=="changePage"&&(o=1);const E={page:o,pageSize:i.rowsPerPage};a(""),z(E)}};if(n)return e.jsx(te,{severity:"error",children:n.message});if(I||!l)return e.jsx(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:1,height:500},children:e.jsx(F,{})});const R=(l?.list||[]).filter(i=>{if(!j)return!0;const h=j.toLowerCase();return i.description.toLowerCase().includes(h)||i.url.toLowerCase().includes(h)}),O=[{label:"URL",name:"url",options:{customBodyRenderLite:(i,h)=>{const o=R[h];return e.jsxs(d,{sx:{display:"flex",alignItems:"center",cursor:"pointer",gap:.5},children:[e.jsx(C,{variant:"body2",children:o.description}),e.jsx(d,{sx:{display:"flex"},onClick:x=>{x.stopPropagation()},children:e.jsx(P,{title:o.url,children:e.jsx(_,{sx:{fontSize:"15px",marginTop:"1px"}})})})]})}}},{label:"Events",name:"events",options:{customBodyRenderLite:(i,h)=>{const o=R[h];return e.jsx(d,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:o.enabledEvents.map(x=>e.jsx(L,{size:"small",variant:"filled",label:x.type,sx:{borderRadius:"4px",textTransform:"capitalize"}},`${o.source}-${x.type}`))})}}},{label:r("common.status"),name:"status",options:{customBodyRenderLite:(i,h)=>{const o=R[h],x=o?.status==="enabled";return e.jsx(d,{onClick:E=>E.stopPropagation(),children:e.jsx(Ze,{checked:x,onChange:()=>k(o,x)},`status-${o.status}`)})}}},{label:r("common.createdAt"),name:"createdAt",minWidth:200,options:{customBodyRender:i=>U(i)}},{label:r("common.createdBy"),name:"createUser",width:100,options:{customBodyRender:i=>i?e.jsx(xe,{showDid:!0,did:i?.did,cardType:me.Detailed,infoType:he.Minimal,sx:{border:0,padding:0}}):"-"}},{label:r("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:(i,h)=>{const o=R[h];return e.jsx(st,{actions:[{icon:e.jsx(Ye,{}),text:r("common.edit"),onClick:x=>{x.stopPropagation(),g(E=>({...E,createEdit:{open:!0,id:o.id,url:o.url,description:o.description,enabledEvents:o.enabledEvents}}))}},{icon:e.jsx(Je,{}),text:r("common.delete"),onClick:x=>{x.stopPropagation(),g(E=>({...E,deleteConfirm:{title:r("webhookEndpoint.deleteWebhook.title"),description:r("webhookEndpoint.deleteWebhook.description"),confirm:r("common.confirm"),cancel:r("common.cancel"),onConfirm:()=>S(o.id),onCancel:()=>g(T=>({...T,deleteConfirm:null}))}}))}}]})}}}];return e.jsxs(d,{sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[p?e.jsx(re,{title:r("webhookEndpoint.listTitle"),tooltipTitle:r("webhookEndpoint.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${w}/webhook`}):null,e.jsx(mt,{durable:c,durableKeys:["page","rowsPerPage"],data:R,columns:O,options:{count:l.count,page:y.page-1,rowsPerPage:y.pageSize,viewColumns:!1,onRowClick:(i,{dataIndex:h})=>{const o=l.list[h];g(x=>({...x,webhookDetail:{open:!0,id:o.id}}))}},loading:I,onChange:D,emptyNodeText:e.jsx(W,{sx:{gap:1},children:r("webhookEndpoint.noWebhooksAdded")}),title:p?null:e.jsx(re,{title:r("webhookEndpoint.listTitle"),tooltipTitle:r("webhookEndpoint.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${w}/webhook`}),customButtons:[e.jsxs(H,{sx:{color:"common.white"},edge:"end",variant:"contained",color:"primary",onClick:()=>g(i=>({...i,createEdit:{...i.createEdit,open:!0}})),className:"rule-action",children:[I?e.jsx(F,{size:16}):e.jsx(Qe,{style:{fontSize:16}}),r("common.create")]},"add")]}),f.webhookDetail.open&&e.jsx(Ee,{open:!0,onClose:()=>g(i=>({...i,webhookDetail:{open:!1,id:null}})),id:f.webhookDetail.id}),f.createEdit.open&&e.jsx(je,{onSubmit:m,...f.createEdit,onClose:()=>g(i=>({...i,createEdit:{id:null,url:"",description:"",enabledEvents:[],open:!1}}))}),f.deleteConfirm&&e.jsx(nt,{title:f.deleteConfirm.title,description:f.deleteConfirm.description,confirm:f.deleteConfirm.confirm,cancel:f.deleteConfirm.cancel,params:f.deleteConfirm.params,onConfirm:f.deleteConfirm.onConfirm,onCancel:f.deleteConfirm.onCancel})]})}export{$t as default};
@@ -1,4 +1,4 @@
1
- import{D as w1,J as K1,j as r,Y as Y1,$ as W1,I as q1,dg as _1,ar as I1,ak as U,a$ as R,cX as y1,b1 as $1,am as B1,T,bD as e6,z as t6,cr as n6,a6,Q as r6}from"./vendor-mui-core-DHT36AZL.js";import{C as x,a as i6,a9 as S1,J as M,c as s6,I as o6,F as c6}from"./vendor-utils-BSZ4yJws.js";import{V as l6,I as F1,e as u6,A as H,l as C6,x as p6,b as d6,n as t1,aF as n1}from"./vendor-ux-sqP3hEhY.js";import{r as t}from"./vendor-react-CUXIiAnY.js";import{k as L1,b as v1,a as Z}from"./vendor-hooks-fhL5FJET.js";import{bj as Y,Z as W,bz as U1,bA as h6,v as m6,bs as E6,bf as g6}from"./index-lFDZOk_k.js";import{x as f6}from"./index-DRYJ0xIl.js";import{f as A6}from"./index-BojVbZw0.js";import{v as a1}from"./index-bbu7QFpz.js";const j=Y({});function D6({key:e}={key:"md"}){const n=w1();return K1(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),O1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(O1||{}),F=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(F||{});function x6({endpoint:e,deps:n=[]}){return L1(async()=>{if(!W(e))return;const{headers:a}=await j.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[i,s,c,u,l,C,d,p,m,g]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],h=i?decodeURIComponent(i):"";if(p===void 0||m===void 0){const f=c&&u&&l;return{version:C,name:h,subscriptionId:s,ownerDid:d||"",isAvailable:f,errorCode:f?0:A.UNAUTHORIZED,isSiteAdmin:g==="true"}}return{version:C,name:h,subscriptionId:s,ownerDid:d,isAvailable:p==="true",errorCode:parseInt(m,10),isSiteAdmin:g==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const w6=U1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{D as w1,J as K1,j as r,Y as Y1,$ as W1,I as q1,df as _1,ar as I1,ak as U,a$ as R,cW as y1,b1 as $1,am as B1,T,bD as e6,z as t6,cq as n6,a6,Q as r6}from"./vendor-mui-core-BPQ6AEW_.js";import{C as x,a as i6,a9 as S1,J as M,c as s6,I as o6,F as c6}from"./vendor-utils-BSZ4yJws.js";import{V as l6,I as F1,e as u6,A as H,l as C6,x as p6,b as d6,n as t1,aF as n1}from"./vendor-ux-D507n6h6.js";import{r as t}from"./vendor-react-CUXIiAnY.js";import{k as L1,b as v1,a as Z}from"./vendor-hooks-fhL5FJET.js";import{bj as Y,Z as W,bz as U1,bA as h6,v as m6,bs as E6,bf as g6}from"./index-CeWTwSLE.js";import{x as f6}from"./index-DRYJ0xIl.js";import{f as A6}from"./index-BojVbZw0.js";import{v as a1}from"./index-BIJNkmLb.js";const j=Y({});function D6({key:e}={key:"md"}){const n=w1();return K1(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),O1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(O1||{}),F=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(F||{});function x6({endpoint:e,deps:n=[]}){return L1(async()=>{if(!W(e))return;const{headers:a}=await j.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[i,s,c,u,l,C,d,p,m,g]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],h=i?decodeURIComponent(i):"";if(p===void 0||m===void 0){const f=c&&u&&l;return{version:C,name:h,subscriptionId:s,ownerDid:d||"",isAvailable:f,errorCode:f?0:A.UNAUTHORIZED,isSiteAdmin:g==="true"}}return{version:C,name:h,subscriptionId:s,ownerDid:d,isAvailable:p==="true",errorCode:parseInt(m,10),isSiteAdmin:g==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const w6=U1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
2
2
  1. Please contact the DID Space administrator to verify the relevant configuration.
3
3
  2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
4
4
  If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),I6=U1.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
@@ -1 +1 @@
1
- import{j as i,b6 as e,bg as a,W as s}from"./vendor-mui-core-DHT36AZL.js";import{l}from"./vendor-ux-sqP3hEhY.js";const r=l(t=>i.jsx(a,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.primary.main,opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:t.palette.primary.main,border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.grey[200],opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function c({labelProps:t=null,...o}){return t?i.jsx(e,{control:i.jsx(r,{...o}),...t}):i.jsx(r,{...o})}c.propTypes={labelProps:s.object};export{c as u};
1
+ import{j as i,b6 as e,bg as a,W as s}from"./vendor-mui-core-BPQ6AEW_.js";import{l}from"./vendor-ux-D507n6h6.js";const r=l(t=>i.jsx(a,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.primary.main,opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:t.palette.primary.main,border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.grey[200],opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function c({labelProps:t=null,...o}){return t?i.jsx(e,{control:i.jsx(r,{...o}),...t}):i.jsx(r,{...o})}c.propTypes={labelProps:s.object};export{c as u};
@@ -1 +1 @@
1
- import{j as t,at as r}from"./vendor-mui-core-DHT36AZL.js";import{r as s}from"./vendor-react-CUXIiAnY.js";import{p as n}from"./vendor-ux-sqP3hEhY.js";import{t as p}from"./index-lFDZOk_k.js";import"./vendor-utils-BSZ4yJws.js";import"./vendor-hooks-fhL5FJET.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-3xKfH3F1.js";function l(){const{t:o}=s.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(p,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=r.main``;export{l as default};
1
+ import{j as t,at as r}from"./vendor-mui-core-BPQ6AEW_.js";import{r as s}from"./vendor-react-CUXIiAnY.js";import{p as n}from"./vendor-ux-D507n6h6.js";import{t as p}from"./index-CeWTwSLE.js";import"./vendor-utils-BSZ4yJws.js";import"./vendor-hooks-fhL5FJET.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BL_VyzmH.js";function l(){const{t:o}=s.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(p,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=r.main``;export{l as default};