@abtnode/blocklet-services 1.17.8-beta-20260116-080047-9fdd00d3 → 1.17.8-beta-20260119-102944-6ba93a16

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 (207) hide show
  1. package/dist/assets/{AdapterDayjs-BI3dme25.js → AdapterDayjs-CYW0YvmK.js} +1 -1
  2. package/dist/assets/{Google-BMSeyXdi.js → Google-DKRt92nm.js} +1 -1
  3. package/dist/assets/{access-control-CSfPgD_B.js → access-control-RI6LQbSm.js} +1 -1
  4. package/dist/assets/{actions-Ng-YRTer.js → actions-BlWED76c.js} +2 -2
  5. package/dist/assets/{actions-Dktj9pEF.js → actions-DydkTgA0.js} +1 -1
  6. package/dist/assets/{add-component-core-DOIm-W83.js → add-component-core-nc1ps0ni.js} +32 -32
  7. package/dist/assets/{add-resource-_wuuBiJJ.js → add-resource-BVOdOQSW.js} +1 -1
  8. package/dist/assets/{addon-N_sS-Sx6.js → addon-DfWedLEC.js} +1 -1
  9. package/dist/assets/{advanced-BhbxG-_n.js → advanced-CuKHqbLO.js} +2 -2
  10. package/dist/assets/{aigne-DElJAbjP.js → aigne-6nMSoyeQ.js} +1 -1
  11. package/dist/assets/{appearance-D71HSeGD.js → appearance-C9TkbSjV.js} +1 -1
  12. package/dist/assets/{ar-BHqjWgUQ.js → ar-DOhYGTlW.js} +1 -1
  13. package/dist/assets/{audit-logs-Ci_HlT4m.js → audit-logs-DKGke9hI.js} +2 -2
  14. package/dist/assets/{authorize-DQERA3Vv.js → authorize-DkSqywe8.js} +1 -1
  15. package/dist/assets/{base-chart-DWXZOkNE.js → base-chart-DcZV4ZCI.js} +1 -1
  16. package/dist/assets/{base32-Cpvj2sD4.js → base32-7iZvvdX8.js} +1 -1
  17. package/dist/assets/{bind-account-BIzFrnLk.js → bind-account-DOwM9Nhe.js} +1 -1
  18. package/dist/assets/branding-Cak2s8bn.js +1 -0
  19. package/dist/assets/{branding-BHJqY7Mz.js → branding-CwSyd5WC.js} +1 -1
  20. package/dist/assets/{branding-DAdwbyWZ.js → branding-lcfxmmPp.js} +1 -1
  21. package/dist/assets/{bundle-avatar-sDqev1Fh.js → bundle-avatar-DwiOyeMO.js} +1 -1
  22. package/dist/assets/button-uUU4Wycr.js +1 -0
  23. package/dist/assets/{click-to-copy-RBTqACSW.js → click-to-copy-BgIYUMoo.js} +1 -1
  24. package/dist/assets/{collapse-DWmyzfnW.js → collapse-RMuUWnK3.js} +1 -1
  25. package/dist/assets/{complete-D6XDZtnV.js → complete-Udiv_yFp.js} +1 -1
  26. package/dist/assets/{component-B2qSKMGx.js → component-CuKviNC8.js} +2 -2
  27. package/dist/assets/{config-oF-A1tKe.js → config-6IwEgT3b.js} +1 -1
  28. package/dist/assets/{config-Ca5tnO9j.js → config-CJwxv2uK.js} +1 -1
  29. package/dist/assets/{config-fYkZxdEr.js → config-D1OcHGlN.js} +4 -4
  30. package/dist/assets/{config-navigation-BEYJ5bSz.js → config-navigation-hDihVsjx.js} +2 -2
  31. package/dist/assets/{config-space-HmsYCb6s.js → config-space-DfstlHnF.js} +1 -1
  32. package/dist/assets/{confirm-DQYDHHdS.js → confirm-CdVn5WdC.js} +1 -1
  33. package/dist/assets/{connect-COLwEMSx.js → connect-CT2vMz6l.js} +3 -3
  34. package/dist/assets/{connect-ydb7rKXe.js → connect-DA7RO2yv.js} +1 -1
  35. package/dist/assets/{connect-BeWeBwCA.js → connect-Dy0Y8HRB.js} +1 -1
  36. package/dist/assets/{connect-to-C3ac4B-g.js → connect-to-CQMUbQkH.js} +1 -1
  37. package/dist/assets/{content-layout-CanSZTqf.js → content-layout-Dlmn5DW6.js} +1 -1
  38. package/dist/assets/{create-passport-svg-De1vqcmo.js → create-passport-svg-hldNORaB.js} +1 -1
  39. package/dist/assets/{createClass-CRUn7w67.js → createClass-CgfWUrk8.js} +1 -1
  40. package/dist/assets/{dashboard-BZiea8Z_.js → dashboard-BvI3ii8Z.js} +2 -2
  41. package/dist/assets/{de-QUGQFv2K.js → de-CtKPdGk6.js} +1 -1
  42. package/dist/assets/{delete-confirm-CpaOkuin.js → delete-confirm-CkiUXocp.js} +1 -1
  43. package/dist/assets/{did-address-DRYM96gB.js → did-address-CG36eCOx.js} +1 -1
  44. package/dist/assets/{domain-D9Kc4Rgt.js → domain-CDTeLbkZ.js} +1 -1
  45. package/dist/assets/{domain-action-card-ugKl692S.js → domain-action-card-kMPYS2Nj.js} +1 -1
  46. package/dist/assets/domains-TI6o1CvX.js +1 -0
  47. package/dist/assets/{email-DDyG3qPR.js → email-DHRHueET.js} +2 -2
  48. package/dist/assets/{empty-spinner-ChYvCNCV.js → empty-spinner-DB1GKIOS.js} +1 -1
  49. package/dist/assets/engine-D_fEFx9_.js +1 -0
  50. package/dist/assets/{es-C4w6cL07.js → es-BSYtSZPg.js} +1 -1
  51. package/dist/assets/{exchange-passport-DoiXZo5M.js → exchange-passport-Cc872mjQ.js} +1 -1
  52. package/dist/assets/{fallback-CZRO9TTQ.js → fallback-D-IHOW-7.js} +1 -1
  53. package/dist/assets/{form--iZWaH7Y.js → form-Co-tgocU.js} +1 -1
  54. package/dist/assets/{form-text-input-Cs-LuCu0.js → form-text-input-CPLafaTk.js} +1 -1
  55. package/dist/assets/{form-wrapper-EixE0Jkw.js → form-wrapper-kWYD3nZz.js} +1 -1
  56. package/dist/assets/{fr-Bq3UipEu.js → fr-C35fi7h9.js} +1 -1
  57. package/dist/assets/{fuel-C85y6XSK.js → fuel-BFx1ShM2.js} +1 -1
  58. package/dist/assets/{gen-access-key-DxF-VBeV.js → gen-access-key-DrgLVRbm.js} +1 -1
  59. package/dist/assets/{gen-simple-access-key-Cxq1_uy6.js → gen-simple-access-key-B24d6k7g.js} +1 -1
  60. package/dist/assets/get-safe-url-beob4f2C.js +1 -0
  61. package/dist/assets/{hi-DGZy0DLh.js → hi-5fpYJkiW.js} +1 -1
  62. package/dist/assets/{home-EzPPxjBW.js → home-Dw18IODa.js} +1 -1
  63. package/dist/assets/{id-DOzDilAf.js → id-DoVb0JYr.js} +1 -1
  64. package/dist/assets/{iframe-C5nvJ0m0.js → iframe-DUzp97tk.js} +1 -1
  65. package/dist/assets/{index-B3ArnS-X.js → index--WQuhwJL.js} +1 -1
  66. package/dist/assets/{index-Cw8Yly1u.js → index-2M4w6J9r.js} +1 -1
  67. package/dist/assets/{index-D3fA5iF-.js → index-3H6a5edM.js} +1 -1
  68. package/dist/assets/{index-_uJPC7_n.js → index-8RHrVCC6.js} +1 -1
  69. package/dist/assets/{index-BM9QepzF.js → index-B-8044Gs.js} +22 -11
  70. package/dist/assets/{index-Ba_SJ3UV.js → index-B6l4xGy5.js} +2 -2
  71. package/dist/assets/{index-CbZQvtgh.js → index-B9FojAjj.js} +1 -1
  72. package/dist/assets/{index-BQFgfBFX.js → index-BOPR4Iyc.js} +2 -2
  73. package/dist/assets/{index-VlFqUdI2.js → index-BUhEyicQ.js} +1 -1
  74. package/dist/assets/{index-DGU5RA0-.js → index-BeunkI-Z.js} +3 -3
  75. package/dist/assets/{index-_bvucGkF.js → index-Bo9KtpTY.js} +1 -1
  76. package/dist/assets/{index-r7svI4rK.js → index-Bpic07NM.js} +7 -7
  77. package/dist/assets/{index-BuucS_rQ.js → index-C1fKsLzf.js} +1 -1
  78. package/dist/assets/{index-D_ymA2Th.js → index-C4ZzROeE.js} +5 -5
  79. package/dist/assets/{index-sb6EjUcD.js → index-CEJb82tA.js} +1 -1
  80. package/dist/assets/{index-Ca33rdd_.js → index-CXp5SI_f.js} +82 -82
  81. package/dist/assets/{index-zkaWHEAS.js → index-C_kNXHsF.js} +1 -1
  82. package/dist/assets/{index-DvQIPWQ6.js → index-Cax1AxL9.js} +1 -1
  83. package/dist/assets/{index-Ca5zgzpl.js → index-CfvGuvbD.js} +1 -1
  84. package/dist/assets/{index-BbO4pSmm.js → index-CqCXPf7W.js} +1 -1
  85. package/dist/assets/{index-p0MfrvgW.js → index-Cx0E03Bs.js} +1 -1
  86. package/dist/assets/{index-CL5ZGYlc.js → index-D3BuekEe.js} +3 -3
  87. package/dist/assets/{index-D4_8N2le.js → index-D6pCyJv8.js} +1 -1
  88. package/dist/assets/{index-Ddl9fWMP.js → index-DFUM0Pvk.js} +1 -1
  89. package/dist/assets/{index-B3fG443w.js → index-DH4rC-7M.js} +1 -1
  90. package/dist/assets/{index-B2PeJoug.js → index-DKzBOJCu.js} +2 -2
  91. package/dist/assets/index-DL0wTcgx.js +1 -0
  92. package/dist/assets/{index-C9V4aWeM.js → index-DWHFecw2.js} +4 -4
  93. package/dist/assets/{index-Dxb3MonW.js → index-DcW3jqfL.js} +1 -1
  94. package/dist/assets/{index-CxOxF1pg.js → index-Di2nSesc.js} +1 -1
  95. package/dist/assets/{index-CiCryHDZ.js → index-DqcciDRh.js} +2 -2
  96. package/dist/assets/{index-DCxNOCc2.js → index-VKjWmvRV.js} +1 -1
  97. package/dist/assets/{index-DVOweIMx.js → index-Vf51dp11.js} +1 -1
  98. package/dist/assets/{index-2AyCotIy.js → index-ZzcJ7eKO.js} +1 -1
  99. package/dist/assets/{index-Bwibx9MU.js → index-bEFOmVth.js} +1 -1
  100. package/dist/assets/{info-outline-rounded-DVdLJtdi.js → info-outline-rounded-DlgANjBB.js} +1 -1
  101. package/dist/assets/{invitation-CUluW5mi.js → invitation-BP8hOEFv.js} +1 -1
  102. package/dist/assets/invitations-C8aZLxdl.js +3 -0
  103. package/dist/assets/{invite-zC3nU84H.js → invite-Cd5zEHFb.js} +1 -1
  104. package/dist/assets/{issue-passport-B_pYDft0.js → issue-passport-D7zqv3Al.js} +1 -1
  105. package/dist/assets/{item-DoUn7xhc.js → item-DNj7ORqk.js} +1 -1
  106. package/dist/assets/{ja-DMq-YXDX.js → ja-DZPUwZ9l.js} +1 -1
  107. package/dist/assets/{ko-BrYbXurh.js → ko-q4i4r9g6.js} +1 -1
  108. package/dist/assets/{landing-page-BJAji-kI.js → landing-page-JLA-ZD1t.js} +1 -1
  109. package/dist/assets/{launch-result-message-B2nhmkKt.js → launch-result-message-DJqF-slD.js} +1 -1
  110. package/dist/assets/{layout-CydCBGqn.js → layout-Cwvm7lmD.js} +1 -1
  111. package/dist/assets/{list-BIwaCPhs.js → list-3MUy-8Ol.js} +2 -2
  112. package/dist/assets/{list-CO8Xp7iX.js → list-BSXHuqLM.js} +1 -1
  113. package/dist/assets/{list-header-DQZTNnUc.js → list-header-BEZSwSji.js} +1 -1
  114. package/dist/assets/localization-Dond4H78.js +1 -0
  115. package/dist/assets/{log-JZXyzrRA.js → log-Bq445Z1e.js} +1 -1
  116. package/dist/assets/logger-CCAAJ2Xo.js +1 -0
  117. package/dist/assets/{login-CU5Tw5QB.js → login-dc2t9Qyo.js} +1 -1
  118. package/dist/assets/{login-method-item-KhJ672kA.js → login-method-item-CyTsqz88.js} +1 -1
  119. package/dist/assets/{login-oauth-callback-Bz7N73Sg.js → login-oauth-callback-Bext19kc.js} +1 -1
  120. package/dist/assets/{logo-uploader-DjKJkvts.js → logo-uploader-CyZuvhwV.js} +1 -1
  121. package/dist/assets/{lost-passport-CyJVtH1V.js → lost-passport-BiYg3QQI.js} +1 -1
  122. package/dist/assets/{metadata-CkzdOpl3.js → metadata-B2-Ltdko.js} +1 -1
  123. package/dist/assets/{nav-menu-5M0Q4jYU.js → nav-menu-DSdXRbfg.js} +1 -1
  124. package/dist/assets/{open-window-DphH3aTv.js → open-window-Dyu79ome.js} +1 -1
  125. package/dist/assets/over-due-invoice-payment-DzUsy6q0.js +1 -0
  126. package/dist/assets/{overview-CGIG2I_w.js → overview-0TBmi-_i.js} +1 -1
  127. package/dist/assets/{page-header-B0HpJClf.js → page-header-qdK3sAJh.js} +1 -1
  128. package/dist/assets/{passport-DKYg_d4G.js → passport-BhEaZ-sr.js} +1 -1
  129. package/dist/assets/{passport-item-CjcqN_g-.js → passport-item-DHwif94N.js} +1 -1
  130. package/dist/assets/{permission-DhyiLNfC.js → permission-CvrrGfG6.js} +1 -1
  131. package/dist/assets/preferences-BBSWzZiT.js +1 -0
  132. package/dist/assets/profile-embed-shcOdRUI.js +1 -0
  133. package/dist/assets/{provider-icon-DX-QfJQN.js → provider-icon-DO2PqSth.js} +1 -1
  134. package/dist/assets/{pt-Dl6732JN.js → pt-BFCHl6F1.js} +1 -1
  135. package/dist/assets/{publish-resource-vCC9AfJK.js → publish-resource-CMuHIOUf.js} +1 -1
  136. package/dist/assets/{react-beautiful-dnd.esm-bkXlrjYw.js → react-beautiful-dnd.esm-CWJ5I9Zv.js} +1 -1
  137. package/dist/assets/{react-stripe.esm-BBCEegrE.js → react-stripe.esm-B-FTN8ep.js} +1 -1
  138. package/dist/assets/{required-11pmtzQr.js → required-DnQpCGsD.js} +1 -1
  139. package/dist/assets/{ru-CVUeN9AX.js → ru-CSTl62kK.js} +1 -1
  140. package/dist/assets/{runtime-BjKYEBG_.js → runtime-B_ZLP4FF.js} +1 -1
  141. package/dist/assets/sdk-CktKu_IW.js +1 -0
  142. package/dist/assets/{section-ewv0pNWr.js → section-CZylgxjz.js} +1 -1
  143. package/dist/assets/{security-Xrnc8Gqe.js → security-DHRU8k0u.js} +1 -1
  144. package/dist/assets/{session-lE2gmzzF.js → session-Bp3LV7zJ.js} +1 -1
  145. package/dist/assets/{setup-p5LUFpYK.js → setup-B6-Ei_3X.js} +1 -1
  146. package/dist/assets/{shorten-label-1iJcvGQT.js → shorten-label-CuBHsWUR.js} +1 -1
  147. package/dist/assets/{simple-select-BKXEgxog.js → simple-select-nI-W90c_.js} +1 -1
  148. package/dist/assets/{spaces-Ckljlc4d.js → spaces-ix8u0ZiI.js} +1 -1
  149. package/dist/assets/{start-BE-C9MhV.js → start-oRp78RMQ.js} +1 -1
  150. package/dist/assets/{starting-progress-DC-J-5Os.js → starting-progress-CWp5fTY0.js} +1 -1
  151. package/dist/assets/{status-DR5t3VVx.js → status-Dn_LKaNp.js} +1 -1
  152. package/dist/assets/{step-actions-CArEuzNw.js → step-actions-DIZRcnXf.js} +1 -1
  153. package/dist/assets/{studio-BEzAGvQT.js → studio-CVIa8-XY.js} +1 -1
  154. package/dist/assets/{switch-CmVFEdik.js → switch-BbyTGEOo.js} +1 -1
  155. package/dist/assets/{switch-control-DbLHF-NB.js → switch-control-BRjXGc1d.js} +1 -1
  156. package/dist/assets/{table-tips-DQIh1EQR.js → table-tips-Dvmdodc5.js} +1 -1
  157. package/dist/assets/{team-7-48iuwj.js → team-BTz28XqK.js} +1 -1
  158. package/dist/assets/{th-32eBNQes.js → th-D75Dlluo.js} +1 -1
  159. package/dist/assets/theme-mode-toggle-D3bcd10D.js +1 -0
  160. package/dist/assets/{traffic-Dwd2RNqG.js → traffic-Cea69sMW.js} +1 -1
  161. package/dist/assets/{transfer-BwnSX6wY.js → transfer-BydXCVCg.js} +1 -1
  162. package/dist/assets/unsubscribe-BjAjx-Fl.js +1 -0
  163. package/dist/assets/{use-app-logo-BzsLZwwK.js → use-app-logo-IRizt64R.js} +1 -1
  164. package/dist/assets/{use-blocklet-logo-BWPJOOVd.js → use-blocklet-logo-Cf1j7pQz.js} +1 -1
  165. package/dist/assets/{use-mobile-DgmmfWdl.js → use-mobile-CyUZDIaX.js} +1 -1
  166. package/dist/assets/{use-mobile-BSL5RsRd.js → use-mobile-DFkQ5N0b.js} +1 -1
  167. package/dist/assets/{use-mobile-TAIHvgoJ.js → use-mobile-DwGMuJlg.js} +1 -1
  168. package/dist/assets/{use-server-logo-BLcfNvrR.js → use-server-logo-KZn9RrZd.js} +1 -1
  169. package/dist/assets/{use-window-close-D2_118dJ.js → use-window-close-Dpj5UcYT.js} +1 -1
  170. package/dist/assets/{useAsyncRetry-B-Txlvk6.js → useAsyncRetry-C4R9ufi-.js} +1 -1
  171. package/dist/assets/{useLocalStorage-D6axLnAi.js → useLocalStorage-BQfIniHX.js} +1 -1
  172. package/dist/assets/{user-center-DBscV1le.js → user-center-6K47tx8j.js} +5 -5
  173. package/dist/assets/{user-follower-Di51icra.js → user-follower-BwzTutxU.js} +1 -1
  174. package/dist/assets/{util-DCHBQZpP.js → util-DkTwHdRu.js} +1 -1
  175. package/dist/assets/{util-ad0rjUA1.js → util-DySzCymV.js} +1 -1
  176. package/dist/assets/{vendor-arcblock-ivFYo5vP.js → vendor-arcblock-Dll6qxMT.js} +1 -1
  177. package/dist/assets/{vendor-mui-core-D7t4vMS5.js → vendor-mui-core-CV-FnYH_.js} +1 -1
  178. package/dist/assets/{vendor-mui-x-BpPw6UfF.js → vendor-mui-x-DwN6dcQH.js} +1 -1
  179. package/dist/assets/{vendor-ux-Dl3wVbv_.js → vendor-ux-CLT2i3Pv.js} +2 -2
  180. package/dist/assets/{vi-DF8IinAc.js → vi-D1mKYrmb.js} +1 -1
  181. package/dist/assets/{wait-connect-DOIonmAv.js → wait-connect-q0_7mz_u.js} +1 -1
  182. package/dist/assets/wallet-hidden-topbar-joIVZ1nl.js +68 -0
  183. package/dist/assets/{wizard-CrkxQgBY.js → wizard-C5Kl-g70.js} +1 -1
  184. package/dist/assets/{wizard-components-BzPyRFRt.js → wizard-components-DQrlaeeW.js} +1 -1
  185. package/dist/assets/wrap-locale-5DJTJTXP.js +1 -0
  186. package/dist/assets/{zh-DQQBhbva.js → zh-CJ9vCpmv.js} +1 -1
  187. package/dist/assets/{zh-ByJkLAV1.js → zh-G2I44gfs.js} +1 -1
  188. package/dist/assets/{zh-tw-34G9tsUP.js → zh-tw-C4Juvs-i.js} +1 -1
  189. package/dist/index.html +1 -1
  190. package/package.json +31 -31
  191. package/dist/assets/branding-D-ShZ8m2.js +0 -1
  192. package/dist/assets/button-B_Qd9K_t.js +0 -1
  193. package/dist/assets/domains-B9b2gmbn.js +0 -1
  194. package/dist/assets/engine-L1SEogaX.js +0 -1
  195. package/dist/assets/get-safe-url-D4zRnTpF.js +0 -1
  196. package/dist/assets/index-BoJbHOhC.js +0 -1
  197. package/dist/assets/invitations-gJ3uAWGN.js +0 -3
  198. package/dist/assets/localization-BYdi6ljV.js +0 -1
  199. package/dist/assets/logger-BMHd-C1S.js +0 -1
  200. package/dist/assets/over-due-invoice-payment-DD_j5vb4.js +0 -1
  201. package/dist/assets/preferences-DHjRWgwZ.js +0 -1
  202. package/dist/assets/profile-embed-Gc79_Dhj.js +0 -1
  203. package/dist/assets/sdk-CXEy5Pgp.js +0 -1
  204. package/dist/assets/theme-mode-toggle-BltDSXhy.js +0 -1
  205. package/dist/assets/unsubscribe-CP0mTwWi.js +0 -1
  206. package/dist/assets/wallet-hidden-topbar-DKISAPb3.js +0 -68
  207. package/dist/assets/wrap-locale-BJF_SaOe.js +0 -1
@@ -1 +1 @@
1
- import{c as g}from"./index-Ca33rdd_.js";import{Q as E}from"./vendor-ux-Dl3wVbv_.js";import{b as y}from"./vendor-hooks-DAZ1H6Va.js";import{r as m}from"./vendor-react-DX7tU9aY.js";import{g as h}from"./get-safe-url-D4zRnTpF.js";import{e as T}from"./vendor-utils-BzQg432x.js";function $({messageType:n,onOpen:o,onClose:r}){const t=m.useRef(null),e=m.useRef(null),w=async s=>{setTimeout(()=>{try{r?.()}catch{}},10*1e3),t.current&&(clearInterval(e.current),t.current.close());const a=Math.random().toString(36).slice(2);t.current=window.open(`${g.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${a}`,"_blank"),o?.(t.current),e.current=setInterval(()=>{(!t.current||t.current.closed)&&(t.current=null,clearInterval(e.current),setTimeout(()=>{r?.()},1100))},200),await Promise.resolve(s(t.current,c=>{if(!t.current){localStorage.setItem(`open-window-url-${a}`,JSON.stringify({url:c,time:Date.now()}));return}t.current.location.href=h(c,{allowDomains:null})}))},i=y(s=>{const{type:a,error:c}=s.data;t.current&&a===n&&c&&(E.error(c),r?.())});return m.useEffect(()=>(window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}),[i]),w}const u={};function b(n){u[n]&&(clearTimeout(u[n]),delete u[n])}async function l(n,{interval:o=1e3,maxDuration:r=120*1e3,intervalFirst:t=4e3,timerKey:e=""}){u[e]&&clearTimeout(u[e]),await new Promise(s=>setTimeout(s,t));const w=Date.now(),i=async(s,a)=>{try{const c=await n();s(c)}catch(c){Date.now()-w>r?a(c):e?u[e]=setTimeout(()=>i(s,a),o):setTimeout(()=>i(s,a),o)}};return new Promise(i)}function j(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function v(n,{did:o,projectId:r,messageId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:t}});if(!e?.project?.blockletDid)throw new Error("Connected store not found");return e.project.blockletDid},{timerKey:"connect-studio"})}function O(n,{did:o,projectId:r,storeId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:""}});if(!e?.project?.connectedStores?.length)throw new Error("Connected store not found");if(!e.project.connectedStores.find(i=>i.storeId===t))throw new Error("Connected store not found")},{timerKey:`connect-store-${t}`})}function M(n,{did:o,projectId:r,endpointId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:""}});if(!e?.project?.connectedEndpoints?.length)throw new Error("Connected endpoint not found");if(!e.project.connectedEndpoints.find(i=>i.endpointId===t))throw new Error("Connected endpoint not found")},{timerKey:`connect-store-${t}`})}function R(n,{did:o,refresh:r,t,providerName:e,values:w,timerKey:i}){return l(async()=>{const{blocklet:s}=await n.getBlocklet({input:{did:o}}),a=T(s,"settings.aigne",{}),{url:c,key:f,provider:p}=a||{},{key:d}=w;if(p==="aigneHub"){if(!c||!f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));if(d&&d===f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));await r(),clearTimeout(u[`connect-aigne-${o}`])}else{if(!d||d!==f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));await r(),clearTimeout(u[`connect-aigne-${o}`])}},{timerKey:i,maxDuration:180*1e3})}export{j as a,v as b,b as c,O as d,M as e,$ as u,R as w};
1
+ import{c as g}from"./index-CXp5SI_f.js";import{Q as E}from"./vendor-ux-CLT2i3Pv.js";import{b as y}from"./vendor-hooks-DAZ1H6Va.js";import{r as m}from"./vendor-react-DX7tU9aY.js";import{g as h}from"./get-safe-url-beob4f2C.js";import{e as T}from"./vendor-utils-BzQg432x.js";function $({messageType:n,onOpen:o,onClose:r}){const t=m.useRef(null),e=m.useRef(null),w=async s=>{setTimeout(()=>{try{r?.()}catch{}},10*1e3),t.current&&(clearInterval(e.current),t.current.close());const a=Math.random().toString(36).slice(2);t.current=window.open(`${g.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${a}`,"_blank"),o?.(t.current),e.current=setInterval(()=>{(!t.current||t.current.closed)&&(t.current=null,clearInterval(e.current),setTimeout(()=>{r?.()},1100))},200),await Promise.resolve(s(t.current,c=>{if(!t.current){localStorage.setItem(`open-window-url-${a}`,JSON.stringify({url:c,time:Date.now()}));return}t.current.location.href=h(c,{allowDomains:null})}))},i=y(s=>{const{type:a,error:c}=s.data;t.current&&a===n&&c&&(E.error(c),r?.())});return m.useEffect(()=>(window.addEventListener("message",i),()=>{window.removeEventListener("message",i)}),[i]),w}const u={};function b(n){u[n]&&(clearTimeout(u[n]),delete u[n])}async function l(n,{interval:o=1e3,maxDuration:r=120*1e3,intervalFirst:t=4e3,timerKey:e=""}){u[e]&&clearTimeout(u[e]),await new Promise(s=>setTimeout(s,t));const w=Date.now(),i=async(s,a)=>{try{const c=await n();s(c)}catch(c){Date.now()-w>r?a(c):e?u[e]=setTimeout(()=>i(s,a),o):setTimeout(()=>i(s,a),o)}};return new Promise(i)}function j(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function v(n,{did:o,projectId:r,messageId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:t}});if(!e?.project?.blockletDid)throw new Error("Connected store not found");return e.project.blockletDid},{timerKey:"connect-studio"})}function O(n,{did:o,projectId:r,storeId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:""}});if(!e?.project?.connectedStores?.length)throw new Error("Connected store not found");if(!e.project.connectedStores.find(i=>i.storeId===t))throw new Error("Connected store not found")},{timerKey:`connect-store-${t}`})}function M(n,{did:o,projectId:r,endpointId:t}){return l(async()=>{const e=await n.getProject({input:{did:o,projectId:r,messageId:""}});if(!e?.project?.connectedEndpoints?.length)throw new Error("Connected endpoint not found");if(!e.project.connectedEndpoints.find(i=>i.endpointId===t))throw new Error("Connected endpoint not found")},{timerKey:`connect-store-${t}`})}function R(n,{did:o,refresh:r,t,providerName:e,values:w,timerKey:i}){return l(async()=>{const{blocklet:s}=await n.getBlocklet({input:{did:o}}),a=T(s,"settings.aigne",{}),{url:c,key:f,provider:p}=a||{},{key:d}=w;if(p==="aigneHub"){if(!c||!f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));if(d&&d===f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));await r(),clearTimeout(u[`connect-aigne-${o}`])}else{if(!d||d!==f)throw new Error(t("setting.aigne.connectTimeOut",{provider:e}));await r(),clearTimeout(u[`connect-aigne-${o}`])}},{timerKey:i,maxDuration:180*1e3})}export{j as a,v as b,b as c,O as d,M as e,$ as u,R as w};
@@ -0,0 +1,68 @@
1
+ import{G as ne,j as f,al as G,I as je,Q as Rt,aj as _t,H as Ot,P as qt,W as Ft,U as Nt,b$ as Dt,T as O,X as y,Z as Ht,a0 as zt,S as Ut,R as Pe,L as Wt,bb as nt,c0 as pe,ap as Bt,bq as Qt,aT as U,ak as Vt,bM as Zt}from"./vendor-mui-core-CV-FnYH_.js";import{r as C,a as Kt}from"./vendor-react-DX7tU9aY.js";import{$ as ot,au as Gt,av as Jt,aw as Yt,ax as Xt,i as en,c as _,ay as Me}from"./index-CXp5SI_f.js";import{g as tn}from"./theme-mode-toggle-D3bcd10D.js";import{Y as ge,bp as Re,a2 as rt,bq as nn,b5 as on,br as rn,P as sn,b8 as it,b9 as cn,af as st,bs as an,W as ln,b7 as un,aS as dn,an as fn}from"./vendor-ux-CLT2i3Pv.js";import{i as hn,b as J,a as T,s as pn,x as gn}from"./vendor-hooks-DAZ1H6Va.js";import{a8 as mn,F as oe,z as W,a as ct}from"./vendor-utils-BzQg432x.js";import{u as xn}from"./use-mobile-CyUZDIaX.js";import{p as yn}from"./purify.es-HRjpPm7y.js";import{r as bn}from"./index-CEJb82tA.js";function wn(e){try{return new URL(e).origin!==window.location.origin}catch{return!1}}function kn(e,n){try{if(!wn(e))return e;const t=mn(e),r={utm_source:window.location.hostname,utm_medium:`${n}_nav`,utm_campaign:"default",utm_content:new URL(e).hostname,...t};return oe(e,r)}catch(t){return console.error("Failed to generate UTM URL:",t),e}}const at=Object.freeze({left:0,top:0,width:16,height:16}),Y=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...at,...Y}),me=Object.freeze({...B,body:"",hidden:!1}),vn=Object.freeze({width:null,height:null}),lt=Object.freeze({...vn,...Y});function Cn(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return n}const In=/[\s,]+/;function jn(e,n){n.split(In).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ut={...lt,preserveAspectRatio:""};function _e(e){const n={...ut},t=(r,o)=>e.getAttribute(r)||o;return n.width=t("width",null),n.height=t("height",null),n.rotate=Cn(t("rotate","")),jn(n,t("flip","")),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}function Sn(e,n){for(const t in ut)if(e[t]!==n[t])return!0;return!1}const F=/^[a-z0-9]+(-[a-z0-9]+)*$/,Q=(e,n,t,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 s=o.pop(),a=o.pop(),l={provider:o.length>0?o[0]:r,prefix:a,name:s};return n&&!Z(l)?null:l}const i=o[0],c=i.split("-");if(c.length>1){const s={provider:r,prefix:c.shift(),name:c.join("-")};return n&&!Z(s)?null:s}if(t&&r===""){const s={provider:r,prefix:"",name:i};return n&&!Z(s,t)?null:s}return null},Z=(e,n)=>e?!!((e.provider===""||e.provider.match(F))&&(n&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1;function Tn(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const r=((e.rotate||0)+(n.rotate||0))%4;return r&&(t.rotate=r),t}function Oe(e,n){const t=Tn(e,n);for(const r in me)r in Y?r in e&&!(r in t)&&(t[r]=Y[r]):r in n?t[r]=n[r]:r in e&&(t[r]=e[r]);return t}function $n(e,n){const t=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(c){if(t[c])return o[c]=[];if(!(c in o)){o[c]=null;const s=r[c]&&r[c].parent,a=s&&i(s);a&&(o[c]=[s].concat(a))}return o[c]}return Object.keys(t).concat(Object.keys(r)).forEach(i),o}function Ln(e,n,t){const r=e.icons,o=e.aliases||Object.create(null);let i={};function c(s){i=Oe(r[s]||o[s],i)}return c(n),t.forEach(c),Oe(e,i)}function dt(e,n){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{n(o,null),t.push(o)});const r=$n(e);for(const o in r){const i=r[o];i&&(n(o,Ln(e,o,i)),t.push(o))}return t}const An={provider:"",aliases:{},not_found:{},...at};function ce(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function ft(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!ce(e,An))return null;const t=n.icons;for(const o in t){const i=t[o];if(!o.match(F)||typeof i.body!="string"||!ce(i,me))return null}const r=n.aliases||Object.create(null);for(const o in r){const i=r[o],c=i.parent;if(!o.match(F)||typeof c!="string"||!t[c]&&!r[c]||!ce(i,me))return null}return n}const X=Object.create(null);function En(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function E(e,n){const t=X[e]||(X[e]=Object.create(null));return t[n]||(t[n]=En(e,n))}function Se(e,n){return ft(n)?dt(n,(t,r)=>{r?e.icons[t]=r:e.missing.add(t)}):[]}function Pn(e,n,t){try{if(typeof t.body=="string")return e.icons[n]={...t},!0}catch{}return!1}function Mn(e,n){let t=[];return(typeof e=="string"?[e]:Object.keys(X)).forEach(o=>{(typeof o=="string"&&typeof n=="string"?[n]:Object.keys(X[o]||{})).forEach(c=>{const s=E(o,c);t=t.concat(Object.keys(s.icons).map(a=>(o!==""?"@"+o+":":"")+c+":"+a))})}),t}let D=!1;function ht(e){return typeof e=="boolean"&&(D=e),D}function H(e){const n=typeof e=="string"?Q(e,!0,D):e;if(n){const t=E(n.provider,n.prefix),r=n.name;return t.icons[r]||(t.missing.has(r)?null:void 0)}}function pt(e,n){const t=Q(e,!0,D);if(!t)return!1;const r=E(t.provider,t.prefix);return Pn(r,t.name,n)}function qe(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),D&&!n&&!e.prefix){let o=!1;return ft(e)&&(e.prefix="",dt(e,(i,c)=>{c&&pt(i,c)&&(o=!0)})),o}const t=e.prefix;if(!Z({provider:n,prefix:t,name:"a"}))return!1;const r=E(n,t);return!!Se(r,e)}function Rn(e){return!!H(e)}function _n(e){const n=H(e);return n?{...B,...n}:null}function On(e){const n={loaded:[],missing:[],pending:[]},t=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,c=o.prefix,s=o.name,a=t[i]||(t[i]=Object.create(null)),l=a[c]||(a[c]=E(i,c));let u;s in l.icons?u=n.loaded:c===""||l.missing.has(s)?u=n.missing:u=n.pending;const d={provider:i,prefix:c,name:s};u.push(d)}),n}function gt(e,n){e.forEach(t=>{const r=t.loaderCallbacks;r&&(t.loaderCallbacks=r.filter(o=>o.id!==n))})}function qn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const r=e.provider,o=e.prefix;n.forEach(i=>{const c=i.icons,s=c.pending.length;c.pending=c.pending.filter(a=>{if(a.prefix!==o)return!0;const l=a.name;if(e.icons[l])c.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))c.missing.push({provider:r,prefix:o,name:l});else return t=!0,!0;return!1}),c.pending.length!==s&&(t||gt([e],i.id),i.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),i.abort))})}))}let Fn=0;function Nn(e,n,t){const r=Fn++,o=gt.bind(null,t,r);if(!n.pending.length)return o;const i={id:r,icons:n,callback:e,abort:o};return t.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(i)}),o}const xe=Object.create(null);function Fe(e,n){xe[e]=n}function ye(e){return xe[e]||xe[""]}function Dn(e,n=!0,t=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?Q(o,n,t):o;i&&r.push(i)}),r}var Hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zn(e,n,t,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let c;if(e.random){let k=e.resources.slice(0);for(c=[];k.length>1;){const I=Math.floor(Math.random()*k.length);c.push(k[I]),k=k.slice(0,I).concat(k.slice(I+1))}c=c.concat(k)}else c=e.resources.slice(i).concat(e.resources.slice(0,i));const s=Date.now();let a="pending",l=0,u,d=null,h=[],p=[];typeof r=="function"&&p.push(r);function g(){d&&(clearTimeout(d),d=null)}function m(){a==="pending"&&(a="aborted"),g(),h.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),h=[]}function x(k,I){I&&(p=[]),typeof k=="function"&&p.push(k)}function b(){return{startTime:s,payload:n,status:a,queriesSent:l,queriesPending:h.length,subscribe:x,abort:m}}function w(){a="failed",p.forEach(k=>{k(void 0,u)})}function v(){h.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),h=[]}function $(k,I,L){const A=I!=="success";switch(h=h.filter(P=>P!==k),a){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=L,w();return}if(A){u=L,h.length||(c.length?S():w());return}if(g(),v(),!e.random){const P=e.resources.indexOf(k.resource);P!==-1&&P!==e.index&&(e.index=P)}a="completed",p.forEach(P=>{P(L)})}function S(){if(a!=="pending")return;g();const k=c.shift();if(k===void 0){if(h.length){d=setTimeout(()=>{g(),a==="pending"&&(v(),w())},e.timeout);return}w();return}const I={status:"pending",resource:k,callback:(L,A)=>{$(I,L,A)}};h.push(I),l++,d=setTimeout(S,e.rotate),t(k,n,I.callback)}return setTimeout(S),b}function mt(e){const n={...Hn,...e};let t=[];function r(){t=t.filter(s=>s().status==="pending")}function o(s,a,l){const u=zn(n,s,a,(d,h)=>{r(),l&&l(d,h)});return t.push(u),u}function i(s){return t.find(a=>s(a))||null}return{query:o,find:i,setIndex:s=>{n.index=s},getIndex:()=>n.index,cleanup:r}}function Te(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,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 re=Object.create(null),q=["https://api.simplesvg.com","https://api.unisvg.com"],K=[];for(;q.length>0;)q.length===1||Math.random()>.5?K.push(q.shift()):K.push(q.pop());re[""]=Te({resources:["https://api.iconify.design"].concat(K)});function Ne(e,n){const t=Te(n);return t===null?!1:(re[e]=t,!0)}function ie(e){return re[e]}function Un(){return Object.keys(re)}function De(){}const ae=Object.create(null);function Wn(e){if(!ae[e]){const n=ie(e);if(!n)return;const t=mt(n),r={config:n,redundancy:t};ae[e]=r}return ae[e]}function xt(e,n,t){let r,o;if(typeof e=="string"){const i=ye(e);if(!i)return t(void 0,424),De;o=i.send;const c=Wn(e);c&&(r=c.redundancy)}else{const i=Te(e);if(i){r=mt(i);const c=e.resources?e.resources[0]:"",s=ye(c);s&&(o=s.send)}}return!r||!o?(t(void 0,424),De):r.query(n,o,t)().abort}const He="iconify2",z="iconify",yt=z+"-count",ze=z+"-version",bt=36e5,Bn=168;function be(e,n){try{return e.getItem(n)}catch{}}function $e(e,n,t){try{return e.setItem(n,t),!0}catch{}}function Ue(e,n){try{e.removeItem(n)}catch{}}function we(e,n){return $e(e,yt,n.toString())}function ke(e){return parseInt(be(e,yt))||0}const M={local:!0,session:!0},wt={local:new Set,session:new Set};let Le=!1;function Qn(e){Le=e}let V=typeof window>"u"?{}:window;function kt(e){const n=e+"Storage";try{if(V&&V[n]&&typeof V[n].length=="number")return V[n]}catch{}M[e]=!1}function vt(e,n){const t=kt(e);if(!t)return;const r=be(t,ze);if(r!==He){if(r){const s=ke(t);for(let a=0;a<s;a++)Ue(t,z+a.toString())}$e(t,ze,He),we(t,0);return}const o=Math.floor(Date.now()/bt)-Bn,i=s=>{const a=z+s.toString(),l=be(t,a);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&n(u,s))return!0}catch{}Ue(t,a)}};let c=ke(t);for(let s=c-1;s>=0;s--)i(s)||(s===c-1?(c--,we(t,c)):wt[e].add(s))}function Ct(){if(!Le){Qn(!0);for(const e in M)vt(e,n=>{const t=n.data,r=n.provider,o=t.prefix,i=E(r,o);if(!Se(i,t).length)return!1;const c=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,c):c,!0})}}function Vn(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const r in M)vt(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===n});return!0}function Zn(e,n){Le||Ct();function t(r){let o;if(!M[r]||!(o=kt(r)))return;const i=wt[r];let c;if(i.size)i.delete(c=Array.from(i).shift());else if(c=ke(o),!we(o,c+1))return;const s={cached:Math.floor(Date.now()/bt),provider:e.provider,data:n};return $e(o,z+c.toString(),JSON.stringify(s))}n.lastModified&&!Vn(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))}function We(){}function Kn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,qn(e)}))}function Gn(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=ye(t)))return;i.prepare(t,r,o).forEach(s=>{xt(t,s,a=>{if(typeof a!="object")s.icons.forEach(l=>{e.missing.add(l)});else try{const l=Se(e,a);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),Zn(e,a)}catch(l){console.error(l)}Kn(e)})})}))}const Ae=(e,n)=>{const t=Dn(e,!0,ht()),r=On(t);if(!r.pending.length){let a=!0;return n&&setTimeout(()=>{a&&n(r.loaded,r.missing,r.pending,We)}),()=>{a=!1}}const o=Object.create(null),i=[];let c,s;return r.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===s&&l===c)return;c=l,s=u,i.push(E(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(a=>{const{provider:l,prefix:u,name:d}=a,h=E(l,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),o[l][u].push(d))}),i.forEach(a=>{const{provider:l,prefix:u}=a;o[l][u].length&&Gn(a,o[l][u])}),n?Nn(n,r,i):We},Jn=e=>new Promise((n,t)=>{const r=typeof e=="string"?Q(e,!0):e;if(!r){t(e);return}Ae([r||e],o=>{if(o.length&&r){const i=H(r);if(i){n({...B,...i});return}}t(e)})});function Yn(e){try{const n=typeof e=="string"?JSON.parse(e):e;if(typeof n.body=="string")return{...n}}catch{}}function Xn(e,n){const t=typeof e=="string"?Q(e,!0,!0):null;if(!t){const i=Yn(e);return{value:e,data:i}}const r=H(t);if(r!==void 0||!t.prefix)return{value:e,name:t,data:r};const o=Ae([t],()=>n(e,t,H(t)));return{value:e,name:t,loading:o}}function le(e){return e.hasAttribute("inline")}let It=!1;try{It=navigator.vendor.indexOf("Apple")===0}catch{}function eo(e,n){switch(n){case"svg":case"bg":case"mask":return n}return n!=="style"&&(It||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const to=/(-?[0-9.]*[0-9]+[0-9.]*)/g,no=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ve(e,n,t){if(n===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const r=e.split(to);if(r===null||!r.length)return e;const o=[];let i=r.shift(),c=no.test(i);for(;;){if(c){const s=parseFloat(i);isNaN(s)?o.push(i):o.push(Math.ceil(s*n*t)/t)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");c=!c}}const oo=e=>e==="unset"||e==="undefined"||e==="none";function jt(e,n){const t={...B,...e},r={...lt,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,r].forEach(g=>{const m=[],x=g.hFlip,b=g.vFlip;let w=g.rotate;x?b?w+=2:(m.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),m.push("scale(-1 1)"),o.top=o.left=0):b&&(m.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),m.push("scale(1 -1)"),o.top=o.left=0);let v;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:v=o.height/2+o.top,m.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:m.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:v=o.width/2+o.left,m.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}w%2===1&&(o.left!==o.top&&(v=o.left,o.left=o.top,o.top=v),o.width!==o.height&&(v=o.width,o.width=o.height,o.height=v)),m.length&&(i='<g transform="'+m.join(" ")+'">'+i+"</g>")});const c=r.width,s=r.height,a=o.width,l=o.height;let u,d;c===null?(d=s===null?"1em":s==="auto"?l:s,u=ve(d,a/l)):(u=c==="auto"?a:c,d=s===null?ve(u,l/a):s==="auto"?l:s);const h={},p=(g,m)=>{oo(m)||(h[g]=m.toString())};return p("width",u),p("height",d),h.viewBox=o.left.toString()+" "+o.top.toString()+" "+a.toString()+" "+l.toString(),{attributes:h,body:i}}const ro=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ee=ro();function io(e){ee=e}function so(){return ee}function co(e,n){const t=ie(e);if(!t)return 0;let r;if(!t.maxURL)r=0;else{let o=0;t.resources.forEach(c=>{o=Math.max(o,c.length)});const i=n+".json?icons=";r=t.maxURL-o-t.path.length-i.length}return r}function ao(e){return e===404}const lo=(e,n,t)=>{const r=[],o=co(e,n),i="icons";let c={type:i,provider:e,prefix:n,icons:[]},s=0;return t.forEach((a,l)=>{s+=a.length+1,s>=o&&l>0&&(r.push(c),c={type:i,provider:e,prefix:n,icons:[]},s=a.length),c.icons.push(a)}),r.push(c),r};function uo(e){if(typeof e=="string"){const n=ie(e);if(n)return n.path}return"/"}const fo=(e,n,t)=>{if(!ee){t("abort",424);return}let r=uo(n.provider);switch(n.type){case"icons":{const i=n.prefix,s=n.icons.join(","),a=new URLSearchParams({icons:s});r+=i+".json?"+a.toString();break}case"custom":{const i=n.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let o=503;ee(e+r).then(i=>{const c=i.status;if(c!==200){setTimeout(()=>{t(ao(c)?"abort":"next",c)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",o)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",o)})},ho={prepare:lo,send:fo};function Be(e,n){switch(e){case"local":case"session":M[e]=n;break;case"all":for(const t in M)M[t]=n;break}}const ue="data-style";let St="";function po(e){St=e}function Qe(e,n){let t=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ue));t||(t=document.createElement("style"),t.setAttribute(ue,ue),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+St}function Tt(){Fe("",ho),ht(!0);let e;try{e=window}catch{}if(e){if(Ct(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!qe(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const o="IconifyProviders["+r+"] is invalid.";try{const i=t[r];if(typeof i!="object"||!i||i.resources===void 0)continue;Ne(r,i)||console.error(o)}catch{console.error(o)}}}}return{enableCache:t=>Be(t,!0),disableCache:t=>Be(t,!1),iconExists:Rn,getIcon:_n,listIcons:Mn,addIcon:pt,addCollection:qe,calculateSize:ve,buildIcon:jt,loadIcons:Ae,loadIcon:Jn,addAPIProvider:Ne,appendCustomStyle:po,_api:{getAPIConfig:ie,setAPIModule:Fe,sendAPIQuery:xt,setFetch:io,getFetch:so,listAPIProviders:Un}}}function $t(e,n){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)t+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function go(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function mo(e){return"data:image/svg+xml,"+go(e)}function xo(e){return'url("'+mo(e)+'")'}const Ce={"background-color":"currentColor"},Lt={"background-color":"transparent"},Ve={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ze={"-webkit-mask":Ce,mask:Ce,background:Lt};for(const e in Ze){const n=Ze[e];for(const t in Ve)n[e+"-"+t]=Ve[t]}function Ke(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function yo(e,n,t){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const i=e.attributes,c=$t(o,{...i,width:n.width+"",height:n.height+""}),s=xo(c),a=r.style,l={"--svg":s,width:Ke(i.width),height:Ke(i.height),...t?Ce:Lt};for(const u in l)a.setProperty(u,l[u]);return r}let N;function bo(){try{N=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{N=null}}function wo(e){return N===void 0&&bo(),N?N.createHTML(e):e}function ko(e){const n=document.createElement("span"),t=e.attributes;let r="";t.width||(r="width: inherit;"),t.height||(r+="height: inherit;"),r&&(t.style=r);const o=$t(e.body,t);return n.innerHTML=wo(o),n.firstChild}function Ge(e,n){const t=n.icon.data,r=n.customisations,o=jt(t,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const i=n.renderedMode;let c;i==="svg"?c=ko(o):c=yo(o,{...B,...t},i==="mask");const s=Array.from(e.childNodes).find(a=>{const l=a.tagName&&a.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});s?c.tagName==="SPAN"&&s.tagName===c.tagName?s.setAttribute("style",c.getAttribute("style")):e.replaceChild(c,s):e.appendChild(c)}function Je(e,n,t){const r=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:n,icon:e,lastRender:r}}function vo(e="iconify-icon"){let n,t;try{n=window.customElements,t=window.HTMLElement}catch{return}if(!n||!t)return;const r=n.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],i=class extends t{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const s=this._shadowRoot=this.attachShadow({mode:"open"}),a=le(this);Qe(s,a),this._state=Je({value:""},a),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(s){if(s==="inline"){const a=le(this),l=this._state;a!==l.inline&&(l.inline=a,Qe(this._shadowRoot,a))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return le(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const a=this._shadowRoot;if(s.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Ge(a,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,a=this.getAttribute("icon");if(a!==s.icon.value){this._iconChanged(a);return}if(!s.rendered)return;const l=this.getAttribute("mode"),u=_e(this);(s.attrMode!==l||Sn(s.customisations,u))&&this._renderIcon(s.icon,u,l)}_iconChanged(s){const a=Xn(s,(l,u,d)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==l)return;const p={value:l,name:u,data:d};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=Je(a,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,_e(this),this.getAttribute("mode"))}_renderIcon(s,a,l){const u=eo(s.data.body,l),d=this._state.inline;Ge(this._shadowRoot,this._state={rendered:!0,icon:s,inline:d,customisations:a,attrMode:l,renderedMode:u})}};o.forEach(s=>{s in i.prototype||Object.defineProperty(i.prototype,s,{get:function(){return this.getAttribute(s)},set:function(a){a!==null?this.setAttribute(s,a):this.removeAttribute(s)}})});const c=Tt();for(const s in c)i[s]=i.prototype[s]=c[s];return n.define(e,i),i}const Co=vo()||Tt(),{enableCache:$r,disableCache:Lr,iconExists:Ar,getIcon:Er,listIcons:Pr,addIcon:Mr,addCollection:Rr,calculateSize:_r,buildIcon:Or,loadIcons:qr,loadIcon:Fr,addAPIProvider:Nr,_api:Dr}=Co,se=(e,n,t="children")=>e.map(r=>Array.isArray(r[t])?n({...r,[t]:se(r[t],n,t)}):n(r)),Hr=(e,n="children")=>{const t=[];return se(e,r=>t.push(r),n),t},Ee=(e,n,t="children")=>e.map(r=>({...r})).filter(r=>{const o=r[t];if(Array.isArray(o)){const c=Ee(o,n,t);r[t]=c?.length?c:void 0}const i={filteredChildren:r[t],isLeaf:!o?.length};return n(r,i)}),Io=e=>/^https?:\/\//.test(e),jo=e=>/^mailto:/i.test(e.trim()),So=e=>{if(!e||!e?.startsWith("/"))return!1;const n=o=>o.endsWith("/")?o:`${o}/`,t=n(window.location.pathname),r=n(new URL(e,window.location.origin).pathname);return t.startsWith(r)},zr=(e=[])=>{const n=e.map((t,r)=>({path:t,index:r})).filter(t=>So(t.path));return n?.length?n.slice(1).reduce((t,r)=>t.path.length>=r.path.length?t:r,n[0]).index:-1},Ur=(e,n={})=>{const{columns:t=1,breakInside:r=!1,groupHeight:o=48,itemHeight:i=24,childrenKey:c="items"}=n,s=e.length,a=e.reduce((m,x)=>m+o+(x[c]?.length||0)*i,0),l=Math.ceil(a/t),u=[[]];let d=0,h=0;const p=l*.2,g=m=>h>l-p&&d<t-1&&h+m>l+p;return e.forEach(m=>{const x=o+(m[c]?.length||0)*i;r&&g(o)&&(d++,h=0,u[d]=[]),!r&&h>0&&(s<=t||g(x))&&(d++,h=0,u[d]=[]),u[d].push({...m,group:!0}),h+=o,m[c]&&m[c].forEach(b=>{r&&g(i)&&(d++,h=0,u[d]=[]),u[d].push({...b,group:!1}),h+=i})}),u},Wr=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",To=e=>{const n={...e},t=e?.background;return typeof t=="string"?n.background={header:t,footer:t,default:t}:t&&typeof t=="object"&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n},$o=(e,n="en",t="en")=>{if(typeof e=="string"){if(Io(e)){const o=new URL(e);return o.searchParams.set("locale",n),o.href}if(jo(e))return e;const r=new URL(e,window.location.origin);return r.searchParams.set("locale",n),r.pathname+r.search}return typeof e=="object"?e[n]||e[t]||e.en:e},Lo=({navigation:e,locale:n,defaultLocale:t,section:r="header"})=>{if(!e?.length)return e;const o=(i,c)=>i&&typeof i=="object"?i[c]||i[t]||i.en:i;return se(e,i=>({...i,title:o(i.title,n),description:o(i.description,n),link:kn(i.items?.length?i.link:$o(i.link,n,t),r),_rawLink:i.link}),"items")},Ao=e=>se(e,n=>n.role?{...n,role:Array.isArray(n.role)?n.role:[n.role]}:n,"items"),Eo=e=>{if(!e?.length)return null;const n=Ao(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach(r=>{r.section?Array.isArray(r.section)?r.section.forEach(o=>{t[o]?.push(r)}):typeof r.section=="string"&&t[r.section]?.push(r):t.header.push(r)}),t},Br=e=>{if(!e)return null;const n={...e};return n.theme=To(n.theme),n.navigation=Eo(Po(n.navigation)),n},Po=(e=[])=>Ee(e,(n,t)=>!!n.link||t.filteredChildren?.length,"items"),Mo=(e,n)=>Ee(e,(t,r)=>{const o=!t.role||n&&(t.role.includes(n)||t.role.includes("guest"));return r.isLeaf?o:o&&r.filteredChildren?.length},"items"),Ro={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},_o={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function Oo({session:e,locale:n="zh",size:t=24,popperType:r="click",sx:o,...i}){const c=window?.blocklet||{},s=(c.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const g=(c?.componentMountPoints||[]).find(m=>p.component===m.name);return{...p,component:g}}),a=ne(),l=C.useRef(null),u=hn({open:!1}),d=J((p=!u.open)=>{u.open=p}),h=r==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return s.length===0||!e?.user?null:f.jsxs(G,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...o},...i,...h,children:[f.jsx(je,{size:"medium",ref:l,children:f.jsx(ge,{icon:Ro,fontSize:t,style:{transform:"scale(1.08)"}})}),f.jsx(Rt,{open:u.open,anchorEl:l.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>f.jsx(_t,{onClickAway:g=>{g.preventDefault(),g.stopPropagation(),d(!1)},children:f.jsx(Ot,{...p,timeout:350,children:f.jsxs(qt,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[f.jsx(Ft,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(g=>f.jsx(Nt,{disablePadding:!0,children:f.jsxs(Dt,{href:Re(g.link,n),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[g?.component?.did?f.jsx(G,{component:"img",src:`${rt}/blocklet/logo-bundle/${g.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):f.jsx(ge,{fontSize:50,icon:g.icon||_o,color:a.palette.text.secondary}),f.jsx(O,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Re(g.title,n)})]})},g.id))}),f.jsx(nn,{session:e,children:f.jsx(on,{variant:"outlined",fullWidth:!0,href:rn,sx:{mt:1},children:n==="zh"?"管理":"Manage"})})]})})})})]})}const Qr=y.shape({appLogo:y.node,appName:y.string,theme:y.shape({background:y.string}),enableConnect:y.bool,enableLocale:y.bool,navigation:y.arrayOf(y.shape({title:y.oneOfType([y.string,y.object]),link:y.oneOfType([y.string,y.object]),icon:y.string,items:y.arrayOf(y.shape({title:y.oneOfType([y.string,y.object]),link:y.oneOfType([y.string,y.object])}))}))}),qo=y.shape({showText:y.bool,showRole:y.bool,switchDid:y.bool,switchProfile:y.bool,switchPassport:y.bool,disableLogout:y.bool,onLogin:y.func,onLogout:y.func,onSwitchDid:y.func,onSwitchProfile:y.func,onSwitchPassport:y.func,menu:y.array,menuRender:y.func,dark:y.bool,size:y.number,profileUrl:y.string}),Fo=["admin","owner"],No=e=>e.endsWith(".ip.abtnet.io"),Do=e=>e.endsWith(".did.abtnet.io"),Ho={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},zo=1e3*60*60*24*30,Ye=".well-known/service/admin/domains";function At({locale:e="en",session:n={}}){const t=n?.user,r=xn(),[o,i]=C.useState(()=>{const h=window.localStorage.getItem("domain-warning-skip");if(!h)return!0;const p=+new Date,g=+new Date(h);return p-g>zo}),c=J((h,p={})=>sn(Ho,h,e,"en",p)),s=C.useMemo(()=>{try{const{hostname:h}=new URL(window.location.href);return h}catch{return""}},[]),a=C.useMemo(()=>[c("owner.benefits1"),c("owner.benefits2"),c("owner.benefits3"),c("owner.benefits4"),c("owner.benefits5")],[c]),l=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),i(!1)},[]),u=C.useCallback(()=>{const h=W(window.location.origin,Ye);h.startsWith("http")&&window.open(h,"_blank"),i(!1)},[]),d=t?.role&&Fo.includes(t.role);return window.location.href.includes(Ye)||r||!No(s)&&!Do(s)?null:f.jsxs(Ht,{open:o,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>i(!1),children:[f.jsxs(zt,{sx:{padding:"20px !important"},children:[f.jsx(O,{sx:{fontSize:"20px",fontWeight:"500"},children:c(d?"owner.title":"guest.title")}),f.jsx(O,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:c(d?"owner.description":"guest.description")}),d&&f.jsx(G,{component:"ul",children:a.map(h=>f.jsx(O,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:h},h))})]}),f.jsxs(Ut,{sx:{px:"12px !important"},children:[f.jsx(Pe,{onClick:l,children:c("skip")}),d&&f.jsx(Pe,{variant:"contained",onClick:u,children:c("bindDomain")})]})]})}At.propTypes={locale:y.string,session:y.object};const Uo=e=>C.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.251 2.5c-2.576-.006-4.747 2.1-4.766 4.506v5.784c0 .793-.084 1.778-.58 2.71h12.19c-.496-.932-.58-1.917-.58-2.711V7.01c-.035-2.403-2.21-4.502-4.797-4.508L9.25 2.5zM17.015 7v5.789c0 .79.1 1.562.53 2.219l.287.438c.436.664-.033 1.554-.817 1.554H2.985c-.785 0-1.255-.89-.818-1.554l.287-.438c.43-.657.53-1.428.53-2.218V7c.024-3.291 2.927-6.008 6.27-6l1.467.003c3.344.008 6.254 2.706 6.294 5.998zM11.06 18.06A1.5 1.5 0 0 0 11.5 17H13a3 3 0 0 1-6 0h1.5a1.5 1.5 0 0 0 2.56 1.06z",fill:"currentColor"})),j={};function Wo(e="admin"){let n="/";!window?.blocklet&&window?.env?.apiPrefix&&(n=window.env.apiPrefix);const t=W(n,rt,e);return new Gt.WsClient(t,{heartbeatIntervalMs:100*1e3})}function Bo(e="admin"){return j[e]||(j[e]=Wo(e)),j[e]}const Qo=(e="admin")=>{const n=C.use(ot),{session:t}=n??{},r=T(()=>t.user?.did,[t.user]),o=pn(r);return gn(()=>{Object.keys(j).forEach(i=>{j[i]?.isConnected()&&j[i]?.disconnect(),delete j[i]})}),r?(o&&o!==r&&Object.keys(j).forEach(i=>{j[i]&&(j[i].isConnected()&&j[i].disconnect(),j[i].connect())}),!j[e]&&t.user&&(j[e]=Bo(e),j[e].connect()),j[e]):null},Vo={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},Zo={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Ko={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function Go(){const e=ne();return[...e.breakpoints.keys].reverse().reduce((n,t)=>{const r=Wt(e.breakpoints.up(t));return!n&&r?t:n},null)||"xs"}var de,Xe;function Jo(){if(Xe)return de;Xe=1;const{joinURL:e,withQuery:n}=Jt(),{toTypeInfo:t}=bn(),{isEVMChain:r,getExplorerUrl:o}=Yt(),{arcChainConfig:i}=Xt(),c={ROLE_ROLLUP:"number"},s="https://explorer.abtnetwork.io/explorer/";return de=function({hash:l,asset:u,rollup:d,address:h,token:p,stake:g,chainId:m=""}){if(r(m)){const v=o(m);return l?e(v,`tx/${l}`):u?e(v,`token/${u}`):e(v,`address/${h}`)}const b=i[m]?.defaultRPC,w=b?`${b}`:void 0;return d&&t(d).role===c.ROLE_ROLLUP?l?n(e(s,`rollups/${d}/moves/${l}`),{host:w}):n(e(s,`rollups/${d}`),{host:w}):u?n(e(s,`assets/${u}`),{host:w}):l?n(e(s,`txs/${l}`),{host:w}):p?n(e(s,`tokens/${p}/tx`),{host:w}):g?n(e(s,`stakes/${g}`),{host:w}):n(e(s,`accounts/${h}`),{host:w})},de}var fe,et;function Et(){return et||(et=1,fe={isSameAddr:(e,n)=>String(e).toLowerCase()===String(n).toLowerCase()}),fe}var he,tt;function Yo(){if(tt)return he;tt=1;const e=Jo(),{isSameAddr:n}=Et();class t{constructor({type:a,did:l,chainId:u,text:d}){this.text=d,this.did=l,this.type=a,this.chainId=u}}const r=s=>{const a=[];try{let l=0;const u=/<(.+?)\(?[tx|nft|token|stake|did|dapp|link]+[:](.+?)\)?>/gi,d=s.matchAll(u);for(const h of d){const p=/\([tx|nft|token|stake|did|dapp|link]+[:](.+?)\)/gi,g=h[0],m=h.index||l,x=m+g.length;if([...g.matchAll(p)].length>1)return[s];let w="";const v=p.exec(g);let $="";if(v){const A=v[0];w=g.replace(A,"").replace(/^</,"").replace(/(>)$/,""),$=A.replace(/\)$/,"").replace(/^\(/,"")}else $=g;const S=$.split(":"),k=(S[0]||"").replace(/^</,"").replace(/^\(/,"").toUpperCase(),I=(S[1]||"").replace(/>$/,"").replace(/\)$/,""),L=(S[S.length-1]||"").replace(/>$/,"").replace(/\)$/,"");a.push(s.substring(l,m)),a.push(new t({type:k,chainId:I,did:L,text:w||k})),l=x}return l<s.length&&a.push(s.substring(l)),a}catch(l){return console.error(l?.message),[s]}},o=s=>{let a;const{type:l,chainId:u,did:d}=s;return n(l,"link")?a=`${u}:${d}`:n(l,"tx")?a=e({hash:d,chainId:u}):n(l,"stake")?a=e({stake:d,chainId:u}):n(l,"nft")?a=e({asset:d,chainId:u}):n(l,"token")?a=e({token:d,chainId:u}):n(l,"did")&&(a=e({address:d,chainId:u})),a};return he={toClickableSpan:(s,a=!0)=>r(s).map(u=>{if(u instanceof t){if(a){const d=o(u),{type:h,chainId:p,did:g}=u;return n(h,"dapp")?`<em style="font-weight:bold;" data-type="${h}" data-chain-id="${p}" data-did="${g}">${u.text}</em>`:d?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${d}">${u.text}</a>`:`<em style="font-weight:bold;" data-type="${h}" data-chain-id="${p}" data-did="${g}">${u.text}</em>`}return u.text}return u}).join(""),toTextList:r,toSlackLink:s=>r(s).map(l=>l instanceof t?`<${o(l)}|${l.text}>`:l.replace(/:\n/g,": ")).join(""),Link:t,getLink:o},he}var te=Yo(),Pt=Et();const Xo=e=>!ct(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,er=e=>{if(!e)return null;const{meta:n,target:t}=e;return{metaLink:n?.id,targetLink:t?.id}},tr=async(e,n)=>{try{return await en().user.getProfileUrl({did:e,locale:n})}catch(t){console.error(t);return}},nr=async(e,n)=>{const{type:t,did:r}=e;return Pt.isSameAddr(t,"did")&&await tr(r,n)||te.getLink(e)},or=async(e,n,t=!0)=>{const r=te.toTextList(e);return await Promise.all(r.map(async o=>{if(o instanceof te.Link){if(t){const i=await nr(o,n),{type:c,chainId:s,did:a}=o;return Pt.isSameAddr(c,"dapp")?`<em class="dapp" data-type="${c}" data-chain-id="${s}" data-did="${a}">${o.text}</em>`:i?`<a target="_blank" rel="noopener noreferrer" class="link" href="${i}">${o.text}</a>`:`<em class="common" data-type="${c}" data-chain-id="${s}" data-did="${a}">${o.text}</em>`}return o.text}return o})).then(o=>o.join(""))},rr=e=>yn.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),ir={comment:(e,n)=>n&&n>1?f.jsxs(f.Fragment,{children:["left ",n," comments on your ",e]}):f.jsxs(f.Fragment,{children:["commented on your ",e]}),like:e=>f.jsxs(f.Fragment,{children:["liked your ",e]}),follow:()=>f.jsx(f.Fragment,{children:"followed you"}),tips:e=>f.jsxs(f.Fragment,{children:["gave tips to your ",e]}),mention:e=>f.jsxs(f.Fragment,{children:["mentioned you in ",e]}),assign:()=>f.jsx(f.Fragment,{children:"assigned you a task"})};function R({user:e,color:n=void 0}){const{palette:t}=ne(),r=oe(W(_.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),o=n||t.text.primary;return f.jsx(nt,{href:r,color:o,target:"_blank",onClick:i=>{i.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}R.displayName="UserLink";function sr({activity:e,users:n,actors:t,extra:r={},mountPoint:o=""}){const{palette:i}=ne(),{type:c,target:s}=e||{},{type:a}=s||{},{linkColor:l=i.text.primary}=r||{},u=T(()=>{if(!Array.isArray(n))return new Map;const x=new Map;return n.forEach(b=>{b?.did&&!x.has(b.did)&&x.set(b.did,b)}),x},[n]),d=T(()=>Array.isArray(t)?t.map(x=>x?u.get(x)||{did:x,fullName:"System"}:null).filter(Boolean):[],[t,u]),h=J(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return f.jsx(R,{user:d[0],color:l});const x=d.slice(0,-1),b=d[d.length-1];if(d.length===2)return f.jsxs(f.Fragment,{children:[f.jsx(R,{user:x[0],color:l})," and ",f.jsx(R,{user:b,color:l})]});const w=d.length>3,v=w?d.slice(0,2):x;return f.jsxs(f.Fragment,{children:[v.map(($,S)=>f.jsxs(Kt.Fragment,{children:[f.jsx(R,{user:$,color:l}),S<v.length-1?", ":""]},$.did)),w?`, and ${d.length-2} others`:f.jsxs(f.Fragment,{children:[", and ",f.jsx(R,{user:b,color:l})]})]})}),p=J(()=>{const x=c?ir[c]:null;return x?x(a,n.length):null}),g=T(()=>{const x=h(),b=p();return!x||!b?null:f.jsxs(f.Fragment,{children:[x," ",b]})},[c,a,d,h,p]),m=T(()=>{if(!e)return null;const x=er(e);return x?.targetLink?W(o,x.targetLink):null},[e,o]);return!c||ct(s)?null:f.jsxs(f.Fragment,{children:[g," ",m&&f.jsx(nt,{href:m,color:l,target:"_blank",sx:{textDecoration:"none"},onClick:x=>{x.customPreventRedirect=!0},children:s.name})]})}const cr={normal:Me,success:Vo,info:Me,warning:Zo,error:Ko},ar=U(Vt)`
2
+ font-size: 20px;
3
+ `,lr=U.div`
4
+ display: flex;
5
+ align-items: flex-start;
6
+ gap: 8px;
7
+ flex: 1;
8
+ width: 0;
9
+ `,ur=U.div`
10
+ display: flex;
11
+ align-items: center;
12
+ margin-left: auto;
13
+ margin-right: -8px;
14
+ width: 44px;
15
+ `,dr={xl:"400px",lg:"400px",md:"400px",sm:"300px"},fr=U(cn)`
16
+ display: flex;
17
+ color: #fff;
18
+ align-items: center;
19
+ padding: 12px 16px;
20
+ border-radius: 4px;
21
+ box-shadow:
22
+ 0px 3px 5px -1px rgba(0, 0, 0, 0.2),
23
+ 0px 6px 10px 0px rgba(0, 0, 0, 0.14),
24
+ 0px 1px 18px 0px rgba(0, 0, 0, 0.12);
25
+
26
+ ${({severity:e,breakpoint:n})=>{const t=dr[n]||"400px";return e==="success"?`
27
+ background-color: ${Bt[600]} !important;
28
+ width: ${t};
29
+ `:e==="error"?`
30
+ background-color: #d32f2f !important;
31
+ width: ${t};
32
+ `:e==="info"?`
33
+ background-color: #1976d2 !important;
34
+ width: ${t};
35
+ `:e==="warning"?`
36
+ background-color: ${Qt[700]} !important;
37
+ width: ${t};
38
+ `:`
39
+ background-color: #333;
40
+ width: ${t};
41
+ `}}
42
+ `,hr=U.div`
43
+ cursor: pointer;
44
+ display: flex;
45
+ flex-direction: column;
46
+ .title {
47
+ overflow: hidden;
48
+ text-overflow: ellipsis;
49
+ display: -webkit-box;
50
+ -webkit-line-clamp: 1;
51
+ -webkit-box-orient: vertical;
52
+ font-weight: bold;
53
+ }
54
+ .desc {
55
+ overflow: hidden;
56
+ text-overflow: ellipsis;
57
+ display: -webkit-box;
58
+ -webkit-line-clamp: 3;
59
+ -webkit-box-orient: vertical;
60
+ word-break: break-word;
61
+ line-height: 1.2;
62
+ .link,
63
+ .dapp,
64
+ .common {
65
+ color: ${pe.white};
66
+ }
67
+ }
68
+ `;function pr({ref:e=void 0,keyId:n,notification:t={},viewAllUrl:r,content:o=null}){const i=Go(),[c,s]=C.useState(t.description||""),a=cr[t.severity||""],{closeSnackbar:l}=it(),u=()=>l(n);C.useEffect(()=>{or(t.description||"","en").then(x=>{s(x)})},[t.description]);const d=x=>{x.stopPropagation(),l(n),x?.customPreventRedirect||window.open(r,"_blank")},h=T(()=>Xo(t),[t]),p=T(()=>t?.activity,[t]),g=T(()=>!p||p.type==="tips"?null:p?.meta,[p]),m=sr({activity:p,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:pe.white}});return f.jsxs(fr,{ref:e,severity:t.severity,breakpoint:i,children:[f.jsxs(lr,{children:[a?f.jsx(ge,{icon:a,fontSize:24}):null,f.jsx(hr,{onClick:d,style:{width:"calc(100% - 30px)"},children:f.jsx(G,{children:h?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"title",children:m}),g?f.jsx(O,{variant:"subtitle2",component:"p",sx:{fontSize:16,display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:pe.white,lineHeight:1.2},children:g?.content}):null]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"title",children:t.title}),o||f.jsx(O,{component:"span",className:"desc",dangerouslySetInnerHTML:{__html:rr(c)}})]})})})]}),f.jsx(ur,{children:f.jsx(je,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:f.jsx(ar,{})},"close")})]})}const Ie=W(_.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),gr=e=>oe(Ie,{id:e.id,severity:e.severity||"all",componentDid:e.source==="system"?"system":e.componentDid||"all"});function Mt({session:e={}}){const{unReadCount:n,user:t,setUnReadCount:r}=e,o=T(()=>t?.did,[t]),i=T(()=>t?.role&&[_.ROLES.ADMIN,_.ROLES.OWNER].includes(t?.role),[t?.role]),{enqueueSnackbar:c}=it(),s=st(),a=C.useMemo(()=>!o||t?.isPreviewUser||o===window.blocklet.did,[o,t]),l=C.useMemo(()=>s.arcSphere||s.wallet,[s]),u=T(()=>window.blocklet?.serverVersion,[]),d=Qo("user"),h=T(()=>`${window.blocklet.did}/${o}/${_.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,[o]),p=T(()=>`${window.blocklet.did}/${o}/${_.EVENTS.NOTIFICATION_BLOCKLET_READ}`,[o]),g=C.useCallback(x=>{const{receivers:b,source:w}=x??{},{receiver:v}=b[0]??{};if(v===o&&(i||w!=="system")){r(S=>S+1);const $=an(u,"1.16.42-beta-20250407");if(!l&&x.source==="component"&&$){const S=gr(x),{severity:k,description:I}=x||{},L=["error","warning"].includes(k)||x.sticky;c(I,{variant:k,autoHideDuration:L?null:5e3,anchorOrigin:{vertical:"top",horizontal:"center"},content:A=>f.jsx(pr,{viewAllUrl:S,keyId:A,notification:x})})}}},[o,r,c,u,l,i]),m=C.useCallback(x=>{const{receiver:b,readCount:w}=x??{};b===o&&r(v=>Math.max(v-w,0))},[o,r]);return C.useEffect(()=>(d&&!a&&(d.on(h,g),d.on(p,m)),()=>{d&&!a&&(d.off(h,g),d.off(p,m))}),[d,r,g,h,m,p,a]),!e.user||!Ie?null:f.jsx(je,{size:"medium",variant:"outlined",href:oe(Ie,{read:n<=0}),sx:{"&:hover":{borderRadius:"50%"}},children:f.jsx(Zt,{badgeContent:n,color:"error",invisible:n===0,children:f.jsx(Uo,{style:{width:"auto",height:24}})})})}Mt.propTypes={session:y.object};const mr=()=>!!(window?.blocklet?.navigation??[]).find(e=>e.id==="/userCenter/notification");function xr({formattedBlocklet:e,addons:n=null,showDomainWarningDialog:t=!0,sessionManagerProps:r={showRole:!0}}){const o=C.use(ot),{locale:i,languages:c,defaultLocale:s}=ln()||{},{enableConnect:a=!0,enableLocale:l=!0}=e,u=!!o?.session?.user;let d=Lo({navigation:e?.navigation?.sessionManager,locale:i,defaultLocale:s})||[];d=Mo(d,o?.session?.user?.role);const h=(()=>{if(n&&typeof n!="function")return Array.isArray(n)?n:[n];let m=[];if(mr()&&m.push(f.jsx(Mt,{session:o.session},"notification-addon")),l&&i&&c.length>1&&m.push(f.jsx(un,{showText:!1},"locale-selector")),m.push(f.jsx(tn,{},"theme-mode-toggle")),a&&o){const x=[];u&&(d?d.slice(0,5):[]).forEach(b=>{x.push({label:b.title,icon:b.icon?f.jsx("iconify-icon",{icon:b.icon,height:24,style:{marginRight:8}}):null,component:"a",href:b.link,key:b.link})}),m.push(f.jsx(Oo,{session:o.session,locale:i},"session-blocklet")),m.push(f.jsx(dn,{session:o.session,locale:i,menu:x,showRole:!0,...r},"session-user"))}return typeof n=="function"&&(m=n(m)||[]),m})(),p=Array.isArray(h)?h:[h],g=[t?f.jsx(At,{session:o?.session,locale:i}):null,...p].filter(Boolean);return C.createElement(f.Fragment,null,...g)}xr.propTypes={formattedBlocklet:y.object.isRequired,addons:y.oneOfType([y.func,y.node]),sessionManagerProps:qo,showDomainWarningDialog:y.bool};const Vr=()=>{const e=st();C.useEffect(()=>{(e.wallet||e.arcSphere)&&fn.call("arcHideTopBar","{}")},[e])};export{Hr as A,Br as L,Lo as N,Mo as P,jo as S,zr as W,$o as a,Io as b,Pt as f,te as h,Ur as k,Qr as n,se as p,Vr as s,qo as t,kn as u,Wr as v,xr as z};
@@ -1,4 +1,4 @@
1
- import{j as e,bc as h,al as n,R as l,aR as f}from"./vendor-mui-core-D7t4vMS5.js";import{c as u,N as w,E as j,F as y}from"./index-Ca33rdd_.js";import{C as g}from"./config-space-HmsYCb6s.js";import{P as v}from"./vendor-arcblock-ivFYo5vP.js";import{N as b}from"./index-DCxNOCc2.js";import{W as k,b5 as C}from"./vendor-ux-Dl3wVbv_.js";import{r as W}from"./vendor-react-DX7tU9aY.js";import{u as S,a as E,S as P,b as z,c as I,W as N}from"./wizard-components-BzPyRFRt.js";import"./vendor-utils-BzQg432x.js";import"./vendor-hooks-DAZ1H6Va.js";import"./spaces-Ckljlc4d.js";import"./api-B8JXuhVp.js";import"./fallback-CZRO9TTQ.js";import"./nav-menu-5M0Q4jYU.js";import"./wallet-hidden-topbar-DKISAPb3.js";import"./theme-mode-toggle-BltDSXhy.js";import"./use-mobile-DgmmfWdl.js";import"./purify.es-HRjpPm7y.js";import"./index-sb6EjUcD.js";import"./use-blocklet-logo-BWPJOOVd.js";import"./get-safe-url-D4zRnTpF.js";import"./use-server-logo-BLcfNvrR.js";import"./server-logo-notext.svg-CtPRYaCm.js";import"./use-mobile-BSL5RsRd.js";const R=f`
1
+ import{j as e,bc as h,al as n,R as l,aR as f}from"./vendor-mui-core-CV-FnYH_.js";import{c as u,N as w,E as j,F as y}from"./index-CXp5SI_f.js";import{C as g}from"./config-space-DfstlHnF.js";import{P as v}from"./vendor-arcblock-Dll6qxMT.js";import{N as b}from"./index-VKjWmvRV.js";import{W as k,b6 as C}from"./vendor-ux-CLT2i3Pv.js";import{r as W}from"./vendor-react-DX7tU9aY.js";import{u as S,a as E,S as P,b as z,c as I,W as N}from"./wizard-components-DQrlaeeW.js";import"./vendor-utils-BzQg432x.js";import"./vendor-hooks-DAZ1H6Va.js";import"./spaces-ix8u0ZiI.js";import"./api-B8JXuhVp.js";import"./fallback-D-IHOW-7.js";import"./nav-menu-DSdXRbfg.js";import"./wallet-hidden-topbar-joIVZ1nl.js";import"./theme-mode-toggle-D3bcd10D.js";import"./use-mobile-CyUZDIaX.js";import"./purify.es-HRjpPm7y.js";import"./index-CEJb82tA.js";import"./use-blocklet-logo-Cf1j7pQz.js";import"./get-safe-url-beob4f2C.js";import"./use-server-logo-KZn9RrZd.js";import"./server-logo-notext.svg-CtPRYaCm.js";import"./use-mobile-DwGMuJlg.js";const R=f`
2
2
  html,
3
3
  body,
4
4
  #app,
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrCTi6nm.css")])))=>i.map(i=>d[i]);
2
- import{j as e,aT as E,al as c,ao as G,T as v,a7 as N,n as J,X as r}from"./vendor-mui-core-D7t4vMS5.js";import{j as Y,u as Z,r as o,k as ee,l as g,N as te}from"./vendor-react-DX7tU9aY.js";import{z as i}from"./vendor-utils-BzQg432x.js";import{c as I,x as se,u as ne,G as k,I as w,J as ie,K as re,L as z}from"./index-Ca33rdd_.js";import{W as O,ab as oe,_ as x}from"./vendor-ux-Dl3wVbv_.js";import{g as P}from"./get-safe-url-D4zRnTpF.js";import{u as ae}from"./use-server-logo-BLcfNvrR.js";function Ce(t=`${I.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,d=!1,h=null){const{t:s}=O(),[f,y]=Y(),p=Z(),{meta:m,blocklet:n,actions:a,launcherSession:S}=se(),j=localStorage.getItem("blocklet-server-url"),{session:b}=ne(),D=n?.environments?.find(u=>u.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value,B=ae({onClick:()=>{window.open(P(j,{allowDomains:null}))}}),R=w("fromLauncher"),W=w("launcherUrl"),U=w("launchType"),C=w("visitorId");C&&(oe(C),f.delete("visitorId"),y(f)),o.useEffect(()=>{ie(),b.user&&(a?.refreshMeta(),a?.refreshBlocklet({showError:!1}))},[b.user]),o.useEffect(()=>{a.refreshFuel({showError:!1})},[n?.meta?.did]);const q=u=>{const l=u?.capabilities?.didSpace;return l?l===k.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||l===k.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP?{key:"did-space",stepTitle:s("setup.steps.didSpace"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.didSpace")," ",e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"did-space"),description:s("setup.didSpace.subTitle"),getButtonDisabled:()=>!D}:l===k.BLOCKLET_APP_SPACE_REQUIREMENT.OPTIONAL?{key:"did-space",stepTitle:s("setup.steps.didSpace"),name:e.jsx(e.Fragment,{children:s("setup.steps.didSpace")}),path:i(t,"did-space"),description:s("setup.didSpace.subTitle"),getButtonDisabled:()=>!1}:(console.warn(`capabilities.didSpace cannot take the value ${l}`),null):null},V=()=>{const{requirements:u}=m;return{key:"aigne",stepTitle:s("setup.steps.aigne"),name:e.jsxs(e.Fragment,{children:[s("setup.aigne.title")," ",u?.aigne&&e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"aigne"),description:s("setup.aigne.subTitle")}},_=[{key:"bind-account",stepTitle:s("setup.steps.connect"),name:s("setup.connectAccount.title"),path:i(t,"bind-account"),description:s("setup.connectAccount.subTitle")},{key:"access",stepTitle:s("setup.steps.access"),name:s("setup.accessControl.title"),path:i(t,"access"),description:s("setup.accessControl.subTitle")},V(),{key:"domain",stepTitle:s("setup.steps.domain"),name:s("setup.domain.title"),path:i(t,"domain"),description:s("setup.domain.subTitle")},q(n),d?{key:"branding",stepTitle:s("setup.steps.branding"),name:s("setup.branding.title"),path:i(t,"branding"),description:s("setup.branding.subTitle")}:{key:"config",stepTitle:s("setup.steps.config"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.config")," ",re(m)&&e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"config"),description:s("setup.config.subTitle")},m?.requirements?.fuels?.length?{key:"fuel",stepTitle:s("setup.steps.fuel"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.fuel")," ",e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"fuel"),description:s("setup.fuel.subTitle")}:null].filter(Boolean),T=_.findIndex(u=>`${z.replace(/\/$/,"")}${t}/${u.key}`===window.location.pathname),F=i(z,I.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${n?.updatedAt}`),K=async u=>{const{search:l}=new URL(window.location.href),Q=_[T];if(l.includes("from=empty")&&Q.key==="config"){window.open(P(`${i(I.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/overview/components")}${l}`));return}if(!u)_[T+1]?p(`${i(t,_[T+1].key)}${l}`):h?h():p(`${i(t,"complete")}${l}`);else{const $=_.findIndex(X=>X.key===u);$>-1?p(`${i(t,_[$].key)}${l}`):h?h():p(`${i(t,"complete")}${l}`)}await a.refreshBlocklet()},M=u=>{const{search:l}=new URL(window.location.href);p(`${i(t,u)}${l}`)},H=()=>{p(-1)},L=[{key:"install",name:s("launchBlocklet.steps.installApp"),path:i(t,"install")},{key:"setup",name:s("setup.steps.launchApp"),children:_}];let A=[{key:"agreement",name:s("launchBlocklet.introduction"),path:i(t,"agreement")},...L];return R&&(A=[{key:"purchase-space",name:s("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:s("launchBlocklet.steps.prepareSpace")},...L]),{meta:m,blocklet:n,actions:a,launcherSession:S,session:b,steps:_,stepIndex:T,totalSteps:A,fromLauncher:R,launcherUrl:W,launchType:U,logoUrl:F,logo:B,t:s,onNext:K,onPrevious:H,onStepClick:M}}const le=o.lazy(()=>x(()=>import("./connect-BeWeBwCA.js"),__vite__mapDeps([0,1]),import.meta.url)),ce=o.lazy(()=>x(()=>import("./bind-account-BIzFrnLk.js"),__vite__mapDeps([0,1]),import.meta.url)),pe=o.lazy(()=>x(()=>import("./config-oF-A1tKe.js"),__vite__mapDeps([0,1]),import.meta.url)),de=o.lazy(()=>x(()=>import("./index-D4_8N2le.js"),__vite__mapDeps([0,1]),import.meta.url)),ue=o.lazy(()=>x(()=>import("./branding-D-ShZ8m2.js"),__vite__mapDeps([0,1]),import.meta.url)),me=o.lazy(()=>x(()=>import("./domain-D9Kc4Rgt.js"),__vite__mapDeps([0,1]),import.meta.url)),fe=o.lazy(()=>x(()=>import("./access-control-CSfPgD_B.js"),__vite__mapDeps([0,1]),import.meta.url)),ge=o.lazy(()=>x(()=>import("./fuel-C85y6XSK.js"),__vite__mapDeps([0,1]),import.meta.url)),xe=o.lazy(()=>x(()=>import("./aigne-DElJAbjP.js"),__vite__mapDeps([0,1]),import.meta.url)),he=o.lazy(()=>x(()=>import("./complete-D6XDZtnV.js"),__vite__mapDeps([0,1]),import.meta.url)),ye=E(c)`
2
+ import{j as e,aT as E,al as c,ao as G,T as v,a7 as N,n as J,X as r}from"./vendor-mui-core-CV-FnYH_.js";import{j as Y,u as Z,r as o,k as ee,l as g,N as te}from"./vendor-react-DX7tU9aY.js";import{z as i}from"./vendor-utils-BzQg432x.js";import{c as I,x as se,u as ne,G as k,I as w,J as ie,K as re,L as z}from"./index-CXp5SI_f.js";import{W as O,ab as oe,_ as x}from"./vendor-ux-CLT2i3Pv.js";import{g as P}from"./get-safe-url-beob4f2C.js";import{u as ae}from"./use-server-logo-KZn9RrZd.js";function Ce(t=`${I.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,d=!1,h=null){const{t:s}=O(),[f,y]=Y(),p=Z(),{meta:m,blocklet:n,actions:a,launcherSession:S}=se(),j=localStorage.getItem("blocklet-server-url"),{session:b}=ne(),D=n?.environments?.find(u=>u.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value,B=ae({onClick:()=>{window.open(P(j,{allowDomains:null}))}}),R=w("fromLauncher"),W=w("launcherUrl"),U=w("launchType"),C=w("visitorId");C&&(oe(C),f.delete("visitorId"),y(f)),o.useEffect(()=>{ie(),b.user&&(a?.refreshMeta(),a?.refreshBlocklet({showError:!1}))},[b.user]),o.useEffect(()=>{a.refreshFuel({showError:!1})},[n?.meta?.did]);const q=u=>{const l=u?.capabilities?.didSpace;return l?l===k.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||l===k.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP?{key:"did-space",stepTitle:s("setup.steps.didSpace"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.didSpace")," ",e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"did-space"),description:s("setup.didSpace.subTitle"),getButtonDisabled:()=>!D}:l===k.BLOCKLET_APP_SPACE_REQUIREMENT.OPTIONAL?{key:"did-space",stepTitle:s("setup.steps.didSpace"),name:e.jsx(e.Fragment,{children:s("setup.steps.didSpace")}),path:i(t,"did-space"),description:s("setup.didSpace.subTitle"),getButtonDisabled:()=>!1}:(console.warn(`capabilities.didSpace cannot take the value ${l}`),null):null},V=()=>{const{requirements:u}=m;return{key:"aigne",stepTitle:s("setup.steps.aigne"),name:e.jsxs(e.Fragment,{children:[s("setup.aigne.title")," ",u?.aigne&&e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"aigne"),description:s("setup.aigne.subTitle")}},_=[{key:"bind-account",stepTitle:s("setup.steps.connect"),name:s("setup.connectAccount.title"),path:i(t,"bind-account"),description:s("setup.connectAccount.subTitle")},{key:"access",stepTitle:s("setup.steps.access"),name:s("setup.accessControl.title"),path:i(t,"access"),description:s("setup.accessControl.subTitle")},V(),{key:"domain",stepTitle:s("setup.steps.domain"),name:s("setup.domain.title"),path:i(t,"domain"),description:s("setup.domain.subTitle")},q(n),d?{key:"branding",stepTitle:s("setup.steps.branding"),name:s("setup.branding.title"),path:i(t,"branding"),description:s("setup.branding.subTitle")}:{key:"config",stepTitle:s("setup.steps.config"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.config")," ",re(m)&&e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"config"),description:s("setup.config.subTitle")},m?.requirements?.fuels?.length?{key:"fuel",stepTitle:s("setup.steps.fuel"),name:e.jsxs(e.Fragment,{children:[s("setup.steps.fuel")," ",e.jsx("span",{className:"required",children:"*"})]}),path:i(t,"fuel"),description:s("setup.fuel.subTitle")}:null].filter(Boolean),T=_.findIndex(u=>`${z.replace(/\/$/,"")}${t}/${u.key}`===window.location.pathname),F=i(z,I.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${n?.updatedAt}`),K=async u=>{const{search:l}=new URL(window.location.href),Q=_[T];if(l.includes("from=empty")&&Q.key==="config"){window.open(P(`${i(I.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/overview/components")}${l}`));return}if(!u)_[T+1]?p(`${i(t,_[T+1].key)}${l}`):h?h():p(`${i(t,"complete")}${l}`);else{const $=_.findIndex(X=>X.key===u);$>-1?p(`${i(t,_[$].key)}${l}`):h?h():p(`${i(t,"complete")}${l}`)}await a.refreshBlocklet()},M=u=>{const{search:l}=new URL(window.location.href);p(`${i(t,u)}${l}`)},H=()=>{p(-1)},L=[{key:"install",name:s("launchBlocklet.steps.installApp"),path:i(t,"install")},{key:"setup",name:s("setup.steps.launchApp"),children:_}];let A=[{key:"agreement",name:s("launchBlocklet.introduction"),path:i(t,"agreement")},...L];return R&&(A=[{key:"purchase-space",name:s("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:s("launchBlocklet.steps.prepareSpace")},...L]),{meta:m,blocklet:n,actions:a,launcherSession:S,session:b,steps:_,stepIndex:T,totalSteps:A,fromLauncher:R,launcherUrl:W,launchType:U,logoUrl:F,logo:B,t:s,onNext:K,onPrevious:H,onStepClick:M}}const le=o.lazy(()=>x(()=>import("./connect-Dy0Y8HRB.js"),__vite__mapDeps([0,1]),import.meta.url)),ce=o.lazy(()=>x(()=>import("./bind-account-DOwM9Nhe.js"),__vite__mapDeps([0,1]),import.meta.url)),pe=o.lazy(()=>x(()=>import("./config-6IwEgT3b.js"),__vite__mapDeps([0,1]),import.meta.url)),de=o.lazy(()=>x(()=>import("./index-D6pCyJv8.js"),__vite__mapDeps([0,1]),import.meta.url)),ue=o.lazy(()=>x(()=>import("./branding-Cak2s8bn.js"),__vite__mapDeps([0,1]),import.meta.url)),me=o.lazy(()=>x(()=>import("./domain-CDTeLbkZ.js"),__vite__mapDeps([0,1]),import.meta.url)),fe=o.lazy(()=>x(()=>import("./access-control-RI6LQbSm.js"),__vite__mapDeps([0,1]),import.meta.url)),ge=o.lazy(()=>x(()=>import("./fuel-BFx1ShM2.js"),__vite__mapDeps([0,1]),import.meta.url)),xe=o.lazy(()=>x(()=>import("./aigne-6nMSoyeQ.js"),__vite__mapDeps([0,1]),import.meta.url)),he=o.lazy(()=>x(()=>import("./complete-Udiv_yFp.js"),__vite__mapDeps([0,1]),import.meta.url)),ye=E(c)`
3
3
  background: ${({theme:t})=>J(t.palette.primary.main,.05)};
4
4
  `,Le=E(c)`
5
5
  width: 100vw;
@@ -0,0 +1 @@
1
+ import{T as n}from"./vendor-ux-CLT2i3Pv.js";import{t as a}from"./index-DL0wTcgx.js";import{j as r}from"./vendor-mui-core-CV-FnYH_.js";function m(t){return function(o){return r.jsx(n,{translations:a,children:r.jsx(t,{...o})})}}export{m as w};
@@ -1 +1 @@
1
- import{g as s}from"./vendor-react-DX7tU9aY.js";import{aO as i}from"./index-Ca33rdd_.js";function c(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=i();const p=s(f),l=c({__proto__:null,default:p},[f]);export{l as z};
1
+ import{g as s}from"./vendor-react-DX7tU9aY.js";import{aO as i}from"./index-CXp5SI_f.js";function c(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var f=i();const p=s(f),l=c({__proto__:null,default:p},[f]);export{l as z};