@abtnode/blocklet-services 1.16.42-beta-20250408-050422-92c8eef3 → 1.16.42-beta-20250409-161010-b0a88c5c

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 (199) hide show
  1. package/api/index.js +1 -1
  2. package/api/routes/user-session.js +2 -2
  3. package/api/routes/user.js +36 -0
  4. package/api/services/auth/connect/destroy-myself.js +64 -0
  5. package/api/services/auth/index.js +2 -0
  6. package/api/services/auth/session.js +36 -16
  7. package/dist/assets/{ArrowDropDown-WXsjNpSB.js → ArrowDropDown-CDjPVis_.js} +1 -1
  8. package/dist/assets/{CheckCircle-D7CrWlJ6.js → CheckCircle-BHD7aj9l.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DeulnkX8.js → ChevronLeft-CUdxcGLW.js} +1 -1
  10. package/dist/assets/{ChevronRight-CACHNf5Y.js → ChevronRight-Bol9kSyE.js} +1 -1
  11. package/dist/assets/{Community-BKnwgGcO.js → Community-Ds1NG5Zj.js} +1 -1
  12. package/dist/assets/{DeleteOutline-DT1G93_1.js → DeleteOutline-BiIEYa8g.js} +1 -1
  13. package/dist/assets/{Done-D9sjuoNQ.js → Done-kAy_Y9ti.js} +1 -1
  14. package/dist/assets/{Download-CBzqKt6X.js → Download-COul5Jpx.js} +1 -1
  15. package/dist/assets/{EditIcon-Bww8_WRx.js → EditIcon-Bt91o1l6.js} +1 -1
  16. package/dist/assets/{Email-C6-GXQIV.js → Email-C7SKOpM8.js} +1 -1
  17. package/dist/assets/{Error-l_WxG8z-.js → Error-xVtnHALO.js} +1 -1
  18. package/dist/assets/{ExpandLess-uIJAqSZm.js → ExpandLess-CW9G6ynD.js} +1 -1
  19. package/dist/assets/{Google-BchHLUIl.js → Google-D98Bf-5Y.js} +1 -1
  20. package/dist/assets/{Holiday-BSfwdA-4.js → Holiday-Dfj3kBBI.js} +1 -1
  21. package/dist/assets/{InfoOutlined-DFTm-vVr.js → InfoOutlined-jnMrCCfZ.js} +1 -1
  22. package/dist/assets/{Launch-DQCS90NS.js → Launch-DFNlDQlk.js} +1 -1
  23. package/dist/assets/{LaunchOutlined-DttrDnYo.js → LaunchOutlined-yZsgpXar.js} +1 -1
  24. package/dist/assets/{Location-CT1S5M1P.js → Location--4ueDivQ.js} +1 -1
  25. package/dist/assets/{LockIcon-kY343jXt.js → LockIcon-B84lMZao.js} +1 -1
  26. package/dist/assets/{Meeting-PVrGyQbK.js → Meeting-CVVnP-bH.js} +1 -1
  27. package/dist/assets/{MoreHoriz-BD8SroCJ.js → MoreHoriz-BqdKN70-.js} +1 -1
  28. package/dist/assets/{OffSick-DD3oLLQu.js → OffSick-C_2x7yDI.js} +1 -1
  29. package/dist/assets/{Phone-BcpEH3XZ.js → Phone-CaKOX2Yu.js} +1 -1
  30. package/dist/assets/{PlayArrow-BEUAi9Bt.js → PlayArrow-CXtQLadK.js} +1 -1
  31. package/dist/assets/{QuestionMarkCircle-BHP2onYz.js → QuestionMarkCircle-5K6WR8Pc.js} +1 -1
  32. package/dist/assets/{ServerLogo-Bi89KNz4.js → ServerLogo-C4P-qXGV.js} +1 -1
  33. package/dist/assets/{Timezone-Ce85fX7w.js → Timezone-Bgwxnj29.js} +1 -1
  34. package/dist/assets/{TuneOutlined-CzDTcEdK.js → TuneOutlined-EaV8HxdX.js} +1 -1
  35. package/dist/assets/{ViewList-6gwww-su.js → ViewList-BPuXZDcI.js} +1 -1
  36. package/dist/assets/{WorkingRemotely-DfgJTsRm.js → WorkingRemotely-Dm2BOs5c.js} +1 -1
  37. package/dist/assets/{access-control-Bp6fLweq.js → access-control-CuKW2kRZ.js} +1 -1
  38. package/dist/assets/{actions-C9vqEgMU.js → actions-DqeM3yie.js} +1 -1
  39. package/dist/assets/{add-component-core-e0A2r7mm.js → add-component-core-DXPSI3Ti.js} +23 -22
  40. package/dist/assets/add-resource-S3Z1zjbJ.js +1 -0
  41. package/dist/assets/{addon-BNDsoean.js → addon-B5UBB-pU.js} +1 -1
  42. package/dist/assets/{advanced-vuRNp9gZ.js → advanced-Cvboset8.js} +1 -1
  43. package/dist/assets/api-BVwAqPhr.js +1 -0
  44. package/dist/assets/appearance-DmQgth7a.js +1 -0
  45. package/dist/assets/{audit-logs-C51Acdy3.js → audit-logs-LLoqbniS.js} +3 -3
  46. package/dist/assets/{base32-CEWQZb_G.js → base32-CMrsHquD.js} +1 -1
  47. package/dist/assets/{branding-PF95Dp3j.js → branding-BfxdFbW1.js} +2 -2
  48. package/dist/assets/{branding-B4OmIbxT.js → branding-DcviCyPr.js} +3 -3
  49. package/dist/assets/bundle-avatar-Ci9fNblN.js +1 -0
  50. package/dist/assets/button-OxbVr1Od.js +1 -0
  51. package/dist/assets/click-to-copy-q_I2l6Sg.js +1 -0
  52. package/dist/assets/cloneDeep-g5lbcy6_.js +1 -0
  53. package/dist/assets/complete-ogipf6id.js +45 -0
  54. package/dist/assets/{component-BbpzttYw.js → component-DVhWy5jQ.js} +1 -1
  55. package/dist/assets/{config-DXNBk8Sr.js → config-BdUShvO-.js} +1 -1
  56. package/dist/assets/{config-BRGxJ2eh.js → config-YsfQuvvt.js} +2 -2
  57. package/dist/assets/{config-navigation-Bp_tpZTf.js → config-navigation-C4hgzi4R.js} +3 -3
  58. package/dist/assets/config-space-DJ-fZ6j4.js +1 -0
  59. package/dist/assets/{confirm-DMfA-cen.js → confirm-C1Nde1Nq.js} +1 -1
  60. package/dist/assets/connect-BkxyLG9H.js +1 -0
  61. package/dist/assets/{connect-BbnPPMBE.js → connect-dGBjAgNF.js} +1 -1
  62. package/dist/assets/connect-to-CdG3TX0A.js +1 -0
  63. package/dist/assets/{content-layout-uPtoKIAs.js → content-layout-Bs-vdQ_U.js} +1 -1
  64. package/dist/assets/dashboard-2jQIZ8v5.js +222 -0
  65. package/dist/assets/{delete-confirm-BOPmqCDE.js → delete-confirm-CpPzqeJx.js} +1 -1
  66. package/dist/assets/{did-address-_2BUka_2.js → did-address-D-fI5ZyH.js} +1 -1
  67. package/dist/assets/{domain-C058D5cL.js → domain-1X_uRV9L.js} +1 -1
  68. package/dist/assets/{domain-action-card-hJylsZDf.js → domain-action-card-Crwneu7N.js} +2 -2
  69. package/dist/assets/domains-BHkUaPc7.js +1 -0
  70. package/dist/assets/{email-DTd5dLMw.js → email-DGh9v0en.js} +3 -3
  71. package/dist/assets/{empty-spinner-CoimPnT0.js → empty-spinner-Cia24BVr.js} +1 -1
  72. package/dist/assets/exchange-passport-CgGOJDm9.js +1 -0
  73. package/dist/assets/{format-error-LAoTjvJe.js → format-error-BrmqJs5a.js} +1 -1
  74. package/dist/assets/{fuel-D1-QzTfA.js → fuel-CItPP5Vk.js} +1 -1
  75. package/dist/assets/{get-safe-url-B2pIo8YT.js → get-safe-url-B2BlmlqT.js} +1 -1
  76. package/dist/assets/{get-safe-url-M62JolcK.js → get-safe-url-C2N97NJc.js} +1 -1
  77. package/dist/assets/{home-D8xdbvkr.js → home-12LB7wlV.js} +1 -1
  78. package/dist/assets/{iframe-BGb_KeKZ.js → iframe-54rcs7kU.js} +1 -1
  79. package/dist/assets/{index-B9lZsGBd.js → index-0CgHVUpB.js} +1 -1
  80. package/dist/assets/{index-DvX6CH9d.js → index-3dawiJIg.js} +3 -3
  81. package/dist/assets/{index-DY7FozBP.js → index-4WjT4o1e.js} +5 -5
  82. package/dist/assets/{index-C-E-0SKx.js → index-643kpB1h.js} +1 -1
  83. package/dist/assets/{index-Bn6qMcz9.js → index-9XJ5HzSd.js} +1 -1
  84. package/dist/assets/index-BIu-u1kW.js +1 -0
  85. package/dist/assets/{index-CKv9guDo.js → index-BTOIZL6e.js} +1 -1
  86. package/dist/assets/{index-DvDiL1rm.js → index-BYsXlcQC.js} +1 -1
  87. package/dist/assets/{index-DUqEJSX8.js → index-Bj10Vbvc.js} +4 -4
  88. package/dist/assets/index-C4dzrN-k.js +290 -0
  89. package/dist/assets/{index-Dja0MgHa.js → index-CB6NPYWM.js} +3 -3
  90. package/dist/assets/index-CFs0La6o.js +15 -0
  91. package/dist/assets/{index-pV_0wOyY.js → index-CPE8Apzb.js} +1 -1
  92. package/dist/assets/{index--QvOAcHK.js → index-CTpJt8AJ.js} +47 -45
  93. package/dist/assets/{index-BYC998Xz.js → index-Cuoxr9xB.js} +1 -1
  94. package/dist/assets/{index-Biod65HH.js → index-D5G2v7wN.js} +2 -2
  95. package/dist/assets/{index-CqRb1YIC.js → index-DKPGWA5E.js} +1 -1
  96. package/dist/assets/{index-BQddb9SV.js → index-DQC9zneB.js} +11 -11
  97. package/dist/assets/{index-tUQxVYYQ.js → index-DVQCgvFb.js} +1 -1
  98. package/dist/assets/index-DVogNW6l.js +1 -0
  99. package/dist/assets/{index-CDJctLrv.js → index-DkZfhapD.js} +1 -1
  100. package/dist/assets/{index-Bcipz7Xh.js → index-Du71d9ZJ.js} +1 -1
  101. package/dist/assets/{index-r4W5xGua.js → index-G26gYrxE.js} +2 -2
  102. package/dist/assets/{index-DOTrxWIb.js → index-YqrAgavD.js} +1 -1
  103. package/dist/assets/{index-COXsk6dn.js → index-jny05NvM.js} +30 -30
  104. package/dist/assets/{invitation-CLrDi0w3.js → invitation-BBqRmSx1.js} +6 -6
  105. package/dist/assets/invite-CKxzd-7d.js +1 -0
  106. package/dist/assets/issue-passport-BA7u3NC-.js +1 -0
  107. package/dist/assets/{item-DFeRxihy.js → item-DssQyiFI.js} +2 -2
  108. package/dist/assets/landing-page-2uYUfHoY.js +1 -0
  109. package/dist/assets/{launch-result-message-DvcvHHH1.js → launch-result-message-C0Ao1hE-.js} +1 -1
  110. package/dist/assets/{layout-BQ9Qhixa.js → layout-R4Ynfcbq.js} +2 -2
  111. package/dist/assets/{list-BO1EU3G2.js → list-BhXWs05I.js} +18 -9
  112. package/dist/assets/{list-header-DvakxkxK.js → list-header-BibBP5t1.js} +1 -1
  113. package/dist/assets/localization-BsSUbpzO.js +1 -0
  114. package/dist/assets/{log-Qir3lxDV.js → log-D4PQ7UF3.js} +7 -7
  115. package/dist/assets/{login-C780ZUv4.js → login-CuCcTu--.js} +1 -1
  116. package/dist/assets/{login-oauth-callback-CfaWz0tg.js → login-oauth-callback-BzcAZfXM.js} +1 -1
  117. package/dist/assets/{logo-uploader-gCM0_9lk.js → logo-uploader-C9TwiAKx.js} +3 -3
  118. package/dist/assets/{lost-passport-ieF1z1Fq.js → lost-passport-DD7XCIgg.js} +4 -4
  119. package/dist/assets/{lottie-react.esm-CPHH620R.js → lottie-react.esm-D2t-u0YU.js} +1 -1
  120. package/dist/assets/{lottie-web-B6s7dDoL.js → lottie-web-jYmAQWuC.js} +1 -1
  121. package/dist/assets/omit-DF3Nt1_-.js +1 -0
  122. package/dist/assets/{open-window-DMkA-B_A.js → open-window-Dsc5mHei.js} +1 -1
  123. package/dist/assets/{overview-CqE5Qd7t.js → overview-BjFpvrpN.js} +2 -2
  124. package/dist/assets/{page-header-D3dCkXy7.js → page-header-B7j9M6Zp.js} +1 -1
  125. package/dist/assets/{permission-ClAqVelD.js → permission-CLAOGeOf.js} +1 -1
  126. package/dist/assets/preferences-qZW-dsds.js +1 -0
  127. package/dist/assets/profile-embed-6mTqkL03.js +1 -0
  128. package/dist/assets/publish-resource-DO-PRxdk.js +1 -0
  129. package/dist/assets/{raf-schd.esm-GV-XhwE0.js → raf-schd.esm-B3j6BePR.js} +1 -1
  130. package/dist/assets/{react-beautiful-dnd.esm-Cx5BcFIr.js → react-beautiful-dnd.esm-Bu3K07pf.js} +1 -1
  131. package/dist/assets/{relative-time-BUHtgSDe.js → relative-time-Cu4jaQ9H.js} +1 -1
  132. package/dist/assets/{runtime-B5YY9Qgr.js → runtime-kNyRK8Hy.js} +1 -1
  133. package/dist/assets/sdk-BjsIctsl.js +1 -0
  134. package/dist/assets/{security-Dad28Y4W.js → security-Dkk4FgYt.js} +4 -4
  135. package/dist/assets/session-UJ7B0EdV.js +1 -0
  136. package/dist/assets/{setup-DEJbIHrj.js → setup-SAEzURDR.js} +3 -3
  137. package/dist/assets/{shorten-label-C642GTxb.js → shorten-label-DDBwv81M.js} +1 -1
  138. package/dist/assets/{simple-select-i-SepLIh.js → simple-select-vCKkiHhG.js} +1 -1
  139. package/dist/assets/{slicedToArray-B6WXjdrb.js → slicedToArray-Da5X2Yv5.js} +1 -1
  140. package/dist/assets/spaces-B_lJq3Uz.js +1 -0
  141. package/dist/assets/{start-9UMY8DNC.js → start-C53MN0u7.js} +1 -1
  142. package/dist/assets/status-5Z1CW-le.js +1 -0
  143. package/dist/assets/{step-actions-DZ9FTtHm.js → step-actions-CujnheOz.js} +1 -1
  144. package/dist/assets/{studio-Bv91lan_.js → studio-BYzuzhpL.js} +1 -1
  145. package/dist/assets/{switch-control-DjMziEFc.js → switch-control-DWiX5YiK.js} +1 -1
  146. package/dist/assets/{traffic-DPZuINtB.js → traffic-WemHsP0B.js} +3 -3
  147. package/dist/assets/{transfer-PY0D3H2H.js → transfer-CF7CWbdm.js} +1 -1
  148. package/dist/assets/{unsubscribe-B3uFNG06.js → unsubscribe-Dfof7yLG.js} +1 -1
  149. package/dist/assets/{use-mobile-B_Gqv6b6.js → use-mobile-DjnNmGRG.js} +1 -1
  150. package/dist/assets/{use-mobile-DudfIz3d.js → use-mobile-DpXDDjat.js} +1 -1
  151. package/dist/assets/{useAsync-BmuLIImU.js → useAsync-De6s-0n9.js} +1 -1
  152. package/dist/assets/{useAsyncRetry-CwtLImQi.js → useAsyncRetry-B6OdNqyX.js} +1 -1
  153. package/dist/assets/{useLocalStorage-C1_Fkr6_.js → useLocalStorage-DLwAkPmo.js} +1 -1
  154. package/dist/assets/{useSetState-BL3ktMon.js → useSetState-CWq0AVWn.js} +1 -1
  155. package/dist/assets/{user-center-C2i8ji9Q.js → user-center-CowUpoIn.js} +3 -3
  156. package/dist/assets/{util-CORzDFgw.js → util-B6E4W35Y.js} +1 -1
  157. package/dist/assets/util-C57yoAn6.js +1 -0
  158. package/dist/assets/{vendor-arcblock-D8eCUoJY.js → vendor-arcblock-CD8CMsgQ.js} +148 -81
  159. package/dist/assets/{vendor-hooks-DtYI0-rF.js → vendor-hooks-8r-lvvPs.js} +1 -1
  160. package/dist/assets/{vendor-mui-core-C-PhacC8.js → vendor-mui-core-1jJmAutq.js} +2 -2
  161. package/dist/assets/{vendor-mui-x-BiTj3AZC.js → vendor-mui-x-CPwlD3uT.js} +1 -1
  162. package/dist/assets/{vendor-react-DoD83n6N.js → vendor-react-DEoibe3W.js} +1 -1
  163. package/dist/assets/{vendor-utils-CRBr0QUY.js → vendor-utils-Cm2BKG2b.js} +6 -6
  164. package/dist/assets/{vendor-ux-did-connect-BQ3cvv_1.js → vendor-ux-did-connect-DlrX4cqq.js} +4 -4
  165. package/dist/assets/{wrap-locale-BFOSjPWa.js → wrap-locale-NNP_yq5G.js} +1 -1
  166. package/dist/index.html +8 -8
  167. package/dist/service-worker.js +1 -1
  168. package/package.json +41 -41
  169. package/dist/assets/add-resource-tZ8OPVzc.js +0 -1
  170. package/dist/assets/api-DlN8K5Jg.js +0 -1
  171. package/dist/assets/appearance-CFcde0Qw.js +0 -1
  172. package/dist/assets/bundle-avatar-xyEwd0kl.js +0 -1
  173. package/dist/assets/button-BQLtMsfK.js +0 -1
  174. package/dist/assets/click-to-copy-CkbZjUXU.js +0 -1
  175. package/dist/assets/cloneDeep-C7Ok409J.js +0 -1
  176. package/dist/assets/complete-BnqT6D6R.js +0 -45
  177. package/dist/assets/config-space-DLpGXOv3.js +0 -1
  178. package/dist/assets/connect-DrhKSeJG.js +0 -1
  179. package/dist/assets/connect-to-BWtx4RxY.js +0 -1
  180. package/dist/assets/dashboard-D1IAu0pg.js +0 -213
  181. package/dist/assets/domains-CHSNHTzm.js +0 -1
  182. package/dist/assets/exchange-passport-CUoEzJAn.js +0 -1
  183. package/dist/assets/index-Be9flGYn.js +0 -1
  184. package/dist/assets/index-Bgbz960f.js +0 -15
  185. package/dist/assets/index-BmIHv0Ao.js +0 -290
  186. package/dist/assets/index-Tc7h84RU.js +0 -1
  187. package/dist/assets/invite-BlqLHSHA.js +0 -1
  188. package/dist/assets/issue-passport-0xgFeiRm.js +0 -1
  189. package/dist/assets/landing-page-Dl8nGCZh.js +0 -1
  190. package/dist/assets/localization-rR3sV7At.js +0 -1
  191. package/dist/assets/omit-r8RGw6zD.js +0 -1
  192. package/dist/assets/preferences-YM19d1y9.js +0 -1
  193. package/dist/assets/profile-embed-DJJJzari.js +0 -1
  194. package/dist/assets/publish-resource-BFGnGhHk.js +0 -1
  195. package/dist/assets/sdk-DRBcrGrS.js +0 -1
  196. package/dist/assets/session-Clq9kJzg.js +0 -1
  197. package/dist/assets/spaces-CcqmBId2.js +0 -1
  198. package/dist/assets/status-BFrUchan.js +0 -1
  199. package/dist/assets/util-BL-qFiRh.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e,T as w,ai as y,t as P,a4 as t,E as r}from"./vendor-mui-core-1jJmAutq.js";import{l as k,b9 as z,ba as A,Y as b,bb as C,i as j}from"./vendor-ux-did-connect-DlrX4cqq.js";import{f as E}from"./vendor-hooks-8r-lvvPs.js";function L({linkProps:s,showExtra:o,...a}){return e.jsxs(w,{...a,children:["Powered by"," ",e.jsx(y,{href:"https://www.arcblock.io",target:"_blank",...s,children:"ArcBlock"}),"'s"," ",e.jsx(y,{href:"https://www.blocklet.io",target:"_blank",...s,children:"Blocklet Technology"}),o?", the decentralized web engine.":null]})}function v({did:s,children:o,title:a,description:d,actions:h,logo:i,logoSize:c,poweredBy:x,termsOfUse:g}){const n=(globalThis==null?void 0:globalThis.blocklet)||(globalThis==null?void 0:globalThis.env)||{},f=P(l=>l.breakpoints.down("lg")),I=E(()=>{const l=n.appPid,m=k.isEthereumDid(l),B=m?void 0:z(l);return m?A(l):B.color},[n==null?void 0:n.appPid]);if(!s)return o;a===void 0&&(a=n.appName),d===void 0&&(d=n.appDescription),i===void 0&&(i=(n==null?void 0:n.appLogoRect)||(n==null?void 0:n.appLogo)||""),typeof i=="string"&&(i?i=e.jsx(t,{sx:{height:c,maxHeight:c,objectFit:"contain"},component:"img",src:i,alt:`${n.appName}'s logo`}):i=e.jsx(b,{size:c,did:s,src:i,variant:"rounded"})),x===void 0&&(x=e.jsx(L,{linkProps:{color:j.textSubtitle,sx:{"&:hover":{textDecoration:"underline"}}},showExtra:!f,sx:{zIndex:10,position:"absolute",bottom:10,left:10,right:10,textAlign:"center",fontSize:"12px",color:j.textSubtitle}}));let p=o;!o&&!f&&(p=e.jsx(t,{sx:{filter:"blur(180px)",display:"flex"},children:e.jsx(b,{size:210,did:s,variant:"rounded"})}));const T=!!o;let u=!0;return f&&(u=!T),e.jsxs(t,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",px:8,py:6,background:`radial-gradient(circle at bottom right, ${C(I,.3)} 10%, #ffffff 50%)`,position:"relative"},children:[e.jsxs(t,{sx:{maxWidth:1200,display:"flex",alignItems:"center",justifyContent:[u,p].filter(Boolean).length>1?"space-between":"space-around",width:"100%",margin:"auto"},children:[u?e.jsxs(t,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[e.jsx(t,{sx:{display:"flex",alignItems:"center"},children:i}),e.jsx(w,{variant:"h2",sx:{fontWeight:"bold",fontSize:{sm:"2.25rem",md:"2.75rem",xl:"3.5rem"}},children:a}),d?e.jsx(t,{variant:"h5",sx:{mb:2,color:"text.secondary"},children:d}):null,h?e.jsx(t,{sx:{mt:8},children:h}):null,g?e.jsx(t,{sx:{mt:-1,color:"grey"},children:g}):null]}):null,p]}),e.jsx(t,{sx:{position:"absolute",bottom:10,left:0,right:0,textAlign:"center"},children:x})]})}v.propTypes={did:r.string.isRequired,children:r.any.isRequired,title:r.any,description:r.any,logo:r.any,logoSize:r.number,actions:r.any,poweredBy:r.any,termsOfUse:r.any};v.defaultProps={title:void 0,description:void 0,logo:void 0,logoSize:50};export{v as L};
@@ -1,4 +1,4 @@
1
- import{j as t,E as i,aa as c,a8 as d,a3 as h,bW as m,bX as p}from"./vendor-mui-core-C-PhacC8.js";function l({variant:e,title:o,subTitle:s,footer:a,...n}){let r;switch(e){case"error":r=p;break;case"info":r=m;break;case"loading":r=h;break;default:r=d}return t.jsx(u,{variant:e,...n,children:t.jsxs("div",{className:"result-body",children:[t.jsx("span",{className:`result-icon color-${e}`,children:t.jsx(r,{})}),t.jsx("div",{className:`result-title color-${e} ${o?"":"ele-hide"}`,children:o}),t.jsx("div",{className:`result-sub-title ${s?"":"ele-hide"}`,children:s}),a&&t.jsx("div",{className:"result-footer",children:a})]})})}l.propTypes={variant:i.oneOf(["success","error","info","loading"]),title:i.string,subTitle:i.any,footer:i.any};l.defaultProps={variant:"success",title:"",subTitle:"",footer:null};const u=c.div`
1
+ import{j as t,E as i,aa as c,a8 as d,a3 as h,bX as m,bY as p}from"./vendor-mui-core-1jJmAutq.js";function l({variant:e,title:o,subTitle:s,footer:a,...n}){let r;switch(e){case"error":r=p;break;case"info":r=m;break;case"loading":r=h;break;default:r=d}return t.jsx(u,{variant:e,...n,children:t.jsxs("div",{className:"result-body",children:[t.jsx("span",{className:`result-icon color-${e}`,children:t.jsx(r,{})}),t.jsx("div",{className:`result-title color-${e} ${o?"":"ele-hide"}`,children:o}),t.jsx("div",{className:`result-sub-title ${s?"":"ele-hide"}`,children:s}),a&&t.jsx("div",{className:"result-footer",children:a})]})})}l.propTypes={variant:i.oneOf(["success","error","info","loading"]),title:i.string,subTitle:i.any,footer:i.any};l.defaultProps={variant:"success",title:"",subTitle:"",footer:null};const u=c.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{j as r,aa as m}from"./vendor-mui-core-C-PhacC8.js";import{C as u}from"./content-layout-uPtoKIAs.js";import{u as c,V as s}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{J as d,h as i}from"./index--QvOAcHK.js";const p=m(u)`
1
+ import{j as r,aa as m}from"./vendor-mui-core-1jJmAutq.js";import{C as c}from"./content-layout-Bs-vdQ_U.js";import{u,Z as s}from"./vendor-ux-did-connect-DlrX4cqq.js";import{c as i}from"./vendor-arcblock-CD8CMsgQ.js";import{H as p}from"./index-CTpJt8AJ.js";const d=m(c)`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -26,4 +26,4 @@ import{j as r,aa as m}from"./vendor-mui-core-C-PhacC8.js";import{C as u}from"./c
26
26
  justify-content: center;
27
27
  overflow-y: auto;
28
28
  }
29
- `;function g({children:e,...a}){const{t:o}=c(),{ws:{useSubscription:n}}=d();return n(i.BlockletEvents.certIssued,t=>{s.success(o("setup.domain.genCertSuccess",{domain:t.domain}))}),n(i.BlockletEvents.certError,t=>{s.error(o("setup.domain.genCertFailed",{domain:t.domain,message:t.message}))}),r.jsx(p,{...a,children:e})}export{g as S};
29
+ `;function w({children:e,...a}){const{t:o}=u(),{ws:{useSubscription:n}}=p();return n(i.BlockletEvents.certIssued,t=>{s.success(o("setup.domain.genCertSuccess",{domain:t.domain}))}),n(i.BlockletEvents.certError,t=>{s.error(o("setup.domain.genCertFailed",{domain:t.domain,message:t.message}))}),r.jsx(d,{...a,children:e})}export{w as S};
@@ -1,4 +1,13 @@
1
- import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 as p,T,aa as H,t as _,al as ee,bF as je,a5 as Fe,bG as Ve,am as Ge,ab as Qe,a2 as be,e as te,m as Ke,bi as U,bT as Xe,x as Ye,s as Ze,I as Je}from"./vendor-mui-core-C-PhacC8.js";import{f as L,u as Y}from"./vendor-hooks-DtYI0-rF.js";import{P as re,E as et,aZ as ne,h as E,Q as tt,u as we,r as Re,g as ke,m as rt,bc as nt}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{S as st}from"./index-BYC998Xz.js";import{B as it}from"./bundle-avatar-xyEwd0kl.js";import{c as W,s as O,g as se,H as ot,h as F,f as Ce,u as Se,M as $e,d as at,m as lt,a as ge,i as ct,B as dt}from"./index-Tc7h84RU.js";import{R as Me}from"./relative-time-BUHtgSDe.js";import{y as G,aa as ut,z as A,Y as pt,x as ht}from"./vendor-utils-CRBr0QUY.js";import{p as mt,k as ft}from"./vendor-arcblock-D8eCUoJY.js";import{F as Te,A as xt}from"./index--QvOAcHK.js";import{d as gt}from"./InfoOutlined-DFTm-vVr.js";import{d as yt}from"./CheckCircle-D7CrWlJ6.js";import{p as vt}from"./util-CORzDFgw.js";function Ie({attachment:e}){const{data:r}=e;let s="";try{s=new URL(r.url).host}catch{s=r.url}return t.jsxs(J,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:n=>{n.customPreventRedirect=!0},children:[!!s&&t.jsx("span",{className:"url",children:s}),!!r.title&&t.jsx(p,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&t.jsx(p,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&t.jsx("img",{src:Te.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ie.propTypes={attachment:i.object.isRequired};function Pe({attachment:e}){const{data:r}=e;return t.jsx("img",{src:Te.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Pe.propTypes={attachment:i.object.isRequired};function ie({attachment:e,...r}){var c;const{data:s}=e,n=((c=s.color)==null?void 0:c.toLowerCase())||r.color,o=s.size||r.size,a=s.fontWeight||r.fontWeight||400;let l="14px";return o==="small"?l="12px":o==="normal"?l="14px":o==="big"?l="16px":o==="large"&&(l="18px"),t.jsx("span",{className:"title",style:{fontSize:l,color:n,whiteSpace:"unset",fontWeight:a},children:s.text})}ie.propTypes={attachment:i.object.isRequired};oe.propTypes={locale:i.string,data:i.object.isRequired};oe.defaultProps={locale:"en"};function oe({locale:e="en",data:r}){const s={zh:"来自",en:"from"}[e]||"from",n={zh:"接收",en:"Received"}[e]||"Received",a=`https://${W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let l=r.amount;r.decimal&&(l=r.amount/10**r.decimal);const c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx("a",{href:a,target:"_blank",rel:"noreferrer",onClick:v=>{v.customPreventRedirect=!0},children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),t.jsxs(T,{component:"div",align:"right",style:O.summaryStyle,flex:1,children:["+",l," ",r.symbol]})]}),t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:s}),t.jsx(p,{sx:{maxWidth:"252px",fontSize:"14px"},children:t.jsx(re,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ae.propTypes={locale:i.string,data:i.object.isRequired};ae.defaultProps={locale:"en"};function ae({locale:e,data:r}){var v,j;const s={zh:"接收",en:"Received"}[e]||"Received",n={zh:"来自",en:"from"}[e]||"from",o=W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId),a=r.did||((j=(v=r==null?void 0:r.credential)==null?void 0:v.issuer)==null?void 0:j.id)||"",l=`https://${o}/explorer/assets/${a}`,c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx(p,{sx:{pr:1},children:t.jsx("a",{href:l,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),t.jsx(T,{component:"div",align:"right",style:O.summaryStyle,children:"+1 Asset"})]}),a?t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:n}),t.jsx(p,{sx:{maxWidth:"252px",fontSize:"14px"},children:t.jsx(re,{did:a,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}ze.propTypes={data:i.object.isRequired,locale:i.string};function ze({data:e,locale:r="en"}){return t.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:s=>{s.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),t.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[t.jsx("div",{style:{marginBottom:"6px"},children:e.title}),t.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:t.jsx(re,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}le.propTypes={locale:i.string,data:i.object.isRequired};le.defaultProps={locale:"en"};function le({locale:e,data:r}){const s=W.getChainHost(r.chainId),n=`https://${s}/explorer/txs/${r.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",a={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return t.jsxs("a",{href:n,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:l=>{l.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:s}),t.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),t.jsxs("div",{style:{wordBreak:"break-all"},children:[a,": ",r.hash]})]})}function Ne({data:e,isMd:r=!1}){return t.jsx(p,{display:"flex",flexDirection:r?"row":"column",justifyContent:"space-between",sx:{width:r?"100%":"auto",flexWrap:"nowrap",gap:1},children:e.items.map((s,n)=>t.jsx(ie,{attachment:s,color:n===0?"rgba(156, 163, 175, 1)":"",size:n===0?"normal":"big",fontWeight:n===0?400:600,sx:et(n===0?{flexShrink:0}:{flex:1})},n))})}Ne.propTypes={data:i.array.isRequired,isMd:i.bool};function Ae({attachment:e,...r}){const{local:s}=u.useContext(ne),n=_(o=>o.breakpoints.down("md"));return t.jsxs(jt,{"data-testid":"attachment-preview",...r,isMd:n,children:[e.type==="link"&&t.jsx(Ie,{attachment:e,...r,isMd:n}),e.type==="image"&&t.jsx(Pe,{attachment:e,isMd:n}),e.type==="text"&&t.jsx(ie,{attachment:e,isMd:n}),e.type==="token"&&t.jsx(oe,{data:e.data,local:s,isMd:n}),e.type==="asset"||e.type==="vc"?t.jsx(ae,{data:e.data,local:s,isMd:n}):null,e.type==="dapp"&&t.jsx(ze,{data:e.data,local:s,isMd:n}),e.type==="transaction"&&t.jsx(le,{data:e.data,local:s,...r,isMd:n}),e.type==="divider"&&t.jsx(ee,{sx:{mb:1,mt:1},style:{color:E.dividerColor}}),e.type==="combined"&&t.jsx(Ne,{data:e,isMd:n})]})}const jt=H.div`
1
+ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as J,a4 as p,aa as D,T,t as E,al as ee,bG as je,a5 as Fe,bH as Ve,am as Ge,ab as Qe,a2 as be,e as te,m as Ke,bk as U,bU as Xe,x as Ye,s as Ze,I as Je}from"./vendor-mui-core-1jJmAutq.js";import{f as L,u as Y}from"./vendor-hooks-8r-lvvPs.js";import{X as re,M as et,a$ as ne,i as H,o as tt,u as we,r as ke,h as Re,p as rt,bc as nt}from"./vendor-ux-did-connect-DlrX4cqq.js";import{S as st}from"./index-Cuoxr9xB.js";import{B as it}from"./bundle-avatar-Ci9fNblN.js";import{c as W,s as O,g as se,H as ot,u as Ce,M as $e,d as at,m as lt,a as ge,i as ct,B as dt}from"./index-DVogNW6l.js";import{R as Se}from"./relative-time-Cu4jaQ9H.js";import{y as G,aa as ut,z as A,Z as pt,x as ht}from"./vendor-utils-Cm2BKG2b.js";import{u as Me,p as ft,h as F,f as Te,q as mt}from"./vendor-arcblock-CD8CMsgQ.js";import{d as xt}from"./InfoOutlined-jnMrCCfZ.js";import{d as gt}from"./CheckCircle-BHD7aj9l.js";import{p as yt}from"./util-B6E4W35Y.js";import{z as vt}from"./index-CTpJt8AJ.js";function Ie({attachment:e}){const{data:r}=e;let s="";try{s=new URL(r.url).host}catch{s=r.url}return t.jsxs(J,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:n=>{n.customPreventRedirect=!0},children:[!!s&&t.jsx("span",{className:"url",children:s}),!!r.title&&t.jsx(p,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&t.jsx(p,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&t.jsx("img",{src:Me.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ie.propTypes={attachment:i.object.isRequired};function Pe({attachment:e}){const{data:r}=e;return t.jsx("img",{src:Me.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Pe.propTypes={attachment:i.object.isRequired};function ie({attachment:e,...r}){var c;const{data:s}=e,n=((c=s.color)==null?void 0:c.toLowerCase())||r.color,o=s.size||r.size,a=s.fontWeight||r.fontWeight||400;let l="14px";return o==="small"?l="12px":o==="normal"?l="14px":o==="big"?l="16px":o==="large"&&(l="18px"),t.jsx(jt,{className:"title",style:{fontSize:l,color:n,whiteSpace:"unset",fontWeight:a},children:s.text})}ie.propTypes={attachment:i.object.isRequired};const jt=D.span`
2
+ width: 100%;
3
+ display: -webkit-box;
4
+ -webkit-box-orient: vertical;
5
+ -webkit-line-clamp: 2;
6
+ overflow: hidden;
7
+ text-overflow: ellipsis;
8
+ white-space: normal;
9
+ word-break: break-word;
10
+ `;oe.propTypes={locale:i.string,data:i.object.isRequired};oe.defaultProps={locale:"en"};function oe({locale:e="en",data:r}){const s={zh:"来自",en:"from"}[e]||"from",n={zh:"接收",en:"Received"}[e]||"Received",a=`https://${W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let l=r.amount;r.decimal&&(l=r.amount/10**r.decimal);const c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx("a",{href:a,target:"_blank",rel:"noreferrer",onClick:v=>{v.customPreventRedirect=!0},children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),t.jsxs(T,{component:"div",align:"right",style:O.summaryStyle,flex:1,children:["+",l," ",r.symbol]})]}),t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:s}),t.jsx(p,{maxWidth:260,fontSize:14,children:t.jsx(re,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ae.propTypes={locale:i.string,data:i.object.isRequired};ae.defaultProps={locale:"en"};function ae({locale:e,data:r}){var v,j;const s={zh:"接收",en:"Received"}[e]||"Received",n={zh:"来自",en:"from"}[e]||"from",o=W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId),a=r.did||((j=(v=r==null?void 0:r.credential)==null?void 0:v.issuer)==null?void 0:j.id)||"",l=`https://${o}/explorer/assets/${a}`,c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx(p,{sx:{pr:1},children:t.jsx("a",{href:l,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:m=>{m.customPreventRedirect=!0},rel:"noreferrer",children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),t.jsx(T,{component:"div",align:"right",style:O.summaryStyle,children:"+1 Asset"})]}),a?t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:n}),t.jsx(p,{maxWidth:260,fontSize:14,children:t.jsx(re,{did:a,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}ze.propTypes={data:i.object.isRequired,locale:i.string};function ze({data:e,locale:r="en"}){return t.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:s=>{s.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),t.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[t.jsx("div",{style:{marginBottom:"6px"},children:e.title}),t.jsx(p,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:t.jsx(re,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}le.propTypes={locale:i.string,data:i.object.isRequired};le.defaultProps={locale:"en"};function le({locale:e,data:r}){const s=W.getChainHost(r.chainId),n=`https://${s}/explorer/txs/${r.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",a={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return t.jsxs("a",{href:n,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:l=>{l.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:s}),t.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),t.jsxs("div",{style:{wordBreak:"break-all"},children:[a,": ",r.hash]})]})}function Ne({data:e,isMd:r=!1}){return t.jsx(p,{display:"flex",flexDirection:r?"row":"column",justifyContent:"space-between",sx:{width:"100%",flexWrap:"nowrap",gap:1,overflow:"hidden"},children:e.items.map((s,n)=>t.jsx(ie,{attachment:s,color:n===0?"rgba(156, 163, 175, 1)":"",size:n===0?"normal":"big",fontWeight:n===0?400:600,sx:et(n===0?{flexShrink:0}:{flex:1})},n))})}Ne.propTypes={data:i.array.isRequired,isMd:i.bool};function Ae({attachment:e,...r}){const{local:s}=u.useContext(ne),n=E(o=>o.breakpoints.down("md"));return t.jsxs(bt,{...r,isMd:n,children:[e.type==="link"&&t.jsx(Ie,{attachment:e,...r,isMd:n}),e.type==="image"&&t.jsx(Pe,{attachment:e,isMd:n}),e.type==="text"&&t.jsx(ie,{attachment:e,isMd:n}),e.type==="token"&&t.jsx(oe,{data:e.data,local:s,isMd:n}),e.type==="asset"||e.type==="vc"?t.jsx(ae,{data:e.data,local:s,isMd:n}):null,e.type==="dapp"&&t.jsx(ze,{data:e.data,local:s,isMd:n}),e.type==="transaction"&&t.jsx(le,{data:e.data,local:s,...r,isMd:n}),e.type==="divider"&&t.jsx(ee,{sx:{mb:1,mt:1},style:{color:H.dividerColor}}),e.type==="combined"&&t.jsx(Ne,{data:e,isMd:n})]})}const bt=D.div`
2
11
  display: ${({sx:e={}})=>e.display||"flex"};
3
12
  flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
4
13
  gap: ${({sx:e={}})=>e.gap||1};
@@ -6,7 +15,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
6
15
  &:last-child {
7
16
  margin-bottom: 0;
8
17
  }
9
- `;Ae.propTypes={attachment:i.object.isRequired};function Le({data:e,...r}){const{items:s}=e;return t.jsx(bt,{...r,children:s.map(n=>t.jsxs(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,style:{width:16,height:16}}):null,t.jsxs(p,{className:"metric-name",display:"flex",alignItems:"center",children:[n.title,n.subtitle?t.jsx(Fe,{title:n.subtitle,arrow:!0,placement:"top",children:t.jsx(gt,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),t.jsxs(p,{className:"metric-number",sx:{color:n.content_color||"rgba(3, 7, 18, 1)"},children:[n.content,n.sub_content?t.jsxs("span",{className:"sub-content",style:{color:n.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",n.sub_content,")"]}):null]})]},n.title))})}const bt=H(p)`
18
+ `;Ae.propTypes={attachment:i.object.isRequired};function Le({data:e,...r}){const{items:s}=e;return t.jsx(wt,{...r,children:s.map(n=>t.jsxs(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,style:{width:16,height:16}}):null,t.jsxs(p,{className:"metric-name",display:"flex",alignItems:"center",children:[n.title,n.subtitle?t.jsx(Fe,{title:n.subtitle,arrow:!0,placement:"top",children:t.jsx(xt,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),t.jsxs(p,{className:"metric-number",sx:{color:n.content_color||"rgba(3, 7, 18, 1)"},children:[n.content,n.sub_content?t.jsxs("span",{className:"sub-content",style:{color:n.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",n.sub_content,")"]}):null]})]},n.title))})}const wt=D(p)`
10
19
  display: flex;
11
20
  justify-content: flex-start;
12
21
  flex-wrap: wrap;
@@ -24,7 +33,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
24
33
  font-size: 14px;
25
34
  color: rgba(156, 163, 175, 1);
26
35
  }
27
- `;Le.propTypes={data:i.object.isRequired};function De({data:e}){const{items:r}=e,s=_(l=>l.breakpoints.down("sm")),n=_(l=>l.breakpoints.down("md")),o=_(l=>l.breakpoints.down("lg")),a=()=>s?1:n?3:o?4:6;return t.jsx(Ve,{variant:"quilted",cols:a(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(l=>{const c=l.cover||l.display;return c?t.jsx("a",{href:l.link,target:"_blank",rel:"noopener noreferrer",children:t.jsx(Ge,{children:t.jsx("img",{src:c,alt:l.title||"",style:{borderRadius:"8px"}})})},c):null})})}De.propTypes={data:i.object.isRequired};function ce({data:e,feedType:r,...s}){return t.jsxs(wt,{...s,children:[r==="data-tracker"&&e.type==="table"&&t.jsx(Le,{data:e}),(r==="graphic"||r==="gallery")&&t.jsx(De,{data:e})]})}const wt=H.div`
36
+ `;Le.propTypes={data:i.object.isRequired};function De({data:e}){const{items:r}=e,s=E(l=>l.breakpoints.down("sm")),n=E(l=>l.breakpoints.down("md")),o=E(l=>l.breakpoints.down("lg")),a=()=>s?1:n?3:o?4:6;return t.jsx(Ve,{variant:"quilted",cols:a(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(l=>{const c=l.cover||l.display;return c?t.jsx("a",{href:l.link,target:"_blank",rel:"noopener noreferrer",children:t.jsx(Ge,{children:t.jsx("img",{src:c,alt:l.title||"",style:{borderRadius:"8px"}})})},c):null})})}De.propTypes={data:i.object.isRequired};function ce({data:e,feedType:r,...s}){return t.jsxs(kt,{...s,children:[r==="data-tracker"&&e.type==="table"&&t.jsx(Le,{data:e}),(r==="graphic"||r==="gallery")&&t.jsx(De,{data:e})]})}const kt=D.div`
28
37
  display: flex;
29
38
  flex-direction: column;
30
39
  width: 100%;
@@ -32,7 +41,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
32
41
  &:last-child {
33
42
  margin-bottom: 0;
34
43
  }
35
- `;ce.propTypes={data:i.object.isRequired,feedType:i.string};ce.defaultProps={feedType:"data-tracker"};const Rt=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},kt=e=>e.every(r=>r.type==="text"),Ct=e=>e.every(r=>r.type==="image"),St=e=>ut(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(s=>{var n,o,a;return(a=(o=(n=s==null?void 0:s.data)==null?void 0:n.text)==null?void 0:o.trim)==null?void 0:a.call(o)})),$t=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(s=>s.type===r)},Mt=async(e,r)=>{const n=new tt().user;if(n)try{return await n.getUserPublicInfo({did:e})?await n.getProfileUrl({did:e,locale:r}):void 0}catch(o){console.error(o);return}},Tt=(e,r)=>{var n;const s=(n=r==null?void 0:r.componentMountPoints)==null?void 0:n.find(o=>o.did===e);return s==null?void 0:s.mountPoint},It=(e,r)=>{var o,a,l;if(!e)return null;if(((o=e.actions)==null?void 0:o.length)===1)return e.actions[0].link||null;const s=se(e.activity),n=(s==null?void 0:s.metaLink)||(s==null?void 0:s.targetLink);if(n)return G(r,n);if(((a=e.attachments)==null?void 0:a.length)===1){const c=e.attachments[0];if(c.type==="link")return((l=c.data)==null?void 0:l.url)||null}return null},Pt=e=>{const{receivers:r=[]}=e;return r.length?r.every(s=>s.read):!0};function de({notification:e,severity:r,showSke:s=!0}){const{attachments:n,data:o,...a}=e,l=_(f=>f.breakpoints.down("md"));if((!n||!n.length)&&A(o))return null;const c=Rt(r),v=(f,k=!1)=>{if(!f&&!Array.isArray(f))return null;let y=f,$={},d="horizontal";k&&kt(f)&&(y=St(f),d="vertical",$={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const x=$t(y);return t.jsx(p,{sx:{width:"100%",display:"flex",gap:1,flexDirection:k?"row":"column",justifyContent:"flex-start",alignItems:k?"center":"unset",flexWrap:"wrap"},children:y.map((h,b)=>h.type==="section"?t.jsx(u.Fragment,{children:v(h.fields,!0)},b):t.jsxs(u.Fragment,{children:[t.jsx(Ae,{attachment:h,sx:$,...a}),!(l&&d==="vertical")&&x&&y.length>1&&b!==y.length-1?t.jsx(ee,{orientation:d,style:{color:E.dividerColor},sx:d==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},b))})},j=Ct(n);return t.jsx(zt,{children:t.jsxs("div",{className:"message-in-list",children:[n.length>0&&t.jsx("div",{className:"message-container",style:l?{width:"100%"}:{},children:j?v(n):t.jsx(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:v(n)})}),!A(o)&&t.jsx("div",{className:"message-container",children:t.jsx("div",{className:"data-container",children:t.jsx(ce,{data:o,feedType:e.feedType})})}),n.length===0&&A(o)&&s&&t.jsx(Qe,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const zt=H.div`
44
+ `;ce.propTypes={data:i.object.isRequired,feedType:i.string};ce.defaultProps={feedType:"data-tracker"};const Rt=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},Ct=e=>e.every(r=>r.type==="text"),$t=e=>e.every(r=>r.type==="image"),St=e=>ut(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(s=>{var n,o,a;return(a=(o=(n=s==null?void 0:s.data)==null?void 0:n.text)==null?void 0:o.trim)==null?void 0:a.call(o)})),Mt=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(s=>s.type===r)},Tt=async(e,r)=>{const n=new tt().user;if(n)try{return await n.getUserPublicInfo({did:e})?await n.getProfileUrl({did:e,locale:r}):void 0}catch(o){console.error(o);return}},It=(e,r)=>{var n;const s=(n=r==null?void 0:r.componentMountPoints)==null?void 0:n.find(o=>o.did===e);return s==null?void 0:s.mountPoint},Pt=(e,r)=>{var o,a,l;if(!e)return null;if(((o=e.actions)==null?void 0:o.length)===1)return e.actions[0].link||null;const s=se(e.activity),n=(s==null?void 0:s.metaLink)||(s==null?void 0:s.targetLink);if(n)return G(r,n);if(((a=e.attachments)==null?void 0:a.length)===1){const c=e.attachments[0];if(c.type==="link")return((l=c.data)==null?void 0:l.url)||null}return null},zt=e=>{const{receivers:r=[]}=e;return r.length?r.every(s=>s.read):!0};function de({notification:e,severity:r,showSke:s=!0}){const{attachments:n,data:o,...a}=e,l=E(m=>m.breakpoints.down("md"));if((!n||!n.length)&&A(o))return null;const c=Rt(r),v=(m,R=!1)=>{if(!m&&!Array.isArray(m))return null;let y=m,S={},d="horizontal";R&&Ct(m)&&(y=St(m),d="vertical",S={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:l||y.length===1?"100%":"28%"});const x=Mt(y);return t.jsx(p,{sx:{width:"100%",display:"flex",gap:1,flexDirection:R?"row":"column",justifyContent:"flex-start",alignItems:R?"center":"unset",flexWrap:"wrap"},children:y.map((h,b)=>h.type==="section"?t.jsx(u.Fragment,{children:v(h.fields,!0)},b):t.jsxs(u.Fragment,{children:[t.jsx(Ae,{attachment:h,style:S,...a}),!(l&&d==="vertical")&&x&&y.length>1&&b%3!==2?t.jsx(ee,{orientation:d,style:{color:H.dividerColor},sx:d==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},b))})},j=$t(n);return t.jsx(Nt,{children:t.jsxs("div",{className:"message-in-list",children:[n.length>0&&t.jsx("div",{className:"message-container",style:l?{width:"100%"}:{},children:j?v(n):t.jsx(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:v(n)})}),!A(o)&&t.jsx("div",{className:"message-container",children:t.jsx("div",{className:"data-container",children:t.jsx(ce,{data:o,feedType:e.feedType})})}),n.length===0&&A(o)&&s&&t.jsx(Qe,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Nt=D.div`
36
45
  display: flex;
37
46
  flex-direction: column;
38
47
  .message-in-list {
@@ -84,7 +93,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
84
93
  margin-right: 8px;
85
94
  }
86
95
  }
87
- `;de.propTypes={severity:i.string.isRequired,notification:i.object.isRequired,showSke:i.bool};de.defaultProps={showSke:!0};const X=e=>mt.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Nt=async(e,r)=>{const{type:s,did:n}=e;return Ce.isSameAddr(s,"did")?await Mt(n,r)||F.getLink(e):F.getLink(e)},At=async(e,r,s=!0)=>{const n=F.toTextList(e);return await Promise.all(n.map(async a=>{if(a instanceof F.Link){if(s){const l=await Nt(a,r),{type:c,chainId:v,did:j}=a;return Ce.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${a.text}</em>`:l?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${l}">${a.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${a.text}</em>`}return a.text}return a})).then(a=>a.join(""))};_e.propTypes={notification:i.object,rows:i.number,minimal:i.bool};function _e({notification:e,rows:r=2,minimal:s=!1}){const[n,o]=u.useState(!1),[a,l]=u.useState(""),{t:c,locale:v}=we(),j=u.useMemo(()=>{const{attachments:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),f=u.useMemo(()=>{const{blocks:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),k=u.useMemo(()=>{const{description:h}=e||{};return!!h},[e]),y=u.useMemo(()=>{const{data:h}=e||{};return!A(h)},[e]),$=u.useMemo(()=>j||f||k||y,[j,f,k,y]);if(u.useEffect(()=>{At((e==null?void 0:e.description)??"",v).then(h=>{l(h)})},[e==null?void 0:e.description,v]),!$)return null;const d=()=>r===0?"":n?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,x=h=>{const{target:b}=h;b.getAttribute("data-name")==="toggle-expanded"&&(o(!n),h.customPreventRedirect=!0)};return t.jsxs(Lt,{color:s?"#fff":"",children:[t.jsx(p,{className:"text-container",component:"div",onClick:x,children:a&&(!n&&r>0?t.jsx(ot,{basedOn:"letters",unsafeHTML:X(a),maxLine:r,ellipsisHTML:X(d())}):t.jsx(T,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:X(`${a}${d()}`)}}))}),!s&&(j||y)?t.jsx(de,{severity:e.severity,notification:e}):null]})}const Lt=H(p)`
96
+ `;de.propTypes={severity:i.string.isRequired,notification:i.object.isRequired,showSke:i.bool};de.defaultProps={showSke:!0};const X=e=>ft.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),At=async(e,r)=>{const{type:s,did:n}=e;return Te.isSameAddr(s,"did")?await Tt(n,r)||F.getLink(e):F.getLink(e)},Lt=async(e,r,s=!0)=>{const n=F.toTextList(e);return await Promise.all(n.map(async a=>{if(a instanceof F.Link){if(s){const l=await At(a,r),{type:c,chainId:v,did:j}=a;return Te.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${a.text}</em>`:l?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${l}">${a.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${a.text}</em>`}return a.text}return a})).then(a=>a.join(""))};_e.propTypes={notification:i.object,rows:i.number,minimal:i.bool};function _e({notification:e,rows:r=2,minimal:s=!1}){const[n,o]=u.useState(!1),[a,l]=u.useState(""),{t:c,locale:v}=we(),j=u.useMemo(()=>{const{attachments:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),m=u.useMemo(()=>{const{blocks:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),R=u.useMemo(()=>{const{description:h}=e||{};return!!h},[e]),y=u.useMemo(()=>{const{data:h}=e||{};return!A(h)},[e]),S=u.useMemo(()=>j||m||R||y,[j,m,R,y]);if(u.useEffect(()=>{Lt((e==null?void 0:e.description)??"",v).then(h=>{l(h)})},[e==null?void 0:e.description,v]),!S)return null;const d=()=>r===0?"":n?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,x=h=>{const{target:b}=h;b.getAttribute("data-name")==="toggle-expanded"&&(o(!n),h.customPreventRedirect=!0)};return t.jsxs(Dt,{color:s?"#fff":"",children:[t.jsx(p,{className:"text-container",component:"div",onClick:x,children:a&&(!n&&r>0?t.jsx(ot,{basedOn:"letters",unsafeHTML:X(a),maxLine:r,ellipsisHTML:X(d())}):t.jsx(T,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:X(`${a}${d()}`)}}))}),!s&&(j||y)?t.jsx(de,{severity:e.severity,notification:e}):null]})}const Dt=D(p)`
88
97
  width: 100%;
89
98
  color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
90
99
  .text-container {
@@ -108,7 +117,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
108
117
  -webkit-line-clamp: 2;
109
118
  }
110
119
  }
111
- `,Dt=u.memo(_e);var ue={},_t=be;Object.defineProperty(ue,"__esModule",{value:!0});var Ee=ue.default=void 0,Et=_t(Re()),Ht=t;Ee=ue.default=(0,Et.default)((0,Ht.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var pe={},qt=be;Object.defineProperty(pe,"__esModule",{value:!0});var He=pe.default=void 0,Wt=qt(Re()),Bt=t;He=pe.default=(0,Wt.default)((0,Bt.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");const Ut={error:Ee,warning:He,info:ft,success:yt};he.propTypes={severity:i.oneOf(["error","warning","info","success"]).isRequired,size:i.number};he.defaultProps={size:32};function he({severity:e="info",size:r=32}){const s=te(),o=L(()=>({error:s.palette.error.main,warning:s.palette.warning.main,info:s.palette.info.main,success:s.palette.success.main}))[e],a=Ut[e],l=Ke(o,.1);return t.jsx(U,{sx:{width:r,height:r,bgcolor:l,color:o},children:t.jsx(a,{fontSize:"small"})})}const Ot={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M5.821 4.91c3.898-2.765 9.469-2.539 13.073.536c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447-7.965 4.583-12.231 2.805l-.232-.101l-4.375.931l-.075.013l-.11.009l-.113-.004l-.044-.005l-.11-.02l-.105-.034l-.1-.044l-.076-.042l-.108-.077l-.081-.074l-.073-.083l-.053-.075l-.065-.115l-.042-.106l-.031-.113l-.013-.075l-.009-.11l.004-.113l.005-.044l.02-.11l.022-.072l1.15-3.451l-.022-.036C.969 12.45 1.97 7.805 5.59 5.079l.23-.168z"/></g>'},Ft={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 2a5 5 0 1 1-5 5l.005-.217A5 5 0 0 1 12 2zm2 12a5 5 0 0 1 5 5v1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-1a5 5 0 0 1 5-5h4z"/></g>'},Vt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34zM12 6a1 1 0 0 0-1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1-.866-.398l-.068-.101a1 1 0 0 0-1.732.998a3 3 0 0 0 2.505 1.5H11a1 1 0 0 0 .883.994L12 18a1 1 0 0 0 1-1l.176-.005A3 3 0 0 0 13 11V9c.358-.012.671.14.866.398l.068.101a1 1 0 0 0 1.732-.998A3 3 0 0 0 13.161 7H13a1 1 0 0 0-1-1zm1 7a1 1 0 0 1 0 2v-2zm-2-4v2a1 1 0 0 1 0-2z"/></g>'},Gt={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-5.5 8.28"/></g>'},Qt={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 10l-4 4l6 6l4-16l-18 7l4 2l2 6l3-4"/>'},ye={comment:{icon:Ot,bgColor:"rgba(239, 246, 255, 1)",color:"rgba(43, 127, 255, 1)"},like:{icon:"👍",bgColor:"rgba(244, 244, 245, 1)",color:"yellow",renderType:"emoji"},follow:{icon:Ft,bgColor:"rgba(238, 242, 255, 1)",color:"rgba(97, 95, 255, 1)"},tips:{icon:Vt,bgColor:"rgba(254, 252, 232, 1)",color:"rgba(240, 177, 0, 1)"},mention:{icon:Gt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"},assign:{icon:Qt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"}};me.propTypes={activity:i.oneOf(["comment","like","follow","tips","mention","assign"]).isRequired,size:i.number};me.defaultProps={size:32};function me({activity:e,size:r=32}){const s=ye[e]||ye.comment,n=s.icon;return t.jsx(U,{sx:{bgcolor:s.bgColor,color:s.color,width:r,height:r},children:s.renderType==="emoji"?t.jsx("span",{style:{fontSize:"14px"},children:n}):t.jsx(ke,{icon:n})})}const Z={avatar:i.string,fullName:i.string,did:i.string};function V({actor:e,size:r,teamDid:s,inService:n,showName:o}){const a=e!=null&&e.avatar?vt(e.avatar,s,n):null,l=c=>{e&&(c.stopPropagation(),window.open(ht(G(rt.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),"_blank"),c.customPreventRedirect=!0)};return t.jsxs(p,{display:"flex",alignItems:"center",gap:1,onClick:l,role:"button",style:{cursor:"pointer"},title:(e==null?void 0:e.fullName)||"",children:[a?t.jsx(U,{alt:(e==null?void 0:e.fullName)||"",src:`${a}?imageFilter=resize&w=${r*1.5}&h=${r*1.5}`,size:r,did:e==null?void 0:e.did,shape:"circle",sx:{width:r,height:r,borderRadius:"100%",overflow:"hidden",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.1)"}}}):t.jsx(U,{sx:{width:r,height:r}}),o&&t.jsx("span",{children:e==null?void 0:e.fullName})]})}V.propTypes={actor:i.shape(Z).isRequired,size:i.number.isRequired,teamDid:i.string,inService:i.bool,showName:i.bool};V.defaultProps={teamDid:"",inService:!1,showName:!1};Q.propTypes={actors:i.oneOfType([i.shape(Z),i.arrayOf(i.shape(Z))]).isRequired,size:i.number,maxDisplay:i.number,teamDid:i.string,inService:i.bool,showName:i.bool};Q.defaultProps={size:32,maxDisplay:9,teamDid:"",inService:!0,showName:!1};function Q({actors:e,size:r=32,maxDisplay:s=9,teamDid:n="",inService:o=!0,showName:a=!1}){const l=L(()=>{const c=Array.isArray(e)?e:[e];return pt(c,"did").filter(Boolean)},[e]);return l.length===1||!l.length?t.jsx(V,{actor:l[0],size:r,teamDid:n,inService:o,showName:a}):t.jsx(Xe,{total:l.length,renderSurplus:c=>c<100?t.jsxs("span",{children:["+",c]}):t.jsx("span",{children:"99+"}),max:s,sx:{justifyContent:"flex-end",height:`${r}px`,".MuiAvatar-root":{width:`${r}px`,height:`${r}px`,fontSize:`${r/2.5}px`,border:0,zIndex:2}},children:l.map((c,v)=>t.jsx(V,{actor:c,size:r,teamDid:n,inService:o},(c==null?void 0:c.did)||v))})}const ve=3;Be.propTypes={notification:i.object.isRequired,isMultiple:i.bool,blocklet:i.object,mountPoint:i.string};qe.propTypes={notification:i.object.isRequired,mountPoint:i.string};We.propTypes={items:i.array.isRequired,activity:i.object.isRequired,blocklet:i.object,mountPoint:i.string,viewMoreLink:i.string};function qe({notification:e,mountPoint:r=""}){var l;const{activity:s}=e,{type:n,meta:o={}}=s||{},a=Se({activity:s,users:[e==null?void 0:e.actorInfo],actors:[(l=e==null?void 0:e.activity)==null?void 0:l.actor],mountPoint:r});return A(s)||!s.type||!s.actor||A(s.target)?null:t.jsxs(p,{children:[t.jsx(T,{variant:"body1",color:E.textBase,sx:{mb:.5},children:a}),t.jsx($e,{meta:o,type:n})]})}function We({items:e,activity:r,blocklet:s,mountPoint:n="",viewMoreLink:o=""}){const a=te(),l=L(()=>{var d;return(s==null?void 0:s.did)||((d=s==null?void 0:s.meta)==null?void 0:d.did)||""},[s]),{locale:c}=u.useContext(ne),v=L(()=>!A(r.meta)&&Object.values(r.meta).some(d=>d!=null),[r]),j=Se({activity:r,users:e.map(d=>d==null?void 0:d.actorInfo),actors:e.map(d=>{var x;return(x=d==null?void 0:d.activity)==null?void 0:x.actor}),mountPoint:n}),f=Y(d=>{if(!d.activity)return null;const x=se(d.activity);return x!=null&&x.metaLink?G(n,x.metaLink):null}),k=Y((d,x)=>{if(d.stopPropagation(),!x)return;const h=f(x);h&&(window.open(h,"_blank"),d.customPreventRedirect=!0)}),y=e.length>ve,$=e.slice(0,ve);return t.jsxs(p,{sx:{width:"100%"},children:[t.jsx(T,{variant:"body1",color:E.textBase,sx:{mb:3},children:j}),v?t.jsxs(p,{className:"sub-content",display:"flex",flexDirection:"column",gap:3,children:[$.map(d=>{var x;return t.jsxs(p,{display:"flex",flexDirection:"column",gap:1,onClick:h=>k(h,d),children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(Q,{actors:d.actorInfo,size:32,teamDid:l}),t.jsx(T,{variant:"subtitle1",color:E.textBase,children:(x=d==null?void 0:d.actorInfo)==null?void 0:x.fullName})," ","·",t.jsx(Me,{value:d.createdAt,locale:c,shouldUpdate:!0,style:{color:a.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),t.jsx(p,{pl:5,children:t.jsx($e,{meta:d.activity.meta,type:d.activity.type})})]},d.id)}),y&&o?t.jsx(p,{mt:1,display:"flex",justifyContent:"center",children:t.jsxs(Ye,{size:"large",variant:"text",component:J,href:o,target:"_blank",rel:"noopener noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:["View More ",t.jsx(ke,{icon:at,style:{marginLeft:4}})]})}):null]}):null]})}function Be({notification:e,isMultiple:r=!1,blocklet:s,mountPoint:n=""}){const o=L(()=>{if(!e.activity)return null;const a=se(e.activity);return a!=null&&a.targetLink?G(n,a.targetLink):null},[e.activity,n]);return r?t.jsx(We,{items:e.items,activity:e.activity,blocklet:s,mountPoint:n,viewMoreLink:o}):t.jsx(qe,{notification:e,mountPoint:n})}const Kt=Ze(p)`
120
+ `,_t=u.memo(_e);var ue={},Et=be;Object.defineProperty(ue,"__esModule",{value:!0});var Ee=ue.default=void 0,Ht=Et(ke()),qt=t;Ee=ue.default=(0,Ht.default)((0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var pe={},Wt=be;Object.defineProperty(pe,"__esModule",{value:!0});var He=pe.default=void 0,Bt=Wt(ke()),Ut=t;He=pe.default=(0,Bt.default)((0,Ut.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");const Ot={error:Ee,warning:He,info:mt,success:gt};he.propTypes={severity:i.oneOf(["error","warning","info","success"]).isRequired,size:i.number};he.defaultProps={size:32};function he({severity:e="info",size:r=32}){const s=te(),o=L(()=>({error:s.palette.error.main,warning:s.palette.warning.main,info:s.palette.info.main,success:s.palette.success.main}))[e],a=Ot[e],l=Ke(o,.1);return t.jsx(U,{sx:{width:r,height:r,bgcolor:l,color:o},children:t.jsx(a,{fontSize:"small"})})}const Ft={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M5.821 4.91c3.898-2.765 9.469-2.539 13.073.536c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447-7.965 4.583-12.231 2.805l-.232-.101l-4.375.931l-.075.013l-.11.009l-.113-.004l-.044-.005l-.11-.02l-.105-.034l-.1-.044l-.076-.042l-.108-.077l-.081-.074l-.073-.083l-.053-.075l-.065-.115l-.042-.106l-.031-.113l-.013-.075l-.009-.11l.004-.113l.005-.044l.02-.11l.022-.072l1.15-3.451l-.022-.036C.969 12.45 1.97 7.805 5.59 5.079l.23-.168z"/></g>'},Vt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 2a5 5 0 1 1-5 5l.005-.217A5 5 0 0 1 12 2zm2 12a5 5 0 0 1 5 5v1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-1a5 5 0 0 1 5-5h4z"/></g>'},Gt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34zM12 6a1 1 0 0 0-1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1-.866-.398l-.068-.101a1 1 0 0 0-1.732.998a3 3 0 0 0 2.505 1.5H11a1 1 0 0 0 .883.994L12 18a1 1 0 0 0 1-1l.176-.005A3 3 0 0 0 13 11V9c.358-.012.671.14.866.398l.068.101a1 1 0 0 0 1.732-.998A3 3 0 0 0 13.161 7H13a1 1 0 0 0-1-1zm1 7a1 1 0 0 1 0 2v-2zm-2-4v2a1 1 0 0 1 0-2z"/></g>'},Qt={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-5.5 8.28"/></g>'},Kt={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 10l-4 4l6 6l4-16l-18 7l4 2l2 6l3-4"/>'},ye={comment:{icon:Ft,bgColor:"rgba(239, 246, 255, 1)",color:"rgba(43, 127, 255, 1)"},like:{icon:"👍",bgColor:"rgba(244, 244, 245, 1)",color:"yellow",renderType:"emoji"},follow:{icon:Vt,bgColor:"rgba(238, 242, 255, 1)",color:"rgba(97, 95, 255, 1)"},tips:{icon:Gt,bgColor:"rgba(254, 252, 232, 1)",color:"rgba(240, 177, 0, 1)"},mention:{icon:Qt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"},assign:{icon:Kt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"}};fe.propTypes={activity:i.oneOf(["comment","like","follow","tips","mention","assign"]).isRequired,size:i.number};fe.defaultProps={size:32};function fe({activity:e,size:r=32}){const s=ye[e]||ye.comment,n=s.icon;return t.jsx(U,{sx:{bgcolor:s.bgColor,color:s.color,width:r,height:r},children:s.renderType==="emoji"?t.jsx("span",{style:{fontSize:"14px"},children:n}):t.jsx(Re,{icon:n})})}const Z={avatar:i.string,fullName:i.string,did:i.string};function V({actor:e,size:r,teamDid:s,inService:n,showName:o}){const a=e!=null&&e.avatar?yt(e.avatar,s,n):null,l=c=>{e&&(c.stopPropagation(),window.open(ht(G(rt.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),"_blank"),c.customPreventRedirect=!0)};return t.jsxs(p,{display:"flex",alignItems:"center",gap:1,onClick:l,role:"button",style:{cursor:"pointer"},title:(e==null?void 0:e.fullName)||"",children:[a?t.jsx(U,{alt:(e==null?void 0:e.fullName)||"",src:`${a}?imageFilter=resize&w=${r*1.5}&h=${r*1.5}`,size:r,did:e==null?void 0:e.did,shape:"circle",sx:{width:r,height:r,borderRadius:"100%",overflow:"hidden",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.1)"}}}):t.jsx(U,{sx:{width:r,height:r}}),o&&t.jsx("span",{children:e==null?void 0:e.fullName})]})}V.propTypes={actor:i.shape(Z).isRequired,size:i.number.isRequired,teamDid:i.string,inService:i.bool,showName:i.bool};V.defaultProps={teamDid:"",inService:!1,showName:!1};Q.propTypes={actors:i.oneOfType([i.shape(Z),i.arrayOf(i.shape(Z))]).isRequired,size:i.number,maxDisplay:i.number,teamDid:i.string,inService:i.bool,showName:i.bool};Q.defaultProps={size:32,maxDisplay:9,teamDid:"",inService:!0,showName:!1};function Q({actors:e,size:r=32,maxDisplay:s=9,teamDid:n="",inService:o=!0,showName:a=!1}){const l=L(()=>{const c=Array.isArray(e)?e:[e];return pt(c,"did").filter(Boolean)},[e]);return l.length===1||!l.length?t.jsx(V,{actor:l[0],size:r,teamDid:n,inService:o,showName:a}):t.jsx(Xe,{total:l.length,renderSurplus:c=>c<100?t.jsxs("span",{children:["+",c]}):t.jsx("span",{children:"99+"}),max:s,sx:{justifyContent:"flex-end",height:`${r}px`,".MuiAvatar-root":{width:`${r}px`,height:`${r}px`,fontSize:`${r/2.5}px`,border:0,zIndex:2}},children:l.map((c,v)=>t.jsx(V,{actor:c,size:r,teamDid:n,inService:o},(c==null?void 0:c.did)||v))})}const ve=3;Be.propTypes={notification:i.object.isRequired,isMultiple:i.bool,blocklet:i.object,mountPoint:i.string};qe.propTypes={notification:i.object.isRequired,mountPoint:i.string};We.propTypes={items:i.array.isRequired,activity:i.object.isRequired,blocklet:i.object,mountPoint:i.string,viewMoreLink:i.string};function qe({notification:e,mountPoint:r=""}){var l;const{activity:s}=e,{type:n,meta:o={}}=s||{},a=Ce({activity:s,users:[e==null?void 0:e.actorInfo],actors:[(l=e==null?void 0:e.activity)==null?void 0:l.actor],mountPoint:r});return A(s)||!s.type||!s.actor||A(s.target)?null:t.jsxs(p,{children:[t.jsx(T,{variant:"body1",color:H.textBase,sx:{mb:.5},children:a}),t.jsx($e,{meta:o,type:n})]})}function We({items:e,activity:r,blocklet:s,mountPoint:n="",viewMoreLink:o=""}){const a=te(),l=L(()=>{var d;return(s==null?void 0:s.did)||((d=s==null?void 0:s.meta)==null?void 0:d.did)||""},[s]),{locale:c}=u.useContext(ne),v=L(()=>!A(r.meta)&&Object.values(r.meta).some(d=>d!=null),[r]),j=Ce({activity:r,users:e.map(d=>d==null?void 0:d.actorInfo),actors:e.map(d=>{var x;return(x=d==null?void 0:d.activity)==null?void 0:x.actor}),mountPoint:n}),m=Y(d=>{if(!d.activity)return null;const x=se(d.activity);return x!=null&&x.metaLink?G(n,x.metaLink):null}),R=Y((d,x)=>{if(d.stopPropagation(),!x)return;const h=m(x);h&&(window.open(h,"_blank"),d.customPreventRedirect=!0)}),y=e.length>ve,S=e.slice(0,ve);return t.jsxs(p,{sx:{width:"100%"},children:[t.jsx(T,{variant:"body1",color:H.textBase,sx:{mb:3},children:j}),v?t.jsxs(p,{className:"sub-content",display:"flex",flexDirection:"column",gap:3,children:[S.map(d=>{var x;return t.jsxs(p,{display:"flex",flexDirection:"column",gap:1,onClick:h=>R(h,d),children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(Q,{actors:d.actorInfo,size:32,teamDid:l}),t.jsx(T,{variant:"subtitle1",color:H.textBase,children:(x=d==null?void 0:d.actorInfo)==null?void 0:x.fullName})," ","·",t.jsx(Se,{value:d.createdAt,locale:c,shouldUpdate:!0,style:{color:a.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),t.jsx(p,{pl:5,children:t.jsx($e,{meta:d.activity.meta,type:d.activity.type})})]},d.id)}),y&&o?t.jsx(p,{mt:1,display:"flex",justifyContent:"center",children:t.jsxs(Ye,{size:"large",variant:"text",component:J,href:o,target:"_blank",rel:"noopener noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:["View More ",t.jsx(Re,{icon:at,style:{marginLeft:4}})]})}):null]}):null]})}function Be({notification:e,isMultiple:r=!1,blocklet:s,mountPoint:n=""}){const o=L(()=>{if(!e.activity)return null;const a=se(e.activity);return a!=null&&a.targetLink?G(n,a.targetLink):null},[e.activity,n]);return r?t.jsx(We,{items:e.items,activity:e.activity,blocklet:s,mountPoint:n,viewMoreLink:o}):t.jsx(qe,{notification:e,mountPoint:n})}const Xt=Ze(p)`
112
121
  display: flex;
113
122
  justify-content: center;
114
123
  align-items: center;
@@ -119,7 +128,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
119
128
  .empty-icon {
120
129
  margin: 10px 0;
121
130
  }
122
- `;function fe({color:e,children:r,...s}){const n=xt();return t.jsxs(Kt,{...s,children:[t.jsx("img",{src:`${n.imgPrefix}/all-done.png`,alt:"All Done",style:{maxHeight:"100%",maxWidth:"100%"},onError:o=>{o.target.style.display="none"}}),t.jsx(p,{className:"empty-content",children:r})]})}fe.propTypes={color:i.string,children:i.any};fe.defaultProps={color:"inherit",children:null};Xt.propTypes={data:i.array,blockletMap:i.object,onReadNotification:i.func,onReadBatch:i.func,inDialog:i.bool,highlightId:i.string,highlight:i.bool,type:i.oneOf(["server","service"])};Oe.propTypes={notification:i.object,blocklet:i.object,onReadNotification:i.func,inDialog:i.bool,highlight:i.bool};Ue.propTypes={blocklet:i.object,size:i.number,showName:i.bool,hideDot:i.bool};function Ue({blocklet:e,size:r=40,showName:s=!1,hideDot:n=!1}){var l,c;const o=(e==null?void 0:e.did)||((l=e==null?void 0:e.meta)==null?void 0:l.did)||"",a=((e==null?void 0:e.alsoKnownAs)||[]).concat((e==null?void 0:e.appId)||(e==null?void 0:e.appDid)||(e==null?void 0:e.appPid)||"");return t.jsxs(p,{className:"component-avatar",display:"flex",alignItems:"center",sx:{gap:n?"8px":"4px"},children:[!n&&t.jsx("span",{className:"dot"}),e?t.jsx(p,{children:a.includes(o)?t.jsx(dt,{blocklet:e,size:r,style:{borderRadius:8}}):t.jsx(it,{blocklet:e,ancestors:e.ancestors??[],size:r,style:{borderRadius:8}})}):t.jsx(st,{width:r,height:r}),s&&t.jsx("span",{className:"component-name",children:(c=e==null?void 0:e.meta)==null?void 0:c.title})]})}function Oe({notification:e,blocklet:r,onReadNotification:s=()=>{},inDialog:n=!1,highlight:o}){const{locale:a}=u.useContext(ne),l=te(),c=_(g=>g.breakpoints.down("md")),v=u.useRef(null),j=u.useMemo(()=>Pt(e),[e]),f=u.useMemo(()=>ct(e),[e]),k=u.useMemo(()=>{const{actions:g,action:w}=e;let C=g??[];return!C.length&&w&&(C=[{name:"Visit",link:w}]),C},[e]),y=u.useMemo(()=>e.items||[],[e]),$=u.useMemo(()=>y.length>0,[y]),d=u.useMemo(()=>f?$?y.map(g=>g.actorInfo).filter(Boolean):e.actorInfo??[]:[],[y,e.actorInfo,$,f]),x=u.useMemo(()=>{var g;return(r==null?void 0:r.did)||((g=r==null?void 0:r.meta)==null?void 0:g.did)||""},[r]),h=u.useMemo(()=>Tt(x,window.blocklet),[x]),b=Y((g,w)=>{if(j||s(g),w&&!w.customPreventRedirect){const C=It(g,h);C&&typeof C=="string"&&window.open(C,"_blank","noopener,noreferrer")}});return t.jsxs(Yt,{ref:v,className:"notification-row",id:e.id,isRead:j,inDialog:n,highlight:o,isMd:c,onClick:g=>b(e,g),children:[f?t.jsx(me,{activity:e.activity.type,size:c?24:32}):t.jsx(he,{severity:e.severity,size:c?24:32}),t.jsxs(p,{className:"notification",display:"flex",flexDirection:"column",alignItems:"start",children:[t.jsxs(p,{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,className:"header",mb:1.5,children:[f?t.jsx(Q,{actors:d,teamDid:x,size:c?24:32}):t.jsx(Ue,{blocklet:r,hideDot:!0,size:c?24:32}),t.jsx(Me,{value:e.createdAt,locale:a,shouldUpdate:!0,style:{color:l.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),f?t.jsx(Be,{notification:e,isMultiple:$,blocklet:r,mountPoint:h}):t.jsxs(t.Fragment,{children:[t.jsx(T,{variant:"body1",className:"title",color:"rgba(24, 24, 27, 1)",sx:{mb:.5},children:e.title}),t.jsx(Dt,{notification:e,rows:n?0:2})]}),k.length>0?t.jsx(p,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,mt:1.5,children:k.map((g,w)=>t.jsxs(u.Fragment,{children:[t.jsx(J,{href:g.link,target:"_blank",className:"link",rel:"noopener noreferrer",sx:{fontSize:"15px"},onClick:C=>{C.customPreventRedirect=!0},children:g.name},g.link),w<k.length-1?t.jsx(ee,{orientation:"vertical",sx:{ml:1,mr:1,height:12,borderWidth:"1px"}}):null]},g.link))}):null]}),(e==null?void 0:e.description)&&e.severity==="error"&&t.jsx(p,{className:"copy-button",children:t.jsx(Je,{size:"small",children:t.jsx(nt,{sx:{fontSize:22},content:(e==null?void 0:e.description)||""})})})]})}function Xt({data:e,blockletMap:r,onReadNotification:s=()=>{},onReadBatch:n=()=>{},inDialog:o=!1,highlightId:a,highlight:l=!1,type:c="service"}){const{t:v}=we(),j=u.useRef(null),[f,k]=u.useState(!1),[y,$]=u.useState(!0),[d,x]=u.useState(!1),h=u.useRef(new Set),b=u.useRef(new Set),g=u.useRef(null),w=u.useRef(null),C=u.useRef(!1),K=u.useMemo(()=>o?e==null?void 0:e.slice(0,5):e,[o,e]),I=u.useMemo(()=>lt(K),[K]),q=u.useMemo(()=>{const m=new Map;return I&&I.length&&I.forEach(R=>{m.set(R.id,R)}),m},[I]);u.useEffect(()=>{const m=()=>{$(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}},[]);const B=u.useCallback(()=>{if(!o&&h.current.size>0){const m=[];h.current.forEach(R=>{if(b.current.has(R))return;const M=q.get(R);if(M){const{receivers:z=[],items:N=[]}=M;if(z.length&&!z[0].read&&(ge(M)&&(m.push(R),b.current.add(R)),N.length>0&&N.forEach(S=>{const P=S.id;P&&ge(S)&&!b.current.has(P)&&(m.push(P),b.current.add(P))}),w.current)){const S=document.getElementById(R);S&&w.current.unobserve(S)}}}),m.length>0&&(n(m),setTimeout(()=>{k(!1)},300)),h.current.clear()}},[o,q,n]),D=u.useCallback(()=>{if(o||!j.current||!y)return;w.current&&w.current.disconnect();const m={root:null,rootMargin:"0px",threshold:.5},R=new IntersectionObserver(z=>{f&&z.forEach(N=>{const S=N.target.id;if(b.current.has(S))return;const P=q.get(S);if(P){const{receivers:xe=[]}=P;xe.length&&!xe[0].read&&(N.isIntersecting?(h.current.add(S),d||B()):h.current.delete(S))}})},m);w.current=R,Array.from(j.current.querySelectorAll(".notification-row")).filter(z=>{const N=z.id;if(b.current.has(N))return!1;const S=q.get(N);if(S){const{receivers:P=[]}=S;return P.length&&!P[0].read}return!1}).forEach(z=>{R.observe(z)}),C.current=!1},[f,o,d,y,q,B]);return u.useEffect(()=>{o||(C.current=!0,w.current&&y&&f&&setTimeout(()=>{D()},0))},[K,f,y,D,o]),u.useEffect(()=>{if(o||!j.current||!y)return;let m=window;if(c==="server"&&(m=document.getElementById("arc__dashboard-main")),!m){const M=document.getElementsByClassName("dashboard-main")[0];M&&(m=M)}if(!m)return;const R=M=>{M.isTrusted&&(f||k(!0),x(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{x(!1),B(),C.current&&D()},300))};return m.addEventListener("scroll",R,{passive:!0}),()=>{m.removeEventListener("scroll",R),g.current&&clearTimeout(g.current)}},[o,f,y,B,D,c]),u.useEffect(()=>(o||D(),()=>{w.current&&w.current.disconnect()}),[D,o]),I!=null&&I.length?t.jsx(p,{ref:j,display:"flex",flexDirection:"column",sx:{...o?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:I==null?void 0:I.map(m=>{var M;const R=m.source==="system"?r.get(m.entityId||m.sender):r.get(m.componentDid||m.sender);return((M=m==null?void 0:m.type)==null?void 0:M.toLowerCase())==="passthrough"?null:t.jsx(Oe,{highlight:l&&a===m.id,inDialog:o,notification:m,blocklet:R,onReadNotification:()=>s(m)},m.id)})}):t.jsx(fe,{children:v("notification.allDone")})}const Yt=H("div")`
131
+ `;function me({color:e,children:r,...s}){const n=vt();return t.jsxs(Xt,{...s,children:[t.jsx("img",{src:`${n.imgPrefix}/all-done.png`,alt:"All Done",style:{maxHeight:"100%",maxWidth:"100%"},onError:o=>{o.target.style.display="none"}}),t.jsx(p,{className:"empty-content",children:r})]})}me.propTypes={color:i.string,children:i.any};me.defaultProps={color:"inherit",children:null};Yt.propTypes={data:i.array,blockletMap:i.object,onReadNotification:i.func,onReadBatch:i.func,inDialog:i.bool,highlightId:i.string,highlight:i.bool,type:i.oneOf(["server","service"])};Oe.propTypes={notification:i.object,blocklet:i.object,onReadNotification:i.func,inDialog:i.bool,highlight:i.bool};Ue.propTypes={blocklet:i.object,size:i.number,showName:i.bool,hideDot:i.bool};function Ue({blocklet:e,size:r=40,showName:s=!1,hideDot:n=!1}){var l,c;const o=(e==null?void 0:e.did)||((l=e==null?void 0:e.meta)==null?void 0:l.did)||"",a=((e==null?void 0:e.alsoKnownAs)||[]).concat((e==null?void 0:e.appId)||(e==null?void 0:e.appDid)||(e==null?void 0:e.appPid)||"");return t.jsxs(p,{className:"component-avatar",display:"flex",alignItems:"center",sx:{gap:n?"8px":"4px"},children:[!n&&t.jsx("span",{className:"dot"}),e?t.jsx(p,{children:a.includes(o)?t.jsx(dt,{blocklet:e,size:r,style:{borderRadius:8}}):t.jsx(it,{blocklet:e,ancestors:e.ancestors??[],size:r,style:{borderRadius:8}})}):t.jsx(st,{width:r,height:r}),s&&t.jsx("span",{className:"component-name",children:(c=e==null?void 0:e.meta)==null?void 0:c.title})]})}function Oe({notification:e,blocklet:r,onReadNotification:s=()=>{},inDialog:n=!1,highlight:o}){const{locale:a}=u.useContext(ne),l=te(),c=E(g=>g.breakpoints.down("md")),v=u.useRef(null),j=u.useMemo(()=>zt(e),[e]),m=u.useMemo(()=>ct(e),[e]),R=u.useMemo(()=>{const{actions:g,action:w}=e;let C=g??[];return!C.length&&w&&(C=[{name:"Visit",link:w}]),C},[e]),y=u.useMemo(()=>e.items||[],[e]),S=u.useMemo(()=>y.length>0,[y]),d=u.useMemo(()=>m?S?y.map(g=>g.actorInfo).filter(Boolean):e.actorInfo??[]:[],[y,e.actorInfo,S,m]),x=u.useMemo(()=>{var g;return(r==null?void 0:r.did)||((g=r==null?void 0:r.meta)==null?void 0:g.did)||""},[r]),h=u.useMemo(()=>It(x,window.blocklet),[x]),b=Y((g,w)=>{if(j||s(g),w&&!w.customPreventRedirect){const C=Pt(g,h);C&&typeof C=="string"&&window.open(C,"_blank","noopener,noreferrer")}});return t.jsxs(Zt,{ref:v,className:"notification-row",id:e.id,isRead:j,inDialog:n,highlight:o,isMd:c,onClick:g=>b(e,g),children:[m?t.jsx(fe,{activity:e.activity.type,size:c?24:32}):t.jsx(he,{severity:e.severity,size:c?24:32}),t.jsxs(p,{className:"notification",display:"flex",flexDirection:"column",alignItems:"start",children:[t.jsxs(p,{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,className:"header",mb:1.5,children:[m?t.jsx(Q,{actors:d,teamDid:x,size:c?24:32}):t.jsx(Ue,{blocklet:r,hideDot:!0,size:c?24:32}),t.jsx(Se,{value:e.createdAt,locale:a,shouldUpdate:!0,style:{color:l.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),m?t.jsx(Be,{notification:e,isMultiple:S,blocklet:r,mountPoint:h}):t.jsxs(t.Fragment,{children:[t.jsx(T,{variant:"body1",className:"title",color:"rgba(24, 24, 27, 1)",sx:{mb:.5},children:e.title}),t.jsx(_t,{notification:e,rows:n?0:2})]}),R.length>0?t.jsx(p,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,mt:1.5,children:R.map((g,w)=>t.jsxs(u.Fragment,{children:[t.jsx(J,{href:g.link,target:"_blank",className:"link",rel:"noopener noreferrer",sx:{fontSize:"15px"},onClick:C=>{C.customPreventRedirect=!0},children:g.name},g.link),w<R.length-1?t.jsx(ee,{orientation:"vertical",sx:{ml:1,mr:1,height:12,borderWidth:"1px"}}):null]},g.link))}):null]}),(e==null?void 0:e.description)&&e.severity==="error"&&t.jsx(p,{className:"copy-button",children:t.jsx(Je,{size:"small",children:t.jsx(nt,{sx:{fontSize:22},content:(e==null?void 0:e.description)||""})})})]})}function Yt({data:e,blockletMap:r,onReadNotification:s=()=>{},onReadBatch:n=()=>{},inDialog:o=!1,highlightId:a,highlight:l=!1,type:c="service"}){const{t:v}=we(),j=u.useRef(null),[m,R]=u.useState(!1),[y,S]=u.useState(!0),[d,x]=u.useState(!1),h=u.useRef(new Set),b=u.useRef(new Set),g=u.useRef(null),w=u.useRef(null),C=u.useRef(!1),K=u.useMemo(()=>o?e==null?void 0:e.slice(0,5):e,[o,e]),I=u.useMemo(()=>lt(K),[K]),q=u.useMemo(()=>{const f=new Map;return I&&I.length&&I.forEach(k=>{f.set(k.id,k)}),f},[I]);u.useEffect(()=>{const f=()=>{S(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f)}},[]);const B=u.useCallback(()=>{if(!o&&h.current.size>0){const f=[];h.current.forEach(k=>{if(b.current.has(k))return;const M=q.get(k);if(M){const{receivers:z=[],items:N=[]}=M;if(z.length&&!z[0].read&&(ge(M)&&(f.push(k),b.current.add(k)),N.length>0&&N.forEach($=>{const P=$.id;P&&ge($)&&!b.current.has(P)&&(f.push(P),b.current.add(P))}),w.current)){const $=document.getElementById(k);$&&w.current.unobserve($)}}}),f.length>0&&(n(f),setTimeout(()=>{R(!1)},300)),h.current.clear()}},[o,q,n]),_=u.useCallback(()=>{if(o||!j.current||!y)return;w.current&&w.current.disconnect();const f={root:null,rootMargin:"0px",threshold:.5},k=new IntersectionObserver(z=>{m&&z.forEach(N=>{const $=N.target.id;if(b.current.has($))return;const P=q.get($);if(P){const{receivers:xe=[]}=P;xe.length&&!xe[0].read&&(N.isIntersecting?(h.current.add($),d||B()):h.current.delete($))}})},f);w.current=k,Array.from(j.current.querySelectorAll(".notification-row")).filter(z=>{const N=z.id;if(b.current.has(N))return!1;const $=q.get(N);if($){const{receivers:P=[]}=$;return P.length&&!P[0].read}return!1}).forEach(z=>{k.observe(z)}),C.current=!1},[m,o,d,y,q,B]);return u.useEffect(()=>{o||(C.current=!0,w.current&&y&&m&&setTimeout(()=>{_()},0))},[K,m,y,_,o]),u.useEffect(()=>{if(o||!j.current||!y)return;let f=window;if(c==="server"&&(f=document.getElementById("arc__dashboard-main")),!f){const M=document.getElementsByClassName("dashboard-main")[0];M&&(f=M)}if(!f)return;const k=M=>{M.isTrusted&&(m||R(!0),x(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{x(!1),B(),C.current&&_()},300))};return f.addEventListener("scroll",k,{passive:!0}),()=>{f.removeEventListener("scroll",k),g.current&&clearTimeout(g.current)}},[o,m,y,B,_,c]),u.useEffect(()=>(o||_(),()=>{w.current&&w.current.disconnect()}),[_,o]),I!=null&&I.length?t.jsx(p,{ref:j,display:"flex",flexDirection:"column",sx:{...o?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:I==null?void 0:I.map(f=>{var M;const k=f.source==="system"?r.get(f.entityId||f.sender):r.get(f.componentDid||f.sender);return((M=f==null?void 0:f.type)==null?void 0:M.toLowerCase())==="passthrough"?null:t.jsx(Oe,{highlight:l&&a===f.id,inDialog:o,notification:f,blocklet:k,onReadNotification:()=>s(f)},f.id)})}):t.jsx(me,{children:v("notification.allDone")})}const Zt=D("div")`
123
132
  @keyframes flash-bg {
124
133
  0% {
125
134
  background-color: ${e=>e.theme.palette.warning.light};
@@ -136,7 +145,7 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
136
145
  cursor: pointer;
137
146
  animation: ${e=>e.highlight?"flash-bg 3s ease-out 0s 1 normal none running":"none"};
138
147
  background-color: ${e=>e.isRead?"transparent":e.theme.palette.primary.lightest||"rgba(239, 246, 255, 0.5)"};
139
- border-bottom: 1px solid ${E.dividerColor};
148
+ border-bottom: 1px solid ${H.dividerColor};
140
149
  &:last-child {
141
150
  border-bottom: none;
142
151
  }
@@ -209,4 +218,4 @@ import{r as u}from"./vendor-react-DoD83n6N.js";import{E as i,j as t,ai as J,a4 a
209
218
  text-decoration: none;
210
219
  }
211
220
  }
212
- `;export{Q as A,Xt as N,Ue as S,Be as a,Dt as b,Pt as c};
221
+ `;export{Q as A,Yt as N,Ue as S,Be as a,_t as b,zt as c};
@@ -1 +1 @@
1
- import"./vendor-react-DoD83n6N.js";import{s as d,v as h,j as e,a4 as a,ae as t,E as o}from"./vendor-mui-core-C-PhacC8.js";const l=d(h)(({theme:r})=>({"& .header-row":{display:"flex",justifyContent:"space-between",alignItems:"center",gap:r.spacing(1)},"& .right":{display:"flex",alignItems:"center",gap:r.spacing(1.5)},"& .tabs":{marginTop:r.spacing(2),"& .MuiButton-root":{border:"none",color:"#999","&.active":{color:"#222"}}},"@media (max-width: 900px)":{"& .header-row":{flexDirection:"column",alignItems:"flex-start"},"& .right":{flexDirection:"column",width:"100%",".search-always-open, .toolbar-btn-show, a, button, .MuiButtonGroup-root":{width:"100% !important"}}}}));function c({left:r,tabs:s,actions:n,...i}){return!r&&!s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left"}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):r&&!s||!r&&s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r||s}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):e.jsxs(l,{elevation:0,...i,children:[e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r}),e.jsx(t,{direction:"row",className:"right",children:n})]}),s&&e.jsx(a,{mt:2,children:s})]})}c.propTypes={left:o.node,tabs:o.node,actions:o.node};c.defaultProps={left:null,tabs:null,actions:null};export{c as L};
1
+ import"./vendor-react-DEoibe3W.js";import{s as d,v as h,j as e,a4 as a,ae as t,E as o}from"./vendor-mui-core-1jJmAutq.js";const l=d(h)(({theme:r})=>({"& .header-row":{display:"flex",justifyContent:"space-between",alignItems:"center",gap:r.spacing(1)},"& .right":{display:"flex",alignItems:"center",gap:r.spacing(1.5)},"& .tabs":{marginTop:r.spacing(2),"& .MuiButton-root":{border:"none",color:"#999","&.active":{color:"#222"}}},"@media (max-width: 900px)":{"& .header-row":{flexDirection:"column",alignItems:"flex-start"},"& .right":{flexDirection:"column",width:"100%",".search-always-open, .toolbar-btn-show, a, button, .MuiButtonGroup-root":{width:"100% !important"}}}}));function c({left:r,tabs:s,actions:n,...i}){return!r&&!s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left"}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):r&&!s||!r&&s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r||s}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):e.jsxs(l,{elevation:0,...i,children:[e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r}),e.jsx(t,{direction:"row",className:"right",children:n})]}),s&&e.jsx(a,{mt:2,children:s})]})}c.propTypes={left:o.node,tabs:o.node,actions:o.node};c.defaultProps={left:null,tabs:null,actions:null};export{c as L};
@@ -0,0 +1 @@
1
+ import{j as o}from"./vendor-mui-core-1jJmAutq.js";import"./vendor-react-DEoibe3W.js";import{S as t}from"./studio-BYzuzhpL.js";import"./vendor-ux-did-connect-DlrX4cqq.js";import"./vendor-utils-Cm2BKG2b.js";import"./vendor-hooks-8r-lvvPs.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CD8CMsgQ.js";import"./TuneOutlined-EaV8HxdX.js";function d(){return o.jsx(t,{children:"Coming soon..."})}export{d as default};