@abtnode/blocklet-services 1.16.43-beta-20250427-232837-e671de06 → 1.16.43-beta-20250430-124448-4edc5502

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 (303) hide show
  1. package/api/emails/_components/layout.js +2 -2
  2. package/api/emails/_libs/style.js +8 -3
  3. package/api/emails/_templates/kyc-code-verify.js +43 -0
  4. package/api/emails/_templates/new-user-session.js +2 -6
  5. package/api/emails/_templates/notification.js +2 -6
  6. package/api/emails/_templates/verify-code-body.js +4 -1
  7. package/api/emails/_templates/verify-code.js +2 -6
  8. package/api/index.js +31 -2
  9. package/api/libs/connect/session.js +4 -2
  10. package/api/libs/email.js +16 -0
  11. package/api/middlewares/ensure-blocklet.js +1 -1
  12. package/api/routes/blocklet.js +26 -17
  13. package/api/routes/ocap.js +1 -1
  14. package/api/routes/user-session.js +4 -2
  15. package/api/routes/user.js +1 -1
  16. package/api/services/auth/session.js +15 -10
  17. package/api/services/kyc/index.js +5 -11
  18. package/dist/assets/{AdapterDayjs-BUGplkxR.js → AdapterDayjs-BWhMsmQP.js} +1 -1
  19. package/dist/assets/{ArrowDropDown-B0sLkJoY.js → ArrowDropDown-DUCtp8oo.js} +1 -1
  20. package/dist/assets/{CheckCircle-BNrN9mgy.js → CheckCircle-yKW43XdV.js} +1 -1
  21. package/dist/assets/{ChevronLeft-Dq00IS01.js → ChevronLeft-6AvuBihM.js} +1 -1
  22. package/dist/assets/{ChevronRight-ZTqWK-Ga.js → ChevronRight-BsdsjNxw.js} +1 -1
  23. package/dist/assets/{Community-DZCTPNMP.js → Community-DathqRsd.js} +1 -1
  24. package/dist/assets/{DeleteOutline-C2sY6hfm.js → DeleteOutline-D_I07sPe.js} +1 -1
  25. package/dist/assets/{Done-JLiLhELm.js → Done-DLTvHdZB.js} +1 -1
  26. package/dist/assets/{Download-Ch4RfGRW.js → Download-DKz_gZX5.js} +1 -1
  27. package/dist/assets/{Edit-CY6fFHQM.js → Edit-odNPT5GK.js} +1 -1
  28. package/dist/assets/{EditIcon-Bi2cR-_u.js → EditIcon-DWRQ3fi6.js} +1 -1
  29. package/dist/assets/{Email-Dz2Eyqu0.js → Email-B0n6rLUZ.js} +1 -1
  30. package/dist/assets/{Error-CSFUqG0m.js → Error-js7ePZ5o.js} +1 -1
  31. package/dist/assets/{ExpandLess-BiMmSOBl.js → ExpandLess-TUium4RQ.js} +1 -1
  32. package/dist/assets/{Google-GOp5YvmZ.js → Google-C7d25Q5r.js} +1 -1
  33. package/dist/assets/{Holiday-Lc6woG1j.js → Holiday-BkY6LMfd.js} +1 -1
  34. package/dist/assets/{InfoOutlined-CQB5qKm-.js → InfoOutlined-BjII93aR.js} +1 -1
  35. package/dist/assets/{Launch-fxgQvk19.js → Launch-ryL3I8d9.js} +1 -1
  36. package/dist/assets/{LaunchOutlined-BV4_W1pb.js → LaunchOutlined-D21Xchdf.js} +1 -1
  37. package/dist/assets/{Location-B8EOY3d0.js → Location-BQhEvGNL.js} +1 -1
  38. package/dist/assets/{LockIcon-fuTfhB_G.js → LockIcon-Bd69pSJI.js} +1 -1
  39. package/dist/assets/{Meeting-Epdyx36z.js → Meeting-BW-_XtSL.js} +1 -1
  40. package/dist/assets/{MoreHoriz-CX_pwfPT.js → MoreHoriz-DHyMdwpT.js} +1 -1
  41. package/dist/assets/{OffSick-VYgugWxu.js → OffSick-9I8vBA8l.js} +1 -1
  42. package/dist/assets/{Phone-KP65huHK.js → Phone-CKzC4712.js} +1 -1
  43. package/dist/assets/{PlayArrow-DFH1Psjx.js → PlayArrow-zDVVYX6u.js} +1 -1
  44. package/dist/assets/{QuestionMarkCircle-p6m3avKp.js → QuestionMarkCircle-DpFFQWud.js} +1 -1
  45. package/dist/assets/{ServerLogo-Bssx1Eou.js → ServerLogo-AfxVBRdi.js} +1 -1
  46. package/dist/assets/{Timezone-Ce4E1Xey.js → Timezone-C3hiNX6j.js} +1 -1
  47. package/dist/assets/{TuneOutlined-Dy2qPFGI.js → TuneOutlined-Bv7cSbWT.js} +1 -1
  48. package/dist/assets/{ViewList-e3CoNi3K.js → ViewList-Ca1IEB31.js} +1 -1
  49. package/dist/assets/{WorkingRemotely-CXFJ6pz8.js → WorkingRemotely-CHzRY2CT.js} +1 -1
  50. package/dist/assets/access-control-CwSjARsN.js +14 -0
  51. package/dist/assets/{actions-DA-6s_nQ.js → actions-BW0Vx00_.js} +1 -1
  52. package/dist/assets/{add-component-core-DG9mQFsr.js → add-component-core-DXp_ntZ3.js} +43 -37
  53. package/dist/assets/add-resource-CmPIp37F.js +1 -0
  54. package/dist/assets/{addon-Bcc-Xwbf.js → addon-FArG2oUy.js} +1 -1
  55. package/dist/assets/{advanced-DTe2fs5L.js → advanced-mJXTlRFz.js} +2 -2
  56. package/dist/assets/api-Bf1onQOz.js +1 -0
  57. package/dist/assets/appearance-D9WrcbPF.js +1 -0
  58. package/dist/assets/ar-BRKjvO8p.js +1 -0
  59. package/dist/assets/ar-Duy7ZH--.js +7 -0
  60. package/dist/assets/audit-logs-CVUuBgdy.js +35 -0
  61. package/dist/assets/{authorize-DUyL7MEU.js → authorize-Bk0sIDAH.js} +1 -1
  62. package/dist/assets/{base32-p9VcJrwv.js → base32-C_EKY5vU.js} +1 -1
  63. package/dist/assets/{branding-_VO2ZZ3t.js → branding-BoSHL25b.js} +2 -2
  64. package/dist/assets/branding-Cywl-fod.js +54 -0
  65. package/dist/assets/bundle-avatar-BXQsJw7m.js +1 -0
  66. package/dist/assets/button-h00yLUET.js +1 -0
  67. package/dist/assets/{click-to-copy-BGyXQL2i.js → click-to-copy-0s0a7Ak5.js} +1 -1
  68. package/dist/assets/cloneDeep-WT_kDeVd.js +1 -0
  69. package/dist/assets/complete--raviZZ4.js +45 -0
  70. package/dist/assets/{component-5gjaNHCg.js → component-C3maTG8x.js} +82 -75
  71. package/dist/assets/config-Die5cVWR.js +32 -0
  72. package/dist/assets/{config-Bh19ZUJ-.js → config-e3P85n7z.js} +1 -1
  73. package/dist/assets/{config-navigation-Dvjz9nAh.js → config-navigation-DhvlW96p.js} +6 -6
  74. package/dist/assets/config-space-CHI2AzS5.js +1 -0
  75. package/dist/assets/{confirm-DqvNmeoz.js → confirm-BqrhdaU7.js} +2 -2
  76. package/dist/assets/connect-DGOqnhoS.js +5 -0
  77. package/dist/assets/connect-cpTXz6hq.js +1 -0
  78. package/dist/assets/connect-to-C1xSYa-8.js +1 -0
  79. package/dist/assets/{content-layout-BPaAeaMQ.js → content-layout-C3Yd4mK9.js} +1 -1
  80. package/dist/assets/dashboard-CvJ8cVy-.js +280 -0
  81. package/dist/assets/de-D3cg0t9f.js +1 -0
  82. package/dist/assets/de-jJ-wrtW1.js +7 -0
  83. package/dist/assets/{delete-confirm-_BzUlhv2.js → delete-confirm-CmXluMcs.js} +1 -1
  84. package/dist/assets/did-address-C6ni99I7.js +1 -0
  85. package/dist/assets/{domain-ag7_Ivc1.js → domain-B7m2mZGp.js} +1 -1
  86. package/dist/assets/domain-action-card-DIGUxqW7.js +24 -0
  87. package/dist/assets/domains-DV-Gl3-a.js +1 -0
  88. package/dist/assets/{dot-BE1YP292.js → dot-WAAJ-O65.js} +2 -2
  89. package/dist/assets/{email-DKpgximx.js → email-CxndZMem.js} +2 -2
  90. package/dist/assets/{empty-spinner-DmDm8XzF.js → empty-spinner-BYUFR95o.js} +1 -1
  91. package/dist/assets/es-CoGP0eAj.js +7 -0
  92. package/dist/assets/es-DPjqApVE.js +1 -0
  93. package/dist/assets/exchange-passport-JjK-mItt.js +1 -0
  94. package/dist/assets/fr-Dscs9WsP.js +1 -0
  95. package/dist/assets/fr-yctlgsrj.js +7 -0
  96. package/dist/assets/{fuel-CcBzY6Bt.js → fuel-bktBZZhG.js} +1 -1
  97. package/dist/assets/{gen-access-key-DxKwgiGT.js → gen-access-key-CPCwDcVa.js} +1 -1
  98. package/dist/assets/get-safe-url-C-CJKtkC.js +1 -0
  99. package/dist/assets/get-safe-url-cyoeQ7Mw.js +1 -0
  100. package/dist/assets/hi-B8D3j6bs.js +1 -0
  101. package/dist/assets/hi-Dh_pGPBD.js +5 -0
  102. package/dist/assets/{home-Bi8fA3jh.js → home-BclSkhw2.js} +1 -1
  103. package/dist/assets/{id-BderyGO5.js → id-DWMMQI0G.js} +1 -1
  104. package/dist/assets/id-cicarMJv.js +7 -0
  105. package/dist/assets/{iframe-DZ181i8X.js → iframe-DZlnwo40.js} +1 -1
  106. package/dist/assets/{index-CYeIiQ6Q.js → index--MMFwLMX.js} +1 -1
  107. package/dist/assets/index-17ov_POl.js +345 -0
  108. package/dist/assets/index-BAstW3VS.js +137 -0
  109. package/dist/assets/{index-BT0GBmWF.js → index-BUHlfcy3.js} +1 -1
  110. package/dist/assets/{index-DyxFC42L.js → index-Bdi900W2.js} +3 -3
  111. package/dist/assets/index-BhX4Vx5B.js +192 -0
  112. package/dist/assets/{index-SDdS_qt8.js → index-Bt7GP-dU.js} +1 -1
  113. package/dist/assets/index-BugTfB-J.js +288 -0
  114. package/dist/assets/index-C-rU1lEd.js +10 -0
  115. package/dist/assets/index-C0x4zVBW.js +55 -0
  116. package/dist/assets/index-C4pzdyRW.js +1 -0
  117. package/dist/assets/index-C8EYAWok.js +113 -0
  118. package/dist/assets/index-CLD6I2fv.js +6 -0
  119. package/dist/assets/{index-CHbpkZwO.js → index-CMFOn8T3.js} +1 -1
  120. package/dist/assets/index-COTyGW2s.js +4 -0
  121. package/dist/assets/index-CiIQJxvH.js +1 -0
  122. package/dist/assets/index-CksPySYI.js +701 -0
  123. package/dist/assets/{index-DKhrYmrN.js → index-DIe9psLc.js} +1 -1
  124. package/dist/assets/{index-n0Q-fETi.js → index-DJeuTVoT.js} +7 -7
  125. package/dist/assets/{index-YbJjfDTR.js → index-DODYa3Im.js} +1 -1
  126. package/dist/assets/{index-B1ljmpu4.css → index-DOq-_YXu.css} +1 -1
  127. package/dist/assets/{index-CGBZONPv.js → index-D_z5kVUS.js} +1 -1
  128. package/dist/assets/{index-Dl4W1N74.js → index-DdLPuFP7.js} +1 -1
  129. package/dist/assets/index-DxR1P6Lh.js +241 -0
  130. package/dist/assets/index-htPha6tP.js +11 -0
  131. package/dist/assets/{invitation-BrAZQXQL.js → invitation-sucipANy.js} +8 -8
  132. package/dist/assets/invite-Bkpf8YcY.js +1 -0
  133. package/dist/assets/{issue-passport-Dd_yyO08.js → issue-passport-Dm4XKvqR.js} +1 -1
  134. package/dist/assets/item-CCsztPdL.js +2 -0
  135. package/dist/assets/ja-3LoBq68U.js +1 -0
  136. package/dist/assets/ja-Bm56AvcM.js +7 -0
  137. package/dist/assets/ko-B0ZZ2RWO.js +7 -0
  138. package/dist/assets/ko-B2dxwXDl.js +1 -0
  139. package/dist/assets/landing-page-BJMRDSCP.js +1 -0
  140. package/dist/assets/{launch-result-message-C9huWJUf.js → launch-result-message-B_fS-f90.js} +1 -1
  141. package/dist/assets/{layout-Cw-hwCHs.js → layout-DV03YuuA.js} +1 -1
  142. package/dist/assets/list-BgP6u-5j.js +236 -0
  143. package/dist/assets/list-header-8k1_C0K0.js +1 -0
  144. package/dist/assets/localization-CTzQFuMS.js +1 -0
  145. package/dist/assets/{log-Chqr_or_.js → log-B4LRFTNR.js} +1 -1
  146. package/dist/assets/{logger-zix81YaM.js → logger-8RyN9oiF.js} +1 -1
  147. package/dist/assets/login-B6TE3gqj.js +1 -0
  148. package/dist/assets/login-oauth-callback-CPP0UVME.js +1 -0
  149. package/dist/assets/logo-uploader-DMxsEq63.js +133 -0
  150. package/dist/assets/{lost-passport-Do1Pl0xI.js → lost-passport-ekwdQ24A.js} +2 -2
  151. package/dist/assets/lottie-error-CMOXHtBH.js +1 -0
  152. package/dist/assets/lottie-loading-o-GBrhM9.js +1 -0
  153. package/dist/assets/lottie-welcome-C9B95FIi.js +1 -0
  154. package/dist/assets/omit-DNeUY6_X.js +1 -0
  155. package/dist/assets/{open-window-D8MZhu_7.js → open-window-BjXpEOv2.js} +1 -1
  156. package/dist/assets/{overview-DLA9wj6a.js → overview-CJRHh92f.js} +2 -2
  157. package/dist/assets/{page-header-CWY8mxlT.js → page-header-MKUHlyAT.js} +1 -1
  158. package/dist/assets/{passport-item-CWtlyIE_.js → passport-item-jrknj0MQ.js} +1 -1
  159. package/dist/assets/{permission-BGM09622.js → permission-PNXSTeNL.js} +1 -1
  160. package/dist/assets/preferences-9BJlt30G.js +1 -0
  161. package/dist/assets/profile-embed-CIWdUuC6.js +1 -0
  162. package/dist/assets/pt-6Xqu-_a4.js +5 -0
  163. package/dist/assets/pt-eei1_Z4R.js +1 -0
  164. package/dist/assets/publish-resource-BQg2Vwb0.js +1 -0
  165. package/dist/assets/{react-beautiful-dnd.esm-ByydTUk4.js → react-beautiful-dnd.esm-C1Wt0pHO.js} +1 -1
  166. package/dist/assets/relative-time-cijkMMnc.js +1 -0
  167. package/dist/assets/ru-ZKgT6XdU.js +1 -0
  168. package/dist/assets/ru-y0N1jyVB.js +5 -0
  169. package/dist/assets/runtime-71FSw-R0.js +1 -0
  170. package/dist/assets/sdk-BXECCi1q.js +1 -0
  171. package/dist/assets/{security-BhkfG23R.js → security-Y5seZEn6.js} +4 -4
  172. package/dist/assets/session-DLQ0rbYE.js +1 -0
  173. package/dist/assets/setup-4hj9RPfM.js +30 -0
  174. package/dist/assets/{shorten-label-DFzv9EKX.js → shorten-label-SbKUBkvs.js} +1 -1
  175. package/dist/assets/{simple-select-DlrdVbaI.js → simple-select-CLc0Q9sm.js} +1 -1
  176. package/dist/assets/{slicedToArray-CPl5_eGD.js → slicedToArray-C0YDCVwK.js} +2 -2
  177. package/dist/assets/{spaces-WkJCApHO.js → spaces-CP1iyRKS.js} +1 -1
  178. package/dist/assets/start-Bt5Vo3K8.js +187 -0
  179. package/dist/assets/starting-progress-yIv14mT6.js +40 -0
  180. package/dist/assets/{status-CygZ0LuY.js → status-BKlS-OSq.js} +1 -1
  181. package/dist/assets/{step-actions-D_1PFeFs.js → step-actions-DMwF4axn.js} +1 -1
  182. package/dist/assets/{studio-Byjzwg8q.js → studio-BR3c6nt5.js} +1 -1
  183. package/dist/assets/{switch-control-5fEOPVKs.js → switch-control-yJOWKqcv.js} +1 -1
  184. package/dist/assets/th-CG5eLRZo.js +1 -0
  185. package/dist/assets/th-CJa7646q.js +5 -0
  186. package/dist/assets/{traffic-T11hxc--.js → traffic-BzRbyLJ-.js} +1 -1
  187. package/dist/assets/{transfer-ROpxn9LD.js → transfer-Ds9NQ12A.js} +1 -1
  188. package/dist/assets/unsubscribe-hfXD8-ea.js +1 -0
  189. package/dist/assets/use-blocklet-logo-BOYeM9RY.js +1 -0
  190. package/dist/assets/{use-mobile-C_flBrm-.js → use-mobile-BKvZ6hcv.js} +1 -1
  191. package/dist/assets/{use-mobile-DlKplWTG.js → use-mobile-BNUwcWCH.js} +1 -1
  192. package/dist/assets/{useAsync-CGW40D2-.js → useAsync-GjVghrwi.js} +1 -1
  193. package/dist/assets/{useLocalStorage-DldnaMbZ.js → useLocalStorage-CXDkfohf.js} +1 -1
  194. package/dist/assets/user-center-CBh-mxjZ.js +76 -0
  195. package/dist/assets/util-D-LnEy9h.js +1 -0
  196. package/dist/assets/{util-Bjy-tP7q.js → util-DJFgW-07.js} +1 -1
  197. package/dist/assets/{vendor-arcblock-ScFEr-lj.js → vendor-arcblock-Dkhgjlzn.js} +100 -97
  198. package/dist/assets/vendor-hooks-DXGUREV9.js +7 -0
  199. package/dist/assets/vendor-mui-core-B6POpIBB.js +266 -0
  200. package/dist/assets/{vendor-mui-x-B0hsmEJ3.js → vendor-mui-x-CATHW1QL.js} +1 -1
  201. package/dist/assets/{vendor-utils-BNHJB5U7.js → vendor-utils-CjMBJT5V.js} +17 -17
  202. package/dist/assets/vendor-ux-did-connect-D4-ZeZHm.js +2292 -0
  203. package/dist/assets/vi-CoZs3B42.js +1 -0
  204. package/dist/assets/vi-Rc5fwdQU.js +5 -0
  205. package/dist/assets/wrap-locale-Dob_mf2V.js +1 -0
  206. package/dist/assets/zh-CgkeS2I3.js +1 -0
  207. package/dist/assets/{zh-BYRCoK6F.js → zh-J32RyrWT.js} +2 -2
  208. package/dist/assets/zh-tw-BSUxp5LQ.js +7 -0
  209. package/dist/assets/zh-tw-CuakNRcW.js +1 -0
  210. package/dist/index.html +7 -7
  211. package/dist/service-worker.js +2 -2
  212. package/dist/share/shared-bridge.html +85 -0
  213. package/package.json +46 -46
  214. package/dist/assets/access-control-B20P1UrY.js +0 -14
  215. package/dist/assets/add-resource-BoS5YkVy.js +0 -1
  216. package/dist/assets/api-BrU7j0QA.js +0 -1
  217. package/dist/assets/appearance-DYi32tlk.js +0 -1
  218. package/dist/assets/ar-CmhpkjwX.js +0 -1
  219. package/dist/assets/ar-DupP3pla.js +0 -7
  220. package/dist/assets/audit-logs-CydL26ZC.js +0 -35
  221. package/dist/assets/branding-CAMtNLMU.js +0 -54
  222. package/dist/assets/bundle-avatar-D0t7RLGx.js +0 -1
  223. package/dist/assets/button-BeZibzB9.js +0 -1
  224. package/dist/assets/cloneDeep-SfcdeqEN.js +0 -1
  225. package/dist/assets/complete-BzCBoyhn.js +0 -45
  226. package/dist/assets/config-1xq1_d84.js +0 -32
  227. package/dist/assets/config-space-CYg-72ab.js +0 -1
  228. package/dist/assets/connect-Bbc2y5nS.js +0 -1
  229. package/dist/assets/connect-DM2xKEWk.js +0 -5
  230. package/dist/assets/connect-to-Ck5O2M1K.js +0 -1
  231. package/dist/assets/dashboard-8QXGSoVu.js +0 -280
  232. package/dist/assets/de-Doy9B4I7.js +0 -1
  233. package/dist/assets/de-TcDcBkI0.js +0 -7
  234. package/dist/assets/did-address-DUThaBlf.js +0 -1
  235. package/dist/assets/domain-action-card-D3w6jyPR.js +0 -24
  236. package/dist/assets/domains-BDxEOJh6.js +0 -1
  237. package/dist/assets/es-CDD0y3ur.js +0 -7
  238. package/dist/assets/es-CruF8tDk.js +0 -1
  239. package/dist/assets/exchange-passport-Izkf8qpM.js +0 -1
  240. package/dist/assets/fr-Bajh_D8H.js +0 -1
  241. package/dist/assets/fr-zYSSKlBw.js +0 -7
  242. package/dist/assets/get-safe-url-Bq9SFfX6.js +0 -1
  243. package/dist/assets/get-safe-url-DBsPGn--.js +0 -1
  244. package/dist/assets/hi-BsP-0YrU.js +0 -5
  245. package/dist/assets/hi-DOsApYK0.js +0 -1
  246. package/dist/assets/id-CY2FWdMB.js +0 -7
  247. package/dist/assets/index-B2yOcqTl.js +0 -192
  248. package/dist/assets/index-BGgGfqEc.js +0 -346
  249. package/dist/assets/index-B_vrglsK.js +0 -10
  250. package/dist/assets/index-BnmeT4Bk.js +0 -113
  251. package/dist/assets/index-C8QMe2NL.js +0 -138
  252. package/dist/assets/index-Cjjg2_Xp.js +0 -11
  253. package/dist/assets/index-DNG6b9sp.js +0 -224
  254. package/dist/assets/index-DO3_1y-L.js +0 -708
  255. package/dist/assets/index-DO4cSlUf.js +0 -290
  256. package/dist/assets/index-DcBUShKK.js +0 -1
  257. package/dist/assets/index-DuH8q5ir.js +0 -1
  258. package/dist/assets/index-EnQ254k3.js +0 -6
  259. package/dist/assets/index-bb90BUf4.js +0 -55
  260. package/dist/assets/index-mDKG4SiY.js +0 -1
  261. package/dist/assets/index-slEV_y-C.js +0 -4
  262. package/dist/assets/invite-Cbz8B2uW.js +0 -1
  263. package/dist/assets/item-nK3D7WH5.js +0 -2
  264. package/dist/assets/ja-99RIjwwl.js +0 -1
  265. package/dist/assets/ja-BLPXqHM4.js +0 -7
  266. package/dist/assets/ko-8oFi6wHH.js +0 -1
  267. package/dist/assets/ko-Cxgk34co.js +0 -7
  268. package/dist/assets/landing-page-BMM_oJb1.js +0 -1
  269. package/dist/assets/list-Dmtz4mRb.js +0 -235
  270. package/dist/assets/list-header-CgF1S4js.js +0 -1
  271. package/dist/assets/localization-DATb3Y_j.js +0 -1
  272. package/dist/assets/login-DjB23H9M.js +0 -1
  273. package/dist/assets/login-oauth-callback-ILeP59KT.js +0 -1
  274. package/dist/assets/logo-uploader-CJrdpVcQ.js +0 -133
  275. package/dist/assets/omit-bLid3PKQ.js +0 -1
  276. package/dist/assets/preferences-DYdbb0kG.js +0 -1
  277. package/dist/assets/profile-embed-CeEMHxEc.js +0 -1
  278. package/dist/assets/pt-BINIHul4.js +0 -5
  279. package/dist/assets/pt-ChXuTrrd.js +0 -1
  280. package/dist/assets/publish-resource-BEc_A5mC.js +0 -1
  281. package/dist/assets/relative-time-Djw-K4Zu.js +0 -1
  282. package/dist/assets/ru-BifF7u-P.js +0 -5
  283. package/dist/assets/ru-IkTTTY0K.js +0 -1
  284. package/dist/assets/runtime-DXl0lfXF.js +0 -1
  285. package/dist/assets/sdk-CTe6rL6c.js +0 -1
  286. package/dist/assets/session-VIMbdc9j.js +0 -1
  287. package/dist/assets/setup-BmYxTt6Z.js +0 -25
  288. package/dist/assets/start-CVexuuAk.js +0 -187
  289. package/dist/assets/th-CBxM23U5.js +0 -5
  290. package/dist/assets/th-OF8xr--T.js +0 -1
  291. package/dist/assets/unsubscribe-Cd3XOnSp.js +0 -1
  292. package/dist/assets/use-app-logo-B8Kl9EZt.js +0 -1
  293. package/dist/assets/user-center-CzyCbtWm.js +0 -77
  294. package/dist/assets/util-Dw9Eiuko.js +0 -1
  295. package/dist/assets/vendor-hooks-DftG_2gV.js +0 -7
  296. package/dist/assets/vendor-mui-core-CQ38ohp2.js +0 -266
  297. package/dist/assets/vendor-ux-did-connect-BdkhddhO.js +0 -2265
  298. package/dist/assets/vi-DCBJBc4G.js +0 -1
  299. package/dist/assets/vi-DY_Y13jR.js +0 -5
  300. package/dist/assets/wrap-locale-DMTYAE64.js +0 -1
  301. package/dist/assets/zh-BRAYg0sY.js +0 -1
  302. package/dist/assets/zh-tw-BG0rlH8p.js +0 -7
  303. package/dist/assets/zh-tw-D5-DkgwC.js +0 -1
@@ -1,280 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-Chqr_or_.js","assets/vendor-mui-core-CQ38ohp2.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-DldnaMbZ.js","assets/vendor-ux-did-connect-BdkhddhO.js","assets/vendor-utils-BNHJB5U7.js","assets/vendor-hooks-DftG_2gV.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-DO3_1y-L.js","assets/vendor-arcblock-ScFEr-lj.js","assets/index-B1ljmpu4.css","assets/Download-Ch4RfGRW.js","assets/bundle-avatar-D0t7RLGx.js","assets/log-D33dFtt_.css","assets/index-BGgGfqEc.js","assets/ViewList-e3CoNi3K.js","assets/index-B_vrglsK.js","assets/Phone-KP65huHK.js","assets/Location-B8EOY3d0.js","assets/Email-Dz2Eyqu0.js","assets/Timezone-Ce4E1Xey.js","assets/did-address-DUThaBlf.js","assets/permission-BGM09622.js","assets/session-VIMbdc9j.js","assets/click-to-copy-BGyXQL2i.js","assets/index-Dl4W1N74.js","assets/vendor-mui-x-B0hsmEJ3.js","assets/AdapterDayjs-BUGplkxR.js","assets/format-error-BrmqJs5a.js","assets/useAsync-CGW40D2-.js","assets/index-CGBZONPv.js","assets/DeleteOutline-C2sY6hfm.js","assets/confirm-DqvNmeoz.js","assets/util-Dw9Eiuko.js","assets/base32-p9VcJrwv.js","assets/sdk-CTe6rL6c.js","assets/actions-DA-6s_nQ.js","assets/MoreHoriz-CX_pwfPT.js","assets/shorten-label-DFzv9EKX.js","assets/PlayArrow-DFH1Psjx.js","assets/get-safe-url-Bq9SFfX6.js","assets/index-DcBUShKK.js","assets/InfoOutlined-CQB5qKm-.js","assets/dot-BE1YP292.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-DlKplWTG.js","assets/index-C8QMe2NL.js","assets/ExpandLess-BiMmSOBl.js","assets/index-DNG6b9sp.js","assets/Error-CSFUqG0m.js","assets/empty-spinner-DmDm8XzF.js","assets/list-header-CgF1S4js.js","assets/QuestionMarkCircle-p6m3avKp.js","assets/index-DVQCgvFb.js","assets/index-DKhrYmrN.js","assets/api-BrU7j0QA.js","assets/ChevronRight-ZTqWK-Ga.js","assets/react-beautiful-dnd.esm-ByydTUk4.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-nK3D7WH5.js","assets/Launch-fxgQvk19.js","assets/Done-JLiLhELm.js","assets/delete-confirm-_BzUlhv2.js","assets/ArrowDropDown-B0sLkJoY.js","assets/index-CHbpkZwO.js","assets/index-C0Iiqot3.css","assets/index-SDdS_qt8.js","assets/overview-DLA9wj6a.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-CygZ0LuY.js","assets/omit-bLid3PKQ.js","assets/spaces-WkJCApHO.js","assets/domains-BDxEOJh6.js","assets/domain-action-card-D3w6jyPR.js","assets/util-Bjy-tP7q.js","assets/CheckCircle-BNrN9mgy.js","assets/index-DO4cSlUf.js","assets/passport-item-CWtlyIE_.js","assets/Google-GOp5YvmZ.js","assets/cloneDeep-SfcdeqEN.js","assets/EditIcon-Bi2cR-_u.js","assets/LockIcon-fuTfhB_G.js","assets/appearance-DYi32tlk.js","assets/audit-logs-CydL26ZC.js","assets/relative-time-Djw-K4Zu.js","assets/index-BnmeT4Bk.js","assets/list-Dmtz4mRb.js","assets/use-app-logo-B8Kl9EZt.js","assets/traffic-T11hxc--.js","assets/iframe-DZ181i8X.js","assets/LaunchOutlined-BV4_W1pb.js","assets/ChevronLeft-Dq00IS01.js","assets/index-BT0GBmWF.js","assets/config-navigation-Dvjz9nAh.js","assets/index-YbJjfDTR.js","assets/slicedToArray-CPl5_eGD.js","assets/simple-select-DlrdVbaI.js","assets/index-EnQ254k3.js","assets/use-mobile-C_flBrm-.js","assets/connect-to-Ck5O2M1K.js","assets/config-space-CYg-72ab.js","assets/index-CYeIiQ6Q.js","assets/switch-control-5fEOPVKs.js","assets/index-bb90BUf4.js","assets/security-BhkfG23R.js","assets/config-Bh19ZUJ-.js","assets/branding-CAMtNLMU.js","assets/logo-uploader-CJrdpVcQ.js","assets/advanced-DTe2fs5L.js","assets/runtime-DXl0lfXF.js","assets/index-n0Q-fETi.js","assets/Edit-CY6fFHQM.js","assets/component-5gjaNHCg.js","assets/TuneOutlined-Dy2qPFGI.js","assets/add-component-core-DG9mQFsr.js","assets/launch-result-message-C9huWJUf.js","assets/page-header-CWY8mxlT.js","assets/index-Cjjg2_Xp.js","assets/content-layout-BPaAeaMQ.js","assets/add-component-core-D-IRi6XF.css","assets/index-DuH8q5ir.js"])))=>i.map(i=>d[i]);
2
- import{c as ce,u as Yn,p as Ps,h as et,f as er,g as tr,i as Ls,j as ks,k as Ds,m as As,l as Rn,n as Os,E as Ms,o as $s,H as Ns,_ as M,R as Us}from"./vendor-arcblock-ScFEr-lj.js";import{H as w,j as s,a8 as Z,ag as V,I as ct,ap as zs,aj as nr,X as Ht,q as Bs,b4 as Hs,aa as ue,b5 as qs,bw as Fs,T as B,bu as Vs,bs as Le,bv as Pn,a9 as R,bJ as Ws,v as se,a5 as lt,bK as Ks,ad as Gs,be as Qs,ao as qt,bL as rr,ac as ke,bM as Zs,aq as Js,ah as Xs,ak as tt,O as re,bt as Ct,bo as ae,bN as sr,bO as or,bP as ir,E as me,b3 as ar,y as Ys,bg as eo}from"./vendor-mui-core-CQ38ohp2.js";import{r as j,L as cr,f as lr,g as ur,u as to,l as no}from"./vendor-react-DEoibe3W.js";import{r as J,b4 as ro,b2 as ut,b5 as so,B as ge,j as z,a1 as Ln,Y as N,u as W,an as oo,m as dr,i as Ft,k as io,d as ao,W as Vt,aX as co,a4 as fr,ar as pr,b6 as lo,I as uo,C as nt,b7 as fo,b8 as po,_ as mo,al as ho}from"./vendor-ux-did-connect-BdkhddhO.js";import{z as Se,f as F,A as gt,B as go,b as xo,C as Wt,D as vo,E as mr,F as te,G as hr,t as je,H as gr,I as yo,n as Ce,J as bo,K as jo,u as wo,j as kn,g as _o,L as Dn,h as So,l as xt,k as Co,m as Io,M as To,O as Eo,Q as Ge,e as qe,R as Ro,T as Po,U as Lo,N as ko,V as vt,c as An}from"./index-DO3_1y-L.js";import{ad as Do,y as we,ae as Ao,z as Qe,I as xr,x as vr,af as Oo}from"./vendor-utils-BNHJB5U7.js";import{_ as On}from"./useLocalStorage-DldnaMbZ.js";import{C as Mn}from"./confirm-DqvNmeoz.js";import{d as Mo}from"./PlayArrow-DFH1Psjx.js";import{g as $n}from"./get-safe-url-Bq9SFfX6.js";import{f as Kt}from"./format-error-BrmqJs5a.js";import{u as yr}from"./session-VIMbdc9j.js";import{f as xe,a as br,u as q,w as $o}from"./vendor-hooks-DftG_2gV.js";import{i as No,u as Uo,M as zo,c as De,s as rt,H as Bo,p as jr}from"./index-DcBUShKK.js";import{d as Ho}from"./InfoOutlined-CQB5qKm-.js";import{_ as wr,D as qo}from"./dot-BE1YP292.js";import{_ as _r}from"./useSetState-CWq0AVWn.js";import{u as Sr}from"./use-mobile-DlKplWTG.js";const Cr=j.createContext({});function Gt({children:e,type:t}){const[n,r]=j.useState([]),o=j.useRef([]),i=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},a=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},c=l=>{const u=n.filter(g=>l.find(p=>p===g));Do(u,n).forEach(g=>a(g))};return s.jsx(Cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}Gt.propTypes={type:w.string,children:w.node.isRequired};Gt.defaultProps={type:"blocklets"};function Hl(){return j.useContext(Cr)}var Qt={},Fo=Z;Object.defineProperty(Qt,"__esModule",{value:!0});var Ir=Qt.default=void 0,Vo=Fo(J()),Wo=s;Ir=Qt.default=(0,Vo.default)((0,Wo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Zt={},Ko=Z;Object.defineProperty(Zt,"__esModule",{value:!0});var Tr=Zt.default=void 0,Go=Ko(J()),Qo=s;Tr=Zt.default=(0,Go.default)((0,Qo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Jt={},Zo=Z;Object.defineProperty(Jt,"__esModule",{value:!0});var Er=Jt.default=void 0,Jo=Zo(J()),Xo=s;Er=Jt.default=(0,Jo.default)((0,Xo.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Xt={},Yo=Z;Object.defineProperty(Xt,"__esModule",{value:!0});var Yt=Xt.default=void 0,ei=Yo(J()),ti=s;Yt=Xt.default=(0,ei.default)((0,ti.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var en={},ni=Z;Object.defineProperty(en,"__esModule",{value:!0});var Rr=en.default=void 0,ri=ni(J()),si=s;Rr=en.default=(0,ri.default)((0,si.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var tn={},oi=Z;Object.defineProperty(tn,"__esModule",{value:!0});var Pr=tn.default=void 0,ii=oi(J()),ai=s;Pr=tn.default=(0,ii.default)((0,ai.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var nn={},ci=Z;Object.defineProperty(nn,"__esModule",{value:!0});var Lr=nn.default=void 0,li=ci(J()),ui=s;Lr=nn.default=(0,li.default)((0,ui.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var rn=function(e){return s.jsx("svg",{...e,children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};rn.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};rn.displayName="dashboard";var sn={},di=Z;Object.defineProperty(sn,"__esModule",{value:!0});var kr=sn.default=void 0,fi=di(J()),pi=s;kr=sn.default=(0,fi.default)((0,pi.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const be={Start:Mo,Stop:Ir,Restart:Tr,Reload:Er,Remove:ro,Config:Yt,Log:Rr,Group:Pr,Cancel:Lr,Dashboard:rn,Overview:kr},mi=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(we(n.origin,t));return o.search=r.toString(),o.toString()},hi="internal",gi="external";function on({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Se(),[u,d]=j.useState(null),[g,p]=j.useState(null),[v,S]=j.useState(!1),[y,P]=j.useState(null),{t:f}=j.useContext(ut),[b]=On("skip-blocklet-setup",!1),{loading:x,recommendedUrl:L}=a(e),[k]=On("blocklet-type-filter",hi),h=F.isInProgress(e.status),[T,C]=j.useState(!1);j.useEffect(()=>{var $,G;if(!(e!=null&&e.controller))return;C(((G=($=e==null?void 0:e.controller)==null?void 0:$.status)==null?void 0:G.value)===ce.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var X,ie,fe;try{const Y=await l.api.getLauncherSession({input:{launcherSessionId:(X=e==null?void 0:e.controller)==null?void 0:X.launcherSessionId,launcherUrl:(ie=e==null?void 0:e.controller)==null?void 0:ie.launcherUrl}});if(Y!=null&&Y.error){console.error("get launcher session failed",Y.error);return}C([z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((fe=Y==null?void 0:Y.launcherSession)==null?void 0:fe.status))}catch(Y){console.error("call getLauncherSession error",Y)}})()},[]);const{inService:I}=l,m=(E,$,G=!1)=>async()=>{const X=async ze=>{var He;t({action:E,blocklet:e}),S(!0),p(E);let Be=!1;try{if(E==="remove")await $(ze);else if(E==="start"){if(!F.hasRunnableComponent(e)){N.error(f("blocklet.noComponent"));return}if(!I&&!b&&!((He=e.settings)!=null&&He.initialized)&&e.mode!==ce.BLOCKLET_MODES.DEVELOPMENT){if(!L||!Ln(L)){N.error(f("blocklet.gotoVisitError"));return}const ne=go(l.info),En=new URL(L);En.searchParams.set("serverUrl",ne),window.open($n(En.href,{allowDomains:null})),n({action:E,blocklet:e});return}const pe=e.children.filter(ne=>!F.isInProgress(ne.status)&&ne.status!=="running").map(ne=>ne.meta.did),ye={did:e.meta.did,componentDids:pe};await $({input:ye})}else if(["stop","restart","reload"].includes(E)){const pe=e.children.filter(ne=>ne.status==="running").map(ne=>ne.meta.did),ye={did:e.meta.did,componentDids:pe};await $({input:ye})}else{const pe={did:e.meta.did};await $({input:pe})}E==="remove"?Be=!0:await xo(1e3),E==="reload"&&N.success(f("blocklet.reloadSuccess")),P(null),n({action:E,blocklet:e})}catch(pe){const ye=`Blocklet ${E} failed: ${Kt(pe)}`;throw n({action:E,blocklet:e,error:new Error(ye)}),new Error(ye)}finally{Be||S(!1)}},ie=()=>{S(!1),P(null)},fe=F.getDisplayName(e,!0),Y=e.mode===ce.BLOCKLET_MODES.DEVELOPMENT?{description:()=>s.jsx(B,{component:"div",children:s.jsx(B,{gutterBottom:!0,children:f("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(ze,Be)=>s.jsxs(B,{component:"div",children:[s.jsx(B,{gutterBottom:!0,children:f("blocklet.action.removeApplicationDescription")}),s.jsxs(Vs,{name:"removeType",value:ze.removeType,onChange:He=>Be({...ze,removeType:He.target.value}),children:[s.jsx(Le,{value:"backup",control:s.jsx(Pn,{}),label:f("blocklet.action.removeApplicationAfterBackup")}),s.jsx(Le,{value:"complete",control:s.jsx(Pn,{}),label:f("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Rs={stop:{title:`${f("common.stop")} ${fe}`,description:f("blocklet.action.stopDescription"),confirm:f("blocklet.action.confirmStop"),cancel:f("common.cancel"),onConfirm:X,onCancel:ie},restart:{title:`${f("common.restart")} ${fe}`,description:f("blocklet.action.restartDescription"),confirm:f("blocklet.action.confirmRestart"),cancel:f("common.cancel"),onConfirm:X,onCancel:ie},remove:{title:`${f("common.remove")} ${fe}`,confirm:f("blocklet.action.confirmRemove"),cancel:f("common.cancel"),onConfirm:X,onCancel:ie,...Y},cancelDownload:{title:`${f("common.cancel")}`,description:f("blocklet.action.cancelDownloadDescription",{name:fe}),confirm:f("common.confirm"),cancel:f("common.cancel"),onConfirm:X,onCancel:ie}};G?P(Rs[E]):await X()},_=!!u,D=E=>{try{E.stopPropagation(),E.preventDefault()}catch{}d(E.currentTarget)},A=E=>{try{E.stopPropagation(),E.preventDefault()}catch{}d(null)},H=async(E,$)=>{try{$.stopPropagation(),$.preventDefault()}catch{}if(typeof E.handler=="function")try{S(!0),p(E.action),await E.handler()}catch(G){console.error(`Blocklet ${E.name} failed: `,G)}finally{S(!1),d(null)}else d(null)},K=!I&&F.isDeletableBlocklet(e)?{action:"remove",icon:be.Remove,name:f("common.remove"),handler:m("remove",async({removeType:E})=>{E==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:h}:null,ht={action:"remove",icon:({sx:E,...$})=>s.jsx(be.Cancel,{sx:{...E,paddingRight:"2px",zoom:.95},...$}),name:f("common.cancel"),handler:m("cancelDownload",l.api.cancelDownloadBlocklet,!0)},Ts=F.getAppMissingConfigs(e),Es=()=>{var X;const E=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),$=i==null?void 0:i({mountPoint:E,blocklet:e});if(!$||!Ln($)){N.error(f("blocklet.gotoVisitError"));return}const G=(X=e==null?void 0:e.site)==null?void 0:X.domainAliases;window.open($n(mi($,".well-known/service/admin"),{allowDomains:G==null?void 0:G.map(ie=>ie.value)}))};let Ue=[{action:"start",icon:be.Start,inExternal:!0,name:f("common.start"),handler:m("start",l.api.startBlocklet),disabled:T||e.children.every(E=>E.status==="running")||gt(e.status)||x||h},{action:"stop",icon:be.Stop,inExternal:!0,name:f("common.stop"),handler:m("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:be.Restart,name:f("common.restart"),handler:m("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},gt(e.status)?ht:K,{separator:!0},I?null:{action:"dashboard",icon:({style:E,...$})=>s.jsx(be.Dashboard,{...$,style:{...E,width:"26px",height:"26px",paddingRight:"3px"}}),name:f("sidebar.dashboard"),handler:Es}].filter(Boolean);return k===gi&&(Ue=Ue.filter(E=>E.inExternal)),r==="menu"?s.jsxs(Nn,{"data-cy":"blocklet-actions",children:[s.jsx(ct,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:D,size:"small",disabled:!o||!gt(e.status)&&v,children:s.jsx(so,{})}),s.jsxs(zs,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:_,onClose:A,PaperProps:{},children:[Ts.length>0&&s.jsxs(nr,{style:{maxWidth:"400px"},severity:"error",children:[f("blocklet.config.missingRequired"),s.jsx("br",{}),s.jsx(cr,{to:`/blocklets/${e.meta.did}/components`,children:f("blocklet.config.gotoFix")})]}),Ue.map((E,$)=>E.separator?s.jsx(Ht,{},`separator-${$}`):s.jsxs(Bs,{dense:!0,onClick:G=>H(E,G),disabled:v||E.disabled,"data-cy":`${E.action}-blocklet`,children:[s.jsx(Hs,{style:{minWidth:24},children:g===E.action&&v?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(E.icon,{fontSize:"small"})}),s.jsx(qs,{primary:E.name})]},E.name))]}),y&&s.jsx(Mn,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]}):s.jsxs(Nn,{"data-cy":"blocklet-actions",...c,children:[s.jsx(Fs,{children:Ue.filter(E=>!E.separator&&!E.onlyInMenu).map(E=>s.jsxs(ge,{title:E.name,"data-cy":`${E.action}-blocklet`,onClick:()=>H(E),disabled:!!E.disabled||v,children:[g===E.action&&v?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(E.icon,{}),s.jsx("span",{className:"blocklet-action-text",children:E.name})]},E.name))}),y&&s.jsx(Mn,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}on.propTypes={getComponentUrl:w.func,blocklet:w.object.isRequired,onStart:w.func.isRequired,onComplete:w.func.isRequired,variant:w.oneOf(["menu","group"]),hasPermission:w.bool,useBlockletUrlEvaluation:w.func};on.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Nn=V.div`
3
- display: flex;
4
- align-items: center;
5
-
6
- @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
7
- .MuiButton-root {
8
- padding: 4px;
9
- font-size: 10px;
10
- }
11
- }
12
- `,Un=j.memo(on),xi=e=>{const t={};let n=null;return F.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=F.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},vi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return o;const l=c[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(g=>g.value).filter(Boolean).find(g=>g.endsWith(z.DEFAULT_DID_DOMAIN))||"").replace(`.${z.DEFAULT_DID_DOMAIN}`,"");return d?o.replace(r,`${d}-${l}.${z.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Dr(){const{t:e}=W(),{api:t}=yr(),{blocklet:n}=Wt(),{inService:r}=Se(),[o,i]=j.useState(!1),[a,c]=j.useState(5),l=n&&n.structVersion!==z.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){N.error(e("blocklet.migrate.tip.running"));return}const p=xi(n);if(p){N.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){N.error(Kt(p))}},d=()=>{const p=vi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(v=>v-1)},1e3)},g=()=>i(!1);return[l&&s.jsxs(nr,{severity:"warning",style:{margin:"12px 0"},children:[s.jsxs(R,{display:"flex",alignItems:"center",children:[s.jsx(ge,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),s.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>s.jsx(R,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&s.jsx(oo,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:vo(n,!0),title:F.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:g},"connect")]}Dr.propTypes={};function yi(){const e=Ws();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const o=se(e.breakpoints.up(r));return!n&&o?r:n},null)||"xs"}function bi(e){return s.jsx(lt,{...e,children:s.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function ji(e){return s.jsx(lt,{...e,children:s.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function wi(e){return s.jsx(lt,{...e,children:s.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function _i(e){return s.jsx(lt,{...e,children:s.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Fe={fontSize:20,marginInlineEnd:8},Si={success:s.jsx(bi,{style:Fe}),warning:s.jsx(ji,{style:Fe}),error:s.jsx(wi,{style:Fe}),info:s.jsx(_i,{style:Fe})},Ci=Ks(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${Gs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Qs[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function an({keyId:e,notification:t={},viewAllUrl:n,content:r},o){var y;const i=Ci({breakpoint:yi()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Si[t.severity],{closeSnackbar:l}=dr(),u=()=>l(e),d=lr(),g=()=>{l(e),d(n)},p=xe(()=>No(t),[t]),v=xe(()=>t==null?void 0:t.activity,[t]),S=Uo({activity:v,users:[t==null?void 0:t.actorInfo],actors:[(y=t==null?void 0:t.activity)==null?void 0:y.actor],extra:{linkColor:Ft.primaryBase}});return s.jsxs(io,{ref:o,className:a,children:[s.jsxs("div",{className:i.message,children:[c,s.jsx(Ti,{onClick:g,style:{width:"calc(100% - 30px)"},children:s.jsx(R,{children:p?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:S}),s.jsx(zo,{meta:v.meta,type:v.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:t.title}),r||s.jsx("span",{className:"desc",children:t.description})]})})})]}),s.jsx("div",{className:i.action,children:s.jsx(ct,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:s.jsx(ao,{className:i.icon})},"close")})]})}const Ii=j.forwardRef(an);an.propTypes={viewAllUrl:w.string.isRequired,keyId:w.number.isRequired,notification:w.object.isRequired,content:w.node};an.defaultProps={content:null};const Ti=V.div`
13
- cursor: pointer;
14
- display: flex;
15
- flex-direction: column;
16
- .title {
17
- overflow: hidden;
18
- text-overflow: ellipsis;
19
- display: -webkit-box;
20
- -webkit-line-clamp: 1;
21
- -webkit-box-orient: vertical;
22
- font-weight: bold;
23
- }
24
- .desc {
25
- overflow: hidden;
26
- text-overflow: ellipsis;
27
- display: -webkit-box;
28
- -webkit-line-clamp: 3;
29
- -webkit-box-orient: vertical;
30
- word-break: break-word;
31
- }
32
- `;function Ar({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return s.jsxs(qt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:r=>{r.customPreventRedirect=!0},children:[!!n&&s.jsx("span",{className:"url",children:n}),!!t.title&&s.jsx(R,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&s.jsx(R,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&s.jsx("img",{src:Yn.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ar.propTypes={attachment:w.object.isRequired};function Or({attachment:e}){const{data:t}=e;return s.jsx("img",{src:Yn.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Or.propTypes={attachment:w.object.isRequired};function Mr({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,o=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return o==="small"?a="12px":o==="normal"?a="14px":o==="big"?a="16px":o==="large"&&(a="18px"),s.jsx(Ei,{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}Mr.propTypes={attachment:w.object.isRequired};const Ei=V.span`
33
- width: 100%;
34
- display: -webkit-box;
35
- -webkit-box-orient: vertical;
36
- -webkit-line-clamp: 2;
37
- overflow: hidden;
38
- text-overflow: ellipsis;
39
- white-space: normal;
40
- word-break: break-word;
41
- `;cn.propTypes={locale:w.string,data:w.object.isRequired};cn.defaultProps={locale:"en"};function cn({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${De.getUrlHost(t.chainHost)||De.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=xe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:l=>{l.customPreventRedirect=!0},children:s.jsxs(R,{display:"flex",flexDirection:"column",children:[s.jsxs(R,{sx:c,children:[s.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),s.jsxs(B,{component:"div",align:"right",style:rt.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),s.jsxs(R,{sx:c,children:[s.jsx(B,{component:"div",style:{...rt.remarkStyle,fontSize:14},children:n}),s.jsx(R,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ln.propTypes={locale:w.string,data:w.object.isRequired};ln.defaultProps={locale:"en"};function ln({locale:e,data:t}){var l,u;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",o=De.getUrlHost(t.chainHost)||De.getChainHost(t.chainId),i=t.did||((u=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:u.id)||"",a=`https://${o}/explorer/assets/${i}`,c=xe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx(R,{sx:{pr:1},children:s.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:d=>{d.customPreventRedirect=!0},rel:"noreferrer",children:s.jsxs(R,{display:"flex",flexDirection:"column",children:[s.jsxs(R,{sx:c,children:[s.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),s.jsx(B,{component:"div",align:"right",style:rt.summaryStyle,children:"+1 Asset"})]}),i?s.jsxs(R,{sx:c,children:[s.jsx(B,{component:"div",style:{...rt.remarkStyle,fontSize:14},children:r}),s.jsx(R,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}$r.propTypes={data:w.object.isRequired,locale:w.string};function $r({data:e,locale:t="en"}){return s.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:n=>{n.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),s.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[s.jsx("div",{style:{marginBottom:"6px"},children:e.title}),s.jsx(R,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:s.jsx(Vt,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}un.propTypes={locale:w.string,data:w.object.isRequired};un.defaultProps={locale:"en"};function un({locale:e,data:t}){const n=De.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return s.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),s.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),s.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function Nr({attachment:e,...t}){const{local:n}=j.useContext(ut),r=se(o=>o.breakpoints.down("md"));return s.jsxs(Ri,{...t,isMd:r,children:[e.type==="link"&&s.jsx(Ar,{attachment:e,...t,isMd:r}),e.type==="image"&&s.jsx(Or,{attachment:e,isMd:r}),e.type==="text"&&s.jsx(Mr,{attachment:e,isMd:r}),e.type==="token"&&s.jsx(cn,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?s.jsx(ln,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&s.jsx($r,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&s.jsx(un,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&s.jsx(Ht,{sx:{mb:1,mt:1},style:{color:Ft.dividerColor}})]})}const Ri=V.div`
42
- display: ${({sx:e={}})=>e.display||"flex"};
43
- flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
44
- gap: ${({sx:e={}})=>e.gap||1};
45
- width: ${({isMd:e=!1})=>e?"100%":"auto"};
46
- &:last-child {
47
- margin-bottom: 0;
48
- }
49
- `;Nr.propTypes={attachment:w.object.isRequired};function Ur({data:e,...t}){const{items:n}=e;return s.jsx(Pi,{...t,children:n.map(r=>s.jsxs(rr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[s.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[r.icon?s.jsx("img",{src:r.icon,alt:r.title,style:{width:16,height:16}}):null,s.jsxs(R,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?s.jsx(ke,{title:r.subtitle,arrow:!0,placement:"top",children:s.jsx(Ho,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),s.jsxs(R,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?s.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const Pi=V(R)`
50
- display: flex;
51
- justify-content: flex-start;
52
- flex-wrap: wrap;
53
- gap: 16px;
54
- .metric-number {
55
- font-size: 18px;
56
- font-weight: 600;
57
- .sub-content {
58
- font-size: 12px;
59
- font-weight: 400;
60
- margin-left: 4px;
61
- }
62
- }
63
- .metric-name {
64
- font-size: 14px;
65
- color: rgba(156, 163, 175, 1);
66
- }
67
- `;Ur.propTypes={data:w.object.isRequired};function zr({data:e}){const{items:t}=e,n=se(a=>a.breakpoints.down("sm")),r=se(a=>a.breakpoints.down("md")),o=se(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:o?4:6;return s.jsx(Zs,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?s.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:s.jsx(Js,{children:s.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}zr.propTypes={data:w.object.isRequired};function dn({data:e,feedType:t,...n}){return s.jsxs(Li,{...n,children:[t==="data-tracker"&&e.type==="table"&&s.jsx(Ur,{data:e}),(t==="graphic"||t==="gallery")&&s.jsx(zr,{data:e})]})}const Li=V.div`
68
- display: flex;
69
- flex-direction: column;
70
- width: 100%;
71
- margin-bottom: 4px;
72
- &:last-child {
73
- margin-bottom: 0;
74
- }
75
- `;dn.propTypes={data:w.object.isRequired,feedType:w.string};dn.defaultProps={feedType:"data-tracker"};const ki=co(),Di=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Ai=e=>e.every(t=>t.type==="text"),Oi=e=>e.every(t=>t.type==="image"),Mi=e=>Ao(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,o,i;return(i=(o=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:o.trim)==null?void 0:i.call(o)})),$i=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Ni=async(e,t)=>{const n=ki.user;if(n)try{return await n.getUserPublicInfo({did:e})?await n.getProfileUrl({did:e,locale:t}):void 0}catch(r){console.error(r);return}};Ze.propTypes={data:w.array.isRequired,style:w.object};function Ze({data:e,style:t={}}){return s.jsx(B,{style:{color:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},children:e.text})}function Br({data:e}){const t=[];for(let n=0;n<(e==null?void 0:e.length);n+=2){const r=e[n],o=e[n+1];r&&o?t.push(s.jsxs(zn,{children:[s.jsx("td",{className:"label-col",children:s.jsx(Ze,{data:r.data,style:{whiteSpace:"nowrap"}})}),s.jsx("td",{className:"value-col",children:s.jsx(Ze,{data:o.data,style:{wordBreak:"break-all"}})})]},n)):r&&t.push(s.jsx(zn,{children:s.jsx("td",{className:"label-col",children:s.jsx(Ze,{data:r.data})})},n))}return s.jsx("table",{style:{width:"100%"},children:s.jsx("tbody",{children:t})})}Br.propTypes={data:w.array.isRequired};const zn=V.tr`
76
- display: flex;
77
- flex-direction: row;
78
- justify-content: flex-start;
79
- align-items: center;
80
- gap: ${({theme:e})=>e.spacing(1)};
81
- .label-col {
82
- min-width: 130px;
83
- flex-shrink: 0;
84
- }
85
- .value-col {
86
- flex: 1;
87
- }
88
- `;function fn({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:o,...i}=e,a=se(d=>d.breakpoints.down("md"));if((!r||!r.length)&&Qe(o))return null;const c=Di(t),l=(d,g=!1)=>{if(!d&&!Array.isArray(d))return null;let p=d,v={},S="horizontal";g&&Ai(d)&&(p=Mi(d),S="vertical",v={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const y=$i(p);return s.jsx(R,{sx:{width:"100%",display:"flex",gap:1,flexDirection:g?"row":"column",justifyContent:"flex-start",alignItems:g?"center":"unset",flexWrap:"wrap"},children:p.map((P,f)=>P.type==="section"?s.jsx(Br,{data:P.fields},f):s.jsxs(j.Fragment,{children:[s.jsx(Nr,{attachment:P,style:v,...i}),!(a&&S==="vertical")&&y&&p.length>1&&f!==p.length-1?s.jsx(Ht,{orientation:S,style:{color:Ft.dividerColor},sx:S==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},f))})},u=Oi(r);return s.jsx(Ui,{children:s.jsxs("div",{className:"message-in-list",children:[r.length>0&&s.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:u?l(r):s.jsx(rr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!Qe(o)&&s.jsx("div",{className:"message-container",children:s.jsx("div",{className:"data-container",children:s.jsx(dn,{data:o,feedType:e.feedType})})}),r.length===0&&Qe(o)&&n&&s.jsx(Xs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Ui=V.div`
89
- display: flex;
90
- flex-direction: column;
91
- .message-in-list {
92
- padding: 8px 8px 8px 0;
93
- display: flex;
94
- border-radius: 8px;
95
- }
96
- .message-title {
97
- color: #25292f;
98
- font-size: 18px;
99
- font-weight: bold;
100
- word-break: break-all;
101
- }
102
-
103
- .attach-ske {
104
- position: relative;
105
- margin-left: 10px;
106
- &::after {
107
- content: '';
108
- position: absolute;
109
- left: -10px;
110
- top: 0;
111
- height: 100%;
112
- width: 4px;
113
- background-color: ${e=>e.leftLineColor};
114
- }
115
- }
116
-
117
- .message-body {
118
- color: #25292f;
119
- font-size: 16px;
120
- word-break: break-all;
121
- white-space: pre-line;
122
- }
123
- .message-container {
124
- display: flex;
125
- flex-direction: column;
126
- justify-content: flex-start;
127
- .data-container,
128
- .attachment-container {
129
- display: flex;
130
- flex-direction: column;
131
- width: 100%;
132
- }
133
- }
134
- .actions-container {
135
- margin-top: 10px;
136
- .actions-item {
137
- margin-right: 8px;
138
- }
139
- }
140
- `;fn.propTypes={severity:w.string.isRequired,notification:w.object.isRequired,showSke:w.bool};fn.defaultProps={showSke:!0};const yt=e=>Ps.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),zi=async(e,t)=>{const{type:n,did:r}=e;return er.isSameAddr(n,"did")?await Ni(r,t)||et.getLink(e):et.getLink(e)},Bi=async(e,t,n=!0)=>{const r=et.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof et.Link){if(n){const a=await zi(i,t),{type:c,chainId:l,did:u}=i;return er.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};Hr.propTypes={notification:w.object,rows:w.number,minimal:w.bool};function Hr({notification:e,rows:t=2,minimal:n=!1}){const[r,o]=j.useState(!1),[i,a]=j.useState(""),{t:c,locale:l}=W(),u=j.useMemo(()=>{const{attachments:P}=e||{};if(!P)return!1;try{return P.length>0}catch{return!1}},[e]),d=j.useMemo(()=>{const{blocks:P}=e||{};if(!P)return!1;try{return P.length>0}catch{return!1}},[e]),g=j.useMemo(()=>{const{description:P}=e||{};return!!P},[e]),p=j.useMemo(()=>{const{data:P}=e||{};return!Qe(P)},[e]),v=j.useMemo(()=>u||d||g||p,[u,d,g,p]);if(j.useEffect(()=>{Bi((e==null?void 0:e.description)??"",l).then(P=>{a(P)})},[e==null?void 0:e.description,l]),!v)return null;const S=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,y=P=>{const{target:f}=P;f.getAttribute("data-name")==="toggle-expanded"&&(o(!r),P.customPreventRedirect=!0)};return s.jsxs(Hi,{color:n?"#fff":"",children:[s.jsx(R,{className:"text-container",component:"div",onClick:y,children:i&&(!r&&t>0?s.jsx(Bo,{basedOn:"letters",unsafeHTML:yt(i),maxLine:t,ellipsisHTML:yt(S())}):s.jsx(B,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:yt(`${i}${S()}`)}}))}),!n&&(u||p)?s.jsx(fn,{severity:e.severity,notification:e}):null]})}const Hi=V(R)`
141
- width: 100%;
142
- color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
143
- .text-container {
144
- word-wrap: break-word;
145
- word-break: break-all;
146
- color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
147
- .toggle-btn {
148
- display: inline-block;
149
- white-space: nowrap;
150
- cursor: pointer;
151
- margin-left: 4px;
152
- color: rgba(59, 130, 246, 1);
153
- }
154
- .content.ellipsis {
155
- overflow: hidden;
156
- text-overflow: ellipsis;
157
- word-break: break-all;
158
- display: block;
159
- display: -webkit-box;
160
- -webkit-box-orient: vertical;
161
- -webkit-line-clamp: 2;
162
- line-height: 1.25;
163
- }
164
- }
165
- `,qi=j.memo(Hr);var It={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var n=c(tr),r=c(Ls),o=c(ks),i=c(Ds),a=c(As);function c(f){return f&&f.__esModule?f:{default:f}}function l(f,b){return v(f)||p(f,b)||d(f,b)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
166
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(f,b){if(f){if(typeof f=="string")return g(f,b);var x={}.toString.call(f).slice(8,-1);return x==="Object"&&f.constructor&&(x=f.constructor.name),x==="Map"||x==="Set"?Array.from(f):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?g(f,b):void 0}}function g(f,b){(b==null||b>f.length)&&(b=f.length);for(var x=0,L=Array(b);x<b;x++)L[x]=f[x];return L}function p(f,b){var x=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(x!=null){var L,k,h,T,C=[],I=!0,m=!1;try{if(h=(x=x.call(f)).next,b!==0)for(;!(I=(L=h.call(x)).done)&&(C.push(L.value),C.length!==b);I=!0);}catch(_){m=!0,k=_}finally{try{if(!I&&x.return!=null&&(T=x.return(),Object(T)!==T))return}finally{if(m)throw k}}return C}}function v(f){if(Array.isArray(f))return f}var S={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},y=/^\[([^\]]+)\](?::([0-9]+))?$/;function P(f,b){if((0,n.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(b=(0,a.default)(b,S),b.validate_length&&f.length>b.max_allowed_length)||!b.allow_fragments&&f.includes("#")||!b.allow_query_components&&(f.includes("?")||f.includes("&")))return!1;var x,L,k,h,T,C,I,m;if(I=f.split("#"),f=I.shift(),I=f.split("?"),f=I.shift(),I=f.split("://"),I.length>1){if(x=I.shift().toLowerCase(),b.require_valid_protocol&&b.protocols.indexOf(x)===-1)return!1}else{if(b.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!b.allow_protocol_relative_urls)return!1;I[0]=f.slice(2)}}if(f=I.join("://"),f==="")return!1;if(I=f.split("/"),f=I.shift(),f===""&&!b.require_host)return!0;if(I=f.split("@"),I.length>1){if(b.disallow_auth||I[0]===""||(L=I.shift(),L.indexOf(":")>=0&&L.split(":").length>2))return!1;var _=L.split(":"),D=l(_,2),A=D[0],H=D[1];if(A===""&&H==="")return!1}h=I.join("@"),C=null,m=null;var K=h.match(y);if(K?(k="",m=K[1],C=K[2]||null):(I=h.split(":"),k=I.shift(),I.length&&(C=I.join(":"))),C!==null&&C.length>0){if(T=parseInt(C,10),!/^[0-9]+$/.test(C)||T<=0||T>65535)return!1}else if(b.require_port)return!1;return b.host_whitelist?(0,r.default)(k,b.host_whitelist):k===""&&!b.require_host?!0:!(!(0,i.default)(k)&&!(0,o.default)(k,b)&&(!m||!(0,i.default)(m,6))||(k=k||m,b.host_blacklist&&(0,r.default)(k,b.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(It,It.exports);var Fi=It.exports;const qr=ur(Fi);var Tt={exports:{}},Et={exports:{}},Rt={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){return r==null}e.exports=t.default,e.exports.default=t.default})(Rt,Rt.exports);var Vi=Rt.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=o(tr),r=o(Vi);function o(l){return l&&l.__esModule?l:{default:l}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function c(l,u){(0,n.default)(l),u=u||{};var d=u.allow_leading_zeroes===!1?i:a,g=!u.hasOwnProperty("min")||(0,r.default)(u.min)||l>=u.min,p=!u.hasOwnProperty("max")||(0,r.default)(u.max)||l<=u.max,v=!u.hasOwnProperty("lt")||(0,r.default)(u.lt)||l<u.lt,S=!u.hasOwnProperty("gt")||(0,r.default)(u.gt)||l>u.gt;return d.test(l)&&g&&p&&v&&S}e.exports=t.default,e.exports.default=t.default})(Et,Et.exports);var Wi=Et.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Wi);function r(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,n.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=t.default,e.exports.default=t.default})(Tt,Tt.exports);var Ki=Tt.exports;const Gi=ur(Ki);function Q({title:e,desc:t,sectionLeftSx:n,sectionRightSx:r,children:o,...i}){return s.jsx(Qi,{...i,children:s.jsxs(tt,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[s.jsxs(R,{className:"section-left",sx:n,children:[s.jsx(B,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),s.jsx(R,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:t}})]}),s.jsx(tt,{className:"section-content",direction:"column",sx:{width:"100%",...r},children:o})]})})}Q.propTypes={title:w.string.isRequired,children:w.node.isRequired,desc:w.string,sectionLeftSx:w.object,sectionRightSx:w.object};Q.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Qi=V(R)`
167
- display: flex;
168
- align-items: flex-start;
169
- width: 100%;
170
-
171
- .section {
172
- width: 100%;
173
-
174
- .section-left {
175
- flex-shrink: 0;
176
- flex-grow: 0;
177
- }
178
-
179
- .section-title {
180
- font-weight: 500;
181
- line-height: 32px;
182
- }
183
-
184
- .section-desc {
185
- font-weight: normal;
186
- font-size: 12px;
187
- white-space: pre-line;
188
- }
189
-
190
- .section-content {
191
- flex-grow: 1;
192
- width: 0;
193
- align-self: center;
194
- }
195
- }
196
-
197
- @media (max-width: 900px) {
198
- .section-left {
199
- width: 100%;
200
- }
201
-
202
- .section-content {
203
- width: 100% !important;
204
- }
205
- }
206
- `,bt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Zi(){var T,C,I;const{api:e}=Se(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=fr(),i=(T=t==null?void 0:t.meta)==null?void 0:T.did,a=Object.assign({...bt},((I=(C=t==null?void 0:t.settings)==null?void 0:C.notification)==null?void 0:I.email)||{}),{handleSubmit:c,control:l,formState:u,watch:d,reset:g}=mr({defaultValues:xr(a,Object.keys(bt))}),p=br({testReceiver:"",testReceiverError:""}),v=d("enabled"),S=q(async(m,_,D=!0)=>{var A,H;try{const{blocklet:K}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:m})}}),ht=Object.assign({...bt},((H=(A=K==null?void 0:K.settings)==null?void 0:A.notification)==null?void 0:H.email)||{});g(ht),D&&N.success(n("oauth.saveSuccess"))}catch(K){if(D)N.error(K.message||n("oauth.saveFailed"));else throw K}}),y=q(async(m,_,D)=>{try{u.isDirty&&await S(m,_,!1),await e.sendEmail({input:{did:i,receiver:D,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),N.success(n("notification.email.testSuccess"))}catch(A){N.error(A.message||n("notification.email.testfailed"))}}),P=q((m,_)=>{p.testReceiver="",p.testReceiverError="",r.open({title:n("notification.email.testSendEmail"),content:()=>s.jsx(R,{sx:{width:"300px"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.email.inputTestReceiver"),value:p.testReceiver,onChange:D=>{p.testReceiver=D.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(D){var H;const A=(H=p.testReceiver)==null?void 0:H.trim();if(!A){p.testReceiverError=n("notification.email.receiverRequired");return}if(!Rn(A)){p.testReceiverError=n("notification.email.receiverInvalid");return}p.testReceiverError="",await y(m,_,A),D()}})}),f=q(m=>{const _=m==null?void 0:m.trim();return _?Rn(_)?!0:n("notification.email.fromInvalid"):n("notification.email.fromRequired")}),b=q(m=>{const _=m==null?void 0:m.trim();return _?qr(_,{require_host:!1,protocols:[]})?!0:n("notification.email.hostInvalid"):n("notification.email.hostRequired")}),x=q(m=>m?Gi(m)?!0:n("notification.email.portInvalid"):n("notification.email.portRequired")),L=q(m=>m!=null&&m.trim()?!0:n("notification.email.userRequired")),k=q(m=>m!=null&&m.trim()?!0:n("notification.email.passwordRequired")),h=q(()=>!0);return s.jsxs(R,{children:[s.jsxs(Ji,{component:"form",onSubmit:c(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.email.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:l,render:({field:m})=>s.jsx(Le,{control:s.jsx(Ct,{checked:m.value,...m})})})}),s.jsx(Q,{title:n("notification.email.from"),children:s.jsx(te,{name:"from",control:l,rules:{validate:v?f:h},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,label:n("notification.email.from"),error:!!u.errors[m.name],helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.host"),children:s.jsx(te,{name:"host",control:l,rules:{validate:v?b:h},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.host"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.port"),children:s.jsx(te,{name:"port",control:l,rules:{validate:v?x:h},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"number",error:!!u.errors[m.name],label:n("notification.email.port"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.user"),children:s.jsx(te,{name:"user",control:l,rules:{validate:v?L:h},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.user"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.password"),children:s.jsx(te,{name:"password",control:l,rules:{validate:v?k:h},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"password",error:!!u.errors[m.name],label:n("notification.email.password"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.secure"),children:s.jsx(te,{name:"secure",control:l,rules:{validate:h},render:({field:m})=>s.jsx(ae,{fullWidth:!0,children:s.jsx(Le,{control:s.jsx(Ct,{checked:m.value,...m,disabled:!v})})})})}),s.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ge,{variant:"outlined",color:"warning",onClick:c(P),sx:{mr:2},disabled:!v,children:n("oauth.runTest")}),s.jsx(ge,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const Ji=V(tt)``,jt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Xi(){var x,L,k;const{api:e}=Se(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=fr(),i=(x=t==null?void 0:t.meta)==null?void 0:x.did,a=Object.assign({...jt},((k=(L=t==null?void 0:t.settings)==null?void 0:L.notification)==null?void 0:k.pushKit)||{}),{handleSubmit:c,control:l,formState:u,watch:d,reset:g}=mr({defaultValues:xr(a,Object.keys(jt))}),p=br({testReceiver:"",testReceiverError:""}),v=d("enabled"),S=q(async(h,T,C=!0)=>{var I,m;try{const{blocklet:_}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:h})}}),D=Object.assign({...jt},((m=(I=_==null?void 0:_.settings)==null?void 0:I.notification)==null?void 0:m.pushKit)||{});g(D),C&&N.success(n("oauth.saveSuccess"))}catch(_){if(C)N.error(_.message||n("oauth.saveFailed"));else throw _}}),y=q(async(h,T)=>{var C,I,m;try{u.isDirty&&await S(h,T,!1);const _=(C=((t==null?void 0:t.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:C.value,D=vr(we(_,"/.well-known/service/blocklet/logo"),{v:(I=t==null?void 0:t.meta)==null?void 0:I.version,t:new Date((t==null?void 0:t.updatedAt)||0).getTime()}),A={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:t==null?void 0:t.appDid,fullName:(m=t==null?void 0:t.meta)==null?void 0:m.title,avatar:D}}}};await e.sendPush({input:{did:i,receiver:p.testReceiver,notification:JSON.stringify(A)}}),N.success(n("notification.pushKit.testSuccess"))}catch(_){N.error(_.message||n("notification.pushKit.testfailed"))}}),P=q((h,T)=>{p.testReceiverError="",r.open({title:n("notification.pushKit.testSend"),content:()=>s.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.pushKit.inputTestReceiver"),value:p.testReceiver,onChange:C=>{p.testReceiver=C.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(C){var m;if(!((m=p.testReceiver)==null?void 0:m.trim())){p.testReceiverError=n("notification.pushKit.receiverRequired");return}p.testReceiverError="",await y(h,T),C()}})}),f=q(h=>{const T=h==null?void 0:h.trim();return T?qr(T)?!0:n("notification.pushKit.endpointInvalid"):n("notification.pushKit.endpointRequired")}),b=q(()=>!0);return s.jsxs(R,{children:[s.jsxs(Yi,{component:"form",onSubmit:c(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.pushKit.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:l,render:({field:h})=>s.jsx(Le,{control:s.jsx(Ct,{checked:h.value,...h})})})}),s.jsx(Q,{title:n("notification.pushKit.endpoint"),children:s.jsx(te,{name:"endpoint",control:l,rules:{validate:v?f:b},render:({field:h})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...h,size:"small",required:!0,label:n("notification.pushKit.endpoint"),error:!!u.errors[h.name],helperText:((T=u.errors[h.name])==null?void 0:T.message)||" ",disabled:!v})})}})}),s.jsxs(Q,{title:n("notification.pushKit.customOptions"),children:[s.jsx(te,{name:"did",control:l,render:({field:h})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...h,size:"small",label:n("notification.pushKit.did"),error:!!u.errors[h.name],helperText:((T=u.errors[h.name])==null?void 0:T.message)||" ",disabled:!v})})}}),s.jsx(te,{name:"pushPath",control:l,render:({field:h})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...h,size:"small",label:n("notification.pushKit.pushPath"),error:!!u.errors[h.name],helperText:((T=u.errors[h.name])==null?void 0:T.message)||" ",disabled:!v})})}})]}),s.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ge,{variant:"outlined",color:"warning",onClick:c(P),disabled:!v,children:n("oauth.runTest")}),s.jsx(ge,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const Yi=V(tt)``,Bn=[{label:s.jsx(R,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:s.jsx(R,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function ea(){const[e,t]=j.useState(Bn[0].value),{locale:n}=j.useContext(ut),r=xe(()=>({email:s.jsx(Zi,{}),pushKit:s.jsx(Xi,{})}),[n]),o=j.useMemo(()=>({padding:"10px 0"}),[]);return s.jsxs(R,{children:[s.jsx(pr,{tabs:Bn,current:e,onChange:t}),s.jsx(R,{style:o,children:r[e]})]})}var O=function(t,n,r){return sr.call(n,"css")?s.jsx(or,ir(t,n),r):s.jsx(t,n,r)},Ve=function(t,n,r){return sr.call(n,"css")?s.jsxs(or,ir(t,n),r):s.jsxs(t,n,r)};/**
207
- * (c) Iconify
208
- *
209
- * For the full copyright and license information, please view the license.txt or license.gpl.txt
210
- * files at https://github.com/iconify/iconify
211
- *
212
- * Licensed under MIT.
213
- *
214
- * @license MIT
215
- * @version 3.1.1
216
- */const Fr=Object.freeze({left:0,top:0,width:16,height:16}),st=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Oe=Object.freeze({...Fr,...st}),Pt=Object.freeze({...Oe,body:"",hidden:!1});function ta(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Hn(e,t){const n=ta(e,t);for(const r in Pt)r in st?r in e&&!(r in n)&&(n[r]=st[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function na(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const c=r[a]&&r[a].parent,l=c&&i(c);l&&(o[a]=[c].concat(l))}return o[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function ra(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function a(c){i=Hn(r[c]||o[c],i)}return a(t),n.forEach(a),Hn(e,i)}function sa(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=na(e);for(const o in r){const i=r[o];i&&(t(o,ra(e,o,i)),n.push(o))}return n}const Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ie=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!Je(u)?null:u}const i=o[0],a=i.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Je(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:i};return t&&!Je(c,n)?null:c}return null},Je=(e,t)=>e?!!((e.provider===""||e.provider.match(Ee))&&(t&&e.prefix===""||e.prefix.match(Ee))&&e.name.match(Ee)):!1,oa={provider:"",aliases:{},not_found:{},...Fr};function wt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ia(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!wt(e,oa))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Ee)||typeof i.body!="string"||!wt(i,Pt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],a=i.parent;if(!o.match(Ee)||typeof a!="string"||!n[a]&&!r[a]||!wt(i,Pt))return null}return t}const ot=Object.create(null);function aa(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function oe(e,t){const n=ot[e]||(ot[e]=Object.create(null));return n[t]||(n[t]=aa(e,t))}function pn(e,t){return ia(t)?sa(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ca(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function la(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ot)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ot[o]||{})).forEach(a=>{const c=oe(o,a);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+a+":"+l))})}),n}let mn=!1;function ua(e){return mn}function Me(e){const t=typeof e=="string"?Ie(e,!0,mn):e;if(t){const n=oe(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function da(e,t){const n=Ie(e,!0,mn);if(!n)return!1;const r=oe(n.provider,n.prefix);return ca(r,n.name,t)}function Vr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Je({provider:t,prefix:n,name:"a"}))return!1;const r=oe(t,n);return!!pn(r,e)}function fa(e){return!!Me(e)}function pa(e){const t=Me(e);return t?{...Oe,...t}:null}const Wr=Object.freeze({width:null,height:null}),Kr=Object.freeze({...Wr,...st}),ma=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ha=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(ma);if(r===null||!r.length)return e;const o=[];let i=r.shift(),a=ha.test(i);for(;;){if(a){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");a=!a}}const ga=e=>e==="unset"||e==="undefined"||e==="none";function dt(e,t){const n={...Oe,...e},r={...Kr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(S=>{const y=[],P=S.hFlip,f=S.vFlip;let b=S.rotate;P?f?b+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):f&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let x;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:x=o.height/2+o.top,y.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,y.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}b%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),y.length&&(i='<g transform="'+y.join(" ")+'">'+i+"</g>")});const a=r.width,c=r.height,l=o.width,u=o.height;let d,g;a===null?(g=c===null?"1em":c==="auto"?u:c,d=Lt(g,l/u)):(d=a==="auto"?l:a,g=c===null?Lt(d,u/l):c==="auto"?u:c);const p={},v=(S,y)=>{ga(y)||(p[S]=y.toString())};return v("width",d),v("height",g),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const xa=/\sid="(\S+)"/g,va="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ya=0;function Gr(e,t=va){const n=[];let r;for(;r=xa.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(ya++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const he={local:!0,session:!0},Qr={local:new Set,session:new Set};let hn=!1;function ba(e){hn=e}const qn="iconify2",Ae="iconify",Zr=Ae+"-count",Fn=Ae+"-version",Jr=36e5,ja=168;function kt(e,t){try{return e.getItem(t)}catch{}}function gn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Vn(e,t){try{e.removeItem(t)}catch{}}function Dt(e,t){return gn(e,Zr,t.toString())}function At(e){return parseInt(kt(e,Zr))||0}let We=typeof window>"u"?{}:window;function Xr(e){const t=e+"Storage";try{if(We&&We[t]&&typeof We[t].length=="number")return We[t]}catch{}he[e]=!1}function Yr(e,t){const n=Xr(e);if(!n)return;const r=kt(n,Fn);if(r!==qn){if(r){const c=At(n);for(let l=0;l<c;l++)Vn(n,Ae+l.toString())}gn(n,Fn,qn),Dt(n,0);return}const o=Math.floor(Date.now()/Jr)-ja,i=c=>{const l=Ae+c.toString(),u=kt(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Vn(n,l)}};let a=At(n);for(let c=a-1;c>=0;c--)i(c)||(c===a-1?(a--,Dt(n,a)):Qr[e].add(c))}function es(){if(!hn){ba(!0);for(const e in he)Yr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=oe(r,o);if(!pn(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function ts(e,t){switch(e){case"local":case"session":he[e]=t;break;case"all":for(const n in he)he[n]=t;break}}const Ot=Object.create(null);function ns(e,t){Ot[e]=t}function Mt(e){return Ot[e]||Ot[""]}function xn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ft=Object.create(null),Te=["https://api.simplesvg.com","https://api.unisvg.com"],Xe=[];for(;Te.length>0;)Te.length===1||Math.random()>.5?Xe.push(Te.shift()):Xe.push(Te.pop());ft[""]=xn({resources:["https://api.iconify.design"].concat(Xe)});function rs(e,t){const n=xn(t);return n===null?!1:(ft[e]=n,!0)}function pt(e){return ft[e]}function wa(){return Object.keys(ft)}const _a=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let it=_a();function Sa(e){it=e}function Ca(){return it}function Ia(e,t){const n=pt(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function Ta(e){return e===404}const Ea=(e,t,n)=>{const r=[],o=Ia(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=o&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function Ra(e){if(typeof e=="string"){const t=pt(e);if(t)return t.path}return"/"}const Pa=(e,t,n)=>{if(!it){n("abort",424);return}let r=Ra(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;it(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(Ta(a)?"abort":"next",a)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},La={prepare:Ea,send:Pa};function ka(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,a=o.prefix,c=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[a]||(l[a]=oe(i,a));let d;c in u.icons?d=t.loaded:a===""||u.missing.has(c)?d=t.missing:d=t.pending;const g={provider:i,prefix:a,name:c};d.push(g)}),t}function ss(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Da(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const a=i.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])a.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||ss([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Aa=0;function Oa(e,t,n){const r=Aa++,o=ss.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),o}function Ma(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?Ie(o,t,n):o;i&&r.push(i)}),r}var $a={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Na(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let h=e.resources.slice(0);for(a=[];h.length>1;){const T=Math.floor(Math.random()*h.length);a.push(h[T]),h=h.slice(0,T).concat(h.slice(T+1))}a=a.concat(h)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",u=0,d,g=null,p=[],v=[];typeof r=="function"&&v.push(r);function S(){g&&(clearTimeout(g),g=null)}function y(){l==="pending"&&(l="aborted"),S(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function P(h,T){T&&(v=[]),typeof h=="function"&&v.push(h)}function f(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:P,abort:y}}function b(){l="failed",v.forEach(h=>{h(void 0,d)})}function x(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function L(h,T,C){const I=T!=="success";switch(p=p.filter(m=>m!==h),l){case"pending":break;case"failed":if(I||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){d=C,b();return}if(I){d=C,p.length||(a.length?k():b());return}if(S(),x(),!e.random){const m=e.resources.indexOf(h.resource);m!==-1&&m!==e.index&&(e.index=m)}l="completed",v.forEach(m=>{m(C)})}function k(){if(l!=="pending")return;S();const h=a.shift();if(h===void 0){if(p.length){g=setTimeout(()=>{S(),l==="pending"&&(x(),b())},e.timeout);return}b();return}const T={status:"pending",resource:h,callback:(C,I)=>{L(T,C,I)}};p.push(T),u++,g=setTimeout(k,e.rotate),n(h,t,T.callback)}return setTimeout(k),f}function os(e){const t={...$a,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,u){const d=Na(t,c,l,(g,p)=>{r(),u&&u(g,p)});return n.push(d),d}function i(c){return n.find(l=>c(l))||null}return{query:o,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Wn(){}const _t=Object.create(null);function Ua(e){if(!_t[e]){const t=pt(e);if(!t)return;const n=os(t),r={config:t,redundancy:n};_t[e]=r}return _t[e]}function is(e,t,n){let r,o;if(typeof e=="string"){const i=Mt(e);if(!i)return n(void 0,424),Wn;o=i.send;const a=Ua(e);a&&(r=a.redundancy)}else{const i=xn(e);if(i){r=os(i);const a=e.resources?e.resources[0]:"",c=Mt(a);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Wn):r.query(t,o,n)().abort}function za(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in he)Yr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Ba(e,t){hn||es();function n(r){let o;if(!he[r]||!(o=Xr(r)))return;const i=Qr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=At(o),!Dt(o,a+1))return;const c={cached:Math.floor(Date.now()/Jr),provider:e.provider,data:t};return gn(o,Ae+a.toString(),JSON.stringify(c))}t.lastModified&&!za(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Kn(){}function Ha(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Da(e)}))}function qa(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=Mt(n)))return;i.prepare(n,r,o).forEach(c=>{is(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=pn(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(g=>{d.delete(g)}),Ba(e,l)}catch(u){console.error(u)}Ha(e)})})}))}const Fa=e=>{const n=oe(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},vn=(e,t)=>{const n=Ma(e,!0,ua()),r=ka(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Kn)}),()=>{l=!1}}const o=Object.create(null),i=[];let a,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===a)return;a=u,c=d,i.push(oe(u,d));const g=o[u]||(o[u]=Object.create(null));g[d]||(g[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:g}=l,p=oe(u,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(g)||(v.add(g),o[u][d].push(g))}),i.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&qa(l,o[u][d])}),t?Oa(t,r,i):Kn},Va=e=>new Promise((t,n)=>{const r=typeof e=="string"?Ie(e,!0):e;if(!r){n(e);return}vn([r||e],o=>{if(o.length&&r){const i=Me(r);if(i){t({...Oe,...i});return}}n(e)})});function as(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Wr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const mt={...Kr,inline:!1},St="iconify",$t="iconify-inline",de="iconifyData"+Date.now();let ve=[];function $e(e){for(let t=0;t<ve.length;t++){const n=ve[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function cs(e,t=!1){let n=$e(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ve.push(n),n)}function Wa(){if(document.documentElement)return cs(document.documentElement);ve.push({node:()=>document.documentElement})}function Ka(e){ve=ve.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ne(){return ve}function Ga(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Re=null;const Qa={childList:!0,subtree:!0,attributes:!0};function ls(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Re&&Re(e)}))}function Za(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[de]!==void 0){n.paused||ls(e);return}}}function us(e,t){e.observer.instance.observe(t,Qa)}function at(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Za.bind(null,e)),us(e,n),t.paused||ls(e))}function Gn(){Ne().forEach(at)}function ds(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ja(e){const t=Re!==null;if(Re!==e&&(Re=e,t&&Ne().forEach(ds)),t){Gn();return}Ga(Gn)}function Nt(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Xa(e){if(e){const t=$e(e);t&&Nt(t)}else Nt()}function Ut(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){at(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?us(t,r):at(t);else return}})}function Ya(e){if(e){const t=$e(e);t&&Ut(t)}else Ut()}function fs(e,t=!1){const n=cs(e,t);return at(n),n}function ps(e){const t=$e(e);t&&(ds(t),Ka(e))}function ec(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in mt)if(n[o]!==r[o])return!0;return!1}function tc(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const nc=/[\s,]+/;function rc(e,t){t.split(nc).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const sc=["width","height"],oc=["inline","hFlip","vFlip"];function ic(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ac(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&Ie(t,!0);if(!n)return null;const r={...mt,inline:e.classList&&e.classList.contains($t)};sc.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=tc(o));const i=e.getAttribute("data-flip");typeof i=="string"&&rc(r,i),oc.forEach(c=>{const l="data-"+c,u=ic(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const cc="svg."+St+", i."+St+", span."+St+", i."+$t+", span."+$t;function lc(e){const t=[];return e.querySelectorAll(cc).forEach(n=>{const r=n[de]||n.tagName.toLowerCase()!=="svg"?ac(n):null;r&&t.push({node:n,props:r})}),t}function ms(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Pe;function uc(){try{Pe=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Pe=null}}function dc(e){return Pe===void 0&&uc(),Pe?Pe.createHTML(e):e}function hs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function gs(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(c=>{o.add(c)})}const i=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&i.push(a):(o.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),i}function xs(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function vs(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=dt(n,o),a=e[de],c=ms(Gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=dc(c);const l=r.childNodes[0],u=e.attributes;for(let S=0;S<u.length;S++){const y=u.item(S),P=y.name;P!=="class"&&!l.hasAttribute(P)&&l.setAttribute(P,y.value)}const d=hs(t.icon),g=gs(l,d,new Set(a&&a.addedClasses),e),p=xs(l,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),v={...t,status:"loaded",addedClasses:g,addedStyles:p};return l[de]=v,e.parentNode&&e.parentNode.replaceChild(l,e),l}function fc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function pc(e){return"data:image/svg+xml,"+fc(e)}function mc(e){return'url("'+pc(e)+'")'}const hc={display:"inline-block"},zt={"background-color":"currentColor"},ys={"background-color":"transparent"},Qn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Zn={"-webkit-mask":zt,mask:zt,background:ys};for(const e in Zn){const t=Zn[e];for(const n in Qn)t[e+"-"+n]=Qn[n]}function Jn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function gc(e,t,n,r){const o=t.customisations,i=dt(n,o),a=i.attributes,c=e[de],l=ms(i.body,{...a,width:n.width+"",height:n.height+""}),u=hs(t.icon),d=gs(e,u,new Set(c&&c.addedClasses)),p={"--svg":mc(l),width:Jn(a.width),height:Jn(a.height),...hc,...r?zt:ys};o.inline&&(p["vertical-align"]="-0.125em");const v=xs(e,p,c&&c.addedStyles),S={...t,status:"loaded",addedClasses:d,addedStyles:v};return e[de]=S,e}let Ke=!1;function xc(){Ke||(Ke=!0,setTimeout(()=>{Ke&&(Ke=!1,_e())}))}function _e(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:a,prefix:c,name:l}=o,u=oe(a,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!Fa(o)){const g=n[a]||(n[a]=Object.create(null));(g[c]||(g[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Ne()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let a=!1,c=!1;function l(u,d,g){if(c||(c=!0,Nt(o)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,v=p==="mask"||(p==="bg"?!1:p==="style"?g.body.indexOf("currentColor")!==-1:null);if(typeof v=="boolean"){gc(u,d,{...Oe,...g},v);return}}vs(u,d,g)}lc(i).forEach(({node:u,props:d})=>{const g=u[de];if(!g){const{status:v,icon:S}=r(d.icon,!0);if(S){l(u,d,S);return}a=a||v==="loading",u[de]={...d,status:v};return}let p;if(ec(g,d)){if(p=r(d.icon,g.name!==d.name),!p.icon){a=a||p.status==="loading",Object.assign(g,{...d,status:p.status});return}}else{if(g.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){g.status=p.status;return}}l(u,d,p.icon)}),o.temporary&&!a?ps(i):t&&a?fs(i,!0):c&&o.observer&&Ut(o)});for(const o in n){const i=n[o];for(const a in i){const c=i[a];vn(Array.from(c).map(l=>({provider:o,prefix:a,name:l})),xc)}}}function vc(e){const t=$e(e);t?_e(t):_e({node:e,temporary:!0},!0)}function bs(e,t,n=!1){const r=Me(e);if(!r)return null;const o=Ie(e),i=as(mt,t||{}),a=vs(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?a.outerHTML:a}function yc(){return"3.1.1"}function bc(e,t){return bs(e,t,!1)}function jc(e,t){return bs(e,t,!0)}function wc(e,t){const n=Me(e);if(!n)return null;const r=as(mt,t||{});return dt(n,r)}function _c(e){e?vc(e):_e()}if(typeof document<"u"&&typeof window<"u"){Wa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Vr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ja(_e),_e()})}function Sc(e,t){ts(e,t!==!1)}function Cc(e){ts(e,!0)}ns("",La);if(typeof document<"u"&&typeof window<"u"){es();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;rs(n,o)||console.error(r)}catch{console.error(r)}}}}const Ic={getAPIConfig:pt,setAPIModule:ns,sendAPIQuery:is,setFetch:Sa,getFetch:Ca,listAPIProviders:wa},Tc={_api:Ic,addAPIProvider:rs,loadIcons:vn,loadIcon:Va,iconExists:fa,getIcon:pa,listIcons:la,addIcon:da,addCollection:Vr,replaceIDs:Gr,calculateSize:Lt,buildIcon:dt,getVersion:yc,renderSVG:bc,renderHTML:jc,renderIcon:wc,scan:_c,observe:fs,stopObserving:ps,pauseObserver:Xa,resumeObserver:Ya,enableCache:Sc,disableCache:Cc};try{self.Iconify===void 0&&(self.Iconify=Tc)}catch{}var yn={},Ec=Z;Object.defineProperty(yn,"__esModule",{value:!0});var js=yn.default=void 0,Rc=Ec(J()),Pc=s;js=yn.default=(0,Rc.default)((0,Pc.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function bn({infos:e}){const{t}=W(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
217
- `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
218
-
219
-
220
-
221
- <!--
222
- [Server Info]
223
- ${r}
224
- * Page: ${window.location.href}
225
- -->
226
- `),O(R,{sx:{mx:{xs:0,md:2}},children:O(qt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}bn.propTypes={infos:w.arrayOf(w.shape({label:w.string,value:w.string}))};bn.defaultProps={infos:[]};var jn={},Lc=Z;Object.defineProperty(jn,"__esModule",{value:!0});var Bt=jn.default=void 0,kc=Lc(J()),Xn=s;Bt=jn.default=(0,kc.default)([(0,Xn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Xn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function le({children:e}){return se(n=>n.breakpoints.down("md"))?s.jsx(ke,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:s.jsx(R,{sx:{display:"flex",alignItems:"center",gap:1},children:s.jsx(Bt,{fontSize:"small"})})}):s.jsxs(R,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(Bt,{fontSize:"small"}),e]})}le.propTypes={children:w.node.isRequired};const Dc="https://launcher.arcblock.io/",Ac=30*24*60*60*1e3;function wn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var k,h,T,C,I,m;const{t:i,locale:a}=W(),c=Se(),[l,u]=_r({safeIframeRef:null,popoverAnchorEl:null}),d=j.useRef(null),g=se(_=>_.breakpoints.down("md")),{sx:p={},...v}=o,S=g?"mobile":"desktop",y=wr(async()=>{const[_,D]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),hr({launcherUrl:e||Dc,nftDid:n,launcherSessionId:r,locale:a})]);if(_!=null&&_.error)throw new Error(_.error);return{launcherSession:_.launcherSession,subscriptionURL:D}},[a]);if(y.loading)return s.jsx(me,{label:s.jsxs(le,{children:[!g&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(y.error)return console.error(y.error),s.jsx(me,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>y.retry()});const P=_=>{u({popoverAnchorEl:_.currentTarget})},f=()=>{u({popoverAnchorEl:null})},b=(k=y.value)==null?void 0:k.launcherSession;let x="success";[z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((T=(h=y.value)==null?void 0:h.launcherSession)==null?void 0:T.status)&&(x="error");let L=null;if(b.expirationDate&&!b.subscription){const _=je(b.expirationDate).diff(je(),"ms");L=i(`expiration.${S}.tips.${x}`,{validity:jr(_,{locale:gr(a),compact:!0,verbose:!0})}),_>0&&_<=Ac&&(x="warning")}return s.jsxs(s.Fragment,{children:[s.jsx(me,{label:s.jsx(le,{children:L||((I=(C=b==null?void 0:b.subscription)==null?void 0:C.product)==null?void 0:I.name)||i("common.subscription")}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:P}),s.jsx(ar,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:f,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(R,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(m=y.value)==null?void 0:m.subscriptionURL})})})]})}wn.propTypes={chainHost:w.string.isRequired,nftId:w.string,launcherSessionId:w.string,sx:w.object,retention:w.number,launcherUrl:w.string.isRequired};wn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Oc=30*24*60*60*1e3,Mc="https://launcher.arcblock.io/";function _n({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var h,T,C,I,m,_,D;const{t:i,locale:a}=W(),[c,l]=_r({safeIframeRef:null,popoverAnchorEl:null}),u=j.useRef(null),d=se(A=>A.breakpoints.down("md")),g=Se(),{sx:p={},...v}=o,S=d?"mobile":"desktop",y=wr(async()=>{const[A,H]=await Promise.all([g.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),hr({launcherUrl:e||Mc,nftDid:n,launcherSessionId:r,locale:a})]);if(A!=null&&A.error)throw new Error(A.error);return{launcherSession:A.launcherSession,subscriptionURL:H}},[a]);if(y.loading)return s.jsx(me,{label:s.jsxs(le,{children:[!d&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(y.error)return console.error(y.error),s.jsx(me,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>y.retry()});const P=(T=(h=y.value)==null?void 0:h.launcherSession)==null?void 0:T.expirationDate,f=je(P).isBefore(je()),b=je(P).diff(je(),"ms");let x="success";b<=Oc&&(x="warning"),f&&(x="error");const L=A=>{l({popoverAnchorEl:A.currentTarget})},k=()=>{l({popoverAnchorEl:null})};return s.jsxs(s.Fragment,{children:[((I=(C=y.value)==null?void 0:C.launcherSession)==null?void 0:I.subscription)&&s.jsx(me,{label:s.jsx(le,{children:i("expiration.desktop.nextInvoice",{date:yo(P,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:L}),!((_=(m=y.value)==null?void 0:m.launcherSession)!=null&&_.subscription)&&s.jsx(me,{label:s.jsx(le,{children:i(`expiration.${S}.tips.${x}`,{validity:jr(b,{locale:gr(a),compact:!0,verbose:!0})})}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:L}),s.jsx(ar,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(R,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(D=y.value)==null?void 0:D.subscriptionURL})})})]})}_n.propTypes={chainHost:w.string.isRequired,nftId:w.string,launcherSessionId:w.string,sx:w.object,retention:w.number,launcherUrl:w.string.isRequired};_n.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Sn={},$c=Z;Object.defineProperty(Sn,"__esModule",{value:!0});var ws=Sn.default=void 0,Nc=$c(J()),Uc=s;ws=Sn.default=(0,Nc.default)((0,Uc.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Cn={},zc=Z;Object.defineProperty(Cn,"__esModule",{value:!0});var _s=Cn.default=void 0,Bc=zc(J()),Hc=s;_s=Cn.default=(0,Bc.default)((0,Hc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const qc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function In({children:e,style:t,...n}){return s.jsx(lo,{style:t,...n,children:e})}In.propTypes={children:w.any.isRequired,style:w.object};In.defaultProps={style:{}};const U={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Ye={added:U.grey,waiting:U.yellow,downloading:U.yellow,extracting:U.yellow,downloaded:U.grey,installing:U.yellow,installed:U.grey,starting:U.yellow,running:U.running,stopping:U.yellow,stopped:U.reverse,error:U.error,upgrading:U.yellow,restarting:U.yellow,corrupted:U.error,deleting:U.yellow,resource:U.primary},Fc={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"};function Ss({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:a}=j.useContext(ut),c=F.isInProgress(t),l=e&&t==="stopped"?"resource":t,u=a(`blocklet.status.${l}`);return n==="pin"?s.jsx(ke,{title:a("blocklet.statusTip",{status:u}),children:s.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[s.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Ye[l],style:{opacity:.15}}),s.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Ye[l]})]})}):n==="dot"?s.jsx(ke,{title:a("blocklet.statusTip",{status:u}),children:s.jsx(qo,{color:Ye[l],...i})}):s.jsxs(In,{type:Fc[l],...i,children:[c&&s.jsx(ue,{size:12,color:"inherit",style:{marginRight:5}}),u,l==="downloading"&&o?s.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}Ss.propTypes={status:w.string.isRequired,variant:w.oneOf(["dot","tag","pin"]),source:w.string,progress:w.number,isResource:w.bool};Ss.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Vc(){const{inFullPage:e,toggleFullPage:t}=$s();return O(ct,{onClick:t,children:e?O(_s,{sx:{transform:"scale(1.3)"}}):O(ws,{sx:{transform:"scale(1.3)"}})})}function Tn({children:e}){var x,L,k;const{t}=W(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:a}=Ce(),{info:c}=bo(),l=to(),u=se(h=>h.breakpoints.down("md")),[d,g]=j.useState(null),{appId:p,version:v}=i,S=[{label:"App ID",value:p},{label:"App Version",value:v},{label:"App Bundle Name",value:(x=a==null?void 0:a.meta)==null?void 0:x.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],y=h=>{var C,I,m,_;const T=Array.isArray(h)?h:[h];if(u||T.unshift(O(Vc,{})),a){const D={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};jo(a)?T.unshift(O(wn,{chainHost:(C=a==null?void 0:a.controller)==null?void 0:C.chainHost,nftId:(I=a==null?void 0:a.controller)==null?void 0:I.nftId,launcherSessionId:(m=a==null?void 0:a.controller)==null?void 0:m.launcherSessionId,launcherUrl:(_=a==null?void 0:a.controller)==null?void 0:_.launcherUrl,sx:D})):c.ownerNft&&c.launcher&&T.unshift(O(_n,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:D}))}return T},P=(L=((a==null?void 0:a.environments)||[]).find(h=>h.key===ce.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:L.value,f=(k=((a==null?void 0:a.environments)||[]).find(h=>h.key===ce.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:k.value;j.useEffect(()=>{if(u)g(null);else{const{appLogo:h,appLogoRect:T}=window.blocklet??{};(T||h)&&g(`${T||h}&v=${Date.now()}`)}},[P,f,u]);const b={logo:d?O("img",{src:d,alt:"logo"}):null,brandAddon:O(R,{children:a&&Ve(R,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[O(ke,{title:F.isRunning(a==null?void 0:a.status)?void 0:t(`blocklet.status.${a==null?void 0:a.status}`),children:O(R,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:Ye[a==null?void 0:a.status]})}),O(R,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.getDisplayName(a)}),O(R,{component:uo,icon:qc,sx:{color:"text.secondary"}})]})})};return Ve(Wc,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:b,footerProps:{addon:O(bn,{infos:S})},children:[!a&&n&&O(nt,{relative:"parent",children:O(ue,{})}),!a&&r&&Ve(nt,{relative:"parent",children:[Ve(R,{display:"flex",alignItems:"center",children:[O(js,{color:"error",sx:{marginRight:1}}),Kt(r)]}),O(ge,{onClick:()=>o(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(R,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(fo,{FallbackComponent:Ms,resetKeys:[l.pathname],children:e})})]})}Tn.propTypes={children:w.any};Tn.defaultProps={children:null};const Wc=V(Os)`
227
- div.dashboard-content {
228
- padding: 0;
229
- }
230
- .header-addons .locales {
231
- max-height: 400px;
232
- overflow-y: auto;
233
- }
234
-
235
- .header-brand-addon {
236
- display: block;
237
- }
238
- `;function Kc(){var P;const{t:e,locale:t}=W(),{blocklet:n,launcherSession:r,refreshSubscription:o}=Ce(),{connectApi:i,session:a,api:c}=wo(),[l,u]=j.useState(!1),[d,g]=j.useState(""),[p,v]=$o({subscriptionURL:"#"});if(j.useEffect(()=>{var f,b;kn(n,r)&&_o({launcherSessionId:(f=n==null?void 0:n.controller)==null?void 0:f.launcherSessionId,launcherUrl:(b=n==null?void 0:n.controller)==null?void 0:b.launcherUrl,locale:t}).then(x=>{v({subscriptionURL:x})}).catch(x=>{console.error("get subscription url error:",x)})},[n,r]),j.useEffect(()=>{var f;if((f=n.controller)!=null&&f.launcherUrl){const b=we(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(b).then(x=>x.json()).then(x=>{var h,T;const L=(T=(h=x.componentMountPoints)==null?void 0:h.find(C=>C.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:T.mountPoint,k=we(n.controller.launcherUrl,L);g(k)})}},[(P=n.controller)==null?void 0:P.launcherUrl]),!Dn(r)&&(!n||!r||!So(n)||r.status===z.LAUNCH_SESSION_STATUS.installed))return"";let S=null,y="";return Dn(r)?(S=s.jsx(Ys,{onClick:()=>u(!0),children:e("blocklet.paynow")}),y=e("blocklet.suspendedCausedByExpired",{deadline:xt(r==null?void 0:r.reservedUntil,t)})):kn(n,r)?(S=s.jsx(qt,{href:p.subscriptionURL,children:e("blocklet.manageSubscription")}),y=e("blocklet.suspendedCausedByExpired",{deadline:xt(r==null?void 0:r.reservedUntil,t)})):Co(n,r)&&(S=s.jsx(cr,{to:we(z.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),y=e("blocklet.suspendedCausedByTerminated",{canceledAt:xt(r==null?void 0:r.terminatedAt,t),deadline:Io(r==null?void 0:r.terminatedAt,t)})),s.jsxs(R,{component:po,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l&&d&&r&&s.jsx(To,{session:a,connect:i,baseUrl:d,authToken:r.subscription.authToken,children:s.jsx(Eo,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})}),y,s.jsx(B,{component:"span",sx:{marginLeft:"4px"},children:S})]})}const Cs=j.createContext({});function ql(){return j.useContext(Cs)}const{Provider:Gc,Consumer:Fl}=Cs,{did:ee,appId:Qc}=window.env;function Zc({children:e}){var h,T;const{t,locale:n}=W(),{blocklet:r}=Ce(),[o,i]=j.useState([]),[a,c]=j.useState([]),[l,u]=j.useState([]),d=F.getDisplayName(r),g=((h=((r==null?void 0:r.environments)||[]).find(C=>C.key===ce.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:h.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],v=(r==null?void 0:r.trustedFactories)||[],S=(r==null?void 0:r.enablePassportIssuance)!==!1,y=async()=>{try{const C=await qe.doBatchQuery({getRoles:{input:{teamDid:ee}},getPermissions:{input:{teamDid:ee}},getInvitations:{input:{teamDid:ee}}}),I=(C.getRoles.roles||[]).filter(m=>!z.RBAC_CONFIG.roles.some(_=>_.name===m.name&&(!_.passport||_.ci))).map(m=>(m.hasDescription=!!m.description,m.hasDescription||(m.description=t("team.passport.description",{teamName:d,title:m.title})),m));c(Oo(I,[m=>Ro(m.name)],["desc"])),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){N.error(C.message)}},P=({did:C}={})=>{const I={teamDid:ee,user:{did:C}};return qe.getUser({input:I})},f=({query:C,paging:I}={})=>{const m={teamDid:ee};return I&&(m.paging=I),C&&(m.query=C),m.sort={lastLoginAt:-1},qe.getUsers({input:m})},b=()=>qe.getUsersCountPerRole({input:{teamDid:ee}}),x=()=>y();j.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&y()},[(T=r==null?void 0:r.meta)==null?void 0:T.did]),j.useEffect(()=>{c(C=>C.map(I=>(I.hasDescription||(I.description=t("team.passport.description",{teamName:d,title:I.title})),{...I})))},[t,n]);const L=C=>{C.teamDid===ee&&y()};Ge(ce.TeamEvents.userAdded,L,[ee]),Ge(ce.TeamEvents.userRemoved,L,[ee]),Ge(ce.TeamEvents.userUpdated,L,[ee]);const k={teamDid:ee,teamIssuerDid:Qc,teamName:d,invitations:o,roles:a,permissions:l,trustedPassports:p,trustedFactories:v,isNodeTeam:!1,enablePassportIssuance:S,refresh:x,passportColor:g,endpoint:window.location.origin,blocklet:r,api:{getUser:P,getUsers:f,getUsersCountPerRole:b}};return s.jsx(Gc,{value:k,children:e})}const Jc=j.lazy(()=>M(()=>import("./log-Chqr_or_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Xc=j.lazy(()=>M(()=>import("./index-BGgGfqEc.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,3,40,41,42,43,44,45,46]))),Yc=j.lazy(()=>M(()=>import("./index-C8QMe2NL.js"),__vite__mapDeps([47,4,2,5,1,6,7,8,43,9,10,11,48,33,29,37,38,3,40,41,24,42,44,30,45,46]))),el=j.lazy(()=>M(()=>import("./index-DNG6b9sp.js"),__vite__mapDeps([49,2,1,9,10,4,5,6,7,8,11,50,33,29,24,22,51,13,39,52,12,25,53,45,54,55,56,57,27,32,58,59,60,61,62,63,41,64,65,66,67]))),tl=j.lazy(()=>M(()=>import("./overview-DLA9wj6a.js"),__vite__mapDeps([68,1,2,4,5,6,7,8,10,43,69,42,9,11,31,44,30,22,70,71,72,56,3,33,29,40,41,24,45,46]))),nl=j.lazy(()=>M(()=>import("./domains-BDxEOJh6.js"),__vite__mapDeps([73,2,4,5,1,6,7,8,9,10,11,74,48,23,24,44,30,33,29,37,38,63,25,75,45,43,31,76]))),rl=j.lazy(()=>M(()=>import("./index-DO4cSlUf.js"),__vite__mapDeps([77,2,6,5,1,4,7,8,9,10,11,22,78,17,18,19,20,21,34,35,23,24,79,80,81,33,29,52,45,82,3,40,41,42,43,44,30,46]))),sl=j.lazy(()=>M(()=>import("./appearance-DYi32tlk.js"),__vite__mapDeps([83,5,2,4,1,6,7,8,9,10,11]))),ol=j.lazy(()=>M(()=>import("./audit-logs-CydL26ZC.js"),__vite__mapDeps([84,4,2,5,1,6,7,8,34,35,3,9,10,11,65,66,43,85,42,39,67,33,29,40,41,24,44,30,45,46]))),il=j.lazy(()=>M(()=>import("./index-BnmeT4Bk.js"),__vite__mapDeps([86,2,1,5,4,6,7,8,9,10,11,39,31,87,55,13,88,85,42,43,36,76,17,18,19,20,21,34,35,22,89,44,30,90,91,92,57,93,29,27,28,3,33,40,41,24,45,46]))),al=j.lazy(()=>M(()=>import("./config-navigation-Dvjz9nAh.js"),__vite__mapDeps([94,2,4,5,1,6,7,8,71,80,10,95,9,11,96,97,64,56,88,58,59,90,29,3,33,40,41,24,42,43,44,30,45,46]))),cl=j.lazy(()=>M(()=>import("./index-EnQ254k3.js"),__vite__mapDeps([98,1,2,6,5,10,4,7,8,9,11,99,56,100,101,72,32,29,31,102,38,41,103,52,3,33,40,24,42,43,44,30,45,46]))),ll=j.lazy(()=>M(()=>import("./index-bb90BUf4.js"),__vite__mapDeps([104,4,2,5,1,6,7,8,9,10,11,103,69,31,35,99,3,33,29,40,41,24,42,43,44,30,45,46]))),ul=j.lazy(()=>M(()=>import("./security-BhkfG23R.js"),__vite__mapDeps([105,4,2,5,1,6,7,8,9,10,11,97,106,99,3,33,29,40,41,24,42,43,44,30,45,46]))),dl=j.lazy(()=>M(()=>import("./branding-CAMtNLMU.js"),__vite__mapDeps([107,2,1,4,5,6,7,8,10,62,108,54,81,64,9,11,23,24,88,3,33,29,40,41,42,43,44,30,45,46]))),fl=j.lazy(()=>M(()=>import("./advanced-DTe2fs5L.js"),__vite__mapDeps([109,2,1,9,10,4,5,6,7,8,11,23,24,33,29,45,25,31,22,70,71,3,40,41,42,43,44,30,46]))),pl=j.lazy(()=>M(()=>import("./traffic-T11hxc--.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,10,4,5,6,7,8,11,44,30,90,91,92,57,93,29,27,28]))),ml=j.lazy(()=>M(()=>import("./runtime-DXl0lfXF.js"),__vite__mapDeps([110,2,1,42,6,5,4,7,8,9,10,11,102,13,3,33,29,40,41,24,43,44,30,45,46]))),hl=j.lazy(()=>M(()=>import("./index-n0Q-fETi.js"),__vite__mapDeps([111,2,4,5,1,6,7,8,78,17,10,18,19,20,21,22,34,35,9,11,26,27,28,33,29,25,63,112,23,24,13,3,40,41,42,43,44,30,45,46]))),gl=j.lazy(()=>M(()=>import("./component-5gjaNHCg.js"),__vite__mapDeps([113,1,2,5,4,6,7,8,10,9,11,114,103,23,24,112,96,93,59,25,57,92,64,29,115,60,61,62,32,63,33,41,22,116,117,101,72,56,108,54,118,79,80,65,66,95,31,3,75,99,119,100,120,82,43,90,13,40,37,38,42,44,30,45,46]))),xl=j.lazy(()=>M(()=>import("./index-DuH8q5ir.js"),__vite__mapDeps([121,1,2,9,10,4,5,6,7,8,11]))),vl=we(z.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),yl=e=>{const{enqueueSnackbar:t}=dr(),n=j.useCallback(r=>vr(vl,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Ge(`${e}/${z.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:i,description:a}=r||{},c=["error","warning"].includes(i)||r.sticky;r.source==="system"&&t(a,{variant:i,autoHideDuration:c?null:5e3,content:l=>s.jsx(Ii,{viewAllUrl:o,keyId:l,notification:r,content:s.jsx(qi,{notification:r,minimal:!0,rows:0})})})},[],"user")};function Is({blocklet:e,isAdmin:t}){const[n,r]=j.useState(!1),{t:o}=W(),i=Sr();return t?s.jsxs(s.Fragment,{children:[s.jsx(il,{blocklet:e,customTableButtons:[s.jsxs(R,{display:"flex",alignItems:"center",gap:1.5,children:[s.jsx(ct,{onClick:()=>r(!0),sx:{p:i?0:void 0},children:s.jsx(Yt,{})},"settings"),i?s.jsx(B,{children:o("common.setting")}):null]})]}),s.jsx(ho,{title:`${o("common.notification")} ${o("common.setting")}`,fullWidth:!0,maxWidth:"md",open:n,onClose:()=>r(!1),PaperProps:{style:{minHeight:"500px"}},children:s.jsx(R,{sx:{mt:"-16px",overflowY:"hidden"},children:s.jsx(ea,{})})})]}):s.jsx(Us,{status:403})}Is.propTypes={blocklet:w.object.isRequired,isAdmin:w.bool.isRequired};const bl=e=>{var d,g;const{t}=W(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:i}=Ce(),a=(d=n==null?void 0:n.meta)==null?void 0:d.did,c=!n||vt(n.status)?[]:F.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:s.jsx(eo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding",show:!vt(n==null?void 0:n.status)},{label:t("common.theming"),value:"theming",show:!vt(n==null?void 0:n.status)},{label:t("common.navigation"),value:"navigation"},{label:t("common.sitemap"),value:"sitemap"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"}],developers:[{label:t("common.logs"),value:"logs",show:((g=n==null?void 0:n.children)==null?void 0:g.length)&&n.structVersion===z.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:tl,components:gl,members:s.jsx(Xc,{type:"blocklet",createPassportSvg:An}),passports:s.jsx(rl,{createPassportSvg:An}),settings:s.jsx(ll,{orientation:"vertical"}),security:s.jsx(ul,{}),"did-spaces":s.jsx(cl,{navOrientation:"horizontal"}),domains:nl,branding:s.jsx(dl,{blocklet:n,onUpdate:r}),theming:s.jsx(sl,{}),navigation:al,sitemap:s.jsx(mo,{children:t("common.comingSoon")}),notifications:s.jsx(Is,{blocklet:n,isAdmin:e}),"audit-logs":s.jsx(ol,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:s.jsx(pl,{client:o,did:i}),advanced:s.jsx(fl,{blocklet:n,onUpdate:r}),webhooks:s.jsx(Yc,{}),"access-keys":s.jsx(hl,{}),logs:Jc,performance:s.jsx(ml,{client:o,did:i}),docs:xl,publish:s.jsx(el,{})};return{tabGroups:l,renders:u}};function jl(){var f,b;const e=lr(),{tab:t="overview",subtab:n}=no(),{blocklet:r,refreshFlag:o}=Ce(),{session:i}=yr(),a=xe(()=>{var x;return(x=i==null?void 0:i.user)==null?void 0:x.did},[i]),c=Sr(),l=xe(()=>{var x;return((x=i.user)==null?void 0:x.role)&&Lo.includes(i.user.role)},[i]);yl(a);const{tabGroups:u,renders:d}=bl(l),g=x=>{e(`${z.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${x}`)},p=(u[t]||[]).filter(x=>x.show===void 0||x.show),v=((f=(p||[]).find(x=>x.value===n))==null?void 0:f.value)||((b=p==null?void 0:p[0])==null?void 0:b.value)||t,S=d[v]||d.overview,y=["overview"].includes(t),P=r?s.jsxs(Gt,{type:"components",children:[p.length>0&&s.jsxs(R,{mb:2,display:"flex",alignItems:"center",gap:2,children:[s.jsx(R,{flex:1,children:s.jsx(pr,{tabs:p,current:v,onChange:g,scrollButtons:"auto"})}),y&&!c&&s.jsx(R,{component:"div",className:"page-header",children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null})]}),s.jsx(R,{className:"page-content",children:s.jsx(j.Suspense,{fallback:s.jsx(nt,{relative:"parent",children:s.jsx(ue,{})}),children:j.isValidElement(S)?S:s.jsx(S,{blocklet:r})})})]}):s.jsx(nt,{relative:"parent",children:s.jsx(ue,{})});return s.jsx(ko,{children:s.jsx(Zc,{children:s.jsx(Tn,{children:s.jsxs(_l,{children:[c&&y&&s.jsx(R,{component:"div",className:"page-header",mb:2,children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null}),s.jsx(Dr,{}),s.jsx(Kc,{}),P]})},`${o}`)})})}function wl(){var r;const{blocklet:e}=Ce(),{t}=W(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return j.useEffect(()=>{const o=Po();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),s.jsxs(s.Fragment,{children:[s.jsx(Ns,{children:s.jsx("title",{children:t("pageTitle.dashboard")})}),s.jsx(jl,{})]})}const _l=V.main`
239
- .page-header {
240
- display: flex;
241
- justify-content: space-between;
242
- align-items: center;
243
- flex-wrap: wrap;
244
- gap: 16px;
245
- }
246
-
247
- .page-title {
248
- display: flex;
249
- align-items: center;
250
-
251
- .page-link {
252
- font-size: 15px;
253
- margin-top: 8px;
254
- margin-left: 8px;
255
- }
256
- }
257
-
258
- @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
259
- .page-header {
260
- flex-direction: column;
261
- align-items: flex-start;
262
- .page-actions,
263
- .MuiButtonGroup-root {
264
- width: 100%;
265
- }
266
- .MuiButtonGroup-root {
267
- .MuiButtonBase-root {
268
- flex: 1;
269
- }
270
- .blocklet-action-text {
271
- display: none;
272
- }
273
- }
274
- }
275
-
276
- .page-title {
277
- margin-bottom: 15px;
278
- }
279
- }
280
- `,Vl=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"}));export{Ss as B,Q as S,In as W,Tr as a,Ir as b,Pr as c,js as d,be as e,Hl as f,Vl as g,ql as u};
@@ -1 +0,0 @@
1
- const e={auth:{noPermission:{title:"Keine Erlaubnis",description:"Du bist nicht der Administrator des Blocklets"}},login:{reLogin:"Verbinden",description:"Du musst deine DIDs Wallet verbinden, um auf {name} zuzugreifen",already:"Du bist verbunden als",connectWallet:"Verbinde das DID Wallet",closeWindow:"Fenster schließen",accessLimit:{title:"Seitenzugriff eingeschränkt",description:"Diese Seite erfordert die folgenden Pässe zum Zugriff, verbinden Sie sich bitte mit dem Portemonnaie, um den entsprechenden Pass zu ändern oder zu beantragen.",alreadyHavePassport:"Habe bereits den Reisepass",connectWithPassport:"Verbinde mit diesem Reisepass",buyPassport:"Kaufen Sie einen Reisepass"},switchDid:{title:"Konto wechseln",scan:"Verwenden Sie die folgenden Methoden, um das Konto zu wechseln",confirm:"Bestätige den Wechsel in deiner DID-Wallet",success:"Erfolgreich umgeschaltet"},switchSpecifiedDid:{title:"Konto wechseln",scan:"Du musst die DID zu {did} wechseln, um die folgenden Aktionen abzuschließen.",confirm:"Bestätigen Sie den Wechsel in Ihrer DID-Brieftasche",success:"Erfolgreich gewechselt"},connect:{title:"Verbinden",scan:"Verwenden Sie bitte die folgenden Methoden, um die Verbindung herzustellen",confirm:"Bestätigen Sie in Ihrer DID-Geldbörse",success:"Sie sind erfolgreich verbunden"},needManualClose:"Anmeldung erfolgreich. Wenn sich dieses Fenster nicht automatisch schließt, bitte schließen.",connectWithPassport:"Verbinde dich mit diesem Reisepass",invalidRedirectUrl:"Ungültige Weiterleitungs-URL",issueKyc:{pageDescription:"Schließen Sie die Verifizierung ab, um Ihr Konto zu sichern und ein wiederverwendbares NFT zu erhalten, das von anderen Websites vertraut werden kann (einmal überprüfen und überall präsentieren).",verifyButton:"Überprüfen",sendCodeButton:"Holen Sie sich einen Bestätigungscode",codeSentMessage:"Wir haben gerade einen Bestätigungscode an {email} gesendet. Der Code ist 30 Minuten lang gültig. Bitte überprüfen Sie Ihr Postfach oder Spam-Ordner.",codeSentSuccess:"Bestätigungscode erfolgreich gesendet",claim:"Bestätigungs-E-Mail-Zertifikat abrufen",scan:"Verbinden Sie Ihre DID-Brieftasche, um das Zertifikat zu erhalten",confirm:"Bestätigen Sie auf Ihrem DID Wallet",success:"Herzlichen Glückwunsch! Sie haben Ihre E-Mail erfolgreich verifiziert und das Zertifikat in Ihrem DID Wallet beansprucht.",backToHome:"Zurück zum Start",emailPlaceholder:"Ihre E-Mail-Adresse",verifyTitle:"Bestätigen Sie Ihre E-Mail-Adresse",issueTitle:"Anspruch E-Mail-Verifizierung NFT",verifyAction:"Überprüfen",issueAction:"Beanspruchung",issueTarget:"Du bist {action} für die folgende DID, klicke auf den Avatar, um eine weitere DID hinzuzufügen"},updateKyc:{button:"Zertifikat präsentieren",title:"Präsentieren Sie das verifizierte E-Mail-Zertifikat",scan:"Verbinden Sie Ihre DID-Brieftasche, um das Zertifikat vorzulegen",confirm:"Bestätigen Sie auf Ihrem DID Wallet",success:"Herzlichen Glückwunsch! Ihr NFT wurde überprüft und akzeptiert."},invalidOpenerUrl:"Ungültige Opener-URL"},studio:{home:"Studio",preferences:"Präferenzaufbau",localization:"Lokalisierung",branding:"Markenbilder",ratio:"Verhältnis",size:"Größe",count:"Zählen",tip:"Tipp",change:"Klicken Sie auf das Logo, um es zu ändern.",order:"Bestellung",orderTip:"Ziehen zum Ändern",orderTipLong:"Ziehen Sie, um zu ändern. Wenn Sie Screenshots auf der Festplatte löschen, aktualisieren Sie bitte die Seite.",type:"Typ",videoTipLong:"Klicke auf das Cover, um den Videolink zu bearbeiten.",video:"Video",videoTooltip:"Ziehen Sie, um die Reihenfolge zu ändern.",videoType:"Unterstützte Webseiten",videoDialogTitle:"Video hinzufügen",videoDialogEditTitle:"Video bearbeiten/löschen",videoInputLabel:"Geben Sie einen YouTube- oder Vimeo-Videolink ein",videoDialogNoSrc:"Bitte geben Sie einen gültigen Videolink ein",duplicateVideo:"Dieses Video wurde hinzugefügt",confirm:"Bestätigen",cancel:"Abbrechen",preview:"Vorschau",delete:"Löschen",title:"Bilder für {title} bereitstellen",description:"Mehr Informationen finden Sie unter",documentation:"Dokumentation"},blocklet:{startApplication:"Starte Anwendung",startDescription:"Bereit, {name} zu starten",start:"Start",starting:"Starten...",open:"Öffnen",suspended:"Anwendung ausgesetzt",manageSubscription:"Abonnement verwalten",suspendedCausedByExpired:"Diese Anwendung wurde aufgrund abgelaufener Bezahlung vorübergehend gestoppt. Bitte erneuern Sie vor {deadline}, um fortzufahren. Erfolgt in der angegebenen Frist keine Erneuerung, kann sie nicht mehr erneuert oder fortgesetzt werden.",suspendedCausedByTerminated:"Die Anwendung wurde aufgrund der am {canceledAt} gekündigten Subscription beendet und die Daten werden bis zum {deadline} vorgehalten. Bevor die Daten gelöscht werden, können Sie die Daten in DID Spaces sichern.",terminated:"Anwendung beendet",gotoVisitError:"Kann URL des Blocklets nicht aufrufen, bitte später erneut versuchen.",paynow:"Jetzt bezahlen"},setup:{steps:{connect:"Verbinden",didSpace:"DID Spaces",config:"Konfiguration",domain:"Domain",access:"Zugangskontrolle",fuel:"Kraftstoff",complete:"Komplett",introduction:"Einführung",selectNodeDesc:"Wähle Blocklet Server aus",launchAppDesc:"Blocklet auf Server installieren",setupAppDesc:"Setup Blocklet",launched:"Vervollständigen"},connect:{title:"Verbinde mit Anwendung",scan:"Verwenden Sie die folgenden Methoden, um Benutzerprofil und Blocklet-Besitzerrechte bereitzustellen. Anschließend können Sie die App konfigurieren und starten.",confirm:"Bestätigen Sie in Ihrer DID-Brieftasche",success:"Sie sind erfolgreich verbunden"},domain:{addTitle:"Bestehende Domain binden (Optional)",title:"Domain auswählen",subTitle:"Passe deine Domain für die Anwendung an",label:"Bitte geben Sie einen gültigen Domainnamen an",tipStart:"Bitte stellen Sie sicher",tipEnd:"Hat Punkt zum aktuellen Server",addingCert:"Zertifikat wird erstellt...",recordType:"Datentyp",recordValue:"Aufzeichnungswert",genCertSuccess:"Das {domain}-Zertifikat wurde erfolgreich ausgestellt",genCertFailed:"Fehler beim Ausstellen des Zertifikats für {domain}: {message}",genCertFailedForNFTDomain:"NFT-Domain erfolgreich hinzugefügt, aber das HTTPS-Zertifikat konnte nicht generiert werden. Bitte versuche es später erneut.",buyDIDDomainTitle:"Kaufe eine DID-Domain (Optional)",buyDIDDomainTips:"Nach dem Kauf einer DID-Domain wird diese automatisch an die Anwendung gebunden.",buyOrConnect:"Sie können eine bestehende Domain kaufen oder konfigurieren",skipDescription:"Sie können vorübergehend die Standarddomains verwenden. Diese Domains sind nicht für die Produktion geeignet und sollten nicht mit Kunden geteilt werden."},didSpace:{title:"Konfigurieren Sie DID Spaces",subTitle:"Bitte schließen Sie den folgenden Verbindungsvorgang ab, um Anwendungsdaten in DID Spaces zu speichern.",tips:"Tipps",description:"Konfigurieren Sie die DID Spaces Instanzadresse und speichern Sie die Anwendungsdaten in DID Spaces nach einer erfolgreichen Verbindung",label:"Bitte wählen Sie den DID Spaces-Dienst",connected:"Sie haben erfolgreich eine Verbindung mit DID Spaces hergestellt",connect:"Verbinden Sie jetzt",reconnect:"Verbinden",addressCannotEmpty:"Die Adresse darf nicht leer sein",addressNotValid:"{url} ist keine gültige Adresse.",authorize:{title:"Verbinde {appName} mit DID Spaces",scan:"Verwenden Sie die folgenden Methoden, um der App {appName} die Verbindung zu DID Spaces zu ermöglichen",success:"Erfolgreich verbunden"}},config:{title:"Konfiguration",subTitle:"Andere Konfigurationselemente (Sie müssen auch die folgenden Elemente festlegen)"},complete:{title:"Ihre App ist bereit",failedTitle:"Fehler beim Starten der App",backToServer:"Zurück zum Blocklet Server",notRunning:"App konnte beim ersten Versuch nicht starten, bitte erneut versuchen"},fuel:{title:"Kraftstoff zum Starten erforderlich",tipStart:"Schlitz",tipEnd:"Für diese Anwendung ist eine Guthaben erforderlich, damit die Anwendung ordnungsgemäß funktionieren kann. Die Gelder werden in der Anwendungsbrieftasche gespeichert und können für Transaktionsgebühren verwendet werden. Sie können Ihr Guthaben jederzeit abheben, wenn Sie die App nicht mehr verwenden.",addressTitle:"Anwendungskonto",addressTip:"Befüllen Sie die Anwendung mit einer DID Wallet",need:"Brauchen",current:"Aktuell",fuelApp:"Anwendung mit Treibstoff versorgen"},title:"Aufbau",next:"Nächster",previous:"Vorherige",continue:"Weiter",skip:"Überspringen",startNow:"Starte jetzt",confirm:"Bestätigen",cancel:"Abbrechen"},user:{walletNotification:"DID Wallet Benachrichtigung",emailNotification:"E-Mail-Benachrichtigung",smsNotification:"SMS-Benachrichtigung",addWebhook:"Neuen Webhook hinzufügen"},pageTitle:{login:"Anmelden",dashboard:"Blocklet-Dashboard",userCenter:"Benutzerzentrum",invite:"Einladen",issuePassport:"Reisepass ausstellen",lostPassport:"Verloren Reisepass"},errorPage:{404:{title:"Ups! Seite nicht gefunden",description:"Es scheint, dass die gesuchte Seite nicht existiert.",backHome:'Wenn Sie ein Besucher sind, können Sie <a href="{url}">zurück zur Startseite gehen</a>',goToDashboard:"Wenn Sie der Site-Besitzer sind, können Sie sich im <a href={url}>Dashboard anmelden</a>."}},common:{branding:"Branding",theming:"Design",navigation:"Navigation",sitemap:"Sitemap",advanced:"Erweitert",performance:"Leistung",docs:"Dokumente",comingSoon:"Bald verfügbar",accessKeys:"Zugriffsschlüssel"},connectCli:{title:"Verbinden, um Zugangsschlüssel zu generieren",scan:"Scannen Sie folgenden QR-Code, um den Zugangsschlüssel zu generieren",success:"Verbindung zum Generieren des Zugriffsschlüssels erfolgreich hergestellt",successDesc:"Zugriffsschlüssel erfolgreich generiert, diese Seite kann sicher geschlossen werden. Sie können jetzt lokale Blocklets mit dem generierten Zugriffsschlüssel hochladen.",invalidSession:"Ungültige Sitzung",invalidSessionDesc:"Sitzung existiert nicht oder ist abgelaufen. Verwenden Sie den Befehl 'blocklet deploy --endpoint {endpoint}', um den Zugriffsschlüssel neu zu generieren.",connectionError:"Zugriffsschlüssel konnte nicht generiert werden",home:"Zurück zur Startseite",tips:{title:"Zugriffsschlüssel generieren",item1:"Unterstützt lokale Bereitstellung von Blocklets in der aktuellen Anwendung",item2:"Wird in der Liste der Zugriffsschlüssel der Anwendung angezeigt",item3:"Sie können den Zugriffsschlüssel jederzeit in der Liste widerrufen"}}};export{e as default};