@abtnode/blocklet-services 1.17.8-beta-20260119-102944-6ba93a16 → 1.17.8-beta-20260125-093329-64b43854

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 (309) hide show
  1. package/api/index.js +5 -0
  2. package/api/libs/connect/session.js +33 -39
  3. package/api/middlewares/launcher-login.js +1 -2
  4. package/api/routes/federated.js +1 -2
  5. package/api/routes/oauth/server.js +1 -2
  6. package/api/routes/user-session.js +0 -2
  7. package/api/routes/user.js +61 -41
  8. package/api/services/auth/connect/destroy-self.js +0 -2
  9. package/api/services/auth/connect/invite.js +0 -2
  10. package/api/services/auth/connect/issue-passport.js +0 -2
  11. package/api/services/auth/connect/receive-transfer-app-owner.js +0 -2
  12. package/api/services/auth/connect/verify-destroy.js +0 -2
  13. package/api/services/auth/connect/verify-elevated.js +0 -2
  14. package/api/services/auth/session.js +1 -36
  15. package/api/util/user-util.js +1 -2
  16. package/dist/assets/{AdapterDayjs-CYW0YvmK.js → AdapterDayjs-B5owpIH3.js} +1 -1
  17. package/dist/assets/{Google-DKRt92nm.js → Google-efeywUOs.js} +1 -1
  18. package/dist/assets/{LottiePlayer.modern-CeQuigIa.js → LottiePlayer.modern-CE8erevJ.js} +1 -1
  19. package/dist/assets/access-control-BzsCJj-F.js +14 -0
  20. package/dist/assets/{actions-DydkTgA0.js → actions-DbuL4r3Z.js} +1 -1
  21. package/dist/assets/actions-Dm98-Dap.js +64 -0
  22. package/dist/assets/{add-component-core-nc1ps0ni.js → add-component-core-BKVGCdxY.js} +21 -21
  23. package/dist/assets/add-resource-Cxa0mbrd.js +1 -0
  24. package/dist/assets/{addon-DfWedLEC.js → addon-B1KwZDQ5.js} +1 -1
  25. package/dist/assets/advanced-B62UUhxe.js +14 -0
  26. package/dist/assets/{aigne-6nMSoyeQ.js → aigne-jjaGOQQ7.js} +1 -1
  27. package/dist/assets/api-BMcHDEnt.js +1 -0
  28. package/dist/assets/appearance-_ZB7EroL.js +1 -0
  29. package/dist/assets/{ar-DOhYGTlW.js → ar-BJmSv7rn.js} +1 -1
  30. package/dist/assets/audit-logs-DF2wcdWX.js +35 -0
  31. package/dist/assets/authorize-C6nOsMWm.js +1 -0
  32. package/dist/assets/{base-chart-DcZV4ZCI.js → base-chart-D_u2nVGm.js} +1 -1
  33. package/dist/assets/{base32-7iZvvdX8.js → base32-D79Y2AcQ.js} +1 -1
  34. package/dist/assets/bind-account-BIj9FA7d.js +1 -0
  35. package/dist/assets/branding-BEGHWROe.js +40 -0
  36. package/dist/assets/{branding-CwSyd5WC.js → branding-C86_64it.js} +3 -3
  37. package/dist/assets/branding-Dqv4_zpD.js +1 -0
  38. package/dist/assets/bundle-avatar-Cy8tSSSQ.js +1 -0
  39. package/dist/assets/button-DMYwcDVh.js +1 -0
  40. package/dist/assets/{click-to-copy-BgIYUMoo.js → click-to-copy-BCjXD9Nd.js} +1 -1
  41. package/dist/assets/{cloneDeep-YxES7wNt.js → cloneDeep-q2Jbqwkh.js} +1 -1
  42. package/dist/assets/{collapse-RMuUWnK3.js → collapse-CBrasNzu.js} +1 -1
  43. package/dist/assets/complete-CCe1VfI6.js +39 -0
  44. package/dist/assets/{component-CuKviNC8.js → component-DLlaIYmq.js} +37 -37
  45. package/dist/assets/config-BccEmD3I.js +53 -0
  46. package/dist/assets/config-C0CmuuRP.js +1 -0
  47. package/dist/assets/config-CsQBU86s.js +32 -0
  48. package/dist/assets/{config-navigation-hDihVsjx.js → config-navigation-D46rq0IX.js} +11 -11
  49. package/dist/assets/config-space-DLjHQVCq.js +1 -0
  50. package/dist/assets/{confirm-CdVn5WdC.js → confirm-ClxC2cDv.js} +1 -1
  51. package/dist/assets/connect-9CgvkPOq.js +1 -0
  52. package/dist/assets/{connect-Dy0Y8HRB.js → connect-C1q4hvQ3.js} +1 -1
  53. package/dist/assets/connect-DXjJ46DL.js +5 -0
  54. package/dist/assets/connect-to-CbgQNAwh.js +1 -0
  55. package/dist/assets/{content-layout-Dlmn5DW6.js → content-layout-BH_g_OCf.js} +1 -1
  56. package/dist/assets/{create-passport-svg-hldNORaB.js → create-passport-svg-Ct68e5tm.js} +1 -1
  57. package/dist/assets/{createClass-CgfWUrk8.js → createClass-CeMEAEuP.js} +1 -1
  58. package/dist/assets/dashboard-y1fk-IQM.js +93 -0
  59. package/dist/assets/{de-CtKPdGk6.js → de-B2IoQCYX.js} +1 -1
  60. package/dist/assets/{delete-confirm-CkiUXocp.js → delete-confirm-CxRbnJU_.js} +1 -1
  61. package/dist/assets/{did-address-CG36eCOx.js → did-address-BhAIkFPZ.js} +1 -1
  62. package/dist/assets/{domain-CDTeLbkZ.js → domain-CMJp7emz.js} +1 -1
  63. package/dist/assets/domain-action-card-CKlATj2V.js +28 -0
  64. package/dist/assets/domains-CQs-XM9-.js +1 -0
  65. package/dist/assets/email-CYR31d5d.js +17 -0
  66. package/dist/assets/{empty-spinner-DB1GKIOS.js → empty-spinner-DzVQ0tC1.js} +1 -1
  67. package/dist/assets/engine-ByRLynLu.js +1 -0
  68. package/dist/assets/{es-BSYtSZPg.js → es-nlHqTKrO.js} +1 -1
  69. package/dist/assets/exchange-passport-BAD6oRbd.js +1 -0
  70. package/dist/assets/{fallback-D-IHOW-7.js → fallback-CJFJeDKq.js} +1 -1
  71. package/dist/assets/{form-text-input-CPLafaTk.js → form-text-input-Dq_8KU_Y.js} +2 -2
  72. package/dist/assets/{form-wrapper-kWYD3nZz.js → form-wrapper-YOmD-sDI.js} +1 -1
  73. package/dist/assets/{form-Co-tgocU.js → form-zHvITlPG.js} +3 -3
  74. package/dist/assets/{fr-C35fi7h9.js → fr-LrrW00cI.js} +1 -1
  75. package/dist/assets/{fuel-BFx1ShM2.js → fuel-CU-CpANh.js} +1 -1
  76. package/dist/assets/gen-access-key-Fb9M1v-f.js +1 -0
  77. package/dist/assets/gen-simple-access-key-BgYT9wM-.js +1 -0
  78. package/dist/assets/get-safe-url-CCXmZ6Ty.js +1 -0
  79. package/dist/assets/hi-DxZE2HUh.js +5 -0
  80. package/dist/assets/home-Cy8jLKNF.js +1 -0
  81. package/dist/assets/{id-DoVb0JYr.js → id-C3U8Kyb0.js} +1 -1
  82. package/dist/assets/{iframe-DUzp97tk.js → iframe-CZ9tjsFz.js} +1 -1
  83. package/dist/assets/{index-8RHrVCC6.js → index-B-yh2KQb.js} +1 -1
  84. package/dist/assets/index-B2LgdSh1.js +242 -0
  85. package/dist/assets/index-BJ69cdwn.js +88 -0
  86. package/dist/assets/index-BJCzMYyG.js +832 -0
  87. package/dist/assets/{index-BUhEyicQ.js → index-BZxTtTlP.js} +1 -1
  88. package/dist/assets/index-Bg0Lw3eZ.js +150 -0
  89. package/dist/assets/{index-C1fKsLzf.js → index-Bij9abGY.js} +2 -2
  90. package/dist/assets/index-BkgA3JrZ.js +124 -0
  91. package/dist/assets/{index-VKjWmvRV.js → index-BqISx1lI.js} +1 -1
  92. package/dist/assets/index-BsIQdVmB.js +29 -0
  93. package/dist/assets/{index-CfvGuvbD.js → index-BtHiIOEI.js} +1 -1
  94. package/dist/assets/index-BtxDkXoY.js +7 -0
  95. package/dist/assets/{index-DqcciDRh.js → index-CKgbiYHC.js} +2 -2
  96. package/dist/assets/index-CQz-yW1Q.js +120 -0
  97. package/dist/assets/{index-Cax1AxL9.js → index-CSdd2W7t.js} +1 -1
  98. package/dist/assets/{index-D3BuekEe.js → index-CYam9iu7.js} +5 -5
  99. package/dist/assets/index-CZc0agHR.js +1 -0
  100. package/dist/assets/index-Cb9H09Dz.js +1 -0
  101. package/dist/assets/{index-D1Fa760B.js → index-CtCzpHpi.js} +1 -1
  102. package/dist/assets/index-D0VFBmtN.js +280 -0
  103. package/dist/assets/{index-3H6a5edM.js → index-D1HHdOwz.js} +2 -2
  104. package/dist/assets/{index-B9FojAjj.js → index-DDpk_EEp.js} +1 -1
  105. package/dist/assets/{index-Di2nSesc.js → index-DPbBn0Vu.js} +1 -1
  106. package/dist/assets/{index-D6pCyJv8.js → index-DbbtJMIS.js} +1 -1
  107. package/dist/assets/index-DgwyiIiW.js +1 -0
  108. package/dist/assets/{index-Bo9KtpTY.js → index-Dh38UJiv.js} +1 -1
  109. package/dist/assets/{index-CqCXPf7W.js → index-DvtkahBB.js} +1 -1
  110. package/dist/assets/index-Dw9kO-TK.js +7 -0
  111. package/dist/assets/{index-DFUM0Pvk.js → index-E0k6Os1B.js} +1 -1
  112. package/dist/assets/index-L6md5GCk.js +6 -0
  113. package/dist/assets/index-VTJ4vv2F.js +200 -0
  114. package/dist/assets/{index-CEJb82tA.js → index-WY8_4PO1.js} +1 -1
  115. package/dist/assets/{index-ZzcJ7eKO.js → index-lGLHoHAP.js} +1 -1
  116. package/dist/assets/{index-Cx0E03Bs.js → index-rh1DYsh2.js} +3 -3
  117. package/dist/assets/{index-C_kNXHsF.js → index-u8Hqob_G.js} +1 -1
  118. package/dist/assets/index-vQWAt26Z.js +81 -0
  119. package/dist/assets/info-outline-rounded-CTki6xsp.js +1 -0
  120. package/dist/assets/{invitation-BP8hOEFv.js → invitation-CrLJgh5y.js} +6 -6
  121. package/dist/assets/{invitations-C8aZLxdl.js → invitations-Cs7LYbh9.js} +2 -2
  122. package/dist/assets/invite-B0wKu-K4.js +1 -0
  123. package/dist/assets/issue-passport-B1azomgq.js +1 -0
  124. package/dist/assets/item-CcfCB60B.js +1 -0
  125. package/dist/assets/{ja-DZPUwZ9l.js → ja-Cv-fddix.js} +1 -1
  126. package/dist/assets/{ko-q4i4r9g6.js → ko-Cy3G6t2o.js} +1 -1
  127. package/dist/assets/{landing-page-JLA-ZD1t.js → landing-page-3yvA3dHp.js} +1 -1
  128. package/dist/assets/{launch-result-message-DJqF-slD.js → launch-result-message-CYcW9uFA.js} +1 -1
  129. package/dist/assets/layout-DPEeowZp.js +29 -0
  130. package/dist/assets/{list-3MUy-8Ol.js → list-BtmehYr0.js} +3 -3
  131. package/dist/assets/{list-header-BEZSwSji.js → list-header-DqG9VFur.js} +1 -1
  132. package/dist/assets/list-qef9ITY3.js +2 -0
  133. package/dist/assets/localization-VGnaiTRr.js +1 -0
  134. package/dist/assets/{log-Bq445Z1e.js → log-BDLuou50.js} +1 -1
  135. package/dist/assets/logger-Cn2_Ur4V.js +1 -0
  136. package/dist/assets/login-BTzBeYdR.js +1 -0
  137. package/dist/assets/login-method-item-T1v3TnPG.js +1 -0
  138. package/dist/assets/login-oauth-callback-f1uXdv_Y.js +1 -0
  139. package/dist/assets/{logo-uploader-CyZuvhwV.js → logo-uploader-YNwnzUQw.js} +1 -1
  140. package/dist/assets/{lost-passport-BiYg3QQI.js → lost-passport-Cv4fSebj.js} +2 -2
  141. package/dist/assets/metadata-BeJTujvj.js +55 -0
  142. package/dist/assets/{nav-menu-DSdXRbfg.js → nav-menu-CefEor9d.js} +1 -1
  143. package/dist/assets/{omit-Dq0FLBY8.js → omit-vVhnMpHQ.js} +1 -1
  144. package/dist/assets/{open-window-Dyu79ome.js → open-window-Cq_Eb4d0.js} +1 -1
  145. package/dist/assets/over-due-invoice-payment-Cx9nVkCY.js +1 -0
  146. package/dist/assets/overview-UWHPi3tV.js +116 -0
  147. package/dist/assets/{page-header-qdK3sAJh.js → page-header-DayahqMa.js} +1 -1
  148. package/dist/assets/passport-D7GEY4wO.js +1 -0
  149. package/dist/assets/passport-item-CpICtT-w.js +1 -0
  150. package/dist/assets/{permission-CvrrGfG6.js → permission-ozcooui7.js} +1 -1
  151. package/dist/assets/preferences-RHaCYv9t.js +1 -0
  152. package/dist/assets/profile-embed-BLPUgZl6.js +1 -0
  153. package/dist/assets/provider-icon-Blmpf_9p.js +1 -0
  154. package/dist/assets/pt-CLIZ5rGV.js +5 -0
  155. package/dist/assets/publish-resource-Cn5CEQma.js +1 -0
  156. package/dist/assets/{react-beautiful-dnd.esm-CWJ5I9Zv.js → react-beautiful-dnd.esm-L71UpeRK.js} +1 -1
  157. package/dist/assets/{react-stripe.esm-B-FTN8ep.js → react-stripe.esm-B1zA7yon.js} +1 -1
  158. package/dist/assets/{required-DnQpCGsD.js → required-jUJP5eu8.js} +1 -1
  159. package/dist/assets/ru-DoXNa8xl.js +5 -0
  160. package/dist/assets/{runtime-B_ZLP4FF.js → runtime-CGShJ0Po.js} +1 -1
  161. package/dist/assets/{sanitize-Bzl4lTuH.js → sanitize-BHeUjEo7.js} +1 -1
  162. package/dist/assets/sdk-C05lZFmW.js +1 -0
  163. package/dist/assets/{section-CZylgxjz.js → section-BHNJgwmP.js} +1 -1
  164. package/dist/assets/security-_Iru3mSY.js +22 -0
  165. package/dist/assets/session-DpYXqKUu.js +1 -0
  166. package/dist/assets/setup-DCnaHhf3.js +24 -0
  167. package/dist/assets/{shorten-label-CuBHsWUR.js → shorten-label-NmLkBKIj.js} +1 -1
  168. package/dist/assets/simple-select--uh08-vW.js +1 -0
  169. package/dist/assets/{spaces-ix8u0ZiI.js → spaces-gCrHfJB8.js} +1 -1
  170. package/dist/assets/start-S0ZFYLEE.js +187 -0
  171. package/dist/assets/{starting-progress-CWp5fTY0.js → starting-progress-BSgBADJS.js} +1 -1
  172. package/dist/assets/{status-Dn_LKaNp.js → status-DqZ0B8Xa.js} +1 -1
  173. package/dist/assets/{step-actions-DIZRcnXf.js → step-actions-DxJMBPwi.js} +1 -1
  174. package/dist/assets/{studio-CVIa8-XY.js → studio-B2SgpXxn.js} +1 -1
  175. package/dist/assets/{switch-BbyTGEOo.js → switch-D9wb-oPu.js} +1 -1
  176. package/dist/assets/{switch-control-BRjXGc1d.js → switch-control-Dl1BCyFd.js} +1 -1
  177. package/dist/assets/{table-tips-Dvmdodc5.js → table-tips-C5NrUDu8.js} +1 -1
  178. package/dist/assets/team-DXPe7dCA.js +146 -0
  179. package/dist/assets/th-DmzEcJam.js +5 -0
  180. package/dist/assets/{theme-mode-toggle-D3bcd10D.js → theme-mode-toggle-BYQvzsDR.js} +1 -1
  181. package/dist/assets/traffic-BandB_6R.js +1 -0
  182. package/dist/assets/transfer-Dky9H1bl.js +16 -0
  183. package/dist/assets/unsubscribe-D0la_6Ib.js +1 -0
  184. package/dist/assets/{use-app-logo-IRizt64R.js → use-app-logo-0G6x82Xn.js} +1 -1
  185. package/dist/assets/{use-blocklet-logo-Cf1j7pQz.js → use-blocklet-logo-IV_8xnB2.js} +1 -1
  186. package/dist/assets/{use-mobile-DFkQ5N0b.js → use-mobile-CEr7zhO3.js} +1 -1
  187. package/dist/assets/{use-mobile-DwGMuJlg.js → use-mobile-DAngW3li.js} +1 -1
  188. package/dist/assets/{use-mobile-CyUZDIaX.js → use-mobile-kXWiSSQD.js} +1 -1
  189. package/dist/assets/{use-server-logo-KZn9RrZd.js → use-server-logo-BVKQ1t0s.js} +1 -1
  190. package/dist/assets/{use-window-close-Dpj5UcYT.js → use-window-close-C-WcChaL.js} +1 -1
  191. package/dist/assets/{useAsync-DfiOQMQ_.js → useAsync-DRrTtbU_.js} +1 -1
  192. package/dist/assets/{useAsync-CkKfnulP.js → useAsync-D_y3bEgl.js} +1 -1
  193. package/dist/assets/{useAsyncRetry-C4R9ufi-.js → useAsyncRetry-BZ4R17gr.js} +2 -2
  194. package/dist/assets/{useLocalStorage-BQfIniHX.js → useLocalStorage-C5E7FrUa.js} +1 -1
  195. package/dist/assets/{user-center-6K47tx8j.js → user-center-D-UOqGpV.js} +5 -5
  196. package/dist/assets/{user-follower-BwzTutxU.js → user-follower-_9B1O2CU.js} +1 -1
  197. package/dist/assets/util-Bf1lWzn8.js +1 -0
  198. package/dist/assets/util-Dn9RqFJI.js +1 -0
  199. package/dist/assets/utils-eOkzHJzR.js +1 -0
  200. package/dist/assets/{vendor-arcblock-Dll6qxMT.js → vendor-arcblock-B6JCofz3.js} +1 -1
  201. package/dist/assets/vendor-hooks-Bt9Vv36g.js +1 -0
  202. package/dist/assets/{vendor-mui-core-CV-FnYH_.js → vendor-mui-core-D6nniiQs.js} +2 -2
  203. package/dist/assets/{vendor-mui-x-DwN6dcQH.js → vendor-mui-x-Ds-5Y7YM.js} +1 -1
  204. package/dist/assets/vendor-utils-BbcnEeJI.js +23 -0
  205. package/dist/assets/{vendor-ux-CLT2i3Pv.js → vendor-ux-hzekFYg2.js} +123 -123
  206. package/dist/assets/vi-6MG7Pp6O.js +5 -0
  207. package/dist/assets/wait-connect-DmtX5SsS.js +1 -0
  208. package/dist/assets/wallet-hidden-topbar-OBN14KiV.js +68 -0
  209. package/dist/assets/wizard-Q2Vm8Y9G.js +8 -0
  210. package/dist/assets/wizard-components-CON7Dump.js +52 -0
  211. package/dist/assets/wrap-locale-BGMozDAq.js +1 -0
  212. package/dist/assets/{zh-G2I44gfs.js → zh-B9y8LJ3-.js} +1 -1
  213. package/dist/assets/{zh-CJ9vCpmv.js → zh-Dfkd9CXx.js} +1 -1
  214. package/dist/assets/{zh-tw-C4Juvs-i.js → zh-tw-CbtwifV_.js} +1 -1
  215. package/dist/index.html +1 -1
  216. package/package.json +44 -44
  217. package/dist/assets/access-control-RI6LQbSm.js +0 -14
  218. package/dist/assets/actions-BlWED76c.js +0 -64
  219. package/dist/assets/add-resource-BVOdOQSW.js +0 -1
  220. package/dist/assets/advanced-CuKHqbLO.js +0 -14
  221. package/dist/assets/api-B8JXuhVp.js +0 -1
  222. package/dist/assets/appearance-C9TkbSjV.js +0 -1
  223. package/dist/assets/audit-logs-DKGke9hI.js +0 -35
  224. package/dist/assets/authorize-DkSqywe8.js +0 -1
  225. package/dist/assets/bind-account-DOwM9Nhe.js +0 -1
  226. package/dist/assets/branding-Cak2s8bn.js +0 -1
  227. package/dist/assets/branding-lcfxmmPp.js +0 -40
  228. package/dist/assets/bundle-avatar-DwiOyeMO.js +0 -1
  229. package/dist/assets/button-uUU4Wycr.js +0 -1
  230. package/dist/assets/complete-Udiv_yFp.js +0 -39
  231. package/dist/assets/config-6IwEgT3b.js +0 -32
  232. package/dist/assets/config-CJwxv2uK.js +0 -1
  233. package/dist/assets/config-D1OcHGlN.js +0 -53
  234. package/dist/assets/config-space-DfstlHnF.js +0 -1
  235. package/dist/assets/connect-CT2vMz6l.js +0 -5
  236. package/dist/assets/connect-DA7RO2yv.js +0 -1
  237. package/dist/assets/connect-to-CQMUbQkH.js +0 -1
  238. package/dist/assets/dashboard-BvI3ii8Z.js +0 -93
  239. package/dist/assets/domain-action-card-kMPYS2Nj.js +0 -28
  240. package/dist/assets/domains-TI6o1CvX.js +0 -1
  241. package/dist/assets/email-DHRHueET.js +0 -17
  242. package/dist/assets/engine-D_fEFx9_.js +0 -1
  243. package/dist/assets/exchange-passport-Cc872mjQ.js +0 -1
  244. package/dist/assets/gen-access-key-DrgLVRbm.js +0 -1
  245. package/dist/assets/gen-simple-access-key-B24d6k7g.js +0 -1
  246. package/dist/assets/get-safe-url-beob4f2C.js +0 -1
  247. package/dist/assets/hi-5fpYJkiW.js +0 -5
  248. package/dist/assets/home-Dw18IODa.js +0 -1
  249. package/dist/assets/index--WQuhwJL.js +0 -6
  250. package/dist/assets/index-2M4w6J9r.js +0 -29
  251. package/dist/assets/index-B-8044Gs.js +0 -280
  252. package/dist/assets/index-B6l4xGy5.js +0 -7
  253. package/dist/assets/index-BOPR4Iyc.js +0 -88
  254. package/dist/assets/index-BeunkI-Z.js +0 -242
  255. package/dist/assets/index-Bpic07NM.js +0 -200
  256. package/dist/assets/index-C4ZzROeE.js +0 -120
  257. package/dist/assets/index-CXp5SI_f.js +0 -832
  258. package/dist/assets/index-DH4rC-7M.js +0 -1
  259. package/dist/assets/index-DKzBOJCu.js +0 -81
  260. package/dist/assets/index-DL0wTcgx.js +0 -1
  261. package/dist/assets/index-DWHFecw2.js +0 -150
  262. package/dist/assets/index-DcW3jqfL.js +0 -6
  263. package/dist/assets/index-Vf51dp11.js +0 -124
  264. package/dist/assets/index-bEFOmVth.js +0 -1
  265. package/dist/assets/info-outline-rounded-DlgANjBB.js +0 -1
  266. package/dist/assets/invite-Cd5zEHFb.js +0 -1
  267. package/dist/assets/issue-passport-D7zqv3Al.js +0 -1
  268. package/dist/assets/item-DNj7ORqk.js +0 -1
  269. package/dist/assets/joi-browser.min-CUdv8seQ.js +0 -1
  270. package/dist/assets/joi-browser.min-eEVeW7LC.js +0 -1
  271. package/dist/assets/layout-Cwvm7lmD.js +0 -29
  272. package/dist/assets/list-BSXHuqLM.js +0 -2
  273. package/dist/assets/localization-Dond4H78.js +0 -1
  274. package/dist/assets/logger-CCAAJ2Xo.js +0 -1
  275. package/dist/assets/login-dc2t9Qyo.js +0 -1
  276. package/dist/assets/login-method-item-CyTsqz88.js +0 -1
  277. package/dist/assets/login-oauth-callback-Bext19kc.js +0 -1
  278. package/dist/assets/metadata-B2-Ltdko.js +0 -55
  279. package/dist/assets/over-due-invoice-payment-DzUsy6q0.js +0 -1
  280. package/dist/assets/overview-0TBmi-_i.js +0 -116
  281. package/dist/assets/passport-BhEaZ-sr.js +0 -1
  282. package/dist/assets/passport-item-DHwif94N.js +0 -1
  283. package/dist/assets/preferences-BBSWzZiT.js +0 -1
  284. package/dist/assets/profile-embed-shcOdRUI.js +0 -1
  285. package/dist/assets/provider-icon-DO2PqSth.js +0 -1
  286. package/dist/assets/pt-BFCHl6F1.js +0 -5
  287. package/dist/assets/publish-resource-CMuHIOUf.js +0 -1
  288. package/dist/assets/ru-CSTl62kK.js +0 -5
  289. package/dist/assets/sdk-CktKu_IW.js +0 -1
  290. package/dist/assets/security-DHRU8k0u.js +0 -22
  291. package/dist/assets/session-Bp3LV7zJ.js +0 -1
  292. package/dist/assets/setup-B6-Ei_3X.js +0 -24
  293. package/dist/assets/simple-select-nI-W90c_.js +0 -1
  294. package/dist/assets/start-oRp78RMQ.js +0 -187
  295. package/dist/assets/team-BTz28XqK.js +0 -146
  296. package/dist/assets/th-D75Dlluo.js +0 -5
  297. package/dist/assets/traffic-Cea69sMW.js +0 -1
  298. package/dist/assets/transfer-BydXCVCg.js +0 -16
  299. package/dist/assets/unsubscribe-BjAjx-Fl.js +0 -1
  300. package/dist/assets/util-DkTwHdRu.js +0 -1
  301. package/dist/assets/util-DySzCymV.js +0 -1
  302. package/dist/assets/vendor-hooks-DAZ1H6Va.js +0 -1
  303. package/dist/assets/vendor-utils-BzQg432x.js +0 -23
  304. package/dist/assets/vi-D1mKYrmb.js +0 -5
  305. package/dist/assets/wait-connect-q0_7mz_u.js +0 -1
  306. package/dist/assets/wallet-hidden-topbar-joIVZ1nl.js +0 -68
  307. package/dist/assets/wizard-C5Kl-g70.js +0 -8
  308. package/dist/assets/wizard-components-DQrlaeeW.js +0 -52
  309. package/dist/assets/wrap-locale-5DJTJTXP.js +0 -1
@@ -0,0 +1,93 @@
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"),window.__toCdnUrl("assets/index-ed1TwQco.css"),window.__toCdnUrl("assets/add-component-core-D4DUnQj0.css")])))=>i.map(i=>d[i]);
2
+ import{j as i,X as y,b4 as Xe,al as C,G as U,L as le,ai as et,ap as rs,bq as is,I as tt,ak as as,aT as nt,br as An,bs as Rn,bt as Pn,an as ke,a7 as Z,bb as ze,bu as Jt,V as re,aL as $n,T as B,s as $t,as as ls,n as Ye,b3 as On,Z as Bn,bv as cs,bw as us,bx as ds,R as St,by as ps,bz as fs,bA as ms,bB as hs,bC as gs,bD as bs,bE as xs,bF as vs,bG as ys,bH as ws,aO as ks,aP as Ss,a4 as js,M as Cs,aM as _s,aN as Is,bI as Es,bJ as Ds,bK as Xt,bL as en,bM as Ls}from"./vendor-mui-core-D6nniiQs.js";import{r as m,u as Nn,g as Ts,L as Ot,i as Ms,a as As,m as Rs}from"./vendor-react-DX7tU9aY.js";import{V as K,X as F,Y as zn,w as Ps,n as O,Z as $s,_ as tn,$ as Os,a0 as Hn,a1 as de,M as ue,a2 as Un,a3 as Bs,L as Bt,a4 as Ns,u as Fn,E as Nt,v as ot,a5 as zs,a6 as Hs,x as nn,a7 as on,q as Us,t as Fs,C as Vs,A as ge,y as Ws,B as Ys,P as qs,F as ct,a8 as ut,j as sn,a9 as Zs,e as Ks,W as pe,aa as Gs,ab as Vn,ac as Qs,ad as Js,ae as Xs,U as rn,af as er,ag as tr,ah as nr}from"./index-BJCzMYyG.js";import{o as qe}from"./vendor-arcblock-B6JCofz3.js";import{V as A,b2 as zt,y as J,b5 as Wn,b6 as or,b7 as sr,b1 as Yn,F as je,ab as rr,b8 as ir,i as ar,j as lr,b9 as cr,M as qn,b3 as an,ba as ur,_ as E,U as dr}from"./vendor-ux-hzekFYg2.js";import{a as q,b as Zn,d as Ht,v as pr,r as fr}from"./vendor-hooks-Bt9Vv36g.js";import{a6 as mr,r as Kn,a7 as hr,i as gr,G as Gn,z as ee,$ as br,e as xr}from"./vendor-utils-BbcnEeJI.js";import{u as st}from"./session-DpYXqKUu.js";import{f as Ut}from"./index-DBs9Ljax.js";import{i as vr,u as yr,M as wr,a as kr,b as Ce,T as Sr,N as jr}from"./team-DXPe7dCA.js";import{D as Cr,u as te}from"./useAsyncRetry-BZ4R17gr.js";import{u as Qn}from"./useSetState-CUbypYGT.js";import{k as _r}from"./fallback-CJFJeDKq.js";import{x as Ir,d as Er}from"./index-D1HHdOwz.js";import{s as Dr,L as Lr,N as Tr,P as Mr,p as Ar,A as Rr,W as Pr,v as dt,z as $r,t as Or,n as Br}from"./wallet-hidden-topbar-OBN14KiV.js";import{M as Nr}from"./use-blocklet-logo-IV_8xnB2.js";import"./zh-Dfkd9CXx.js";import{O as zr}from"./over-due-invoice-payment-Cx9nVkCY.js";import{u as ln}from"./useLocalStorage-C5E7FrUa.js";import{C as cn}from"./confirm-ClxC2cDv.js";import{g as pt}from"./get-safe-url-CCXmZ6Ty.js";import{c as un}from"./passport-D7GEY4wO.js";import{M as Hr}from"./provider-icon-Blmpf_9p.js";import{g as Ur}from"./spaces-gCrHfJB8.js";const Jn=m.createContext({});function Xn({children:e,type:t="blocklets"}){const[n,s]=m.useState([]),o=m.useRef([]),r=c=>{if(!o.current.includes(c)){const u=[...o.current,c];s(u),o.current=u}},a=c=>{if(o.current.includes(c)){const u=o.current.filter(d=>d!==c);s(u),o.current=u}},l=c=>{const u=n.filter(p=>c.find(f=>f===p));mr(u,n).forEach(p=>a(p))};return i.jsx(Jn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:r,removeDeletingDid:a,matchDeletingDid:l},children:e})}Xn.propTypes={type:y.string,children:y.node.isRequired};function Ic(){return m.useContext(Jn)}const Fr=e=>{const t={};let n=null;return O.forEachBlockletSync(e,s=>{t[s.meta.bundleDid]?n=O.getDisplayName(s,!0):s.meta.bundleDid&&(t[s.meta.bundleDid]=!0)}),n},Vr=(e,t,n)=>{const{hostname:s,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(s);if(!a)return o;const l=a[0],u=((t.site?.domainAliases||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(tn))||"").replace(`.${tn}`,"");return u?o.replace(s,`${u}-${l}.${Os}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Wr(){const{t:e}=A(),{api:t}=st(),{blocklet:n}=K(),{inService:s}=F(),[o,r]=m.useState(!1),[a,l]=m.useState(5),c=n&&n.structVersion!==zn,u=()=>{try{if(O.isBlockletRunning(n)){J.error(e("blocklet.migrate.tip.running"));return}const f=Fr(n);if(f){J.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}r(!0)}catch(f){J.error(Ut(f))}},d=()=>{const f=Vr(window.location,n,s);setTimeout(()=>{window.location.href=f},5e3),l(5),setInterval(()=>{l(g=>g-1)},1e3)},p=()=>r(!1);return[c&&i.jsxs(Xe,{severity:"warning",style:{margin:"12px 0"},children:[i.jsxs(C,{sx:{display:"flex",alignItems:"center"},children:[i.jsx(zt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),i.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>i.jsx(C,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&i.jsx(Ps,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:$s(n,!0),title:O.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:p},"connect")]}function Yr(){const e=U();return[...e.breakpoints.keys].reverse().reduce((n,s)=>{const o=le(e.breakpoints.up(s));return!n&&o?s:n},null)||"xs"}function qr(e){return i.jsx(et,{...e,children:i.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 Zr(e){return i.jsx(et,{...e,children:i.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Kr(e){return i.jsx(et,{...e,children:i.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 Gr(e){return i.jsx(et,{...e,children:i.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 Pe={fontSize:20,marginInlineEnd:8},Qr={success:i.jsx(qr,{style:Pe}),warning:i.jsx(Zr,{style:Pe}),error:i.jsx(Kr,{style:Pe}),info:i.jsx(Gr,{style:Pe})},Jr={xl:"400px",lg:"400px",md:"400px",sm:"300px"};function eo({keyId:e,notification:t={},viewAllUrl:n,content:s=null},o){const r=U(),a=Qr[t.severity],{closeSnackbar:l}=Wn(),c=()=>l(e),u=Nn(),d=()=>{l(e),u(n)},p=q(()=>vr(t),[t]),f=q(()=>t?.activity,[t]),g=yr({activity:f,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:r.palette.primary.main,userDid:t?.receivers?.[0]?.did}}),h=Yr();return i.jsxs(C,{component:or,ref:o,sx:[{...r.typography.body2,display:"flex",backgroundColor:r.palette.background.default,color:"#fff",alignItems:"center",pl:2.5,pr:2,py:.75,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)",width:Jr[h]},t.severity==="success"?{backgroundColor:`${rs[600]} !important`}:{},t.severity==="error"?{backgroundColor:`${r.palette.error.dark} !important`}:{},t.severity==="info"?{backgroundColor:`${r.palette.primary.main} !important`}:{},t.severity==="warning"?{backgroundColor:`${is[700]} !important`}:{}],children:[i.jsxs(C,{sx:{display:"flex",alignItems:"center",py:1,flex:1},children:[a,i.jsx(ei,{onClick:d,sx:{flex:1},children:i.jsx(C,{children:p?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:g}),f.meta?i.jsx(wr,{meta:f.meta,type:f.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:t.title}),s||i.jsx("span",{className:"desc",children:t.description})]})})})]}),i.jsx(C,{sx:{display:"flex",alignItems:"center",ml:"auto",mr:-1,width:44},children:i.jsx(tt,{"aria-label":"close",color:"inherit",onClick:c,size:"large",children:i.jsx(C,{component:as,sx:{fontSize:20}})},"close")})]})}const Xr=m.forwardRef(eo);eo.propTypes={viewAllUrl:y.string.isRequired,keyId:y.number.isRequired,notification:y.object.isRequired,content:y.node};const ei=nt.div`
3
+ cursor: pointer;
4
+ display: flex;
5
+ flex-direction: column;
6
+ .title {
7
+ overflow: hidden;
8
+ text-overflow: ellipsis;
9
+ display: -webkit-box;
10
+ -webkit-line-clamp: 2;
11
+ -webkit-box-orient: vertical;
12
+ font-weight: bold;
13
+ }
14
+ .desc {
15
+ overflow: hidden;
16
+ text-overflow: ellipsis;
17
+ display: -webkit-box;
18
+ -webkit-line-clamp: 3;
19
+ -webkit-box-orient: vertical;
20
+ word-break: break-word;
21
+ }
22
+ `;var L=function(t,n,s){return An.call(n,"css")?i.jsx(Rn,Pn(t,n),s):i.jsx(t,n,s)},$e=function(t,n,s){return An.call(n,"css")?i.jsxs(Rn,Pn(t,n),s):i.jsxs(t,n,s)};const to=Object.freeze({left:0,top:0,width:16,height:16}),Ze=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_e=Object.freeze({...to,...Ze}),jt=Object.freeze({..._e,body:"",hidden:!1});function ti(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const s=((e.rotate||0)+(t.rotate||0))%4;return s&&(n.rotate=s),n}function dn(e,t){const n=ti(e,t);for(const s in jt)s in Ze?s in e&&!(s in n)&&(n[s]=Ze[s]):s in t?n[s]=t[s]:s in e&&(n[s]=e[s]);return n}function ni(e,t){const n=e.icons,s=e.aliases||Object.create(null),o=Object.create(null);function r(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=s[a]&&s[a].parent,c=l&&r(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(n).concat(Object.keys(s)).forEach(r),o}function oi(e,t,n){const s=e.icons,o=e.aliases||Object.create(null);let r={};function a(l){r=dn(s[l]||o[l],r)}return a(t),n.forEach(a),dn(e,r)}function si(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 s=ni(e);for(const o in s){const r=s[o];r&&(t(o,oi(e,o,r)),n.push(o))}return n}const ve=/^[a-z0-9]+(-[a-z0-9]+)*$/,me=(e,t,n,s="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:s,prefix:c,name:l};return t&&!He(u)?null:u}const r=o[0],a=r.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return t&&!He(l)?null:l}if(n&&s===""){const l={provider:s,prefix:"",name:r};return t&&!He(l,n)?null:l}return null},He=(e,t)=>e?!!((e.provider===""||e.provider.match(ve))&&(t&&e.prefix===""||e.prefix.match(ve))&&e.name.match(ve)):!1,ri={provider:"",aliases:{},not_found:{},...to};function ft(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ii(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ft(e,ri))return null;const n=t.icons;for(const o in n){const r=n[o];if(!o.match(ve)||typeof r.body!="string"||!ft(r,jt))return null}const s=t.aliases||Object.create(null);for(const o in s){const r=s[o],a=r.parent;if(!o.match(ve)||typeof a!="string"||!n[a]&&!s[a]||!ft(r,jt))return null}return t}const Ke=Object.create(null);function ai(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function H(e,t){const n=Ke[e]||(Ke[e]=Object.create(null));return n[t]||(n[t]=ai(e,t))}function Ft(e,t){return ii(t)?si(t,(n,s)=>{s?e.icons[n]=s:e.missing.add(n)}):[]}function li(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function ci(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ke)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ke[o]||{})).forEach(a=>{const l=H(o,a);n=n.concat(Object.keys(l.icons).map(c=>(o!==""?"@"+o+":":"")+a+":"+c))})}),n}let Vt=!1;function ui(e){return Vt}function Ie(e){const t=typeof e=="string"?me(e,!0,Vt):e;if(t){const n=H(t.provider,t.prefix),s=t.name;return n.icons[s]||(n.missing.has(s)?null:void 0)}}function di(e,t){const n=me(e,!0,Vt);if(!n)return!1;const s=H(n.provider,n.prefix);return li(s,n.name,t)}function no(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!He({provider:t,prefix:n,name:"a"}))return!1;const s=H(t,n);return!!Ft(s,e)}function pi(e){return!!Ie(e)}function fi(e){const t=Ie(e);return t?{..._e,...t}:null}const oo=Object.freeze({width:null,height:null}),so=Object.freeze({...oo,...Ze}),mi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hi=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ct(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 s=e.split(mi);if(s===null||!s.length)return e;const o=[];let r=s.shift(),a=hi.test(r);for(;;){if(a){const l=parseFloat(r);isNaN(l)?o.push(r):o.push(Math.ceil(l*t*n)/n)}else o.push(r);if(r=s.shift(),r===void 0)return o.join("");a=!a}}const gi=e=>e==="unset"||e==="undefined"||e==="none";function rt(e,t){const n={..._e,...e},s={...so,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,s].forEach(h=>{const x=[],v=h.hFlip,j=h.vFlip;let b=h.rotate;v?j?b+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):j&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let S;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:S=o.height/2+o.top,x.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,x.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}b%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),x.length&&(r='<g transform="'+x.join(" ")+'">'+r+"</g>")});const a=s.width,l=s.height,c=o.width,u=o.height;let d,p;a===null?(p=l===null?"1em":l==="auto"?u:l,d=Ct(p,c/u)):(d=a==="auto"?c:a,p=l===null?Ct(d,u/c):l==="auto"?u:l);const f={},g=(h,x)=>{gi(x)||(f[h]=x.toString())};return g("width",d),g("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:f,body:r}}const bi=/\sid="(\S+)"/g,xi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let vi=0;function ro(e,t=xi){const n=[];let s;for(;s=bi.exec(e);)n.push(s[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(r=>{const a=typeof t=="function"?t(r):t+(vi++).toString(),l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ie={local:!0,session:!0},io={local:new Set,session:new Set};let Wt=!1;function yi(e){Wt=e}const pn="iconify2",Se="iconify",ao=Se+"-count",fn=Se+"-version",lo=36e5,wi=168;function _t(e,t){try{return e.getItem(t)}catch{}}function Yt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function mn(e,t){try{e.removeItem(t)}catch{}}function It(e,t){return Yt(e,ao,t.toString())}function Et(e){return parseInt(_t(e,ao))||0}let Oe=typeof window>"u"?{}:window;function co(e){const t=e+"Storage";try{if(Oe&&Oe[t]&&typeof Oe[t].length=="number")return Oe[t]}catch{}ie[e]=!1}function uo(e,t){const n=co(e);if(!n)return;const s=_t(n,fn);if(s!==pn){if(s){const l=Et(n);for(let c=0;c<l;c++)mn(n,Se+c.toString())}Yt(n,fn,pn),It(n,0);return}const o=Math.floor(Date.now()/lo)-wi,r=l=>{const c=Se+l.toString(),u=_t(n,c);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,l))return!0}catch{}mn(n,c)}};let a=Et(n);for(let l=a-1;l>=0;l--)r(l)||(l===a-1?(a--,It(n,a)):io[e].add(l))}function po(){if(!Wt){yi(!0);for(const e in ie)uo(e,t=>{const n=t.data,s=t.provider,o=n.prefix,r=H(s,o);if(!Ft(r,n).length)return!1;const a=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function fo(e,t){switch(e){case"local":case"session":ie[e]=t;break;case"all":for(const n in ie)ie[n]=t;break}}const Dt=Object.create(null);function mo(e,t){Dt[e]=t}function Lt(e){return Dt[e]||Dt[""]}function qt(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 it=Object.create(null),be=["https://api.simplesvg.com","https://api.unisvg.com"],Ue=[];for(;be.length>0;)be.length===1||Math.random()>.5?Ue.push(be.shift()):Ue.push(be.pop());it[""]=qt({resources:["https://api.iconify.design"].concat(Ue)});function ho(e,t){const n=qt(t);return n===null?!1:(it[e]=n,!0)}function at(e){return it[e]}function ki(){return Object.keys(it)}const Si=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ge=Si();function ji(e){Ge=e}function Ci(){return Ge}function _i(e,t){const n=at(e);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const r=t+".json?icons=";s=n.maxURL-o-n.path.length-r.length}return s}function Ii(e){return e===404}const Ei=(e,t,n)=>{const s=[],o=_i(e,t),r="icons";let a={type:r,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(s.push(a),a={type:r,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function Di(e){if(typeof e=="string"){const t=at(e);if(t)return t.path}return"/"}const Li=(e,t,n)=>{if(!Ge){n("abort",424);return}let s=Di(t.provider);switch(t.type){case"icons":{const r=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});s+=r+".json?"+c.toString();break}case"custom":{const r=t.uri;s+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;Ge(e+s).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{n(Ii(a)?"abort":"next",a)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},Ti={prepare:Ei,send:Li};function Mi(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let s={provider:"",prefix:"",name:""};return e.forEach(o=>{if(s.name===o.name&&s.prefix===o.prefix&&s.provider===o.provider)return;s=o;const r=o.provider,a=o.prefix,l=o.name,c=n[r]||(n[r]=Object.create(null)),u=c[a]||(c[a]=H(r,a));let d;l in u.icons?d=t.loaded:a===""||u.missing.has(l)?d=t.missing:d=t.pending;const p={provider:r,prefix:a,name:l};d.push(p)}),t}function go(e,t){e.forEach(n=>{const s=n.loaderCallbacks;s&&(n.loaderCallbacks=s.filter(o=>o.id!==t))})}function Ai(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 s=e.provider,o=e.prefix;t.forEach(r=>{const a=r.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:s,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:s,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||go([e],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let Ri=0;function Pi(e,t,n){const s=Ri++,o=go.bind(null,n,s);if(!t.pending.length)return o;const r={id:s,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),o}function $i(e,t=!0,n=!1){const s=[];return e.forEach(o=>{const r=typeof o=="string"?me(o,t,n):o;r&&s.push(r)}),s}var Oi={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Bi(e,t,n,s){const o=e.resources.length,r=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let k=e.resources.slice(0);for(a=[];k.length>1;){const _=Math.floor(Math.random()*k.length);a.push(k[_]),k=k.slice(0,_).concat(k.slice(_+1))}a=a.concat(k)}else a=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let c="pending",u=0,d,p=null,f=[],g=[];typeof s=="function"&&g.push(s);function h(){p&&(clearTimeout(p),p=null)}function x(){c==="pending"&&(c="aborted"),h(),f.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),f=[]}function v(k,_){_&&(g=[]),typeof k=="function"&&g.push(k)}function j(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:f.length,subscribe:v,abort:x}}function b(){c="failed",g.forEach(k=>{k(void 0,d)})}function S(){f.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),f=[]}function D(k,_,T){const P=_!=="success";switch(f=f.filter(I=>I!==k),c){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){d=T,b();return}if(P){d=T,f.length||(a.length?R():b());return}if(h(),S(),!e.random){const I=e.resources.indexOf(k.resource);I!==-1&&I!==e.index&&(e.index=I)}c="completed",g.forEach(I=>{I(T)})}function R(){if(c!=="pending")return;h();const k=a.shift();if(k===void 0){if(f.length){p=setTimeout(()=>{h(),c==="pending"&&(S(),b())},e.timeout);return}b();return}const _={status:"pending",resource:k,callback:(T,P)=>{D(_,T,P)}};f.push(_),u++,p=setTimeout(R,e.rotate),n(k,t,_.callback)}return setTimeout(R),j}function bo(e){const t={...Oi,...e};let n=[];function s(){n=n.filter(l=>l().status==="pending")}function o(l,c,u){const d=Bi(t,l,c,(p,f)=>{s(),u&&u(p,f)});return n.push(d),d}function r(l){return n.find(c=>l(c))||null}return{query:o,find:r,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:s}}function hn(){}const mt=Object.create(null);function Ni(e){if(!mt[e]){const t=at(e);if(!t)return;const n=bo(t),s={config:t,redundancy:n};mt[e]=s}return mt[e]}function xo(e,t,n){let s,o;if(typeof e=="string"){const r=Lt(e);if(!r)return n(void 0,424),hn;o=r.send;const a=Ni(e);a&&(s=a.redundancy)}else{const r=qt(e);if(r){s=bo(r);const a=e.resources?e.resources[0]:"",l=Lt(a);l&&(o=l.send)}}return!s||!o?(n(void 0,424),hn):s.query(t,o,n)().abort}function zi(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const s in ie)uo(s,o=>{const r=o.data;return o.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function Hi(e,t){Wt||po();function n(s){let o;if(!ie[s]||!(o=co(s)))return;const r=io[s];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=Et(o),!It(o,a+1))return;const l={cached:Math.floor(Date.now()/lo),provider:e.provider,data:t};return Yt(o,Se+a.toString(),JSON.stringify(l))}t.lastModified&&!zi(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function gn(){}function Ui(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ai(e)}))}function Fi(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:s}=e,o=e.iconsToLoad;delete e.iconsToLoad;let r;if(!o||!(r=Lt(n)))return;r.prepare(n,s,o).forEach(l=>{xo(n,l,c=>{if(typeof c!="object")l.icons.forEach(u=>{e.missing.add(u)});else try{const u=Ft(e,c);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),Hi(e,c)}catch(u){console.error(u)}Ui(e)})})}))}const Vi=e=>{const n=H(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Zt=(e,t)=>{const n=$i(e,!0,ui()),s=Mi(n);if(!s.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(s.loaded,s.missing,s.pending,gn)}),()=>{c=!1}}const o=Object.create(null),r=[];let a,l;return s.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===a)return;a=u,l=d,r.push(H(u,d));const p=o[u]||(o[u]=Object.create(null));p[d]||(p[d]=[])}),s.pending.forEach(c=>{const{provider:u,prefix:d,name:p}=c,f=H(u,d),g=f.pendingIcons||(f.pendingIcons=new Set);g.has(p)||(g.add(p),o[u][d].push(p))}),r.forEach(c=>{const{provider:u,prefix:d}=c;o[u][d].length&&Fi(c,o[u][d])}),t?Pi(t,s,r):gn},Wi=e=>new Promise((t,n)=>{const s=typeof e=="string"?me(e,!0):e;if(!s){n(e);return}Zt([s||e],o=>{if(o.length&&s){const r=Ie(s);if(r){t({..._e,...r});return}}n(e)})});function vo(e,t){const n={...e};for(const s in t){const o=t[s],r=typeof o;s in oo?(o===null||o&&(r==="string"||r==="number"))&&(n[s]=o):r===typeof n[s]&&(n[s]=s==="rotate"?o%4:o)}return n}const lt={...so,inline:!1},ht="iconify",Tt="iconify-inline",ne="iconifyData"+Date.now();let ae=[];function Ee(e){for(let t=0;t<ae.length;t++){const n=ae[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function yo(e,t=!1){let n=Ee(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ae.push(n),n)}function Yi(){if(document.documentElement)return yo(document.documentElement);ae.push({node:()=>document.documentElement})}function qi(e){ae=ae.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function De(){return ae}function Zi(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ye=null;const Ki={childList:!0,subtree:!0,attributes:!0};function wo(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ye&&ye(e)}))}function Gi(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let s=0;s<t.length;s++){const o=t[s];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[ne]!==void 0){n.paused||wo(e);return}}}function ko(e,t){e.observer.instance.observe(t,Ki)}function Qe(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(Gi.bind(null,e)),ko(e,n),t.paused||wo(e))}function bn(){De().forEach(Qe)}function So(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 Qi(e){const t=ye!==null;if(ye!==e&&(ye=e,t&&De().forEach(So)),t){bn();return}Zi(bn)}function Mt(e){(e?[e]:De()).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 Ji(e){if(e){const t=Ee(e);t&&Mt(t)}else Mt()}function At(e){(e?[e]:De()).forEach(t=>{if(!t.observer){Qe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const s=typeof t.node=="function"?t.node():t.node;if(s)n.instance?ko(t,s):Qe(t);else return}})}function Xi(e){if(e){const t=Ee(e);t&&At(t)}else At()}function jo(e,t=!1){const n=yo(e,t);return Qe(n),n}function Co(e){const t=Ee(e);t&&(So(t),qi(e))}function ea(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,s=t.customisations;for(const o in lt)if(n[o]!==s[o])return!0;return!1}function ta(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function s(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:s(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?s(r):0)}}return t}const na=/[\s,]+/;function oa(e,t){t.split(na).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const sa=["width","height"],ra=["inline","hFlip","vFlip"];function ia(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function aa(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&me(t,!0);if(!n)return null;const s={...lt,inline:e.classList&&e.classList.contains(Tt)};sa.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(s.rotate=ta(o));const r=e.getAttribute("data-flip");typeof r=="string"&&oa(s,r),ra.forEach(l=>{const c="data-"+l,u=ia(e.getAttribute(c),c);typeof u=="boolean"&&(s[l]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:s,mode:a}}const la="svg."+ht+", i."+ht+", span."+ht+", i."+Tt+", span."+Tt;function ca(e){const t=[];return e.querySelectorAll(la).forEach(n=>{const s=n[ne]||n.tagName.toLowerCase()!=="svg"?aa(n):null;s&&t.push({node:n,props:s})}),t}function _o(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in t)n+=" "+s+'="'+t[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let we;function ua(){try{we=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{we=null}}function da(e){return we===void 0&&ua(),we?we.createHTML(e):e}function Io(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Eo(e,t,n,s){const o=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{o.add(l)})}const r=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&r.push(a):(o.add(a),r.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),r}function Do(e,t,n){const s=e.style;(n||[]).forEach(r=>{s.removeProperty(r)});const o=[];for(const r in t)s.getPropertyValue(r)||(o.push(r),s.setProperty(r,t[r]));return o}function Lo(e,t,n){let s;try{s=document.createElement("span")}catch{return e}const o=t.customisations,r=rt(n,o),a=e[ne],l=_o(ro(r.body),{"aria-hidden":"true",role:"img",...r.attributes});s.innerHTML=da(l);const c=s.childNodes[0],u=e.attributes;for(let h=0;h<u.length;h++){const x=u.item(h),v=x.name;v!=="class"&&!c.hasAttribute(v)&&c.setAttribute(v,x.value)}const d=Io(t.icon),p=Eo(c,d,new Set(a&&a.addedClasses),e),f=Do(c,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),g={...t,status:"loaded",addedClasses:p,addedStyles:f};return c[ne]=g,e.parentNode&&e.parentNode.replaceChild(c,e),c}function pa(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function fa(e){return"data:image/svg+xml,"+pa(e)}function ma(e){return'url("'+fa(e)+'")'}const ha={display:"inline-block"},Rt={"background-color":"currentColor"},To={"background-color":"transparent"},xn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},vn={"-webkit-mask":Rt,mask:Rt,background:To};for(const e in vn){const t=vn[e];for(const n in xn)t[e+"-"+n]=xn[n]}function yn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ga(e,t,n,s){const o=t.customisations,r=rt(n,o),a=r.attributes,l=e[ne],c=_o(r.body,{...a,width:n.width+"",height:n.height+""}),u=Io(t.icon),d=Eo(e,u,new Set(l&&l.addedClasses)),f={"--svg":ma(c),width:yn(a.width),height:yn(a.height),...ha,...s?Rt:To};o.inline&&(f["vertical-align"]="-0.125em");const g=Do(e,f,l&&l.addedStyles),h={...t,status:"loaded",addedClasses:d,addedStyles:g};return e[ne]=h,e}let Be=!1;function ba(){Be||(Be=!0,setTimeout(()=>{Be&&(Be=!1,fe())}))}function fe(e,t=!1){const n=Object.create(null);function s(o,r){const{provider:a,prefix:l,name:c}=o,u=H(a,l),d=u.icons[c];if(d)return{status:"loaded",icon:d};if(u.missing.has(c))return{status:"missing"};if(r&&!Vi(o)){const p=n[a]||(n[a]=Object.create(null));(p[l]||(p[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:De()).forEach(o=>{const r=typeof o.node=="function"?o.node():o.node;if(!r||!r.querySelectorAll)return;let a=!1,l=!1;function c(u,d,p){if(l||(l=!0,Mt(o)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,g=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof g=="boolean"){ga(u,d,{..._e,...p},g);return}}Lo(u,d,p)}ca(r).forEach(({node:u,props:d})=>{const p=u[ne];if(!p){const{status:g,icon:h}=s(d.icon,!0);if(h){c(u,d,h);return}a=a||g==="loading",u[ne]={...d,status:g};return}let f;if(ea(p,d)){if(f=s(d.icon,p.name!==d.name),!f.icon){a=a||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=s(d.icon,!1),!f.icon){p.status=f.status;return}}c(u,d,f.icon)}),o.temporary&&!a?Co(r):t&&a?jo(r,!0):l&&o.observer&&At(o)});for(const o in n){const r=n[o];for(const a in r){const l=r[a];Zt(Array.from(l).map(c=>({provider:o,prefix:a,name:c})),ba)}}}function xa(e){const t=Ee(e);t?fe(t):fe({node:e,temporary:!0},!0)}function Mo(e,t,n=!1){const s=Ie(e);if(!s)return null;const o=me(e),r=vo(lt,t||{}),a=Lo(document.createElement("span"),{name:e,icon:o,customisations:r},s);return n?a.outerHTML:a}function va(){return"3.1.1"}function ya(e,t){return Mo(e,t,!1)}function wa(e,t){return Mo(e,t,!0)}function ka(e,t){const n=Ie(e);if(!n)return null;const s=vo(lt,t||{});return rt(n,s)}function Sa(e){e?xa(e):fe()}if(typeof document<"u"&&typeof window<"u"){Yi();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(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!no(s))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Qi(fe),fe()})}function ja(e,t){fo(e,t!==!1)}function Ca(e){fo(e,!0)}mo("",Ti);if(typeof document<"u"&&typeof window<"u"){po();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const s="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;ho(n,o)||console.error(s)}catch{console.error(s)}}}}const _a={getAPIConfig:at,setAPIModule:mo,sendAPIQuery:xo,setFetch:ji,getFetch:Ci,listAPIProviders:ki},Ia={_api:_a,addAPIProvider:ho,loadIcons:Zt,loadIcon:Wi,iconExists:pi,getIcon:fi,listIcons:ci,addIcon:di,addCollection:no,replaceIDs:ro,calculateSize:Ct,buildIcon:rt,getVersion:va,renderSVG:ya,renderHTML:wa,renderIcon:ka,scan:Sa,observe:jo,stopObserving:Co,pauseObserver:Ji,resumeObserver:Xi,enableCache:ja,disableCache:Ca};try{self.Iconify===void 0&&(self.Iconify=Ia)}catch{}function Ao({children:e,style:t={},...n}){return i.jsx(sr,{style:t,...n,children:e})}Ao.propTypes={children:y.any.isRequired,style:y.object};const $={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Fe={added:$.grey,waiting:$.yellow,downloading:$.yellow,extracting:$.yellow,downloaded:$.grey,installing:$.yellow,installed:$.grey,starting:$.yellow,running:$.running,stopping:$.yellow,stopped:$.reverse,error:$.error,upgrading:$.yellow,restarting:$.yellow,corrupted:$.error,deleting:$.yellow,resource:$.primary},wn={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function Ro({isResource:e=!1,status:t,variant:n="tag",progress:s=0,tip:o="",...r}){const{t:a}=m.useContext(Yn),l=O.isInProgress(t);let c=e&&t==="stopped"?"resource":t;wn[c]||(c="installed");const u=a(`blocklet.status.${c}`);return n==="pin"?i.jsx(ke,{title:a("blocklet.statusTip",{status:u}),children:i.jsxs(C,{...r,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:[i.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Fe[c]}}),i.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Fe[c]}})]})}):n==="dot"?i.jsx(ke,{title:a("blocklet.statusTip",{status:u}),children:i.jsx(Cr,{color:Fe[c],...r})}):i.jsxs(Ao,{type:wn[c],...r,children:[l&&i.jsx(Z,{size:12,color:"inherit",style:{marginRight:5}}),u,o&&i.jsx("span",{style:{marginLeft:5},children:o}),c==="downloading"&&s?i.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Ro.propTypes={status:y.string.isRequired,variant:y.oneOf(["dot","tag","pin"]),source:y.string,progress:y.number,isResource:y.bool,tip:y.string};function Po({infos:e=[]}){const{t}=A(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const s=e.map(o=>`* ${o.label}: ${o.value}`).join(`
23
+ `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
24
+
25
+
26
+
27
+ <!--
28
+ [Server Info]
29
+ ${s}
30
+ * Page: ${window.location.href}
31
+ -->
32
+ `),L(C,{sx:{mx:{xs:0,md:2}},children:L(ze,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Po.propTypes={infos:y.arrayOf(y.shape({label:y.string,value:y.string}))};var gt,kn;function Ea(){return kn||(kn=1,gt={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}}),gt}var bt,Sn;function Da(){return Sn||(Sn=1,bt={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),bt}var xt,jn;function $o(){if(jn)return xt;jn=1;const e=new Map;return xt={registerLang:(s,o)=>{e.set(s,o)},getLang:(s="en_US")=>e.get(s)||e.get("en_US")},xt}var vt,Cn;function La(){return Cn||(Cn=1,vt=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}),vt}var yt,_n;function Ta(){if(_n)return yt;_n=1;const e=La(),{getLang:t}=$o(),n=(o,r)=>r===1?o:`${o}s`,s=1e-7;return yt=(o,r={})=>{if(!Number.isFinite(o))throw new TypeError("Expected a finite number");r.colonNotation&&(r.compact=!1,r.formatSubMilliseconds=!1,r.separateMilliseconds=!1,r.verbose=!1),r.compact&&(r.secondsDecimalDigits=0,r.millisecondsDecimalDigits=0);const a=t(r.locale),l=[],c=(p,f)=>{const g=Math.floor(p*10**f+s);return(Math.round(g)/10**f).toFixed(f)},u=(p,f,g)=>{if((l.length===0||!r.colonNotation)&&p===0&&!(r.colonNotation&&f==="minute"))return;const{long:h}=a[f]||t("en_US")[f],{short:x}=a[f]||t("en_US")[f];let v=(g||p||"0").toString(),j,b;if(r.colonNotation){j=l.length>0?":":"",b="";const S=v.includes(".")?v.split(".")[0].length:v.length,D=l.length>0?2:1;v="0".repeat(Math.max(0,D-S))+v}else j="",r.locale==="zh_CN"?Object.values(d).filter(S=>S>0).length>1?!d.days&&!d.hours&&d.minutes&&r.compact?b=h:b=x:d.minutes?b=h:b=x:b=r.verbose?` ${n(h,p)}`:x;l.push(j+v+b)},d=e(o);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),r.separateMilliseconds||r.formatSubMilliseconds||!r.colonNotation&&o<1e3)if(u(d.seconds,"second"),r.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const p=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,f=typeof r.millisecondsDecimalDigits=="number"?r.millisecondsDecimalDigits:0,g=p>=1?Math.round(p):Math.ceil(p),h=f?p.toFixed(f):g;u(Number.parseFloat(h,10),"millisecond",h)}else{const p=o/1e3%60,f=typeof r.secondsDecimalDigits=="number"?r.secondsDecimalDigits:1,g=c(p,f),h=r.keepDecimalsOnWholeSeconds?g:g.replace(/\.0+$/,"");u(Number.parseFloat(h,10),"second",h)}if(l.length===0){const p=(a.millisecond||t("en_US").millisecond).long,f=(a.millisecond||t("en_US").millisecond).short;return r.locale==="zh_CN"?`0${r.verbose?`${p}`:f}`:`0${r.verbose?` ${p}s`:f}`}if(r.compact)return l[0];if(typeof r.unitCount=="number"){const p=r.colonNotation?"":" ";return l.slice(0,Math.max(r.unitCount,1)).join(p)}return r.colonNotation?l.join(""):l.join(" ")},yt}var wt,In;function Ma(){if(In)return wt;In=1;const e=Ea(),t=Da(),{registerLang:n}=$o(),s=Ta();return n("en_US",e),n("zh_CN",t),s.registerLang=n,wt=s,wt}var Aa=Ma();const Oo=Ts(Aa);function X({children:e}){return le(n=>n.breakpoints.down("md"))?i.jsx(ke,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:i.jsx(C,{sx:{display:"flex",alignItems:"center",gap:1},children:i.jsx(Jt,{fontSize:"small"})})}):i.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(Jt,{fontSize:"small"}),e]})}X.propTypes={children:y.node.isRequired};const Ra="https://launcher.arcblock.io/",Pa=720*60*60*1e3;function Bo({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:s="",retention:o=0,sx:r={},...a}){const{t:l,locale:c}=A(),u=F(),[d,p]=Qn({safeIframeRef:null,popoverAnchorEl:null}),f=m.useRef(null),g=U(),h=le(k=>k.breakpoints.down("md")),x=h?"mobile":"desktop",v=te(async()=>{const[k,_]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),Hn({launcherUrl:e||Ra,nftDid:n,launcherSessionId:s,locale:c,theme:g.palette.mode})]);if(k?.error)throw new Error(k.error);return{launcherSession:k.launcherSession,subscriptionURL:_}},[c]);if(v.loading)return i.jsx(re,{label:i.jsxs(X,{children:[!h&&l("expiration.desktop.loading"),i.jsx(Z,{size:16})]}),variant:"success",sx:{cursor:"pointer",...r},...a,retention:o});if(v.error)return console.error(v.error),i.jsx(re,{label:i.jsx(X,{children:l(`expiration.${x}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...r},...a,retention:o,onClick:()=>v.retry()});const j=k=>{p({popoverAnchorEl:k.currentTarget})},b=()=>{p({popoverAnchorEl:null})},S=v.value?.launcherSession;let D="success";[de.overdue,de.canceled,de.terminated].includes(v.value?.launcherSession?.status)&&(D="error");let R=null;if(S.expirationDate&&!S.subscription){const k=ue(S.expirationDate).diff(ue(),"ms");R=l(`expiration.${x}.tips.${D}`,{validity:Oo(k,{locale:Un(c),compact:!0,verbose:!0})}),k>0&&k<=Pa&&(D="warning")}return i.jsxs(i.Fragment,{children:[i.jsx(re,{label:i.jsx(X,{children:R||S?.subscription?.product?.name||l("common.subscription")}),color:D,variant:D!=="success"?"contained":"outlined",sx:{cursor:"pointer",...r},...a,retention:o,onClick:j}),i.jsx($n,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(C,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:i.jsx("iframe",{ref:f,title:l("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:v.value?.subscriptionURL})})})]})}Bo.propTypes={chainHost:y.string.isRequired,nftId:y.string,launcherSessionId:y.string,sx:y.object,retention:y.number,launcherUrl:y.string.isRequired};const $a=720*60*60*1e3,Oa="https://launcher.arcblock.io/";function No({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:s="",sx:o={},retention:r=0,...a}){const{t:l,locale:c}=A(),[u,d]=Qn({safeIframeRef:null,popoverAnchorEl:null}),p=m.useRef(null),f=le(k=>k.breakpoints.down("md")),g=F(),h=f?"mobile":"desktop",x=te(async()=>{const[k,_]=await Promise.all([g.api.getLauncherSession({input:{launcherSessionId:s||n,launcherUrl:e}}),Hn({launcherUrl:e||Oa,nftDid:n,launcherSessionId:s,locale:c})]);if(k?.error)throw new Error(k.error);return{launcherSession:k.launcherSession,subscriptionURL:_}},[c]);if(x.loading)return i.jsx(re,{label:i.jsxs(X,{children:[!f&&l("expiration.desktop.loading"),i.jsx(Z,{size:16})]}),variant:"success",sx:{cursor:"pointer",...o},...a,retention:r});if(x.error)return console.error(x.error),i.jsx(re,{label:i.jsx(X,{children:l(`expiration.${h}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...o},...a,retention:r,onClick:()=>x.retry()});const v=x.value?.launcherSession?.expirationDate,j=ue(v).isBefore(ue()),b=ue(v).diff(ue(),"ms");let S="success";b<=$a&&(S="warning"),j&&(S="error");const D=k=>{d({popoverAnchorEl:k.currentTarget})},R=()=>{d({popoverAnchorEl:null})};return i.jsxs(i.Fragment,{children:[x.value?.launcherSession?.subscription&&i.jsx(re,{label:i.jsx(X,{children:l("expiration.desktop.nextInvoice",{date:Bs(v,c)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...o},...a,retention:r,onClick:D}),!x.value?.launcherSession?.subscription&&i.jsx(re,{label:i.jsx(X,{children:l(`expiration.${h}.tips.${S}`,{validity:Oo(b,{locale:Un(c),compact:!0,verbose:!0})})}),color:S,variant:S!=="success"?"contained":"outlined",sx:{cursor:"pointer",...o},...a,retention:r,onClick:D}),i.jsx($n,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(C,{sx:{width:{xs:"360px",md:"450px"}},children:i.jsx("iframe",{ref:p,title:l("common.subscription"),width:"100%",height:"600px",style:{border:0},src:x.value?.subscriptionURL})})})]})}No.propTypes={chainHost:y.string.isRequired,nftId:y.string,launcherSessionId:y.string,sx:y.object,retention:y.number,launcherUrl:y.string.isRequired};var Ve={exports:{}},Ba=Ve.exports,En;function Na(){return En||(En=1,(function(e,t){(function(n,s){e.exports=s(Kn())})(Ba,(function(n){function s(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=s(n),r={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"週":a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var c=100*a+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r}))})(Ve)),Ve.exports}Na();var We={exports:{}},za=We.exports,Dn;function Ha(){return Dn||(Dn=1,(function(e,t){(function(n,s){e.exports=s(Kn())})(za,(function(n){function s(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=s(n),r={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return o.default.locale(r,null,!0),r}))})(We)),We.exports}Ha();const Ua=(e="")=>e.startsWith("http:")||e.startsWith("https:"),Fa=e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}};$t("span")(({theme:e,color:t})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:t,marginRight:e.spacing(1)}));const Ne=$t(C)(({theme:e})=>({position:"relative",display:"inline-flex",alignItems:"center",height:e.spacing(3),paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),border:"1px solid",borderColor:e.palette.divider,borderRadius:e.shape.borderRadius*.5,fontSize:12,overflow:"hidden","& .app-badge-label":{display:"inline-flex",gap:e.spacing(1),alignItems:"center",lineHeight:e.spacing(3),marginLeft:e.spacing(-1.5),paddingLeft:e.spacing(1.5),marginRight:e.spacing(1),fontSize:12,backgroundColor:e.palette.grey[100],color:e.palette.text.secondary,"&::after":{content:'""',height:e.spacing(3),borderRight:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[100]}},"& .app-badge-value":{color:e.palette.text.primary,fontSize:12}}));function Le({loading:e=!1,children:t=null,to:n="",...s}){const o=i.jsx(Ne,{className:"app-badge",component:n?"a":"div",href:n,...s,children:t});if(e)return i.jsx(ls,{variant:"rounded",children:o});if(n){if(Ua(n)){const r=Fa(n)?"_self":"_blank";return i.jsx(Ne,{className:"app-badge",component:"a",href:n,target:r,rel:"noreferrer noopener",...s,children:t})}return i.jsx(Ne,{className:"app-badge",component:Ot,to:n,...s,children:t})}return i.jsx(Ne,{className:"app-badge",component:"div",...s,children:t})}function kt({icon:e="",label:t="",value:n="",loading:s=!1,...o}){return i.jsxs(Le,{loading:s,...o,children:[t&&i.jsxs(B,{className:"app-badge-label",children:[e&&i.jsx(je,{icon:e}),t]}),i.jsx(B,{className:"app-badge-value",children:n})]})}function Va({label:e="",value:t=void 0,trueValue:n=!0,falseValue:s=!1,loading:o=!1,onChange:r=void 0,...a}){const l=U();let c=!1;const u=Zn(()=>r?.(!c));return t===n?c=!0:t===s?c=!1:c=!!t,i.jsxs(Le,{loading:o,sx:{cursor:"pointer",backgroundColor:c?"primary.main":"grey.100",borderColor:c?"primary.main":"divider",transition:"background-color 0.3s ease"},onClick:u,...a,children:[i.jsx(B,{sx:{fontWeight:400,paddingLeft:c?0:l.spacing(2.5),paddingRight:c?l.spacing(2.5):0,color:c?"common.white":"text.secondary",transition:"color 0.3s ease"},children:e}),i.jsx(C,{sx:{width:l.spacing(2.5),height:l.spacing(2.5),borderRadius:`${l.shape.borderRadius*.5}px`,backgroundColor:"common.white",position:"absolute",top:"50%",left:c?`calc(100% - ${l.spacing(3)})`:l.spacing(.5),transform:"translateY(-50%)",transition:"left 0.3s ease",boxShadow:1}})]})}const Je={primary:e=>e.palette.primary,info:e=>e.palette.info,success:e=>e.palette.success,error:e=>e.palette.error,warning:e=>e.palette.warning},zo=(e,t)=>{if(Je[t]){const n=Je[t](e).main;return Ye(n,.1)}return Ye(t,.1)},Pt=(e,t)=>Je[t]?Je[t](e).main:t;function Wa({icon:e="",value:t="",color:n="info",loading:s=!1,...o}){const r=U(),a=Pt(r,n),l=zo(r,n);return i.jsxs(Le,{loading:s,sx:{borderColor:Ye(a,.2),bgcolor:l},...o,children:[i.jsx(je,{icon:e||"lucide:orbit",style:{marginRight:6}}),i.jsxs(B,{className:"app-badge-value",style:{color:a},children:["v ",t]})]})}const Ya=$t("span")(({theme:e,color:t})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:t,marginRight:e.spacing(1)}));function qa({value:e="",color:t="primary",loading:n=!1,...s}){const o=U(),r=Pt(o,t),a=zo(o,t);return i.jsxs(Le,{loading:n,sx:{borderColor:Ye(r,.2),bgcolor:a},...s,children:[i.jsx(Ya,{color:Pt(o,t)}),i.jsx(B,{className:"app-badge-value",style:{color:r},children:e})]})}function Za({value:e="",loading:t=!1,...n}){const s=q(()=>`DID:${rr(e)?"ETH":"ABT"}`,[e]);return i.jsxs(Le,{loading:t,...n,children:[i.jsx(B,{className:"app-badge-label",children:s}),i.jsx(B,{className:"app-badge-value",children:i.jsx(ir,{inline:!0,size:14,compact:!0,responsive:!1,children:e})})]})}Ht.extend(ar);Ht.extend(lr);const Ka=(e,t=0)=>{if(typeof e!="number")return"";const n=Math.abs(e);let s,o="";return n>=1e12?(o="T",s=`${(e/1e12).toFixed(t)}`):n>=1e9?(o="B",s=`${(e/1e9).toFixed(t)}`):n>=1e6?(o="M",s=`${(e/1e6).toFixed(t)}`):n>=1e3?(o="K",s=`${(e/1e3).toFixed(t)}`):s=e.toString(),t>0&&(s=s.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),`${s}${o}`},Ga=(e,t="en")=>e?Ht(e).locale(t).fromNow():"",Qa={switch:Va,version:Wa,state:qa,did:Za};function Ja(e){const{locale:t="en"}=A()||{};if(e.variant==="number"){const{value:n,round:s=0,...o}=e,r=Ka(Number(n),s);return i.jsx(kt,{value:r,...o})}if(e.variant==="time"){const{value:n,...s}=e,o=Ga(n,t);return i.jsx(kt,{value:o,...s})}if(e.variant){const n=Qa[e.variant];if(n)return i.jsx(n,{...e})}return i.jsx(kt,{...e})}const Ho=m.createContext({inService:!1,currentTab:"",TabComponent:null,navItem:void 0,updateAppInfo:()=>{}}),xe=(e,t,n="en")=>{const s=e?.[t];return gr(s)?s[n]||s.en:s},Xa=(e,t="",n="en")=>{const s=t==="/"?["/"]:t.split("/").filter(Boolean);let o=null,r=0;return e.forEach(a=>{const l=xe(a,"link",n)||"",c=l==="/"?["/"]:l.split("/").filter(Boolean);if(c.length>s.length)return;let u=!0;for(let d=0;d<c.length;d++)if(c[d]!==s[d]){u=!1;break}u&&c.length>r&&(o=a,r=c.length)}),o};function el({path:e=window?.location?.pathname||"",currentTab:t="",meta:n=void 0,children:s=null}){const{locale:o="en"}=A()||{},r=hr(e),a=r.startsWith(Bt),l=q(()=>Object.assign({},window.blocklet,n),[n]),c=q(()=>{const g=l.navigation?.filter(b=>Array.isArray(b.section)?b.section.includes("dashboard"):b.section==="dashboard"),h=g?.flatMap(b=>b.items||[]),x=Xa(h,r,o);if(!x)return;const v=g.find(b=>b.id===x.parent);let j=xe(x,"title",o)||"";return a||(j=`${xe(v,"title",o)||""} - ${j}`),{id:x.id,parent:x.parent,title:j,link:xe(x,"link",o)||"",description:xe(x,"description",o)||""}},[e,a,o,l]),[u,d]=m.useState({}),p=Zn(g=>{d(h=>({...h,...g}))}),f=m.useMemo(()=>{const{tabs:g=[]}=u,h=g.find(j=>j.value===t);let x=t,v=null;return!h&&g.length>0?(x=g[0].value,v=g[0].render||null):v=h?.render||null,{...u,inService:a,navItem:c,currentTab:x,TabComponent:v,updateAppInfo:p}},[u,c,a,t,p]);return i.jsx(Ho.Provider,{value:f,children:s})}function V(){return m.useContext(Ho)}function Uo(){return le(e=>e.breakpoints.down("md"))}function Ln({sx:e={}}){const t=Uo();return i.jsx(C,{sx:{mx:t?-2:-3,borderBottom:"1px solid",borderColor:"divider",mt:1.5,mb:1,...e}})}function tl({onTabChange:e=void 0}){const t=Uo(),{inService:n,navItem:s,icon:o=void 0,name:r="",description:a=void 0,actions:l=void 0,badges:c=[],tabs:u=[],currentTab:d="",updateAppInfo:p}=V();return m.useEffect(()=>{n||p({name:s?.title||"",description:s?.description||""})},[s?.title,s?.description,n,p]),r?i.jsxs(C,{className:"app-header",sx:{mt:3,mb:3},children:[i.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[o&&i.jsx(C,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:o}),i.jsxs(On,{sx:{flexGrow:1},children:[i.jsx(B,{variant:"h1",sx:{mb:.5},children:r}),a&&i.jsx(B,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6,"& a":{color:"primary.main"},maxWidth:980},children:a})]}),!t&&l&&i.jsx(C,{sx:{ml:1},children:l})]}),c.length>0&&i.jsx(C,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:2},children:c.map((f,g)=>m.isValidElement(f)?f:i.jsx(Ja,{...f},f.label||g))}),t&&l&&i.jsx(C,{sx:{mt:t?2:0},children:l}),u.length<=1&&i.jsx(Ln,{}),u.length>1&&i.jsxs(i.Fragment,{children:[i.jsx(cr,{tabs:u,current:d,onChange:e,scrollButtons:"auto",sx:{mt:2.5}}),i.jsx(Ln,{sx:{mt:0}})]})]}):null}function Fo({meta:e=void 0,fallbackUrl:t=dt,invalidPathFallback:n=null,headerAddons:s=void 0,sessionManagerProps:o={showRole:!0,onLogout:()=>{window.location.href=dt}},links:r=[],showDomainWarningDialog:a=!0,appPath:l=void 0,appTab:c=void 0,onAppTabChange:u=void 0,children:d=void 0,...p}){Dr();const f=m.use(Ns)?.session?.user,g=f?.role,{locale:h,defaultLocale:x}=A()||{},v=m.useMemo(()=>{const _=Object.assign({},window.blocklet,e);try{return Lr(_)}catch(T){return console.error("Failed to format blocklet info",T,_),_}},[e]),{localizedNav:j,flattened:b,matchedIndex:S}=m.useMemo(()=>{let _=Tr({navigation:v?.navigation?.dashboard,locale:h,defaultLocale:x})||[];_=Mr(_,g),_=Ar(_,I=>{let oe=null;return I.icon&&(I.icon.startsWith("http")||I.icon.startsWith("data:")?oe=i.jsx(qn,{src:I.icon}):oe=i.jsx("iconify-icon",{height:"100%",width:"100%",icon:I.icon})),{id:I.id,title:I.title,url:I.link,icon:oe,external:!0,children:I.items}},"items");const T=Rr(_).filter(I=>!!I.url),P=Pr(T.map(I=>I.url));return P!==-1&&(T[P].active=!0),{localizedNav:_,flattened:T,matchedIndex:P}},[v,h,x,g]),D=typeof r=="function"?r(j):[...j,...r],R=Nr({meta:e});if(m.useLayoutEffect(()=>{f&&!b?.length&&t&&(window.location.href=t)},[t]),m.useLayoutEffect(()=>{f&&b?.length&&S===-1&&n&&n()},[n,b,S]),!v.appName)return null;const{appName:k}=v;return i.jsx(Ir,{title:k,fullWidth:!0,sidebarWidth:128,legacy:!1,links:D,...p,headerProps:{homeLink:dt,logo:i.jsx("img",{src:R,alt:"logo"}),addons:i.jsx($r,{formattedBlocklet:v,addons:s,sessionManagerProps:o,showDomainWarningDialog:a}),...p.headerProps},children:i.jsxs(el,{path:l,currentTab:c,meta:e,children:[i.jsx(tl,{onTabChange:u}),d]})})}Fo.propTypes={meta:Br,fallbackUrl:y.string,invalidPathFallback:y.func,headerAddons:y.oneOfType([y.func,y.node]),sessionManagerProps:Or,links:y.oneOfType([y.array,y.func]),showDomainWarningDialog:y.bool,appPath:y.string,appTab:y.string,onAppTabChange:y.func,children:y.node};const nl={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'},ol="/.well-known/service/onboard/bind-account";function Vo({onFinished:e=()=>{},show:t=!1,onChangeVisible:n=()=>{},loadingText:s="",defaultPath:o=ol,...r}){const[a,l]=m.useState(t),[c,u]=m.useState(!1),[d,p]=m.useState(()=>{const S=localStorage.getItem("wizard-current-url");return S?.includes("/.well-known/service/onboard")?S:o}),f=m.useRef(e),g=m.useRef(),h=m.useRef(null),{locale:x}=A(),v=U(),j=le(v.breakpoints.down("sm"));if(f.current=e,g.current=()=>{if(h.current?.contentWindow)try{const S=new URL(h.current.contentWindow.location.href).pathname;localStorage.setItem("wizard-current-url",S),p(S)}catch(S){p(o),console.warn("Failed to save wizard URL:",S)}localStorage.setItem("wizard-completed","true"),l(!1),n(!1)},m.useEffect(()=>{t!==a&&l(t)},[t]),m.useEffect(()=>{!a&&c&&u(!1)},[a]),m.useEffect(()=>{const S=D=>{if(D.origin!==window.location.origin)return;const{type:R,data:k}=D.data||{};switch(R){case"wizard.loaded":u(!0);break;case"wizard.finished":{l(!1),p(o),localStorage.removeItem("wizard-current-url"),localStorage.setItem("wizard-completed","true"),f.current?.(k);break}case"wizard.close":{g.current();break}}};return window.addEventListener("message",S),()=>{window.removeEventListener("message",S)}},[]),m.useEffect(()=>{localStorage.getItem("wizard-completed")||l(!0)},[]),!a)return null;const b=Gn(ee(window.location.origin,d),{locale:x});return i.jsxs(Bn,{id:"wizard-dialog",open:a,onClose:()=>g.current(),fullWidth:!0,maxWidth:j?!1:"md",fullScreen:j,...r,slotProps:br({},{paper:{sx:{margin:0,borderRadius:0,position:"relative",overflow:"hidden",...j?{borderRadius:0}:{borderRadius:1,height:"720px"}}}},r.slotProps),sx:{"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.5)"},...r.sx},children:[i.jsx("iframe",{ref:h,id:"wizard-iframe",src:b,title:"Setup Wizard",style:{width:"100%",height:"100%",border:0,padding:0,margin:0,opacity:c?1:0,transition:"opacity 0.3s ease-in-out"},onLoad:()=>u(!0)}),c?null:i.jsx(C,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",bgcolor:"background.paper"},children:i.jsxs(C,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:1},children:[i.jsx(Z,{}),typeof s=="string"?i.jsx(B,{variant:"body1",children:s}):s]})})]})}Vo.propTypes={onFinished:y.func,show:y.bool,onChangeVisible:y.func,loadingText:y.node,defaultPath:y.string,...Bn.propTypes};const sl={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 21L21 6l-3-3L3 18l3 3m9-15l3 3M9 3a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2m10 10a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2"/>'};function rl(){const{session:e}=Fn(),[t,n]=m.useState(!1),[s,o]=m.useState(!1),{t:r}=A(),a=m.useMemo(()=>!!localStorage.getItem("wizard-finished"),[]);return m.useMemo(()=>e.user?.role&&Nt.includes(e.user.role),[e])?i.jsxs(i.Fragment,{children:[i.jsx(ke,{title:r("setup.wizardTooltip"),open:t,placement:"bottom",arrow:!0,children:i.jsx(tt,{size:"small",onClick:()=>{o(!0),n(!1)},sx:{display:{xs:"none",md:"flex"},color:"text.secondary",...t&&{backgroundColor:"action.hover","@keyframes pulse":{"0%":{opacity:.8},"50%":{opacity:.5},"100%":{opacity:.8}},animation:"pulse 2s infinite"}},children:i.jsx(je,{icon:sl,height:20})})},`wizard-toggle-${t}`),i.jsx(Vo,{show:s,loadingText:i.jsxs(C,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1,mt:2,maxWidth:"80vw"},children:[i.jsx(an,{variant:"h4",sx:{fontWeight:"bold"},children:r("setup.wizardLoading")}),!a&&i.jsx(an,{variant:"body2",sx:{textAlign:"center"},children:r("setup.wizardSubTitle")})]}),slotProps:{paper:{sx:{height:{xs:"100vh",md:"750px"}}}},onChangeVisible:c=>{o(c),!c&&s&&n(!0)},onClose:void 0,onFinished:()=>{o(!1),n(!1)}},"wizard-modal")]}):null}function il(){const{inFullPage:e,toggleFullPage:t}=Er();return L(tt,{onClick:t,children:e?L(us,{sx:{transform:"scale(1.3)"}}):L(ds,{sx:{transform:"scale(1.3)"}})})}function Wo({children:e=null,title:t="",appPath:n=void 0,appTab:s=void 0,onAppTabChange:o=void 0}){const{t:r}=A(),{loading:a,error:l,actions:{refreshBlocklet:c},env:u,blocklet:d}=ot(),{info:p,imgPrefix:f}=zs(),g=Ms(),h=le(_=>_.breakpoints.down("md")),x=U(),{appId:v,version:j}=u,b=[{label:"App ID",value:v},{label:"App Version",value:j},{label:"App Bundle Name",value:d?.meta?.bundleName},{label:"Server Id",value:p.did},{label:"Server Version",value:p.version}],S=_=>{const T=Array.isArray(_)?_:[_];if(T.unshift(L(rl,{})),h||T.unshift(L(il,{})),d){const P={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Hs(d)?T.unshift(L(Bo,{chainHost:d?.controller?.chainHost,nftId:d?.controller?.nftId,launcherSessionId:d?.controller?.launcherSessionId,launcherUrl:d?.controller?.launcherUrl,sx:P})):p.ownerNft&&p.launcher&&T.unshift(L(No,{chainHost:p.launcher.chainHost,launcherUrl:p.launcher.url,nftId:p.ownerNft.did,launcherSessionId:p.ownerNft.launcherSessionId,sx:P}))}return T},D=kr({blocklet:d}),R={logo:D?L("img",{src:D,alt:"logo"}):null,brandAddon:L(C,{children:d&&$e(C,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:.5,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[L(ke,{title:O.isRunning(d?.status)?void 0:r(`blocklet.status.${d?.status}`),children:L(C,{sx:{bgcolor:Fe[d?.status],width:8,height:8,borderRadius:"50%"}})}),L(C,{sx:{color:"text.secondary",maxWidth:h?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:O.getDisplayName(d)}),L(C,{component:je,icon:nl,sx:{color:"text.secondary"}})]})})};return $e(al,{legacy:!1,fullWidth:!0,headerAddons:S,headerProps:R,links:_=>_?.map(P=>(P.children=P.children?.map(I=>{if(I.id==="/team/aigne"){const oe=f?ee(f,"/aigne-hub.png"):"/aigne-hub.pg";return{...I,icon:L(qn,{src:oe,alt:"AIGNE Hub",style:x.palette.mode==="dark"?{filter:"invert(1)"}:{},fallback:I.icon})}}return I}),P)),title:t,footerProps:{addon:L(Po,{infos:b})},appPath:n,appTab:s,onAppTabChange:o,children:[!d&&a&&L(qe,{relative:"parent",children:L(Z,{})}),!d&&l&&$e(qe,{relative:"parent",children:[$e(C,{sx:{display:"flex",alignItems:"center"},children:[L(cs,{color:"error",sx:{marginRight:1}}),Ut(l)]}),L(zt,{onClick:()=>c(),children:L("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!d&&L(C,{sx:{flex:1,display:"flex",flexDirection:"column"},children:L(ur,{FallbackComponent:_r,resetKeys:[g.pathname],children:e})})]})}Wo.propTypes={children:y.any,title:y.string,appPath:y.string,appTab:y.string,onAppTabChange:y.func};const al=nt(Fo)`
33
+ .header-addons .locales {
34
+ max-height: 400px;
35
+ overflow-y: auto;
36
+ }
37
+
38
+ .header-brand-addon {
39
+ display: block;
40
+ }
41
+ `;function ll(){const{t:e,locale:t}=A(),{blocklet:n,launcherSession:s,refreshSubscription:o}=ot(),{connectApi:r,session:a,api:l}=Fn(),[c,u]=m.useState(!1),[d,p]=m.useState(""),[f,g]=pr({subscriptionURL:"#"});if(m.useEffect(()=>{(nn(n,s)||on(s))&&Us({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(j=>{g({subscriptionURL:j})}).catch(j=>{console.error("get subscription url error:",j)})},[n,s]),m.useEffect(()=>{if(n.controller?.launcherUrl){const j=ee(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(j).then(b=>b.json()).then(b=>{const S=b.componentMountPoints?.find(R=>R.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,D=ee(n.controller.launcherUrl,S);p(D)})}},[n.controller?.launcherUrl]),!n||!s)return"";let h=null,x="",v="error";return Fs(s)?(h=Vs(s)?i.jsx(ze,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):i.jsx(St,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),x=e("blocklet.suspendedCausedByPastDue",{deadline:ge(s?.reservedUntil,t)})):on(s)?(h=i.jsx(ze,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),x=e("blocklet.willBeSuspendedSoon",{deadline:ge((s?.subscription?.cancel_at||0)*1e3,t)}),v="warning"):nn(n,s)?(h=i.jsx(ze,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),x=e("blocklet.suspendedCausedByExpired",{deadline:ge(s?.reservedUntil,t),canceledAt:ge((s?.subscription?.canceled_at||0)*1e3,t)})):Ws(n,s)&&(h=i.jsx(Ot,{to:ee(Bt,"/did-spaces"),children:e("common.backup")}),x=e("blocklet.suspendedCausedByTerminated",{canceledAt:ge(s?.terminatedAt,t),deadline:Ys(s?.terminatedAt,t)})),x?i.jsxs(i.Fragment,{children:[i.jsxs(Xe,{severity:v,sx:{mb:1},children:[x,i.jsx(B,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:h})]}),c&&d&&s&&i.jsx(qs,{session:a,connect:r,baseUrl:d,authToken:s.subscription.authToken,children:i.jsx(zr,{dialogProps:{open:c,onClose:()=>u(!1)},subscriptionId:s.subscription.id,successToast:!0,onPaid:()=>{l.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})})]}):null}const cl=e=>m.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33 8.207A11.52 11.52 0 0 1 23.504 26.34H8.496A11.52 11.52 0 0 1 9.33 8.207zM16 3.52a14.08 14.08 0 0 0-8.76 25.102c.226.18.506.278.796.278h15.928c.29 0 .57-.098.797-.278A14.08 14.08 0 0 0 16 3.52zm5.883 10.072a1.28 1.28 0 0 0-1.81-1.81l-2.205 2.205a4.124 4.124 0 1 0 1.81 1.81l2.205-2.205zm-7.447 4.073a1.564 1.564 0 1 1 3.128 0 1.564 1.564 0 0 1-3.129 0z",fill:"currentColor"})),Yo={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 9l3 3l-3 3m5 0h3"/><path d="M3 6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></g>'},ul={display:"inline-flex",width:"26px",height:"26px",paddingRight:"3px"};function dl(e){return i.jsx("span",{style:ul,children:i.jsx(je,{icon:Yo,width:"100%",height:"100%",...e})})}const se={Start:ps,Stop:fs,Restart:ms,Reload:ws,Remove:hs,Config:ys,Log:vs,Group:xs,Cancel:gs,Dashboard:cl,Overview:bs,LogIcon:dl,TerminalIcon:Yo},Tn=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),s=new URLSearchParams(n.searchParams),o=new URL(ee(n.origin,t));return o.search=s.toString(),o.toString()},pl="internal",fl="external";function qo({blocklet:e,onStart:t,onComplete:n,variant:s="menu",source:o="blocklet-list",hasPermission:r=!1,getComponentUrl:a=null,useBlockletUrlEvaluation:l=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const u=F(),[d,p]=m.useState(null),[f,g]=m.useState(null),[h,x]=m.useState(!1),[v,j]=m.useState(null),{t:b}=m.useContext(Yn),[S]=ln("skip-blocklet-setup",!1),{loading:D,recommendedUrl:R}=l(e),[k]=ln("blocklet-type-filter",pl),_=O.isInProgress(e.status),[T,P]=m.useState(!1);m.useEffect(()=>{if(!e?.controller)return;P(e?.controller?.status?.value===ct.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const M=await u.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(M?.error){console.error("get launcher session failed",M.error);return}P([de.overdue,de.canceled,de.terminated].includes(M?.launcherSession?.status))}catch(M){console.error("call getLauncherSession error",M)}})()},[]);const{inService:I}=u,oe=o==="blocklet-detail",he=(w,M,z=!1)=>async()=>{const G=async Ae=>{t({action:w,blocklet:e}),x(!0),g(w);let Re=!1;try{if(w==="remove")await M(Ae);else if(w==="start"){if(!O.hasRunnableComponent(e)){J.error(b("blocklet.noComponent"));return}if(!I&&!S&&!e.settings?.initialized&&e.mode!==ct.BLOCKLET_MODES.DEVELOPMENT){if(!R||!sn(R)){J.error(b("blocklet.gotoVisitError"));return}const N=Zs(u.info),Qt=new URL(R);Qt.searchParams.set("serverUrl",N),window.open(pt(Qt.href,{allowDomains:null})),n({action:w,blocklet:e});return}const Y=e.children.filter(N=>!O.isInProgress(N.status)&&N.status!=="running"&&!O.isInProgress(N.greenStatus)&&N.greenStatus!=="running").map(N=>N.meta.did),ce={did:e.meta.did,componentDids:Y};await M({input:ce})}else if(["stop","restart","reload"].includes(w)){const Y=e.children.filter(N=>O.isBlockletRunning(N)).map(N=>N.meta.did),ce={did:e.meta.did,componentDids:Y};await M({input:ce})}else{const Y={did:e.meta.did};await M({input:Y})}w==="remove"?Re=!0:await Ks(1e3),w==="reload"&&J.success(b("blocklet.reloadSuccess")),j(null),n({action:w,blocklet:e})}catch(Y){const ce=`Blocklet ${w} failed: ${Ut(Y)}`;throw n({action:w,blocklet:e,error:new Error(ce)}),new Error(ce)}finally{Re||x(!1)}},Q=()=>{x(!1),j(null)},Me=O.getDisplayName(e,!0),os=e.mode===ct.BLOCKLET_MODES.DEVELOPMENT?{description:()=>i.jsx(B,{component:"div",children:i.jsx(B,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ae,Re)=>i.jsxs(B,{component:"div",children:[i.jsx(B,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")}),i.jsxs(Ds,{name:"removeType",value:Ae.removeType,onChange:Y=>Re({...Ae,removeType:Y.target.value}),children:[i.jsx(Xt,{value:"backup",control:i.jsx(en,{}),label:b("blocklet.action.removeApplicationAfterBackup")}),i.jsx(Xt,{value:"complete",control:i.jsx(en,{}),label:b("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ss={stop:{title:`${b("common.stop")} ${Me}`,description:b("blocklet.action.stopDescription"),confirm:b("blocklet.action.confirmStop"),cancel:b("common.cancel"),onConfirm:G,onCancel:Q},restart:{title:`${b("common.restart")} ${Me}`,description:b("blocklet.action.restartDescription"),confirm:b("blocklet.action.confirmRestart"),cancel:b("common.cancel"),onConfirm:G,onCancel:Q},remove:{title:`${b("common.remove")} ${Me}`,confirm:b("blocklet.action.confirmRemove"),cancel:b("common.cancel"),onConfirm:G,onCancel:Q,...os},cancelDownload:{title:`${b("common.cancel")}`,description:b("blocklet.action.cancelDownloadDescription",{name:Me}),confirm:b("common.confirm"),cancel:b("common.cancel"),onConfirm:G,onCancel:Q}};z?j(ss[w]):await G()},Qo=!!d,Jo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}p(w.currentTarget)},Xo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}p(null)},Kt=async(w,M)=>{try{M.stopPropagation(),M.preventDefault()}catch{}if(typeof w.handler=="function")try{x(!0),g(w.action),await w.handler()}catch(z){console.error(`Blocklet ${w.name} failed: `,z)}finally{x(!1),p(null)}else p(null)},es=!I&&O.isDeletableBlocklet(e)?{action:"remove",icon:se.Remove,name:b("common.remove"),handler:he("remove",async({removeType:w})=>{w==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:_}:null,ts={action:"remove",icon:({sx:w,...M})=>i.jsx(se.Cancel,{sx:{...w,paddingRight:"2px",zoom:.95},...M}),name:b("common.cancel"),handler:he("cancelDownload",u.api.cancelDownloadBlocklet,!0)},ns=O.getAppMissingConfigs(e),Gt=(w="dashboard")=>{const M=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),z=a?.({mountPoint:M,blocklet:e});if(!z||!sn(z)){J.error(b("blocklet.gotoVisitError"));return}const G=e?.site?.domainAliases;w==="logs"?window.open(pt(Tn(z,`${pe}/admin/developers/logs`),{allowDomains:G?.map(Q=>Q.value)})):window.open(pt(Tn(z,`${pe}/admin`),{allowDomains:G?.map(Q=>Q.value)}))};let Te=[{action:"start",icon:se.Start,inExternal:!0,name:b("common.start"),handler:he("start",u.api.startBlocklet),disabled:T||e.children.every(w=>O.isBlockletRunning(w))||ut(e.status)||D||_},{action:"stop",icon:se.Stop,inExternal:!0,name:b("common.stop"),handler:he("stop",u.api.stopBlocklet,!0),disabled:!["running","starting","error"].includes(e.status)},{action:"restart",inExternal:!0,icon:se.Restart,name:b("common.restart"),handler:he("restart",u.api.restartBlocklet,!0),disabled:T||e.status!=="running"},ut(e.status)?ts:es,{separator:!0},I?null:{action:"dashboard",icon:({style:w,...M})=>i.jsx(se.Dashboard,{...M,style:{...w,width:"26px",height:"26px",paddingRight:"3px"}}),name:b("sidebar.dashboard"),handler:Gt},!I&&!oe?{action:"logs",icon:se.LogIcon,name:b("common.logs"),handler:()=>Gt("logs")}:null].filter(Boolean);return k===fl&&(Te=Te.filter(w=>w.inExternal)),s==="menu"?i.jsxs(Mn,{"data-cy":"blocklet-actions",children:[i.jsx(tt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:Jo,size:"small",disabled:!r||!ut(e.status)&&h,children:i.jsx(ks,{})}),i.jsxs(Ss,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:Qo,onClose:Xo,PaperProps:{},children:[ns.length>0&&i.jsxs(Xe,{style:{maxWidth:"400px"},severity:"error",children:[b("blocklet.config.missingRequired"),i.jsx("br",{}),i.jsx(Ot,{to:`/blocklets/${e.meta.did}/components`,children:b("blocklet.config.gotoFix")})]}),Te.map((w,M)=>w.separator?i.jsx(js,{},`separator-${M}`):i.jsxs(Cs,{dense:!0,onClick:z=>Kt(w,z),disabled:h||w.disabled,"data-cy":`${w.action}-blocklet`,children:[i.jsx(_s,{style:{minWidth:24},children:f===w.action&&h?i.jsx(Z,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{fontSize:"small"})}),i.jsx(Is,{primary:w.name})]},w.name))]}),v&&i.jsx(cn,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]}):i.jsxs(Mn,{"data-cy":"blocklet-actions",...c,children:[i.jsx(Es,{children:Te.filter(w=>!w.separator&&!w.onlyInMenu).map(w=>i.jsxs(zt,{title:w.name,"data-cy":`${w.action}-blocklet`,onClick:()=>Kt(w),disabled:!!w.disabled||h,children:[f===w.action&&h?i.jsx(Z,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{}),i.jsx("span",{className:"blocklet-action-text",children:w.name})]},w.name))}),v&&i.jsx(cn,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}qo.propTypes={getComponentUrl:y.func,blocklet:y.object.isRequired,onStart:y.func.isRequired,onComplete:y.func.isRequired,variant:y.oneOf(["menu","group"]),source:y.oneOf(["blocklet-list","blocklet-detail"]),hasPermission:y.bool,useBlockletUrlEvaluation:y.func};const Mn=nt.div`
42
+ display: flex;
43
+ align-items: center;
44
+
45
+ @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
46
+ .MuiButton-root {
47
+ padding: 4px;
48
+ font-size: 10px;
49
+ }
50
+ }
51
+ `,ml=m.memo(qo);function W({component:e=void 0}){const{blocklet:t}=K();return e?i.jsx(C,{className:"page-content",children:i.jsx(m.Suspense,{fallback:i.jsx(qe,{relative:"parent",children:i.jsx(Z,{})}),children:m.isValidElement(e)?e:As.createElement(e,{blocklet:t})})}):null}W.propTypes={component:y.any};const hl=m.lazy(()=>E(()=>import("./overview-UWHPi3tV.js"),__vite__mapDeps([0,1]),import.meta.url)),gl=m.lazy(()=>E(()=>import("./component-DLlaIYmq.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),bl=m.lazy(()=>E(()=>import("./advanced-B62UUhxe.js"),__vite__mapDeps([0,1]),import.meta.url));function xl(){const e=U(),{info:t,inService:n}=F(),{t:s}=A(),{navItem:o,updateAppInfo:r,TabComponent:a}=V(),{blocklet:l,actions:{refreshBlocklet:c}}=K(),u=!l||Gs(l.status)?[]:O.getAppMissingConfigs(l),p=!!(n?window.env?.gateway?.wafPolicy?.enabled:t?.routing.wafPolicy?.enabled)&&(l?.settings?.gateway?.wafPolicy?.enabled??!0);m.useEffect(()=>{r({name:o?.title||"",description:o?.description||s("navigation.overviewDesc")})},[o,s,r]),m.useEffect(()=>{r({actions:l?i.jsx(ml,{className:"page-actions",hasPermission:!0,blocklet:l,onStart:()=>{},onComplete:({error:h}={})=>{h&&J.error(h.message)},variant:"group"}):null})},[l,r]),m.useEffect(()=>{const g=[];l&&g.push(i.jsx(Ro,{"data-cy":"blocklet-status","status-blocklet-did":l.meta?.did,status:l.status,source:l.source,progress:l.progress,style:{lineHeight:e.spacing(3),height:e.spacing(3)}},"blocklet-status")),g.push({label:"WAF",value:p?"ON":"OFF",to:`${o?.link}/settings`}),r({badges:g})},[l,r,p,o?.link,e]);const f=m.useMemo(()=>[{label:s("common.overview"),value:"overview",render:hl},{label:i.jsx(Ls,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!u.length,children:s("common.components")}),labelText:s("common.components"),value:"components",render:gl},{label:s("common.globalSettings"),value:"settings",render:i.jsx(bl,{blocklet:l,onUpdate:c})}],[s,u.length,l,c]);return m.useEffect(()=>{r({tabs:f})},[f,r]),i.jsx(W,{component:a})}const vl=m.lazy(()=>E(()=>import("./traffic-BandB_6R.js").then(e=>e.t),__vite__mapDeps([0,1]),import.meta.url)),yl=m.lazy(()=>E(()=>import("./audit-logs-DF2wcdWX.js"),__vite__mapDeps([0,1,2]),import.meta.url)),wl=m.lazy(()=>E(()=>import("./log-BDLuou50.js"),__vite__mapDeps([0,1]),import.meta.url)),kl=m.lazy(()=>E(()=>import("./runtime-CGShJ0Po.js"),__vite__mapDeps([0,1]),import.meta.url));function Sl(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V(),{blocklet:o,client:r,did:a}=K(),{teamDid:l}=Ce(),{api:c}=F(),u=o?.meta?.did,d=te(()=>c.getBlockletBaseInfo({input:{teamDid:l}}),[l,c]);m.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.operationsDesc")})},[t,e,n]),m.useEffect(()=>{const f=[],{totalRequests:g=0,failedRequests:h=0}=d.value?.traffic??{},{cpuUsage:x=0,memoryUsage:v=0}=d.value?.appRuntimeInfo??{};f.push({variant:"number",label:e("analytics.traffic.totalRequests"),value:g,round:0,to:`${t.link}/analytics`,loading:d.loading}),f.push({variant:"number",label:e("analytics.traffic.failedRequests"),value:h,round:0,to:`${t.link}/analytics`,loading:d.loading}),f.push({label:e("blocklet.runtimeInfo.cpuUsage"),value:`${x.toFixed(1)}%`,to:`${t.link}/performance`,loading:d.loading}),f.push({label:e("blocklet.runtimeInfo.memoryUsage"),value:Vn(v),to:`${t.link}/performance`,loading:d.loading}),n({badges:f})},[n,d.value,d.loading,t?.link,e]);const p=m.useMemo(()=>[o?.children?.length&&o.structVersion===zn&&{label:e("common.logs"),value:"logs",render:wl},{label:e("common.auditLogs"),value:"audit-logs",render:i.jsx(yl,{scope:u,categories:["blocklet","team","security","certificates","gateway"]})},{label:e("common.performance"),value:"performance",render:i.jsx(kl,{client:r,did:a})},{label:e("common.analytics"),value:"analytics",render:i.jsx(vl,{client:r,did:a})}].filter(Boolean),[e,o,r,a,u]);return m.useEffect(()=>{n({tabs:p})},[p,n]),i.jsx(W,{component:s})}const jl=m.lazy(()=>E(()=>import("./index-Dw9kO-TK.js"),__vite__mapDeps([0,1]),import.meta.url)),Cl=m.lazy(()=>E(()=>import("./index-Bg0Lw3eZ.js"),__vite__mapDeps([0,1]),import.meta.url)),_l=m.lazy(()=>E(()=>import("./list-qef9ITY3.js"),__vite__mapDeps([0,1]),import.meta.url));function Il(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V(),{api:o}=F(),{teamDid:r}=Ce(),{session:a}=st(),l=m.useMemo(()=>a?.user?.role&&Nt.includes(a.user.role),[a]),c=te(()=>o.getBlockletBaseInfo({input:{teamDid:r}}),[r,o]);m.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.integrationsDesc")})},[t,e,n]),m.useEffect(()=>{const d=[],{webhooks:p=0,accessKeys:f=0,oauthApps:g=0}=c.value?.integrations??{};d.push({variant:"number",label:"Webhooks",value:p,to:`${t.link}/webhooks`,loading:c.loading}),d.push({variant:"number",label:"API Keys",value:f,to:`${t.link}/access-keys`,loading:c.loading}),d.push({variant:"number",label:"OAuth Apps",value:g,to:`${t.link}/oauth`,loading:c.loading}),n({badges:d})},[n,c.value,c.loading,t.link]);const u=m.useMemo(()=>[l&&{label:"Webhooks",value:"webhooks",render:i.jsx(jl,{})},{label:e("common.accessKeys"),value:"access-keys",render:i.jsx(Cl,{})},{label:e("common.oauth"),value:"oauth",render:i.jsx(_l,{})}].filter(Boolean),[l,e]);return m.useEffect(()=>{n({tabs:u})},[u,n]),i.jsx(W,{component:s})}var Zo=function(t){return i.jsx("svg",{...t,children:i.jsx("path",{d:"M79.425.7c5.688 0 10.3 4.612 10.3 10.3v43.234c0 5.689-4.612 10.3-10.3 10.3H11.156c-5.688 0-10.3-4.611-10.3-10.3v-.215h4.6v.215a5.7 5.7 0 0 0 5.7 5.7h68.269a5.7 5.7 0 0 0 5.7-5.7V11a5.7 5.7 0 0 0-5.7-5.7H11.156a5.7 5.7 0 0 0-5.7 5.7v.49h-4.6V11C.856 5.312 5.468.7 11.156.7h68.269ZM11.293 17.691c2.945 0 5.495.62 7.65 1.86 2.182 1.211 3.879 2.929 5.088 5.154 1.21 2.225 1.814 4.845 1.814 7.86 0 2.985-.604 5.577-1.814 7.774a12.78 12.78 0 0 1-5.088 5.112c-2.155 1.211-4.706 1.818-7.65 1.818H1V17.69h10.293ZM35.206 47.27h-5.324V17.69h5.324V47.27ZM50.883 17.69c2.944 0 5.494.62 7.65 1.86 2.182 1.21 3.878 2.929 5.087 5.154 1.21 2.225 1.815 4.846 1.815 7.86 0 2.985-.606 5.577-1.815 7.774a12.78 12.78 0 0 1-5.087 5.112c-2.156 1.211-4.706 1.818-7.65 1.818H40.59V17.69h10.293Zm22.595 19.066a2.98 2.98 0 1 1-.001 5.958 2.98 2.98 0 0 1 .001-5.958ZM6.325 42.494h4.812c2.97 0 5.257-.874 6.861-2.62 1.604-1.775 2.405-4.211 2.405-7.31 0-3.126-.801-5.591-2.405-7.394-1.604-1.803-3.89-2.704-6.861-2.704H6.324v20.028Zm39.59 0h4.81c2.971 0 5.26-.873 6.863-2.62 1.603-1.775 2.405-4.211 2.405-7.31 0-3.126-.801-5.591-2.405-7.394-1.604-1.803-3.892-2.704-6.862-2.704h-4.81v20.028Zm27.564-19.637a2.978 2.978 0 1 1 0 5.957 2.978 2.978 0 0 1 0-5.957Z",fill:"currentColor"})})};Zo.defaultProps={viewBox:"0 0 24 17",xmlns:"http://www.w3.org/2000/svg"};function Ko({width:e=24,color:t="black",backgroundColor:n="transparent"}){return i.jsx(C,{component:"span",sx:{width:e,display:"inline-block",verticalAlign:"middle",color:t,backgroundColor:n,fontSize:0},children:i.jsx(Zo,{viewBox:"0 0 90 65",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",top:-1,lineHeight:1}})})}Ko.propTypes={width:y.number,color:y.string,backgroundColor:y.string};const El=m.lazy(()=>E(()=>import("./index-D0VFBmtN.js"),__vite__mapDeps([0,1]),import.meta.url)),Dl=m.lazy(()=>E(()=>import("./index-BtxDkXoY.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url)),Ll=m.lazy(()=>E(()=>import("./index-VTJ4vv2F.js"),__vite__mapDeps([0,1]),import.meta.url)),Tl=m.lazy(()=>E(()=>import("./index-vQWAt26Z.js"),__vite__mapDeps([0,1]),import.meta.url)),Ml=m.lazy(()=>E(()=>import("./security-_Iru3mSY.js"),__vite__mapDeps([0,1]),import.meta.url));function Al(){const{t:e,locale:t}=A(),{navItem:n,updateAppInfo:s,TabComponent:o}=V(),{blocklet:r}=K(),{api:a}=F(),{teamDid:l}=Ce(),c=m.useMemo(()=>xr(r,"settings.org.enabled",!1),[r]),u=te(()=>a.getBlockletBaseInfo({input:{teamDid:l}}),[l,a]),d=te(async()=>{if(!r?.meta?.did)return null;const{securityRules:h}=await a.getBlockletSecurityRules({input:{did:r.meta.did,includeDisabled:!0}});return h.find(x=>x.id===Qs)},[r?.meta?.did,a]),p=m.useMemo(()=>{const h=r?.settings?.authentication||{};return Object.keys(h).filter(v=>h[v]?.enabled).sort((v,j)=>(h[v]?.order||0)-(h[j]?.order||0)).map(v=>({name:v,title:dr[v]||v}))},[r?.settings?.authentication]),f=m.useMemo(()=>(r?.settings?.federated?.sites||[]).length>0,[r?.settings?.federated?.sites]);m.useEffect(()=>{const h=e("navigation.didConnectDesc"),x=e("common.poweredBy",{brand:"$placeholder"}),v=h?h.slice(-1):"",[j,b]=x.split("$placeholder");s({name:n?.title||"",description:i.jsxs("span",{children:[h," ",j,i.jsxs("a",{href:`https://www.didconnect.io/${t}`,target:"_blank",style:{color:"#5bbec5"},rel:"noreferrer",children:[i.jsx(Ko,{color:"#5bbec5"})," Connect"]}),b," ",v]})})},[n,e,t,s]),m.useEffect(()=>{const h=[],{users:x=0}=u.value?.user??{},{passports:v=0}=u.value?.passport??{};h.push({variant:"number",label:e("common.members"),value:x,to:`${n.link}/members`,round:0}),h.push({variant:"number",label:e("team.member.passports"),value:v,to:`${n.link}/passports`,round:0}),p.length>0&&h.push({label:e("authentication.loginProviders"),value:i.jsx(On,{component:"span",direction:"row",spacing:.5,children:p.map(b=>i.jsx(Hr,{provider:b.name,sx:{width:12,height:12}},b.name))}),to:`${n.link}/settings`}),h.push({label:e("authentication.federated"),value:f?"ON":"OFF",to:`${n.link}/settings`});const j=d.value?.accessPolicy?.name;j&&h.push({label:e("accessPolicy.title"),value:j,to:`${n.link}/security`}),s({badges:h})},[s,u.value,u.loading,e,p,f,d.value,d.loading,n.link]);const g=m.useMemo(()=>[{label:e("common.members"),value:"members",render:i.jsx(El,{type:"blocklet",createPassportSvg:un})},c&&{label:e("common.orgs"),value:"orgs",render:i.jsx(Dl,{editable:!1,mode:"dashboard",layout:"table"})},{label:e("team.member.passports"),value:"passports",render:i.jsx(Ll,{createPassportSvg:un})},{label:e("common.setting"),value:"settings",render:i.jsx(Tl,{orientation:"vertical"})},{label:e("common.policies"),value:"security",render:i.jsx(Ml,{})}].filter(Boolean),[e,c]);return m.useEffect(()=>{s({tabs:g})},[g,s]),i.jsx(W,{component:o})}const Rl=m.lazy(()=>E(()=>import("./domains-CQs-XM9-.js"),__vite__mapDeps([0,1]),import.meta.url)),Pl=m.lazy(()=>E(()=>import("./branding-C86_64it.js"),__vite__mapDeps([0,1]),import.meta.url)),$l=m.lazy(()=>E(()=>import("./appearance-_ZB7EroL.js"),__vite__mapDeps([0,1]),import.meta.url)),Ol=m.lazy(()=>E(()=>import("./config-navigation-D46rq0IX.js"),__vite__mapDeps([0,1]),import.meta.url));function Bl(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V(),{blocklet:o,actions:{refreshBlocklet:r}}=K(),a=m.useMemo(()=>o?{domainCount:(o?.site?.domainAliases||[]).length}:null,[o]),l=m.useMemo(()=>o?.settings?.theme?.name??"Default",[o]);m.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.websiteDesc")})},[t,e,n]),m.useEffect(()=>{const u=[],{domainCount:d=0}=a;u.push({variant:"number",label:e("common.domains"),value:d,to:`${t.link}/domains`}),u.push({label:e("common.theme"),value:l,to:`${t.link}/theming`}),n({badges:u})},[n,a,l,e,t.link]);const c=m.useMemo(()=>[{label:e("common.domains"),value:"domains",render:Rl},{label:e("common.branding"),value:"branding",render:i.jsx(Pl,{blocklet:o,onUpdate:r})},{label:e("common.theming"),value:"theming",render:i.jsx($l,{})},{label:e("common.navigation"),value:"navigation",render:Ol}],[e,o,r]);return m.useEffect(()=>{n({tabs:c})},[c,n]),i.jsx(W,{component:s})}const Nl=m.lazy(()=>E(()=>import("./index-CQz-yW1Q.js"),__vite__mapDeps([0,1]),import.meta.url)),zl=m.lazy(()=>E(()=>import("./index-lGLHoHAP.js"),__vite__mapDeps([0,1]),import.meta.url));function Hl(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V(),{blocklet:o}=K(),{session:r}=st(),{teamDid:a}=Ce(),l=m.useMemo(()=>r?.user?.role&&Nt.includes(r.user.role),[r]),c=te(async()=>(await Js.get(`${Xs}/notification`,{params:{since:"24h"}})).data?.data,[a]),u=m.useMemo(()=>{const p=o?.settings?.notification||{},f=[];return f.push({name:"Email",icon:"lucide:mail",enabled:p.email?.enabled}),f.push({name:"Push Kit",icon:"lucide:bell",enabled:p.pushKit?.enabled}),f.push({name:"Wallet",icon:"lucide:wallet",enabled:!0}),f.push({name:"Webhook",icon:"lucide:webhook",enabled:!0}),f},[o]);m.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.websiteDesc")})},[t,e,n]),m.useEffect(()=>{const p=[],f=c.value?.channels||[];let g=0,h=0;Object.values(f).forEach(x=>{g+=x.state?.total??0,h+=x.state?.success??0}),p.push({label:`${e("notification.sendStatus.success")}(24h)`,value:i.jsxs("span",{children:[h," / ",g]}),to:`${t.link}/notifications`}),u.forEach(x=>{p.push({label:x.name,value:x.enabled?"ON":"OFF",to:`${t.link}/settings`})}),n({badges:p})},[n,u,c.value,e,t.link]);const d=m.useMemo(()=>[{label:e("notification.history"),value:"notifications",render:l?i.jsx(Nl,{blocklet:o}):i.jsx(rn,{status:403})},{label:e("common.settings"),value:"settings",render:l?i.jsx(zl,{}):i.jsx(rn,{status:403})}].filter(Boolean),[l,e,o]);return m.useEffect(()=>{n({tabs:d})},[d,n]),i.jsx(W,{component:s})}const Ul=m.lazy(()=>E(()=>import("./config-BccEmD3I.js").then(e=>e.c),__vite__mapDeps([0,1]),import.meta.url)),Fl=m.lazy(()=>E(()=>import("./index-CZc0agHR.js"),__vite__mapDeps([0,1]),import.meta.url));function Vl(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V();m.useEffect(()=>{const r=t?.description||i.jsx(C,{dangerouslySetInnerHTML:{__html:e("navigation.aigneDesc",{aigneHubUrl:"https://store.blocklet.dev/blocklets/z8ia3xzq2tMq8CRHfaXj1BTYJyYnEcHbqP8cJ",mcpUrl:"https://modelcontextprotocol.io/"})}});n({name:t?.title||"",description:r})},[t,e,n]),m.useEffect(()=>{n({badges:[]})},[n]);const o=m.useMemo(()=>[{label:e("setup.steps.aigne"),value:"aigne-config",render:i.jsx(C,{sx:{maxWidth:1536},children:i.jsx(Ul,{})})},{label:e("common.mcpServers"),value:"mcp-servers",render:i.jsx(Fl,{})}],[e]);return m.useEffect(()=>{n({tabs:o})},[o,n]),i.jsx(W,{component:s})}const Wl=e=>m.createElement("svg",{viewBox:"0 0 24 17",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{d:"M79.4248 0.700195C85.1132 0.700234 89.7244 5.31169 89.7246 11V54.2344C89.7244 59.9227 85.1132 64.5341 79.4248 64.5342H11.1562C5.46786 64.5342 0.856682 59.9227 0.856445 54.2344V54.0186H5.45605V54.2344C5.45629 57.3822 8.00837 59.9336 11.1562 59.9336H79.4248C82.5726 59.9336 85.1248 57.3822 85.125 54.2344V11C85.1248 7.8522 82.5727 5.29984 79.4248 5.2998H11.1562C8.00837 5.2998 5.45629 7.85217 5.45605 11V11.4893H0.856445V11C0.856676 5.31166 5.46786 0.700195 11.1562 0.700195H79.4248ZM11.293 17.6914C14.2375 17.6914 16.7876 18.3114 18.9434 19.5508C21.1254 20.762 22.8219 22.4798 24.0312 24.7051C25.2406 26.9304 25.8447 29.5504 25.8447 32.5645C25.8447 35.5502 25.2405 38.1418 24.0312 40.3389C22.8219 42.536 21.1255 44.2399 18.9434 45.4512C16.7875 46.6624 14.2375 47.2686 11.293 47.2686H1V17.6914H11.293ZM35.2061 47.2686H29.8818V17.6914H35.2061V47.2686ZM50.8828 17.6914C53.8272 17.6914 56.3774 18.3114 58.5332 19.5508C60.7151 20.7619 62.4108 22.48 63.6201 24.7051C64.8295 26.9304 65.4346 29.5505 65.4346 32.5645C65.4346 35.5503 64.8295 38.1417 63.6201 40.3389C62.4108 42.5359 60.7152 44.2399 58.5332 45.4512C56.3774 46.6624 53.8272 47.2685 50.8828 47.2686H40.5898V17.6914H50.8828ZM73.4785 36.7568C75.1235 36.7568 76.457 38.0913 76.457 39.7363C76.4568 41.3811 75.1234 42.7148 73.4785 42.7148C71.8338 42.7147 70.5003 41.381 70.5 39.7363C70.5 38.0914 71.8336 36.757 73.4785 36.7568ZM6.32422 42.4941H11.1357C14.1064 42.4941 16.3934 41.6204 17.9971 39.874C19.6008 38.0994 20.4023 35.663 20.4023 32.5645C20.4023 29.4378 19.6008 26.9727 17.9971 25.1699C16.3934 23.3674 14.1063 22.4659 11.1357 22.4658H6.32422V42.4941ZM45.9141 42.4941H50.7246C53.6954 42.4941 55.9832 41.6205 57.5869 39.874C59.1905 38.0994 59.9922 35.6628 59.9922 32.5645C59.9922 29.4378 59.1906 26.9727 57.5869 25.1699C55.9832 23.3672 53.6954 22.4658 50.7246 22.4658H45.9141V42.4941ZM73.4785 22.8574C75.1235 22.8574 76.457 24.1909 76.457 25.8359C76.457 27.4809 75.1235 28.8145 73.4785 28.8145C71.8336 28.8143 70.5 27.4808 70.5 25.8359C70.5 24.191 71.8337 22.8576 73.4785 22.8574Z",fill:"currentColor"}));function Go({width:e=24,color:t="black",backgroundColor:n="transparent"}){return i.jsx(C,{component:"span",sx:{width:e,display:"inline-block",verticalAlign:"middle",color:t,backgroundColor:n,fontSize:0},children:i.jsx(Wl,{viewBox:"0 0 90 65",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",top:-1,lineHeight:1}})})}Go.propTypes={width:y.number,color:y.string,backgroundColor:y.string};function Yl(){const{api:e}=F(),{blocklet:t}=K(),{data:n,loading:s}=fr(()=>e.getBlocklet({input:{did:t?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!t?.meta?.did,refreshDeps:[t?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}const ql=m.lazy(()=>E(()=>import("./index-L6md5GCk.js"),__vite__mapDeps([0,1]),import.meta.url));function Zl(){const{palette:e}=U(),{t,locale:n}=A(),{navItem:s,updateAppInfo:o,TabComponent:r}=V(),{blocklet:a}=K(),{blocklet:l,loading:c}=Yl(),u=m.useMemo(()=>!!Ur(a?.environments),[a?.environments]);m.useEffect(()=>{const p=t("navigation.didSpacesDesc"),f=t("common.poweredBy",{brand:"$placeholder"}),g=p?p.slice(-1):"",[h,x]=f.split("$placeholder");o({name:s?.title||"",description:i.jsxs("span",{children:[p," ",h,i.jsxs("a",{href:`https://www.didspaces.com/${n}`,target:"_blank",style:{color:"#876bf4"},rel:"noreferrer",children:[i.jsx(Go,{color:"#876bf4"})," Spaces"]}),x," ",g]})})},[s,t,n,o]),m.useEffect(()=>{const p=[];p.push({variant:"state",value:t(u?"storage.spaces.connected.tag":"storage.spaces.disconnected.tag"),color:u?"success":e.text.secondary,loading:c}),p.push({label:t("blocklet.runtimeInfo.dataStorage"),value:Vn(l?.diskInfo?.data??0),loading:c}),o({badges:p})},[o,u,l,c,t,e]);const d=m.useMemo(()=>[{label:t("common.backup"),value:"did-spaces",render:i.jsx(ql,{navOrientation:"horizontal"})}],[t]);return m.useEffect(()=>{o({tabs:d})},[d,o]),i.jsx(W,{component:r})}const Kl=m.lazy(()=>E(()=>import("./index-B2LgdSh1.js"),__vite__mapDeps([0,1,2]),import.meta.url));function Gl(){const{t:e}=A(),{navItem:t,updateAppInfo:n,TabComponent:s}=V(),{teamDid:o}=Ce(),{api:r}=F(),a=te(()=>r.getBlockletBaseInfo({input:{teamDid:o}}),[o,r]);m.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.publishDesc")})},[t,e,n]),m.useEffect(()=>{const c=[],{blocklets:u=0,releases:d=0}=a.value?.studio??{};c.push({variant:"number",label:e("common.blocklets"),value:u,round:0,loading:a.loading}),c.push({variant:"number",label:e("common.releases"),value:d,round:0,loading:a.loading}),n({badges:c})},[n,a.value,a.loading,e]);const l=m.useMemo(()=>[{label:e("common.blocklets"),value:"publish",render:i.jsx(Kl,{})}],[e]);return m.useEffect(()=>{n({tabs:l})},[l,n]),i.jsx(W,{component:s})}const Ql=new Map([["overview",xl],["operations",Sl],["integrations",Il],["did-connect",Al],["website",Bl],["notification",Hl],["aigne",Vl],["did-spaces",Zl],["publish",Gl]]),Jl=ee(pe,"user","notifications"),Xl=e=>{const{enqueueSnackbar:t}=Wn(),n=m.useCallback(s=>Gn(Jl,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);tr(`${e}/${nr.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const o=n(s),{severity:r,description:a}=s||{},l=["error","warning"].includes(r)||s.sticky;s.source==="system"&&t(a,{variant:r,autoHideDuration:l?null:5e3,anchorOrigin:{vertical:"top",horizontal:"center"},content:c=>i.jsx(Xr,{viewAllUrl:o,keyId:c,notification:s,content:i.jsx(jr,{notification:s,minimal:!0,rows:0})})})},[],"user")};function ec(){const{t:e}=A(),t=Nn(),{app:n="overview",tab:s}=Rs(),{blocklet:o,refreshFlag:r}=ot(),{session:a}=st(),l=q(()=>a?.user?.did,[a]);Xl(l);const c=Ql.get(n),u=q(()=>ee(Bt,n),[n]),d=q(()=>(o?.site?.domainAliases||[]).map(h=>h.value),[o]),p=q(()=>{if(!o)return!0;try{const h=o.configs?.find(v=>v.key==="BLOCKLET_APP_URL")?.value;if(!h||!d.length)return!0;const{host:x}=new URL(h);return d.some(v=>v===x)}catch{return!1}},[o,d]),f=m.useCallback(h=>{t(`${pe}/admin/${n}/${h}`)},[t,n]),g=o?i.jsx(Xn,{type:"components",children:i.jsx(c,{})}):i.jsx(qe,{relative:"parent",children:i.jsx(Z,{})});return i.jsx(Sr,{children:i.jsx(Wo,{appPath:u,appTab:s,onAppTabChange:f,children:i.jsxs(nc,{children:[!p&&i.jsx(Xe,{severity:"warning",sx:{mb:2,py:2},action:i.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[i.jsx(St,{size:"small",onClick:()=>{t(`${pe}/admin/website/branding`)},children:e("invalidAppUrl.viewConfig")}),i.jsx(St,{variant:"contained",size:"small",onClick:()=>{t(`${pe}/admin/website/domains`)},children:e("invalidAppUrl.viewDomains")})]}),children:e("invalidAppUrl.desc")}),i.jsx(Wr,{}),i.jsx(ll,{}),g]})},`${r}`)})}function tc(){const{blocklet:e}=ot(),t=e?.meta?.did;return m.useEffect(()=>{const n=er();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),i.jsx(ec,{})}const nc=nt.main`
52
+ .page-header {
53
+ display: flex;
54
+ justify-content: space-between;
55
+ align-items: center;
56
+ flex-wrap: wrap;
57
+ gap: 16px;
58
+ }
59
+
60
+ .page-title {
61
+ display: flex;
62
+ align-items: center;
63
+
64
+ .page-link {
65
+ font-size: 15px;
66
+ margin-top: 8px;
67
+ margin-left: 8px;
68
+ }
69
+ }
70
+
71
+ @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
72
+ .page-header {
73
+ flex-direction: column;
74
+ align-items: flex-start;
75
+ .page-actions,
76
+ .MuiButtonGroup-root {
77
+ width: 100%;
78
+ }
79
+ .MuiButtonGroup-root {
80
+ .MuiButtonBase-root {
81
+ flex: 1;
82
+ }
83
+ .blocklet-action-text {
84
+ display: none;
85
+ }
86
+ }
87
+ }
88
+
89
+ .page-title {
90
+ margin-bottom: 15px;
91
+ }
92
+ }
93
+ `,Ec=Object.freeze(Object.defineProperty({__proto__:null,default:tc},Symbol.toStringTag,{value:"Module"}));export{Ro as B,Ao as W,Fo as Z,Yl as a,se as b,Ec as d,wn as m,Oo as p,Ic as u};