@abtnode/blocklet-services 1.16.43-beta-20250508-132430-79f0da2d → 1.16.43-beta-20250509-094134-34c76f98

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 (179) hide show
  1. package/api/services/auth/session.js +9 -12
  2. package/dist/assets/{AdapterDayjs-DdJ4VT-y.js → AdapterDayjs-DWoymUZR.js} +1 -1
  3. package/dist/assets/{ArrowDropDown-eLxSrK0e.js → ArrowDropDown-oIFrKvRQ.js} +1 -1
  4. package/dist/assets/{CheckCircle-DxRgzKvx.js → CheckCircle-DKTlmPGr.js} +1 -1
  5. package/dist/assets/{ChevronLeft-B15pinY6.js → ChevronLeft-CFwnl5kG.js} +1 -1
  6. package/dist/assets/{ChevronRight-B2sjje0T.js → ChevronRight-8T5vdE8C.js} +1 -1
  7. package/dist/assets/{Community-HWgwjOzD.js → Community-BUrh_Kqh.js} +1 -1
  8. package/dist/assets/{DeleteOutline-DYyAnzFX.js → DeleteOutline-1ZpdOBb4.js} +1 -1
  9. package/dist/assets/{Done-CiSqPhhR.js → Done-1iBqzwts.js} +1 -1
  10. package/dist/assets/{Download-Zxb7WMKn.js → Download-BZiCoF-V.js} +1 -1
  11. package/dist/assets/{Edit-RoUmIPTL.js → Edit-BGameSEw.js} +1 -1
  12. package/dist/assets/{EditIcon-_JnvyTnF.js → EditIcon-Tb4i_lkD.js} +1 -1
  13. package/dist/assets/{Email-22EBBQEA.js → Email-DVjqqt2m.js} +1 -1
  14. package/dist/assets/{Error-C782OBuj.js → Error-DmLM9r9y.js} +1 -1
  15. package/dist/assets/{ExpandLess-CJztBroj.js → ExpandLess-mzw0LYV7.js} +1 -1
  16. package/dist/assets/{Google-DwaWO1n0.js → Google-DknSY4FA.js} +1 -1
  17. package/dist/assets/{Holiday-Lj9LTNQ5.js → Holiday-Aqm_6mkn.js} +1 -1
  18. package/dist/assets/{InfoOutlined-BCqZENBx.js → InfoOutlined-BMdv5FNj.js} +1 -1
  19. package/dist/assets/{Launch-BbLsJvEN.js → Launch-BGXBIBAE.js} +1 -1
  20. package/dist/assets/{LaunchOutlined-BdTDYYqz.js → LaunchOutlined-C1cAhHQM.js} +1 -1
  21. package/dist/assets/{Location-R9yMI3QX.js → Location-9D-5nMVA.js} +1 -1
  22. package/dist/assets/{LockIcon-DEqu2BZe.js → LockIcon-DJgkKDXB.js} +1 -1
  23. package/dist/assets/{Meeting-CYNfXiDR.js → Meeting-Drc_0V1u.js} +1 -1
  24. package/dist/assets/{MoreHoriz-Bp9phGCA.js → MoreHoriz-KJHmH0lv.js} +1 -1
  25. package/dist/assets/{OffSick-BWarRVS4.js → OffSick-C991mOvw.js} +1 -1
  26. package/dist/assets/{Phone-Df90pdBA.js → Phone-BfBgFKKG.js} +1 -1
  27. package/dist/assets/{PlayArrow-qTn22j6x.js → PlayArrow-CY4IxSfG.js} +1 -1
  28. package/dist/assets/{QuestionMarkCircle-DV5837_n.js → QuestionMarkCircle-dkY86QWO.js} +1 -1
  29. package/dist/assets/{ServerLogo-7OspbhQZ.js → ServerLogo-BTwLn5Zv.js} +1 -1
  30. package/dist/assets/{Timezone-BfjUkoy7.js → Timezone-BWB21Pdc.js} +1 -1
  31. package/dist/assets/{TuneOutlined-BkH0zJXZ.js → TuneOutlined-BEZh1SVU.js} +1 -1
  32. package/dist/assets/{ViewList-BBNBkCo1.js → ViewList-BwVW4Mbn.js} +1 -1
  33. package/dist/assets/{WorkingRemotely-C3lk6KRk.js → WorkingRemotely-DHNo6euv.js} +1 -1
  34. package/dist/assets/{access-control-DVj3Uudk.js → access-control-BULUPRVa.js} +1 -1
  35. package/dist/assets/{actions-CcV0Tb1p.js → actions-7FcWNRsN.js} +1 -1
  36. package/dist/assets/{add-component-core-BxVPX1qJ.js → add-component-core-BMiZ7LE5.js} +13 -13
  37. package/dist/assets/{add-resource-CR93luK2.js → add-resource-j8u2ovZD.js} +1 -1
  38. package/dist/assets/{addon-igarTbiO.js → addon-vARTsq3u.js} +1 -1
  39. package/dist/assets/advanced-u-DAzAIF.js +14 -0
  40. package/dist/assets/api-BjteVZFg.js +1 -0
  41. package/dist/assets/{appearance-CuEL_wAd.js → appearance-DROrcrHA.js} +1 -1
  42. package/dist/assets/{audit-logs-DXfN0Akp.js → audit-logs-CcVb9ghw.js} +2 -2
  43. package/dist/assets/{authorize-DyX7LBCN.js → authorize-ChpWebj3.js} +1 -1
  44. package/dist/assets/{base32-sa8QWx2s.js → base32-HzVjc8tz.js} +1 -1
  45. package/dist/assets/{branding-B8w6MlXP.js → branding-BbyygUCZ.js} +2 -2
  46. package/dist/assets/{branding-CVWmoAus.js → branding-Be5nWHmr.js} +1 -1
  47. package/dist/assets/{bundle-avatar-DJNl27pn.js → bundle-avatar-CkhAjy4c.js} +1 -1
  48. package/dist/assets/button-Bk6R99H4.js +1 -0
  49. package/dist/assets/click-to-copy-CzMRt9dA.js +1 -0
  50. package/dist/assets/{cloneDeep-DBPWtvi_.js → cloneDeep-UpFQ2VNg.js} +1 -1
  51. package/dist/assets/{complete-jXf2IsN1.js → complete-B8pYAeSZ.js} +1 -1
  52. package/dist/assets/{component-DFHLfmfe.js → component-B79RqFMg.js} +1 -1
  53. package/dist/assets/{config-E-Dkdpbo.js → config-Cr_HvxTH.js} +1 -1
  54. package/dist/assets/{config-navigation-BbbAAFTA.js → config-navigation-BEcY6Wrz.js} +3 -3
  55. package/dist/assets/{config-space-B3L4cc62.js → config-space-CxYC75c6.js} +1 -1
  56. package/dist/assets/{config-DIa982AP.js → config-zGEZcVMw.js} +1 -1
  57. package/dist/assets/{confirm-CHZbNj0g.js → confirm-qyOtSX3L.js} +1 -1
  58. package/dist/assets/{connect-60F826H5.js → connect-D3ZxLXkG.js} +1 -1
  59. package/dist/assets/{connect-xMiXau0y.js → connect-sAGOXOYo.js} +1 -1
  60. package/dist/assets/{connect-to-Do1R8dL3.js → connect-to-DjFFSoXW.js} +1 -1
  61. package/dist/assets/{content-layout-clTZd0qL.js → content-layout-HQq6mBBk.js} +1 -1
  62. package/dist/assets/{dashboard-BjhEdRo6.js → dashboard-CuF4binC.js} +12 -12
  63. package/dist/assets/{delete-confirm-D-jVITSf.js → delete-confirm-DQ_YJQpj.js} +1 -1
  64. package/dist/assets/{did-address-anPrguG7.js → did-address-Dd9R3pkY.js} +1 -1
  65. package/dist/assets/{domain-CYWI_G__.js → domain-B2_scx4B.js} +1 -1
  66. package/dist/assets/{domain-action-card-CDfoYMjV.js → domain-action-card-DE7xLk29.js} +1 -1
  67. package/dist/assets/domains-bZXw9tDX.js +1 -0
  68. package/dist/assets/{dot-Bc3KtmUA.js → dot-B5LFAb8e.js} +1 -1
  69. package/dist/assets/{email-CQL_CvUV.js → email-CWYkPTia.js} +1 -1
  70. package/dist/assets/{empty-spinner-Bm-LVesB.js → empty-spinner-g1Jw7iuj.js} +1 -1
  71. package/dist/assets/{exchange-passport-nsHr64lM.js → exchange-passport-BbC_bBga.js} +1 -1
  72. package/dist/assets/{fuel-BEbwZqYG.js → fuel-BdagEU33.js} +1 -1
  73. package/dist/assets/{gen-access-key-DsEy5ZlI.js → gen-access-key-Cf76OFN7.js} +1 -1
  74. package/dist/assets/get-safe-url-Dh8rhVin.js +1 -0
  75. package/dist/assets/get-safe-url-_fT029s-.js +1 -0
  76. package/dist/assets/{home-DUvgZ0gR.js → home-BSxVGonp.js} +1 -1
  77. package/dist/assets/{iframe-D7qMCC0L.js → iframe-DXRYs3PX.js} +1 -1
  78. package/dist/assets/{index-iTlCZ1FK.js → index-B9xM_Hng.js} +1 -1
  79. package/dist/assets/{index-BUwaZJ5Y.js → index-BFsMuPKK.js} +4 -4
  80. package/dist/assets/{index-DFkZuM1_.js → index-BPuJmMx-.js} +1 -1
  81. package/dist/assets/{index-DyU89GO9.js → index-BQJa9ZJC.js} +1 -1
  82. package/dist/assets/{index-Bpz-SuLt.js → index-BSuIcvk6.js} +12 -12
  83. package/dist/assets/{index-CiWjpC34.js → index-Bs1kxR8_.js} +1 -1
  84. package/dist/assets/{index-DiZbt9Ww.js → index-C-RHInKj.js} +4 -4
  85. package/dist/assets/{index-hgktawrH.js → index-CXDRY0Gs.js} +1 -1
  86. package/dist/assets/{index-B1yanBlZ.js → index-Cc-_2bD1.js} +1 -1
  87. package/dist/assets/{index-w68bai-3.js → index-Cy1Hvxt0.js} +1 -1
  88. package/dist/assets/{index-BJfBmMvG.js → index-CzGXBMFc.js} +1 -1
  89. package/dist/assets/{index-Pu5My3eU.js → index-DEsvwKlq.js} +1 -1
  90. package/dist/assets/{index-CYz41Upz.js → index-DF0z_zii.js} +1 -1
  91. package/dist/assets/{index-OVTGvi9j.js → index-DW75AsWb.js} +1 -1
  92. package/dist/assets/{index-BmpX2Oqa.js → index-Djpx18Tz.js} +2 -2
  93. package/dist/assets/{index-DQncaTCr.js → index-DpW-Ik8u.js} +9 -9
  94. package/dist/assets/{index-egCz4jdE.js → index-TE82Z_py.js} +1 -1
  95. package/dist/assets/{index-DBajhv2h.js → index-aMtQhU6T.js} +18 -18
  96. package/dist/assets/{index-CZqp_6Zr.js → index-aQxEawZE.js} +14 -14
  97. package/dist/assets/{index-Ctbrsvlm.js → index-cs-08BqN.js} +4 -4
  98. package/dist/assets/{index-0ncGiO4u.js → index-ftkgQlGr.js} +1 -1
  99. package/dist/assets/{index-DZ9Jqm_w.js → index-m_po8k60.js} +2 -2
  100. package/dist/assets/{index-pvu3nbgn.js → index-mbuQZLIX.js} +1 -1
  101. package/dist/assets/{index-B6vKQTr4.js → index-yiU4BWrm.js} +1 -1
  102. package/dist/assets/{invitation-DqKIvv6t.js → invitation-B8tJTJsE.js} +1 -1
  103. package/dist/assets/{invite-uMWH0SpB.js → invite-EdScAUQO.js} +1 -1
  104. package/dist/assets/{issue-passport-BurnsPQZ.js → issue-passport-CStwxDqe.js} +1 -1
  105. package/dist/assets/{item-C69diC1y.js → item-B4NAOVBY.js} +2 -2
  106. package/dist/assets/{landing-page-CUkHfAZ5.js → landing-page-CBb5_s7o.js} +1 -1
  107. package/dist/assets/{launch-result-message-CiDoyZ_1.js → launch-result-message-mW7oxgKT.js} +1 -1
  108. package/dist/assets/{layout-CLOmXrMq.js → layout-uc9mKcbg.js} +1 -1
  109. package/dist/assets/{list-D69IwVXI.js → list-BK68Cxh8.js} +8 -8
  110. package/dist/assets/{list-header-D9r1Z68x.js → list-header-D4MXeBc7.js} +1 -1
  111. package/dist/assets/localization-CJlgb0T8.js +1 -0
  112. package/dist/assets/{log-CskQJ4o-.js → log-BdBIH8S_.js} +1 -1
  113. package/dist/assets/{logger-D6jfI5U_.js → logger-DCttRmHI.js} +1 -1
  114. package/dist/assets/{login-DWvvPy3b.js → login-CKa2oQPz.js} +1 -1
  115. package/dist/assets/{login-oauth-callback-gLyMSemT.js → login-oauth-callback-DVRZRaip.js} +1 -1
  116. package/dist/assets/{logo-uploader-D5rcqbIA.js → logo-uploader-DRH-fnyc.js} +3 -3
  117. package/dist/assets/{lost-passport-BWY_TJIl.js → lost-passport-ClMglNv0.js} +1 -1
  118. package/dist/assets/{omit-CM6MPIu5.js → omit-D2k92RIF.js} +1 -1
  119. package/dist/assets/{open-window-DKiwPBLK.js → open-window-Cu3fShwR.js} +1 -1
  120. package/dist/assets/{overview-DedgPJyh.js → overview-D5q1KD9x.js} +1 -1
  121. package/dist/assets/{page-header-D7vhn9dN.js → page-header-C1NOmuYB.js} +1 -1
  122. package/dist/assets/{passport-item-B45OGe4c.js → passport-item-CjxzZUKR.js} +1 -1
  123. package/dist/assets/{permission-6aZ4MNgh.js → permission-DzaDpKIW.js} +1 -1
  124. package/dist/assets/preferences-Dmcgwjhp.js +1 -0
  125. package/dist/assets/profile-embed-DsYLFLkt.js +1 -0
  126. package/dist/assets/publish-resource--xDHKiTt.js +1 -0
  127. package/dist/assets/{react-beautiful-dnd.esm-DPnGSgvn.js → react-beautiful-dnd.esm-CrdGz16R.js} +1 -1
  128. package/dist/assets/{relative-time-CKENJIpb.js → relative-time-tY0x-ayF.js} +1 -1
  129. package/dist/assets/{runtime-Dfcxeun4.js → runtime-CRViKGyG.js} +1 -1
  130. package/dist/assets/sdk-D0dqnQoQ.js +1 -0
  131. package/dist/assets/{security-zb06EOxl.js → security-fwRPOvQx.js} +1 -1
  132. package/dist/assets/{session-Ir9UAnhf.js → session-xl6Fb2Wm.js} +1 -1
  133. package/dist/assets/{setup-Pi8eih8l.js → setup-KZaDiyeL.js} +3 -3
  134. package/dist/assets/{shorten-label-DTcisg7Q.js → shorten-label-srsBvHNw.js} +1 -1
  135. package/dist/assets/{simple-select-DpNtA3N5.js → simple-select-DyL9G1FX.js} +1 -1
  136. package/dist/assets/{slicedToArray-CM_xB2K2.js → slicedToArray-B3Jznk0w.js} +1 -1
  137. package/dist/assets/{spaces-DfgQftqB.js → spaces-BtThOmfG.js} +1 -1
  138. package/dist/assets/{start-CnF5I9iM.js → start-DNZ-ulwN.js} +1 -1
  139. package/dist/assets/{starting-progress-CUkPGiLq.js → starting-progress-CN1sTPnO.js} +1 -1
  140. package/dist/assets/{status-w7wNdwd8.js → status-kLLmMBy7.js} +1 -1
  141. package/dist/assets/{step-actions-CvAYbv4K.js → step-actions-DSriMOaL.js} +1 -1
  142. package/dist/assets/{studio-mvCiDQFy.js → studio-CqjHflyE.js} +1 -1
  143. package/dist/assets/{switch-control-BP0JyiwP.js → switch-control-DsHfwUN7.js} +1 -1
  144. package/dist/assets/{traffic-Bo3Bp96o.js → traffic-38eCC37i.js} +1 -1
  145. package/dist/assets/{transfer-DsERsnl1.js → transfer-zdDZ9_KG.js} +1 -1
  146. package/dist/assets/{unsubscribe-l6QkVxmr.js → unsubscribe-DiFsgDJ8.js} +1 -1
  147. package/dist/assets/use-blocklet-logo-OwFyCoUV.js +1 -0
  148. package/dist/assets/{use-mobile-BleYjZfN.js → use-mobile-B-WdQWoB.js} +1 -1
  149. package/dist/assets/{use-mobile-BnYZ5d8f.js → use-mobile-PBkFclTq.js} +1 -1
  150. package/dist/assets/{useAsync-BTtZas5A.js → useAsync-DV3NyLhI.js} +1 -1
  151. package/dist/assets/{useLocalStorage-C7usthsI.js → useLocalStorage-DeyICx-h.js} +1 -1
  152. package/dist/assets/{user-center-CSjvhqGU.js → user-center-D-0-UOTc.js} +1 -1
  153. package/dist/assets/{util-CRVGSd5f.js → util-CZd-jYUF.js} +1 -1
  154. package/dist/assets/{util-CKfiFLd5.js → util-DStpLP3f.js} +1 -1
  155. package/dist/assets/{vendor-arcblock-Bi9JkCAO.js → vendor-arcblock-CORkwLwW.js} +5 -5
  156. package/dist/assets/{vendor-hooks-zv9Oe7Yx.js → vendor-hooks-rDgu5KV9.js} +1 -1
  157. package/dist/assets/{vendor-mui-core-FzKVVAue.js → vendor-mui-core-DMvlMpwf.js} +1 -1
  158. package/dist/assets/{vendor-mui-x-B9zuOzS0.js → vendor-mui-x-mcVodcG2.js} +1 -1
  159. package/dist/assets/vendor-utils-rHXShPKm.js +208 -0
  160. package/dist/assets/vendor-ux-did-connect-akcz-Ldw.js +2296 -0
  161. package/dist/assets/{wrap-locale-BmmKAsYR.js → wrap-locale-NyChvVhT.js} +1 -1
  162. package/dist/index.html +6 -6
  163. package/dist/service-worker.js +1 -1
  164. package/package.json +30 -30
  165. package/dist/assets/advanced-C22Mc4mt.js +0 -14
  166. package/dist/assets/api-DPHyou8y.js +0 -1
  167. package/dist/assets/button-D0USBc4l.js +0 -1
  168. package/dist/assets/click-to-copy-Dhxc_blG.js +0 -1
  169. package/dist/assets/domains-D-YYFzTK.js +0 -1
  170. package/dist/assets/get-safe-url-CH0a4wzx.js +0 -1
  171. package/dist/assets/get-safe-url-Cn647BYQ.js +0 -1
  172. package/dist/assets/localization-CAh5vCty.js +0 -1
  173. package/dist/assets/preferences-DU_A8Q43.js +0 -1
  174. package/dist/assets/profile-embed-B8hvxRm0.js +0 -1
  175. package/dist/assets/publish-resource-riTnsr3y.js +0 -1
  176. package/dist/assets/sdk-DUAPwTSQ.js +0 -1
  177. package/dist/assets/use-blocklet-logo-BiDCl8v3.js +0 -2
  178. package/dist/assets/vendor-utils-lR6P1BXz.js +0 -208
  179. package/dist/assets/vendor-ux-did-connect-CaDmrsW1.js +0 -2296
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-CskQJ4o-.js","assets/vendor-mui-core-FzKVVAue.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-C7usthsI.js","assets/vendor-ux-did-connect-CaDmrsW1.js","assets/vendor-utils-lR6P1BXz.js","assets/vendor-hooks-zv9Oe7Yx.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-BUwaZJ5Y.js","assets/vendor-arcblock-Bi9JkCAO.js","assets/index-DOq-_YXu.css","assets/Download-Zxb7WMKn.js","assets/bundle-avatar-DJNl27pn.js","assets/log-D33dFtt_.css","assets/index-CZqp_6Zr.js","assets/ViewList-BBNBkCo1.js","assets/index-pvu3nbgn.js","assets/Phone-Df90pdBA.js","assets/Location-R9yMI3QX.js","assets/Email-22EBBQEA.js","assets/Timezone-BfjUkoy7.js","assets/did-address-anPrguG7.js","assets/permission-6aZ4MNgh.js","assets/session-Ir9UAnhf.js","assets/click-to-copy-Dhxc_blG.js","assets/index-w68bai-3.js","assets/vendor-mui-x-B9zuOzS0.js","assets/AdapterDayjs-DdJ4VT-y.js","assets/format-error-BrmqJs5a.js","assets/useAsync-BTtZas5A.js","assets/index-CYz41Upz.js","assets/DeleteOutline-DYyAnzFX.js","assets/confirm-CHZbNj0g.js","assets/util-CRVGSd5f.js","assets/base32-sa8QWx2s.js","assets/sdk-DUAPwTSQ.js","assets/actions-CcV0Tb1p.js","assets/MoreHoriz-Bp9phGCA.js","assets/shorten-label-DTcisg7Q.js","assets/PlayArrow-qTn22j6x.js","assets/get-safe-url-Cn647BYQ.js","assets/use-blocklet-logo-BiDCl8v3.js","assets/InfoOutlined-BCqZENBx.js","assets/dot-Bc3KtmUA.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-BnYZ5d8f.js","assets/index-DZ9Jqm_w.js","assets/ExpandLess-CJztBroj.js","assets/index-Bpz-SuLt.js","assets/Error-C782OBuj.js","assets/empty-spinner-Bm-LVesB.js","assets/list-header-D9r1Z68x.js","assets/QuestionMarkCircle-DV5837_n.js","assets/index-DVQCgvFb.js","assets/index-DFkZuM1_.js","assets/api-DPHyou8y.js","assets/ChevronRight-B2sjje0T.js","assets/react-beautiful-dnd.esm-DPnGSgvn.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-C69diC1y.js","assets/Launch-BbLsJvEN.js","assets/Done-CiSqPhhR.js","assets/delete-confirm-D-jVITSf.js","assets/ArrowDropDown-eLxSrK0e.js","assets/index-DyU89GO9.js","assets/index-C0Iiqot3.css","assets/index-BJfBmMvG.js","assets/overview-DedgPJyh.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-w7wNdwd8.js","assets/omit-CM6MPIu5.js","assets/spaces-DfgQftqB.js","assets/domains-D-YYFzTK.js","assets/domain-action-card-CDfoYMjV.js","assets/util-CKfiFLd5.js","assets/CheckCircle-DxRgzKvx.js","assets/index-DQncaTCr.js","assets/passport-item-B45OGe4c.js","assets/Google-DwaWO1n0.js","assets/cloneDeep-DBPWtvi_.js","assets/EditIcon-_JnvyTnF.js","assets/LockIcon-DEqu2BZe.js","assets/appearance-CuEL_wAd.js","assets/audit-logs-DXfN0Akp.js","assets/relative-time-CKENJIpb.js","assets/index-Ctbrsvlm.js","assets/list-D69IwVXI.js","assets/traffic-Bo3Bp96o.js","assets/iframe-D7qMCC0L.js","assets/LaunchOutlined-BdTDYYqz.js","assets/ChevronLeft-B15pinY6.js","assets/index-B6vKQTr4.js","assets/config-navigation-BbbAAFTA.js","assets/index-CiWjpC34.js","assets/slicedToArray-CM_xB2K2.js","assets/simple-select-DpNtA3N5.js","assets/index-BmpX2Oqa.js","assets/use-mobile-BleYjZfN.js","assets/connect-to-Do1R8dL3.js","assets/config-space-B3L4cc62.js","assets/index-0ncGiO4u.js","assets/switch-control-BP0JyiwP.js","assets/index-OVTGvi9j.js","assets/security-zb06EOxl.js","assets/config-DIa982AP.js","assets/branding-CVWmoAus.js","assets/logo-uploader-D5rcqbIA.js","assets/advanced-C22Mc4mt.js","assets/runtime-Dfcxeun4.js","assets/index-hgktawrH.js","assets/Edit-RoUmIPTL.js","assets/component-DFHLfmfe.js","assets/TuneOutlined-BkH0zJXZ.js","assets/add-component-core-BxVPX1qJ.js","assets/launch-result-message-CiDoyZ_1.js","assets/page-header-D7vhn9dN.js","assets/index-iTlCZ1FK.js","assets/content-layout-clTZd0qL.js","assets/add-component-core-D-IRi6XF.css","assets/index-egCz4jdE.js"])))=>i.map(i=>d[i]);
2
- import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m as As,l as kn,n as Os,E as Ms,o as $s,H as Ns,_ as M,R as zs}from"./vendor-arcblock-Bi9JkCAO.js";import{H as j,j as s,a9 as Z,ah as V,I as ut,aq as Us,ak as rr,X as qt,q as Hs,b5 as Bs,ab as ue,b6 as qs,bx as Fs,T as H,bv as Vs,bt as De,bw as Pn,aa as E,bJ as Ws,v as se,a6 as dt,bK as Ks,e as ce,ae as Gs,bf as Qs,ap as Ft,bL as sr,ad as Ae,bM as Zs,ar as Js,ai as Xs,al as rt,O as re,bu as Tt,bp as ae,bN as or,bO as ir,bP as ar,E as he,b4 as cr,y as Ys,bh as eo}from"./vendor-mui-core-FzKVVAue.js";import{r as w,L as lr,f as ur,g as dr,u as to,l as no}from"./vendor-react-DEoibe3W.js";import{r as J,b4 as ro,b2 as ft,b5 as so,B as ve,j as z,a3 as Ln,_ as N,u as W,ao as oo,m as fr,k as io,d as ao,h as co,Y as Vt,b6 as lo,a6 as pr,as as mr,b7 as uo,I as fo,C as st,b8 as po,b9 as mo,a0 as ho,am as go}from"./vendor-ux-did-connect-CaDmrsW1.js";import{z as Te,f as F,A as vt,B as xo,b as vo,C as Wt,D as yo,E as hr,F as te,G as gr,t as _e,H as xr,I as bo,n as Ie,J as jo,K as wo,u as So,j as Dn,g as _o,L as An,h as Co,l as yt,k as To,m as Io,M as Ro,O as Eo,Q as Ze,e as Ve,R as ko,T as Po,U as Lo,N as Do,V as Ao,c as On}from"./index-BUwaZJ5Y.js";import{af as Oo,A as ge,ag as Mo,z as Kt,b as Je,J as vr,ah as $o}from"./vendor-utils-lR6P1BXz.js";import{_ as Mn}from"./useLocalStorage-C7usthsI.js";import{C as $n}from"./confirm-CHZbNj0g.js";import{d as No}from"./PlayArrow-qTn22j6x.js";import{g as Nn}from"./get-safe-url-Cn647BYQ.js";import{f as Gt}from"./format-error-BrmqJs5a.js";import{u as yr}from"./session-Ir9UAnhf.js";import{f as ye,a as br,u as q,w as zo}from"./vendor-hooks-zv9Oe7Yx.js";import{i as Uo,u as Ho,M as Bo,l as qo,c as Oe,s as ot,H as Fo,p as jr,a as Vo}from"./use-blocklet-logo-BiDCl8v3.js";import{d as Wo}from"./InfoOutlined-BCqZENBx.js";import{_ as wr,D as Ko}from"./dot-Bc3KtmUA.js";import{_ as Sr}from"./useSetState-CWq0AVWn.js";import{u as _r}from"./use-mobile-BnYZ5d8f.js";const Cr=w.createContext({});function Qt({children:e,type:t}){const[n,r]=w.useState([]),o=w.useRef([]),i=c=>{if(!o.current.includes(c)){const u=[...o.current,c];r(u),o.current=u}},a=c=>{if(o.current.includes(c)){const u=o.current.filter(f=>f!==c);r(u),o.current=u}},l=c=>{const u=n.filter(h=>c.find(p=>p===h));Oo(u,n).forEach(h=>a(h))};return s.jsx(Cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}Qt.propTypes={type:j.string,children:j.node.isRequired};Qt.defaultProps={type:"blocklets"};function Vl(){return w.useContext(Cr)}var Zt={},Go=Z;Object.defineProperty(Zt,"__esModule",{value:!0});var Tr=Zt.default=void 0,Qo=Go(J()),Zo=s;Tr=Zt.default=(0,Qo.default)((0,Zo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Jt={},Jo=Z;Object.defineProperty(Jt,"__esModule",{value:!0});var Ir=Jt.default=void 0,Xo=Jo(J()),Yo=s;Ir=Jt.default=(0,Xo.default)((0,Yo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Xt={},ei=Z;Object.defineProperty(Xt,"__esModule",{value:!0});var Rr=Xt.default=void 0,ti=ei(J()),ni=s;Rr=Xt.default=(0,ti.default)((0,ni.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Yt={},ri=Z;Object.defineProperty(Yt,"__esModule",{value:!0});var en=Yt.default=void 0,si=ri(J()),oi=s;en=Yt.default=(0,si.default)((0,oi.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var tn={},ii=Z;Object.defineProperty(tn,"__esModule",{value:!0});var Er=tn.default=void 0,ai=ii(J()),ci=s;Er=tn.default=(0,ai.default)((0,ci.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var nn={},li=Z;Object.defineProperty(nn,"__esModule",{value:!0});var kr=nn.default=void 0,ui=li(J()),di=s;kr=nn.default=(0,ui.default)((0,di.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var rn={},fi=Z;Object.defineProperty(rn,"__esModule",{value:!0});var Pr=rn.default=void 0,pi=fi(J()),mi=s;Pr=rn.default=(0,pi.default)((0,mi.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var sn=function(e){return s.jsx("svg",{...e,children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};sn.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};sn.displayName="dashboard";var on={},hi=Z;Object.defineProperty(on,"__esModule",{value:!0});var Lr=on.default=void 0,gi=hi(J()),xi=s;Lr=on.default=(0,gi.default)((0,xi.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const Se={Start:No,Stop:Tr,Restart:Ir,Reload:Rr,Remove:ro,Config:en,Log:Er,Group:kr,Cancel:Pr,Dashboard:sn,Overview:Lr},vi=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(ge(n.origin,t));return o.search=r.toString(),o.toString()},yi="internal",bi="external";function an({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=Te(),[u,f]=w.useState(null),[h,p]=w.useState(null),[y,S]=w.useState(!1),[b,k]=w.useState(null),{t:d}=w.useContext(ft),[g]=Mn("skip-blocklet-setup",!1),{loading:x,recommendedUrl:P}=a(e),[L]=Mn("blocklet-type-filter",yi),v=F.isInProgress(e.status),[I,C]=w.useState(!1);w.useEffect(()=>{var $,G;if(!(e!=null&&e.controller))return;C(((G=($=e==null?void 0:e.controller)==null?void 0:$.status)==null?void 0:G.value)===me.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var X,ie,fe;try{const Y=await c.api.getLauncherSession({input:{launcherSessionId:(X=e==null?void 0:e.controller)==null?void 0:X.launcherSessionId,launcherUrl:(ie=e==null?void 0:e.controller)==null?void 0:ie.launcherUrl}});if(Y!=null&&Y.error){console.error("get launcher session failed",Y.error);return}C([z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((fe=Y==null?void 0:Y.launcherSession)==null?void 0:fe.status))}catch(Y){console.error("call getLauncherSession error",Y)}})()},[]);const{inService:T}=c,m=(R,$,G=!1)=>async()=>{const X=async Be=>{var Fe;t({action:R,blocklet:e}),S(!0),p(R);let qe=!1;try{if(R==="remove")await $(Be);else if(R==="start"){if(!F.hasRunnableComponent(e)){N.error(d("blocklet.noComponent"));return}if(!T&&!g&&!((Fe=e.settings)!=null&&Fe.initialized)&&e.mode!==me.BLOCKLET_MODES.DEVELOPMENT){if(!P||!Ln(P)){N.error(d("blocklet.gotoVisitError"));return}const ne=xo(c.info),En=new URL(P);En.searchParams.set("serverUrl",ne),window.open(Nn(En.href,{allowDomains:null})),n({action:R,blocklet:e});return}const pe=e.children.filter(ne=>!F.isInProgress(ne.status)&&ne.status!=="running").map(ne=>ne.meta.did),we={did:e.meta.did,componentDids:pe};await $({input:we})}else if(["stop","restart","reload"].includes(R)){const pe=e.children.filter(ne=>ne.status==="running").map(ne=>ne.meta.did),we={did:e.meta.did,componentDids:pe};await $({input:we})}else{const pe={did:e.meta.did};await $({input:pe})}R==="remove"?qe=!0:await vo(1e3),R==="reload"&&N.success(d("blocklet.reloadSuccess")),k(null),n({action:R,blocklet:e})}catch(pe){const we=`Blocklet ${R} failed: ${Gt(pe)}`;throw n({action:R,blocklet:e,error:new Error(we)}),new Error(we)}finally{qe||S(!1)}},ie=()=>{S(!1),k(null)},fe=F.getDisplayName(e,!0),Y=e.mode===me.BLOCKLET_MODES.DEVELOPMENT?{description:()=>s.jsx(H,{component:"div",children:s.jsx(H,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Be,qe)=>s.jsxs(H,{component:"div",children:[s.jsx(H,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")}),s.jsxs(Vs,{name:"removeType",value:Be.removeType,onChange:Fe=>qe({...Be,removeType:Fe.target.value}),children:[s.jsx(De,{value:"backup",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationAfterBackup")}),s.jsx(De,{value:"complete",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Es={stop:{title:`${d("common.stop")} ${fe}`,description:d("blocklet.action.stopDescription"),confirm:d("blocklet.action.confirmStop"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},restart:{title:`${d("common.restart")} ${fe}`,description:d("blocklet.action.restartDescription"),confirm:d("blocklet.action.confirmRestart"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},remove:{title:`${d("common.remove")} ${fe}`,confirm:d("blocklet.action.confirmRemove"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie,...Y},cancelDownload:{title:`${d("common.cancel")}`,description:d("blocklet.action.cancelDownloadDescription",{name:fe}),confirm:d("common.confirm"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie}};G?k(Es[R]):await X()},_=!!u,A=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(R.currentTarget)},D=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(null)},B=async(R,$)=>{try{$.stopPropagation(),$.preventDefault()}catch{}if(typeof R.handler=="function")try{S(!0),p(R.action),await R.handler()}catch(G){console.error(`Blocklet ${R.name} failed: `,G)}finally{S(!1),f(null)}else f(null)},K=!T&&F.isDeletableBlocklet(e)?{action:"remove",icon:Se.Remove,name:d("common.remove"),handler:m("remove",async({removeType:R})=>{R==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,xt={action:"remove",icon:({sx:R,...$})=>s.jsx(Se.Cancel,{sx:{...R,paddingRight:"2px",zoom:.95},...$}),name:d("common.cancel"),handler:m("cancelDownload",c.api.cancelDownloadBlocklet,!0)},Is=F.getAppMissingConfigs(e),Rs=()=>{var X;const R=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),$=i==null?void 0:i({mountPoint:R,blocklet:e});if(!$||!Ln($)){N.error(d("blocklet.gotoVisitError"));return}const G=(X=e==null?void 0:e.site)==null?void 0:X.domainAliases;window.open(Nn(vi($,".well-known/service/admin"),{allowDomains:G==null?void 0:G.map(ie=>ie.value)}))};let He=[{action:"start",icon:Se.Start,inExternal:!0,name:d("common.start"),handler:m("start",c.api.startBlocklet),disabled:I||e.children.every(R=>R.status==="running")||vt(e.status)||x||v},{action:"stop",icon:Se.Stop,inExternal:!0,name:d("common.stop"),handler:m("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:Se.Restart,name:d("common.restart"),handler:m("restart",c.api.restartBlocklet,!0),disabled:I||e.status!=="running"},vt(e.status)?xt:K,{separator:!0},T?null:{action:"dashboard",icon:({style:R,...$})=>s.jsx(Se.Dashboard,{...$,style:{...R,width:"26px",height:"26px",paddingRight:"3px"}}),name:d("sidebar.dashboard"),handler:Rs}].filter(Boolean);return L===bi&&(He=He.filter(R=>R.inExternal)),r==="menu"?s.jsxs(zn,{"data-cy":"blocklet-actions",children:[s.jsx(ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:A,size:"small",disabled:!o||!vt(e.status)&&y,children:s.jsx(so,{})}),s.jsxs(Us,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:_,onClose:D,PaperProps:{},children:[Is.length>0&&s.jsxs(rr,{style:{maxWidth:"400px"},severity:"error",children:[d("blocklet.config.missingRequired"),s.jsx("br",{}),s.jsx(lr,{to:`/blocklets/${e.meta.did}/components`,children:d("blocklet.config.gotoFix")})]}),He.map((R,$)=>R.separator?s.jsx(qt,{},`separator-${$}`):s.jsxs(Hs,{dense:!0,onClick:G=>B(R,G),disabled:y||R.disabled,"data-cy":`${R.action}-blocklet`,children:[s.jsx(Bs,{style:{minWidth:24},children:h===R.action&&y?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{fontSize:"small"})}),s.jsx(qs,{primary:R.name})]},R.name))]}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]}):s.jsxs(zn,{"data-cy":"blocklet-actions",...l,children:[s.jsx(Fs,{children:He.filter(R=>!R.separator&&!R.onlyInMenu).map(R=>s.jsxs(ve,{title:R.name,"data-cy":`${R.action}-blocklet`,onClick:()=>B(R),disabled:!!R.disabled||y,children:[h===R.action&&y?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{}),s.jsx("span",{className:"blocklet-action-text",children:R.name})]},R.name))}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]})}an.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};an.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const zn=V.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-BdBIH8S_.js","assets/vendor-mui-core-DMvlMpwf.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-DeyICx-h.js","assets/vendor-ux-did-connect-akcz-Ldw.js","assets/vendor-utils-rHXShPKm.js","assets/vendor-hooks-rDgu5KV9.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-BFsMuPKK.js","assets/vendor-arcblock-CORkwLwW.js","assets/index-DOq-_YXu.css","assets/Download-BZiCoF-V.js","assets/bundle-avatar-CkhAjy4c.js","assets/log-D33dFtt_.css","assets/index-aQxEawZE.js","assets/ViewList-BwVW4Mbn.js","assets/index-mbuQZLIX.js","assets/Phone-BfBgFKKG.js","assets/Location-9D-5nMVA.js","assets/Email-DVjqqt2m.js","assets/Timezone-BWB21Pdc.js","assets/did-address-Dd9R3pkY.js","assets/permission-DzaDpKIW.js","assets/session-xl6Fb2Wm.js","assets/click-to-copy-CzMRt9dA.js","assets/index-Cy1Hvxt0.js","assets/vendor-mui-x-mcVodcG2.js","assets/AdapterDayjs-DWoymUZR.js","assets/format-error-BrmqJs5a.js","assets/useAsync-DV3NyLhI.js","assets/index-DF0z_zii.js","assets/DeleteOutline-1ZpdOBb4.js","assets/confirm-qyOtSX3L.js","assets/util-CZd-jYUF.js","assets/base32-HzVjc8tz.js","assets/sdk-D0dqnQoQ.js","assets/actions-7FcWNRsN.js","assets/MoreHoriz-KJHmH0lv.js","assets/shorten-label-srsBvHNw.js","assets/PlayArrow-CY4IxSfG.js","assets/get-safe-url-_fT029s-.js","assets/use-blocklet-logo-OwFyCoUV.js","assets/InfoOutlined-BMdv5FNj.js","assets/dot-B5LFAb8e.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-PBkFclTq.js","assets/index-m_po8k60.js","assets/ExpandLess-mzw0LYV7.js","assets/index-BSuIcvk6.js","assets/Error-DmLM9r9y.js","assets/empty-spinner-g1Jw7iuj.js","assets/list-header-D4MXeBc7.js","assets/QuestionMarkCircle-dkY86QWO.js","assets/index-DVQCgvFb.js","assets/index-BPuJmMx-.js","assets/api-BjteVZFg.js","assets/ChevronRight-8T5vdE8C.js","assets/react-beautiful-dnd.esm-CrdGz16R.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-B4NAOVBY.js","assets/Launch-BGXBIBAE.js","assets/Done-1iBqzwts.js","assets/delete-confirm-DQ_YJQpj.js","assets/ArrowDropDown-oIFrKvRQ.js","assets/index-BQJa9ZJC.js","assets/index-C0Iiqot3.css","assets/index-CzGXBMFc.js","assets/overview-D5q1KD9x.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-kLLmMBy7.js","assets/omit-D2k92RIF.js","assets/spaces-BtThOmfG.js","assets/domains-bZXw9tDX.js","assets/domain-action-card-DE7xLk29.js","assets/util-DStpLP3f.js","assets/CheckCircle-DKTlmPGr.js","assets/index-DpW-Ik8u.js","assets/passport-item-CjxzZUKR.js","assets/Google-DknSY4FA.js","assets/cloneDeep-UpFQ2VNg.js","assets/EditIcon-Tb4i_lkD.js","assets/LockIcon-DJgkKDXB.js","assets/appearance-DROrcrHA.js","assets/audit-logs-CcVb9ghw.js","assets/relative-time-tY0x-ayF.js","assets/index-cs-08BqN.js","assets/list-BK68Cxh8.js","assets/traffic-38eCC37i.js","assets/iframe-DXRYs3PX.js","assets/LaunchOutlined-C1cAhHQM.js","assets/ChevronLeft-CFwnl5kG.js","assets/index-yiU4BWrm.js","assets/config-navigation-BEcY6Wrz.js","assets/index-Bs1kxR8_.js","assets/slicedToArray-B3Jznk0w.js","assets/simple-select-DyL9G1FX.js","assets/index-Djpx18Tz.js","assets/use-mobile-B-WdQWoB.js","assets/connect-to-DjFFSoXW.js","assets/config-space-CxYC75c6.js","assets/index-ftkgQlGr.js","assets/switch-control-DsHfwUN7.js","assets/index-DW75AsWb.js","assets/security-fwRPOvQx.js","assets/config-zGEZcVMw.js","assets/branding-Be5nWHmr.js","assets/logo-uploader-DRH-fnyc.js","assets/advanced-u-DAzAIF.js","assets/runtime-CRViKGyG.js","assets/index-CXDRY0Gs.js","assets/Edit-BGameSEw.js","assets/component-B79RqFMg.js","assets/TuneOutlined-BEZh1SVU.js","assets/add-component-core-BMiZ7LE5.js","assets/launch-result-message-mW7oxgKT.js","assets/page-header-C1NOmuYB.js","assets/index-B9xM_Hng.js","assets/content-layout-HQq6mBBk.js","assets/add-component-core-D-IRi6XF.css","assets/index-TE82Z_py.js"])))=>i.map(i=>d[i]);
2
+ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m as As,l as kn,n as Os,E as Ms,o as $s,H as Ns,_ as M,R as zs}from"./vendor-arcblock-CORkwLwW.js";import{H as j,j as s,a9 as J,ah as V,I as ut,aq as Us,ak as rr,X as qt,q as Hs,b5 as Bs,ab as ue,b6 as qs,bx as Fs,T as H,bv as Vs,bt as De,bw as Pn,aa as E,bJ as Ws,v as se,a6 as dt,bK as Ks,e as ce,ae as Gs,bf as Qs,ap as Ft,bL as sr,ad as Ae,bM as Js,ar as Zs,ai as Xs,al as rt,O as re,bu as Tt,bp as ae,bN as or,bO as ir,bP as ar,E as he,b4 as cr,y as Ys,bh as eo}from"./vendor-mui-core-DMvlMpwf.js";import{r as w,L as lr,f as ur,g as dr,u as to,l as no}from"./vendor-react-DEoibe3W.js";import{r as Z,b4 as ro,b2 as ft,b5 as so,B as ve,j as z,a3 as Ln,_ as N,u as W,ao as oo,m as fr,k as io,d as ao,h as co,aJ as lo,Y as Vt,b6 as uo,a6 as pr,as as mr,b7 as fo,I as po,C as st,b8 as mo,b9 as ho,a0 as go,am as xo}from"./vendor-ux-did-connect-akcz-Ldw.js";import{z as Te,f as F,A as vt,B as vo,b as yo,C as Wt,D as bo,E as hr,F as te,G as gr,t as _e,H as xr,I as jo,n as Ie,J as wo,K as So,u as _o,j as Dn,g as Co,L as An,h as To,l as yt,k as Io,m as Ro,M as Eo,O as ko,Q as Je,e as Ve,R as Po,T as Lo,U as Do,N as Ao,V as Oo,c as On}from"./index-BFsMuPKK.js";import{af as Mo,A as ge,ag as $o,z as Kt,b as Ze,J as vr,ah as No}from"./vendor-utils-rHXShPKm.js";import{_ as Mn}from"./useLocalStorage-DeyICx-h.js";import{C as $n}from"./confirm-qyOtSX3L.js";import{d as zo}from"./PlayArrow-CY4IxSfG.js";import{g as Nn}from"./get-safe-url-_fT029s-.js";import{f as Gt}from"./format-error-BrmqJs5a.js";import{u as yr}from"./session-xl6Fb2Wm.js";import{f as ye,a as br,u as q,w as Uo}from"./vendor-hooks-rDgu5KV9.js";import{i as Ho,u as Bo,M as qo,c as Oe,s as ot,H as Fo,p as jr,a as Vo}from"./use-blocklet-logo-OwFyCoUV.js";import{d as Wo}from"./InfoOutlined-BMdv5FNj.js";import{_ as wr,D as Ko}from"./dot-B5LFAb8e.js";import{_ as Sr}from"./useSetState-CWq0AVWn.js";import{u as _r}from"./use-mobile-PBkFclTq.js";const Cr=w.createContext({});function Qt({children:e,type:t}){const[n,r]=w.useState([]),o=w.useRef([]),i=c=>{if(!o.current.includes(c)){const u=[...o.current,c];r(u),o.current=u}},a=c=>{if(o.current.includes(c)){const u=o.current.filter(f=>f!==c);r(u),o.current=u}},l=c=>{const u=n.filter(h=>c.find(p=>p===h));Mo(u,n).forEach(h=>a(h))};return s.jsx(Cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}Qt.propTypes={type:j.string,children:j.node.isRequired};Qt.defaultProps={type:"blocklets"};function Vl(){return w.useContext(Cr)}var Jt={},Go=J;Object.defineProperty(Jt,"__esModule",{value:!0});var Tr=Jt.default=void 0,Qo=Go(Z()),Jo=s;Tr=Jt.default=(0,Qo.default)((0,Jo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Zt={},Zo=J;Object.defineProperty(Zt,"__esModule",{value:!0});var Ir=Zt.default=void 0,Xo=Zo(Z()),Yo=s;Ir=Zt.default=(0,Xo.default)((0,Yo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Xt={},ei=J;Object.defineProperty(Xt,"__esModule",{value:!0});var Rr=Xt.default=void 0,ti=ei(Z()),ni=s;Rr=Xt.default=(0,ti.default)((0,ni.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Yt={},ri=J;Object.defineProperty(Yt,"__esModule",{value:!0});var en=Yt.default=void 0,si=ri(Z()),oi=s;en=Yt.default=(0,si.default)((0,oi.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var tn={},ii=J;Object.defineProperty(tn,"__esModule",{value:!0});var Er=tn.default=void 0,ai=ii(Z()),ci=s;Er=tn.default=(0,ai.default)((0,ci.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var nn={},li=J;Object.defineProperty(nn,"__esModule",{value:!0});var kr=nn.default=void 0,ui=li(Z()),di=s;kr=nn.default=(0,ui.default)((0,di.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var rn={},fi=J;Object.defineProperty(rn,"__esModule",{value:!0});var Pr=rn.default=void 0,pi=fi(Z()),mi=s;Pr=rn.default=(0,pi.default)((0,mi.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var sn=function(e){return s.jsx("svg",{...e,children:s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};sn.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};sn.displayName="dashboard";var on={},hi=J;Object.defineProperty(on,"__esModule",{value:!0});var Lr=on.default=void 0,gi=hi(Z()),xi=s;Lr=on.default=(0,gi.default)((0,xi.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const Se={Start:zo,Stop:Tr,Restart:Ir,Reload:Rr,Remove:ro,Config:en,Log:Er,Group:kr,Cancel:Pr,Dashboard:sn,Overview:Lr},vi=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(ge(n.origin,t));return o.search=r.toString(),o.toString()},yi="internal",bi="external";function an({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=Te(),[u,f]=w.useState(null),[h,p]=w.useState(null),[y,S]=w.useState(!1),[b,k]=w.useState(null),{t:d}=w.useContext(ft),[g]=Mn("skip-blocklet-setup",!1),{loading:x,recommendedUrl:P}=a(e),[L]=Mn("blocklet-type-filter",yi),v=F.isInProgress(e.status),[I,C]=w.useState(!1);w.useEffect(()=>{var $,G;if(!(e!=null&&e.controller))return;C(((G=($=e==null?void 0:e.controller)==null?void 0:$.status)==null?void 0:G.value)===me.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var X,ie,fe;try{const Y=await c.api.getLauncherSession({input:{launcherSessionId:(X=e==null?void 0:e.controller)==null?void 0:X.launcherSessionId,launcherUrl:(ie=e==null?void 0:e.controller)==null?void 0:ie.launcherUrl}});if(Y!=null&&Y.error){console.error("get launcher session failed",Y.error);return}C([z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((fe=Y==null?void 0:Y.launcherSession)==null?void 0:fe.status))}catch(Y){console.error("call getLauncherSession error",Y)}})()},[]);const{inService:T}=c,m=(R,$,G=!1)=>async()=>{const X=async Be=>{var Fe;t({action:R,blocklet:e}),S(!0),p(R);let qe=!1;try{if(R==="remove")await $(Be);else if(R==="start"){if(!F.hasRunnableComponent(e)){N.error(d("blocklet.noComponent"));return}if(!T&&!g&&!((Fe=e.settings)!=null&&Fe.initialized)&&e.mode!==me.BLOCKLET_MODES.DEVELOPMENT){if(!P||!Ln(P)){N.error(d("blocklet.gotoVisitError"));return}const ne=vo(c.info),En=new URL(P);En.searchParams.set("serverUrl",ne),window.open(Nn(En.href,{allowDomains:null})),n({action:R,blocklet:e});return}const pe=e.children.filter(ne=>!F.isInProgress(ne.status)&&ne.status!=="running").map(ne=>ne.meta.did),we={did:e.meta.did,componentDids:pe};await $({input:we})}else if(["stop","restart","reload"].includes(R)){const pe=e.children.filter(ne=>ne.status==="running").map(ne=>ne.meta.did),we={did:e.meta.did,componentDids:pe};await $({input:we})}else{const pe={did:e.meta.did};await $({input:pe})}R==="remove"?qe=!0:await yo(1e3),R==="reload"&&N.success(d("blocklet.reloadSuccess")),k(null),n({action:R,blocklet:e})}catch(pe){const we=`Blocklet ${R} failed: ${Gt(pe)}`;throw n({action:R,blocklet:e,error:new Error(we)}),new Error(we)}finally{qe||S(!1)}},ie=()=>{S(!1),k(null)},fe=F.getDisplayName(e,!0),Y=e.mode===me.BLOCKLET_MODES.DEVELOPMENT?{description:()=>s.jsx(H,{component:"div",children:s.jsx(H,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Be,qe)=>s.jsxs(H,{component:"div",children:[s.jsx(H,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")}),s.jsxs(Vs,{name:"removeType",value:Be.removeType,onChange:Fe=>qe({...Be,removeType:Fe.target.value}),children:[s.jsx(De,{value:"backup",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationAfterBackup")}),s.jsx(De,{value:"complete",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Es={stop:{title:`${d("common.stop")} ${fe}`,description:d("blocklet.action.stopDescription"),confirm:d("blocklet.action.confirmStop"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},restart:{title:`${d("common.restart")} ${fe}`,description:d("blocklet.action.restartDescription"),confirm:d("blocklet.action.confirmRestart"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},remove:{title:`${d("common.remove")} ${fe}`,confirm:d("blocklet.action.confirmRemove"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie,...Y},cancelDownload:{title:`${d("common.cancel")}`,description:d("blocklet.action.cancelDownloadDescription",{name:fe}),confirm:d("common.confirm"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie}};G?k(Es[R]):await X()},_=!!u,A=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(R.currentTarget)},D=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(null)},B=async(R,$)=>{try{$.stopPropagation(),$.preventDefault()}catch{}if(typeof R.handler=="function")try{S(!0),p(R.action),await R.handler()}catch(G){console.error(`Blocklet ${R.name} failed: `,G)}finally{S(!1),f(null)}else f(null)},K=!T&&F.isDeletableBlocklet(e)?{action:"remove",icon:Se.Remove,name:d("common.remove"),handler:m("remove",async({removeType:R})=>{R==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,xt={action:"remove",icon:({sx:R,...$})=>s.jsx(Se.Cancel,{sx:{...R,paddingRight:"2px",zoom:.95},...$}),name:d("common.cancel"),handler:m("cancelDownload",c.api.cancelDownloadBlocklet,!0)},Is=F.getAppMissingConfigs(e),Rs=()=>{var X;const R=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),$=i==null?void 0:i({mountPoint:R,blocklet:e});if(!$||!Ln($)){N.error(d("blocklet.gotoVisitError"));return}const G=(X=e==null?void 0:e.site)==null?void 0:X.domainAliases;window.open(Nn(vi($,".well-known/service/admin"),{allowDomains:G==null?void 0:G.map(ie=>ie.value)}))};let He=[{action:"start",icon:Se.Start,inExternal:!0,name:d("common.start"),handler:m("start",c.api.startBlocklet),disabled:I||e.children.every(R=>R.status==="running")||vt(e.status)||x||v},{action:"stop",icon:Se.Stop,inExternal:!0,name:d("common.stop"),handler:m("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:Se.Restart,name:d("common.restart"),handler:m("restart",c.api.restartBlocklet,!0),disabled:I||e.status!=="running"},vt(e.status)?xt:K,{separator:!0},T?null:{action:"dashboard",icon:({style:R,...$})=>s.jsx(Se.Dashboard,{...$,style:{...R,width:"26px",height:"26px",paddingRight:"3px"}}),name:d("sidebar.dashboard"),handler:Rs}].filter(Boolean);return L===bi&&(He=He.filter(R=>R.inExternal)),r==="menu"?s.jsxs(zn,{"data-cy":"blocklet-actions",children:[s.jsx(ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:A,size:"small",disabled:!o||!vt(e.status)&&y,children:s.jsx(so,{})}),s.jsxs(Us,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:_,onClose:D,PaperProps:{},children:[Is.length>0&&s.jsxs(rr,{style:{maxWidth:"400px"},severity:"error",children:[d("blocklet.config.missingRequired"),s.jsx("br",{}),s.jsx(lr,{to:`/blocklets/${e.meta.did}/components`,children:d("blocklet.config.gotoFix")})]}),He.map((R,$)=>R.separator?s.jsx(qt,{},`separator-${$}`):s.jsxs(Hs,{dense:!0,onClick:G=>B(R,G),disabled:y||R.disabled,"data-cy":`${R.action}-blocklet`,children:[s.jsx(Bs,{style:{minWidth:24},children:h===R.action&&y?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{fontSize:"small"})}),s.jsx(qs,{primary:R.name})]},R.name))]}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]}):s.jsxs(zn,{"data-cy":"blocklet-actions",...l,children:[s.jsx(Fs,{children:He.filter(R=>!R.separator&&!R.onlyInMenu).map(R=>s.jsxs(ve,{title:R.name,"data-cy":`${R.action}-blocklet`,onClick:()=>B(R),disabled:!!R.disabled||y,children:[h===R.action&&y?s.jsx(ue,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{}),s.jsx("span",{className:"blocklet-action-text",children:R.name})]},R.name))}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]})}an.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};an.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const zn=V.div`
3
3
  display: flex;
4
4
  align-items: center;
5
5
 
@@ -9,7 +9,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
9
9
  font-size: 10px;
10
10
  }
11
11
  }
12
- `,Un=w.memo(an),ji=e=>{const t={};let n=null;return F.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=F.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},wi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const l=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!l)return o;const c=l[0],f=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(h=>h.value).filter(Boolean).find(h=>h.endsWith(z.DEFAULT_DID_DOMAIN))||"").replace(`.${z.DEFAULT_DID_DOMAIN}`,"");return f?o.replace(r,`${f}-${c}.${z.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Dr(){const{t:e}=W(),{api:t}=yr(),{blocklet:n}=Wt(),{inService:r}=Te(),[o,i]=w.useState(!1),[a,l]=w.useState(5),c=n&&n.structVersion!==z.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){N.error(e("blocklet.migrate.tip.running"));return}const p=ji(n);if(p){N.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){N.error(Gt(p))}},f=()=>{const p=wi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),l(5),setInterval(()=>{l(y=>y-1)},1e3)},h=()=>i(!1);return[c&&s.jsxs(rr,{severity:"warning",style:{margin:"12px 0"},children:[s.jsxs(E,{display:"flex",alignItems:"center",children:[s.jsx(ve,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),s.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>s.jsx(E,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&s.jsx(oo,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:n.appDid,did:n.meta.did,wt:yo(n,!0),title:F.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:h},"connect")]}Dr.propTypes={};function Si(){const e=Ws();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const o=se(e.breakpoints.up(r));return!n&&o?r:n},null)||"xs"}function _i(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Ci(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ti(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Ii(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const We={fontSize:20,marginInlineEnd:8},Ri={success:s.jsx(_i,{style:We}),warning:s.jsx(Ci,{style:We}),error:s.jsx(Ti,{style:We}),info:s.jsx(Ii,{style:We})},Ei=Ks(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${Gs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Qs[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function cn({keyId:e,notification:t={},viewAllUrl:n,content:r},o){var k,d,g;const i=Ei({breakpoint:Si()}),a=ce(),l=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Ri[t.severity],{closeSnackbar:u}=fr(),f=()=>u(e),h=ur(),p=()=>{u(e),h(n)},y=ye(()=>Uo(t),[t]),S=ye(()=>t==null?void 0:t.activity,[t]),b=Ho({activity:S,users:[t==null?void 0:t.actorInfo],actors:[(k=t==null?void 0:t.activity)==null?void 0:k.actor],extra:{linkColor:a.palette.primary.main,userDid:(g=(d=t==null?void 0:t.receivers)==null?void 0:d[0])==null?void 0:g.did}});return s.jsxs(io,{ref:o,className:l,children:[s.jsxs("div",{className:i.message,children:[c,s.jsx(Pi,{onClick:p,style:{width:"calc(100% - 30px)"},children:s.jsx(E,{children:y?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:b}),S.meta?s.jsx(Bo,{meta:S.meta,type:S.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:t.title}),r||s.jsx("span",{className:"desc",children:t.description})]})})})]}),s.jsx("div",{className:i.action,children:s.jsx(ut,{"aria-label":"close",color:"inherit",onClick:f,size:"large",children:s.jsx(ao,{className:i.icon})},"close")})]})}const ki=w.forwardRef(cn);cn.propTypes={viewAllUrl:j.string.isRequired,keyId:j.number.isRequired,notification:j.object.isRequired,content:j.node};cn.defaultProps={content:null};const Pi=V.div`
12
+ `,Un=w.memo(an),ji=e=>{const t={};let n=null;return F.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=F.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},wi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const l=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!l)return o;const c=l[0],f=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(h=>h.value).filter(Boolean).find(h=>h.endsWith(z.DEFAULT_DID_DOMAIN))||"").replace(`.${z.DEFAULT_DID_DOMAIN}`,"");return f?o.replace(r,`${f}-${c}.${z.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Dr(){const{t:e}=W(),{api:t}=yr(),{blocklet:n}=Wt(),{inService:r}=Te(),[o,i]=w.useState(!1),[a,l]=w.useState(5),c=n&&n.structVersion!==z.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){N.error(e("blocklet.migrate.tip.running"));return}const p=ji(n);if(p){N.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){N.error(Gt(p))}},f=()=>{const p=wi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),l(5),setInterval(()=>{l(y=>y-1)},1e3)},h=()=>i(!1);return[c&&s.jsxs(rr,{severity:"warning",style:{margin:"12px 0"},children:[s.jsxs(E,{display:"flex",alignItems:"center",children:[s.jsx(ve,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),s.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>s.jsx(E,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&s.jsx(oo,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:n.appDid,did:n.meta.did,wt:bo(n,!0),title:F.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:h},"connect")]}Dr.propTypes={};function Si(){const e=Ws();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const o=se(e.breakpoints.up(r));return!n&&o?r:n},null)||"xs"}function _i(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Ci(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ti(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Ii(e){return s.jsx(dt,{...e,children:s.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const We={fontSize:20,marginInlineEnd:8},Ri={success:s.jsx(_i,{style:We}),warning:s.jsx(Ci,{style:We}),error:s.jsx(Ti,{style:We}),info:s.jsx(Ii,{style:We})},Ei=Ks(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${Gs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Qs[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function cn({keyId:e,notification:t={},viewAllUrl:n,content:r},o){var k,d,g;const i=Ei({breakpoint:Si()}),a=ce(),l=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Ri[t.severity],{closeSnackbar:u}=fr(),f=()=>u(e),h=ur(),p=()=>{u(e),h(n)},y=ye(()=>Ho(t),[t]),S=ye(()=>t==null?void 0:t.activity,[t]),b=Bo({activity:S,users:[t==null?void 0:t.actorInfo],actors:[(k=t==null?void 0:t.activity)==null?void 0:k.actor],extra:{linkColor:a.palette.primary.main,userDid:(g=(d=t==null?void 0:t.receivers)==null?void 0:d[0])==null?void 0:g.did}});return s.jsxs(io,{ref:o,className:l,children:[s.jsxs("div",{className:i.message,children:[c,s.jsx(Pi,{onClick:p,style:{width:"calc(100% - 30px)"},children:s.jsx(E,{children:y?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:b}),S.meta?s.jsx(qo,{meta:S.meta,type:S.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:t.title}),r||s.jsx("span",{className:"desc",children:t.description})]})})})]}),s.jsx("div",{className:i.action,children:s.jsx(ut,{"aria-label":"close",color:"inherit",onClick:f,size:"large",children:s.jsx(ao,{className:i.icon})},"close")})]})}const ki=w.forwardRef(cn);cn.propTypes={viewAllUrl:j.string.isRequired,keyId:j.number.isRequired,notification:j.object.isRequired,content:j.node};cn.defaultProps={content:null};const Pi=V.div`
13
13
  cursor: pointer;
14
14
  display: flex;
15
15
  flex-direction: column;
@@ -38,7 +38,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
38
38
  text-overflow: ellipsis;
39
39
  white-space: normal;
40
40
  word-break: break-word;
41
- `,Di=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Ai=e=>e.every(t=>t.type==="text"),Oi=e=>e.every(t=>t.type==="image"),Mi=e=>Mo(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,o,i;return(i=(o=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:o.trim)==null?void 0:i.call(o)})),$i=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Ni=(e,t)=>{try{const n=co.toTypeInfo(e);if(!(n.role!==void 0&&n.role!==qo.types.RoleType.ACCOUNT))return;const o=ge(z.WELLKNOWN_SERVICE_PATH_PREFIX,"user");return Kt(o,{did:e,locale:t})}catch(n){console.error(n);return}},be=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}});ln.propTypes={locale:j.string,data:j.object.isRequired};ln.defaultProps={locale:"en"};function ln({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${Oe.getUrlHost(t.chainHost)||Oe.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,a=ce(),l=a.palette.mode==="dark";let c=t.amount;t.decimal&&(c=t.amount/10**t.decimal);const u=ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:f=>{f.customPreventRedirect=!0},children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",sx:{fontWeight:700,color:a.palette.text.primary},children:r}),s.jsxs(H,{component:"div",align:"right",style:be(ot.summaryStyle,l),flex:1,children:["+",c," ",t.symbol]})]}),s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",style:be({...ot.remarkStyle,fontSize:14},l),children:n}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}un.propTypes={locale:j.string,data:j.object.isRequired};un.defaultProps={locale:"en"};function un({locale:e,data:t}){var f,h;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",o=Oe.getUrlHost(t.chainHost)||Oe.getChainHost(t.chainId),i=t.did||((h=(f=t==null?void 0:t.credential)==null?void 0:f.issuer)==null?void 0:h.id)||"",a=`https://${o}/explorer/assets/${i}`,c=ce().palette.mode==="dark",u=ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx(E,{sx:{pr:1},children:s.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:p=>{p.customPreventRedirect=!0},rel:"noreferrer",children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:n}),s.jsx(H,{component:"div",align:"right",style:be(ot.summaryStyle,c),children:"+1 Asset"})]}),i?s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",style:be({...ot.remarkStyle,fontSize:14},c),children:r}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}$r.propTypes={data:j.object.isRequired,locale:j.string};function $r({data:e,locale:t="en"}){const r=ce().palette.mode==="dark";return s.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:o=>{o.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),s.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[s.jsx("div",{style:be({marginBottom:"6px"},r),children:e.title}),s.jsx(E,{maxWidth:260,fontSize:10,children:s.jsx(Vt,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}dn.propTypes={locale:j.string,data:j.object.isRequired};dn.defaultProps={locale:"en"};function dn({locale:e,data:t}){const n=Oe.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash",a=ce(),l=a.palette.mode==="dark";return s.jsxs("a",{href:r,target:"_blank",style:be({textDecoration:"none",color:"initial",display:"block",fontSize:14},l),onClick:c=>{c.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("h6",{style:{color:a.palette.text.secondary,margin:0},children:n}),s.jsx("p",{style:{color:a.palette.warning.main,margin:0},children:o}),s.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function Nr({attachment:e,...t}){const{local:n}=w.useContext(ft),r=se(i=>i.breakpoints.down("md")),o=ce();return s.jsxs(zi,{...t,isMd:r,children:[e.type==="link"&&s.jsx(Ar,{attachment:e,...t,isMd:r}),e.type==="image"&&s.jsx(Or,{attachment:e,isMd:r}),e.type==="text"&&s.jsx(Mr,{attachment:e,isMd:r}),e.type==="token"&&s.jsx(ln,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?s.jsx(un,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&s.jsx($r,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&s.jsx(dn,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&s.jsx(qt,{sx:{mb:1,mt:1},style:{color:o.palette.divider}})]})}const zi=V.div`
41
+ `,Di=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Ai=e=>e.every(t=>t.type==="text"),Oi=e=>e.every(t=>t.type==="image"),Mi=e=>$o(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,o,i;return(i=(o=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:o.trim)==null?void 0:i.call(o)})),$i=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Ni=(e,t)=>{try{const n=co.toTypeInfo(e);if(!(n.role!==void 0&&n.role!==lo.types.RoleType.ACCOUNT))return;const o=ge(z.WELLKNOWN_SERVICE_PATH_PREFIX,"user");return Kt(o,{did:e,locale:t})}catch(n){console.error(n);return}},be=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}});ln.propTypes={locale:j.string,data:j.object.isRequired};ln.defaultProps={locale:"en"};function ln({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${Oe.getUrlHost(t.chainHost)||Oe.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,a=ce(),l=a.palette.mode==="dark";let c=t.amount;t.decimal&&(c=t.amount/10**t.decimal);const u=ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:f=>{f.customPreventRedirect=!0},children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",sx:{fontWeight:700,color:a.palette.text.primary},children:r}),s.jsxs(H,{component:"div",align:"right",style:be(ot.summaryStyle,l),flex:1,children:["+",c," ",t.symbol]})]}),s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",style:be({...ot.remarkStyle,fontSize:14},l),children:n}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}un.propTypes={locale:j.string,data:j.object.isRequired};un.defaultProps={locale:"en"};function un({locale:e,data:t}){var f,h;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",o=Oe.getUrlHost(t.chainHost)||Oe.getChainHost(t.chainId),i=t.did||((h=(f=t==null?void 0:t.credential)==null?void 0:f.issuer)==null?void 0:h.id)||"",a=`https://${o}/explorer/assets/${i}`,c=ce().palette.mode==="dark",u=ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx(E,{sx:{pr:1},children:s.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:p=>{p.customPreventRedirect=!0},rel:"noreferrer",children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:n}),s.jsx(H,{component:"div",align:"right",style:be(ot.summaryStyle,c),children:"+1 Asset"})]}),i?s.jsxs(E,{sx:u,children:[s.jsx(H,{component:"div",style:be({...ot.remarkStyle,fontSize:14},c),children:r}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}$r.propTypes={data:j.object.isRequired,locale:j.string};function $r({data:e,locale:t="en"}){const r=ce().palette.mode==="dark";return s.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:o=>{o.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),s.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[s.jsx("div",{style:be({marginBottom:"6px"},r),children:e.title}),s.jsx(E,{maxWidth:260,fontSize:10,children:s.jsx(Vt,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}dn.propTypes={locale:j.string,data:j.object.isRequired};dn.defaultProps={locale:"en"};function dn({locale:e,data:t}){const n=Oe.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash",a=ce(),l=a.palette.mode==="dark";return s.jsxs("a",{href:r,target:"_blank",style:be({textDecoration:"none",color:"initial",display:"block",fontSize:14},l),onClick:c=>{c.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("h6",{style:{color:a.palette.text.secondary,margin:0},children:n}),s.jsx("p",{style:{color:a.palette.warning.main,margin:0},children:o}),s.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function Nr({attachment:e,...t}){const{local:n}=w.useContext(ft),r=se(i=>i.breakpoints.down("md")),o=ce();return s.jsxs(zi,{...t,isMd:r,children:[e.type==="link"&&s.jsx(Ar,{attachment:e,...t,isMd:r}),e.type==="image"&&s.jsx(Or,{attachment:e,isMd:r}),e.type==="text"&&s.jsx(Mr,{attachment:e,isMd:r}),e.type==="token"&&s.jsx(ln,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?s.jsx(un,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&s.jsx($r,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&s.jsx(dn,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&s.jsx(qt,{sx:{mb:1,mt:1},style:{color:o.palette.divider}})]})}const zi=V.div`
42
42
  display: ${({sx:e={}})=>e.display||"flex"};
43
43
  flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
44
44
  gap: ${({sx:e={}})=>e.gap||1};
@@ -64,7 +64,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
64
64
  font-size: 14px;
65
65
  color: rgba(156, 163, 175, 1);
66
66
  }
67
- `;zr.propTypes={data:j.object.isRequired};function Ur({data:e}){const{items:t}=e,n=se(a=>a.breakpoints.down("sm")),r=se(a=>a.breakpoints.down("md")),o=se(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:o?4:6;return s.jsx(Zs,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const l=a.cover||a.display;return l?s.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:s.jsx(Js,{children:s.jsx("img",{src:l,alt:a.title||"",style:{borderRadius:"8px"}})})},l):null})})}Ur.propTypes={data:j.object.isRequired};function fn({data:e,feedType:t,...n}){return s.jsxs(Hi,{...n,children:[t==="data-tracker"&&e.type==="table"&&s.jsx(zr,{data:e}),(t==="graphic"||t==="gallery")&&s.jsx(Ur,{data:e})]})}const Hi=V.div`
67
+ `;zr.propTypes={data:j.object.isRequired};function Ur({data:e}){const{items:t}=e,n=se(a=>a.breakpoints.down("sm")),r=se(a=>a.breakpoints.down("md")),o=se(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:o?4:6;return s.jsx(Js,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const l=a.cover||a.display;return l?s.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:s.jsx(Zs,{children:s.jsx("img",{src:l,alt:a.title||"",style:{borderRadius:"8px"}})})},l):null})})}Ur.propTypes={data:j.object.isRequired};function fn({data:e,feedType:t,...n}){return s.jsxs(Hi,{...n,children:[t==="data-tracker"&&e.type==="table"&&s.jsx(zr,{data:e}),(t==="graphic"||t==="gallery")&&s.jsx(Ur,{data:e})]})}const Hi=V.div`
68
68
  display: flex;
69
69
  flex-direction: column;
70
70
  width: 100%;
@@ -85,7 +85,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
85
85
  .value-col {
86
86
  flex: 1;
87
87
  }
88
- `;function pn({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:o,...i}=e,a=se(f=>f.breakpoints.down("md"));if((!r||!r.length)&&Je(o))return null;const l=Di(t),c=(f,h=!1)=>{if(!f&&!Array.isArray(f))return null;let p=f,y={},S="horizontal";h&&Ai(f)&&(p=Mi(f),S="vertical",y={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const b=$i(p);return s.jsx(E,{sx:{width:"100%",display:"flex",gap:1,flexDirection:h?"row":"column",justifyContent:"flex-start",alignItems:h?"center":"unset",flexWrap:"wrap"},children:p.map((k,d)=>k.type==="section"?s.jsx(Hr,{data:k.fields},d):s.jsxs(w.Fragment,{children:[s.jsx(Nr,{attachment:k,style:y,...i}),!(a&&S==="vertical")&&b&&p.length>1&&d!==p.length-1?s.jsx(qt,{orientation:S,style:{color:lo.dividerColor},sx:S==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},d))})},u=Oi(r);return s.jsx(Bi,{children:s.jsxs("div",{className:"message-in-list",children:[r.length>0&&s.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:u?c(r):s.jsx(sr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(r)})}),!Je(o)&&s.jsx("div",{className:"message-container",children:s.jsx("div",{className:"data-container",children:s.jsx(fn,{data:o,feedType:e.feedType})})}),r.length===0&&Je(o)&&n&&s.jsx(Xs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Bi=V.div`
88
+ `;function pn({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:o,...i}=e,a=se(f=>f.breakpoints.down("md"));if((!r||!r.length)&&Ze(o))return null;const l=Di(t),c=(f,h=!1)=>{if(!f&&!Array.isArray(f))return null;let p=f,y={},S="horizontal";h&&Ai(f)&&(p=Mi(f),S="vertical",y={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const b=$i(p);return s.jsx(E,{sx:{width:"100%",display:"flex",gap:1,flexDirection:h?"row":"column",justifyContent:"flex-start",alignItems:h?"center":"unset",flexWrap:"wrap"},children:p.map((k,d)=>k.type==="section"?s.jsx(Hr,{data:k.fields},d):s.jsxs(w.Fragment,{children:[s.jsx(Nr,{attachment:k,style:y,...i}),!(a&&S==="vertical")&&b&&p.length>1&&d!==p.length-1?s.jsx(qt,{orientation:S,style:{color:uo.dividerColor},sx:S==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},d))})},u=Oi(r);return s.jsx(Bi,{children:s.jsxs("div",{className:"message-in-list",children:[r.length>0&&s.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:u?c(r):s.jsx(sr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(r)})}),!Ze(o)&&s.jsx("div",{className:"message-container",children:s.jsx("div",{className:"data-container",children:s.jsx(fn,{data:o,feedType:e.feedType})})}),r.length===0&&Ze(o)&&n&&s.jsx(Xs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Bi=V.div`
89
89
  display: flex;
90
90
  flex-direction: column;
91
91
  .message-in-list {
@@ -137,7 +137,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
137
137
  margin-right: 8px;
138
138
  }
139
139
  }
140
- `;pn.propTypes={severity:j.string.isRequired,notification:j.object.isRequired,showSke:j.bool};pn.defaultProps={showSke:!0};const bt=e=>ks.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),qi=async(e,t)=>{const{type:n,did:r}=e;return tr.isSameAddr(n,"did")?await Ni(r,t)||nt.getLink(e):nt.getLink(e)},Fi=async(e,t,n=!0)=>{const r=nt.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof nt.Link){if(n){const a=await qi(i,t),{type:l,chainId:c,did:u}=i;return tr.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};Br.propTypes={notification:j.object,rows:j.number,minimal:j.bool};function Br({notification:e,rows:t=2,minimal:n=!1}){const[r,o]=w.useState(!1),[i,a]=w.useState(""),{t:l,locale:c}=W(),{palette:u}=ce(),f=w.useMemo(()=>{const{attachments:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),h=w.useMemo(()=>{const{blocks:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),p=w.useMemo(()=>{const{description:d}=e||{};return!!d},[e]),y=w.useMemo(()=>{const{data:d}=e||{};return!Je(d)},[e]),S=w.useMemo(()=>f||h||p||y,[f,h,p,y]);if(w.useEffect(()=>{Fi((e==null?void 0:e.description)??"",c).then(d=>{a(d)})},[e==null?void 0:e.description,c]),!S)return null;const b=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,k=d=>{const{target:g}=d;g.getAttribute("data-name")==="toggle-expanded"&&(o(!r),d.customPreventRedirect=!0)};return s.jsxs(Vi,{color:n?u.primary.contrastText:"",children:[s.jsx(E,{className:"text-container",component:"div",onClick:k,children:i&&(!r&&t>0?s.jsx(Fo,{basedOn:"letters",unsafeHTML:bt(i),maxLine:t,ellipsisHTML:bt(b())}):s.jsx(H,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:bt(`${i}${b()}`)}}))}),!n&&(f||y)?s.jsx(pn,{severity:e.severity,notification:e}):null]})}const Vi=V(E)`
140
+ `;pn.propTypes={severity:j.string.isRequired,notification:j.object.isRequired,showSke:j.bool};pn.defaultProps={showSke:!0};const bt=e=>ks.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),qi=async(e,t)=>{const{type:n,did:r}=e;return tr.isSameAddr(n,"did")?await Ni(r,t)||nt.getLink(e):nt.getLink(e)},Fi=async(e,t,n=!0)=>{const r=nt.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof nt.Link){if(n){const a=await qi(i,t),{type:l,chainId:c,did:u}=i;return tr.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};Br.propTypes={notification:j.object,rows:j.number,minimal:j.bool};function Br({notification:e,rows:t=2,minimal:n=!1}){const[r,o]=w.useState(!1),[i,a]=w.useState(""),{t:l,locale:c}=W(),{palette:u}=ce(),f=w.useMemo(()=>{const{attachments:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),h=w.useMemo(()=>{const{blocks:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),p=w.useMemo(()=>{const{description:d}=e||{};return!!d},[e]),y=w.useMemo(()=>{const{data:d}=e||{};return!Ze(d)},[e]),S=w.useMemo(()=>f||h||p||y,[f,h,p,y]);if(w.useEffect(()=>{Fi((e==null?void 0:e.description)??"",c).then(d=>{a(d)})},[e==null?void 0:e.description,c]),!S)return null;const b=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,k=d=>{const{target:g}=d;g.getAttribute("data-name")==="toggle-expanded"&&(o(!r),d.customPreventRedirect=!0)};return s.jsxs(Vi,{color:n?u.primary.contrastText:"",children:[s.jsx(E,{className:"text-container",component:"div",onClick:k,children:i&&(!r&&t>0?s.jsx(Fo,{basedOn:"letters",unsafeHTML:bt(i),maxLine:t,ellipsisHTML:bt(b())}):s.jsx(H,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:bt(`${i}${b()}`)}}))}),!n&&(f||y)?s.jsx(pn,{severity:e.severity,notification:e}):null]})}const Vi=V(E)`
141
141
  width: 100%;
142
142
  color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
143
143
  .text-container {
@@ -163,7 +163,7 @@ import{c as me,u as er,p as ks,h as nt,f as tr,g as nr,i as Ps,j as Ls,k as Ds,m
163
163
  }
164
164
  }
165
165
  `,Wi=w.memo(Br);var It={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var n=l(nr),r=l(Ps),o=l(Ls),i=l(Ds),a=l(As);function l(d){return d&&d.__esModule?d:{default:d}}function c(d,g){return y(d)||p(d,g)||f(d,g)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
166
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(d,g){if(d){if(typeof d=="string")return h(d,g);var x={}.toString.call(d).slice(8,-1);return x==="Object"&&d.constructor&&(x=d.constructor.name),x==="Map"||x==="Set"?Array.from(d):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?h(d,g):void 0}}function h(d,g){(g==null||g>d.length)&&(g=d.length);for(var x=0,P=Array(g);x<g;x++)P[x]=d[x];return P}function p(d,g){var x=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(x!=null){var P,L,v,I,C=[],T=!0,m=!1;try{if(v=(x=x.call(d)).next,g!==0)for(;!(T=(P=v.call(x)).done)&&(C.push(P.value),C.length!==g);T=!0);}catch(_){m=!0,L=_}finally{try{if(!T&&x.return!=null&&(I=x.return(),Object(I)!==I))return}finally{if(m)throw L}}return C}}function y(d){if(Array.isArray(d))return d}var S={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},b=/^\[([^\]]+)\](?::([0-9]+))?$/;function k(d,g){if((0,n.default)(d),!d||/[\s<>]/.test(d)||d.indexOf("mailto:")===0||(g=(0,a.default)(g,S),g.validate_length&&d.length>g.max_allowed_length)||!g.allow_fragments&&d.includes("#")||!g.allow_query_components&&(d.includes("?")||d.includes("&")))return!1;var x,P,L,v,I,C,T,m;if(T=d.split("#"),d=T.shift(),T=d.split("?"),d=T.shift(),T=d.split("://"),T.length>1){if(x=T.shift().toLowerCase(),g.require_valid_protocol&&g.protocols.indexOf(x)===-1)return!1}else{if(g.require_protocol)return!1;if(d.slice(0,2)==="//"){if(!g.allow_protocol_relative_urls)return!1;T[0]=d.slice(2)}}if(d=T.join("://"),d==="")return!1;if(T=d.split("/"),d=T.shift(),d===""&&!g.require_host)return!0;if(T=d.split("@"),T.length>1){if(g.disallow_auth||T[0]===""||(P=T.shift(),P.indexOf(":")>=0&&P.split(":").length>2))return!1;var _=P.split(":"),A=c(_,2),D=A[0],B=A[1];if(D===""&&B==="")return!1}v=T.join("@"),C=null,m=null;var K=v.match(b);if(K?(L="",m=K[1],C=K[2]||null):(T=v.split(":"),L=T.shift(),T.length&&(C=T.join(":"))),C!==null&&C.length>0){if(I=parseInt(C,10),!/^[0-9]+$/.test(C)||I<=0||I>65535)return!1}else if(g.require_port)return!1;return g.host_whitelist?(0,r.default)(L,g.host_whitelist):L===""&&!g.require_host?!0:!(!(0,i.default)(L)&&!(0,o.default)(L,g)&&(!m||!(0,i.default)(m,6))||(L=L||m,g.host_blacklist&&(0,r.default)(L,g.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(It,It.exports);var Ki=It.exports;const qr=dr(Ki);var Rt={exports:{}},Et={exports:{}},kt={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){return r==null}e.exports=t.default,e.exports.default=t.default})(kt,kt.exports);var Gi=kt.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=o(nr),r=o(Gi);function o(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,u){(0,n.default)(c),u=u||{};var f=u.allow_leading_zeroes===!1?i:a,h=!u.hasOwnProperty("min")||(0,r.default)(u.min)||c>=u.min,p=!u.hasOwnProperty("max")||(0,r.default)(u.max)||c<=u.max,y=!u.hasOwnProperty("lt")||(0,r.default)(u.lt)||c<u.lt,S=!u.hasOwnProperty("gt")||(0,r.default)(u.gt)||c>u.gt;return f.test(c)&&h&&p&&y&&S}e.exports=t.default,e.exports.default=t.default})(Et,Et.exports);var Qi=Et.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Qi);function r(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,n.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=t.default,e.exports.default=t.default})(Rt,Rt.exports);var Zi=Rt.exports;const Ji=dr(Zi);function Q({title:e,desc:t,sectionLeftSx:n,sectionRightSx:r,children:o,...i}){return s.jsx(Xi,{...i,children:s.jsxs(rt,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[s.jsxs(E,{className:"section-left",sx:n,children:[s.jsx(H,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),s.jsx(E,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:t}})]}),s.jsx(rt,{className:"section-content",direction:"column",sx:{width:"100%",...r},children:o})]})})}Q.propTypes={title:j.string.isRequired,children:j.node.isRequired,desc:j.string,sectionLeftSx:j.object,sectionRightSx:j.object};Q.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Xi=V(E)`
166
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(d,g){if(d){if(typeof d=="string")return h(d,g);var x={}.toString.call(d).slice(8,-1);return x==="Object"&&d.constructor&&(x=d.constructor.name),x==="Map"||x==="Set"?Array.from(d):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?h(d,g):void 0}}function h(d,g){(g==null||g>d.length)&&(g=d.length);for(var x=0,P=Array(g);x<g;x++)P[x]=d[x];return P}function p(d,g){var x=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(x!=null){var P,L,v,I,C=[],T=!0,m=!1;try{if(v=(x=x.call(d)).next,g!==0)for(;!(T=(P=v.call(x)).done)&&(C.push(P.value),C.length!==g);T=!0);}catch(_){m=!0,L=_}finally{try{if(!T&&x.return!=null&&(I=x.return(),Object(I)!==I))return}finally{if(m)throw L}}return C}}function y(d){if(Array.isArray(d))return d}var S={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},b=/^\[([^\]]+)\](?::([0-9]+))?$/;function k(d,g){if((0,n.default)(d),!d||/[\s<>]/.test(d)||d.indexOf("mailto:")===0||(g=(0,a.default)(g,S),g.validate_length&&d.length>g.max_allowed_length)||!g.allow_fragments&&d.includes("#")||!g.allow_query_components&&(d.includes("?")||d.includes("&")))return!1;var x,P,L,v,I,C,T,m;if(T=d.split("#"),d=T.shift(),T=d.split("?"),d=T.shift(),T=d.split("://"),T.length>1){if(x=T.shift().toLowerCase(),g.require_valid_protocol&&g.protocols.indexOf(x)===-1)return!1}else{if(g.require_protocol)return!1;if(d.slice(0,2)==="//"){if(!g.allow_protocol_relative_urls)return!1;T[0]=d.slice(2)}}if(d=T.join("://"),d==="")return!1;if(T=d.split("/"),d=T.shift(),d===""&&!g.require_host)return!0;if(T=d.split("@"),T.length>1){if(g.disallow_auth||T[0]===""||(P=T.shift(),P.indexOf(":")>=0&&P.split(":").length>2))return!1;var _=P.split(":"),A=c(_,2),D=A[0],B=A[1];if(D===""&&B==="")return!1}v=T.join("@"),C=null,m=null;var K=v.match(b);if(K?(L="",m=K[1],C=K[2]||null):(T=v.split(":"),L=T.shift(),T.length&&(C=T.join(":"))),C!==null&&C.length>0){if(I=parseInt(C,10),!/^[0-9]+$/.test(C)||I<=0||I>65535)return!1}else if(g.require_port)return!1;return g.host_whitelist?(0,r.default)(L,g.host_whitelist):L===""&&!g.require_host?!0:!(!(0,i.default)(L)&&!(0,o.default)(L,g)&&(!m||!(0,i.default)(m,6))||(L=L||m,g.host_blacklist&&(0,r.default)(L,g.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(It,It.exports);var Ki=It.exports;const qr=dr(Ki);var Rt={exports:{}},Et={exports:{}},kt={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){return r==null}e.exports=t.default,e.exports.default=t.default})(kt,kt.exports);var Gi=kt.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=o(nr),r=o(Gi);function o(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,u){(0,n.default)(c),u=u||{};var f=u.allow_leading_zeroes===!1?i:a,h=!u.hasOwnProperty("min")||(0,r.default)(u.min)||c>=u.min,p=!u.hasOwnProperty("max")||(0,r.default)(u.max)||c<=u.max,y=!u.hasOwnProperty("lt")||(0,r.default)(u.lt)||c<u.lt,S=!u.hasOwnProperty("gt")||(0,r.default)(u.gt)||c>u.gt;return f.test(c)&&h&&p&&y&&S}e.exports=t.default,e.exports.default=t.default})(Et,Et.exports);var Qi=Et.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Qi);function r(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,n.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=t.default,e.exports.default=t.default})(Rt,Rt.exports);var Ji=Rt.exports;const Zi=dr(Ji);function Q({title:e,desc:t,sectionLeftSx:n,sectionRightSx:r,children:o,...i}){return s.jsx(Xi,{...i,children:s.jsxs(rt,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[s.jsxs(E,{className:"section-left",sx:n,children:[s.jsx(H,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),s.jsx(E,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:t}})]}),s.jsx(rt,{className:"section-content",direction:"column",sx:{width:"100%",...r},children:o})]})})}Q.propTypes={title:j.string.isRequired,children:j.node.isRequired,desc:j.string,sectionLeftSx:j.object,sectionRightSx:j.object};Q.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Xi=V(E)`
167
167
  display: flex;
168
168
  align-items: flex-start;
169
169
  width: 100%;
@@ -203,7 +203,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
203
203
  width: 100% !important;
204
204
  }
205
205
  }
206
- `,jt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Yi(){var I,C,T;const{api:e}=Te(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=pr(),i=(I=t==null?void 0:t.meta)==null?void 0:I.did,a=Object.assign({...jt},((T=(C=t==null?void 0:t.settings)==null?void 0:C.notification)==null?void 0:T.email)||{}),{handleSubmit:l,control:c,formState:u,watch:f,reset:h}=hr({defaultValues:vr(a,Object.keys(jt))}),p=br({testReceiver:"",testReceiverError:""}),y=f("enabled"),S=q(async(m,_,A=!0)=>{var D,B;try{const{blocklet:K}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:m})}}),xt=Object.assign({...jt},((B=(D=K==null?void 0:K.settings)==null?void 0:D.notification)==null?void 0:B.email)||{});h(xt),A&&N.success(n("oauth.saveSuccess"))}catch(K){if(A)N.error(K.message||n("oauth.saveFailed"));else throw K}}),b=q(async(m,_,A)=>{try{u.isDirty&&await S(m,_,!1),await e.sendEmail({input:{did:i,receiver:A,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),N.success(n("notification.email.testSuccess"))}catch(D){N.error(D.message||n("notification.email.testfailed"))}}),k=q((m,_)=>{p.testReceiver="",p.testReceiverError="",r.open({title:n("notification.email.testSendEmail"),content:()=>s.jsx(E,{sx:{width:"300px"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.email.inputTestReceiver"),value:p.testReceiver,onChange:A=>{p.testReceiver=A.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(A){var B;const D=(B=p.testReceiver)==null?void 0:B.trim();if(!D){p.testReceiverError=n("notification.email.receiverRequired");return}if(!kn(D)){p.testReceiverError=n("notification.email.receiverInvalid");return}p.testReceiverError="",await b(m,_,D),A()}})}),d=q(m=>{const _=m==null?void 0:m.trim();return _?kn(_)?!0:n("notification.email.fromInvalid"):n("notification.email.fromRequired")}),g=q(m=>{const _=m==null?void 0:m.trim();return _?qr(_,{require_host:!1,protocols:[]})?!0:n("notification.email.hostInvalid"):n("notification.email.hostRequired")}),x=q(m=>m?Ji(m)?!0:n("notification.email.portInvalid"):n("notification.email.portRequired")),P=q(m=>m!=null&&m.trim()?!0:n("notification.email.userRequired")),L=q(m=>m!=null&&m.trim()?!0:n("notification.email.passwordRequired")),v=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(ea,{component:"form",onSubmit:l(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.email.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:c,render:({field:m})=>s.jsx(De,{control:s.jsx(Tt,{checked:m.value,...m})})})}),s.jsx(Q,{title:n("notification.email.from"),children:s.jsx(te,{name:"from",control:c,rules:{validate:y?d:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,label:n("notification.email.from"),error:!!u.errors[m.name],helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.host"),children:s.jsx(te,{name:"host",control:c,rules:{validate:y?g:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.host"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.port"),children:s.jsx(te,{name:"port",control:c,rules:{validate:y?x:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"number",error:!!u.errors[m.name],label:n("notification.email.port"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.user"),children:s.jsx(te,{name:"user",control:c,rules:{validate:y?P:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.user"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.password"),children:s.jsx(te,{name:"password",control:c,rules:{validate:y?L:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"password",error:!!u.errors[m.name],label:n("notification.email.password"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.secure"),children:s.jsx(te,{name:"secure",control:c,rules:{validate:v},render:({field:m})=>s.jsx(ae,{fullWidth:!0,children:s.jsx(De,{control:s.jsx(Tt,{checked:m.value,...m,disabled:!y})})})})}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ve,{variant:"outlined",color:"warning",onClick:l(k),sx:{mr:2},disabled:!y,children:n("oauth.runTest")}),s.jsx(ve,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const ea=V(rt)``,wt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function ta(){var x,P,L;const{api:e}=Te(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=pr(),i=(x=t==null?void 0:t.meta)==null?void 0:x.did,a=Object.assign({...wt},((L=(P=t==null?void 0:t.settings)==null?void 0:P.notification)==null?void 0:L.pushKit)||{}),{handleSubmit:l,control:c,formState:u,watch:f,reset:h}=hr({defaultValues:vr(a,Object.keys(wt))}),p=br({testReceiver:"",testReceiverError:""}),y=f("enabled"),S=q(async(v,I,C=!0)=>{var T,m;try{const{blocklet:_}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:v})}}),A=Object.assign({...wt},((m=(T=_==null?void 0:_.settings)==null?void 0:T.notification)==null?void 0:m.pushKit)||{});h(A),C&&N.success(n("oauth.saveSuccess"))}catch(_){if(C)N.error(_.message||n("oauth.saveFailed"));else throw _}}),b=q(async(v,I)=>{var C,T,m;try{u.isDirty&&await S(v,I,!1);const _=(C=((t==null?void 0:t.configs)||[]).find(B=>B.key==="BLOCKLET_APP_URL"))==null?void 0:C.value,A=Kt(ge(_,"/.well-known/service/blocklet/logo"),{v:(T=t==null?void 0:t.meta)==null?void 0:T.version,t:new Date((t==null?void 0:t.updatedAt)||0).getTime()}),D={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:t==null?void 0:t.appDid,fullName:(m=t==null?void 0:t.meta)==null?void 0:m.title,avatar:A}}}};await e.sendPush({input:{did:i,receiver:p.testReceiver,notification:JSON.stringify(D)}}),N.success(n("notification.pushKit.testSuccess"))}catch(_){N.error(_.message||n("notification.pushKit.testfailed"))}}),k=q((v,I)=>{p.testReceiverError="",r.open({title:n("notification.pushKit.testSend"),content:()=>s.jsx(E,{sx:{width:"450px",maxWidth:"100%"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.pushKit.inputTestReceiver"),value:p.testReceiver,onChange:C=>{p.testReceiver=C.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(C){var m;if(!((m=p.testReceiver)==null?void 0:m.trim())){p.testReceiverError=n("notification.pushKit.receiverRequired");return}p.testReceiverError="",await b(v,I),C()}})}),d=q(v=>{const I=v==null?void 0:v.trim();return I?qr(I)?!0:n("notification.pushKit.endpointInvalid"):n("notification.pushKit.endpointRequired")}),g=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(na,{component:"form",onSubmit:l(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.pushKit.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:c,render:({field:v})=>s.jsx(De,{control:s.jsx(Tt,{checked:v.value,...v})})})}),s.jsx(Q,{title:n("notification.pushKit.endpoint"),children:s.jsx(te,{name:"endpoint",control:c,rules:{validate:y?d:g},render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",required:!0,label:n("notification.pushKit.endpoint"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}})}),s.jsxs(Q,{title:n("notification.pushKit.customOptions"),children:[s.jsx(te,{name:"did",control:c,render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",label:n("notification.pushKit.did"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}}),s.jsx(te,{name:"pushPath",control:c,render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",label:n("notification.pushKit.pushPath"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}})]}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ve,{variant:"outlined",color:"warning",onClick:l(k),disabled:!y,children:n("oauth.runTest")}),s.jsx(ve,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const na=V(rt)``,Bn=[{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function ra(){const[e,t]=w.useState(Bn[0].value),{locale:n}=w.useContext(ft),r=ye(()=>({email:s.jsx(Yi,{}),pushKit:s.jsx(ta,{})}),[n]),o=w.useMemo(()=>({padding:"10px 0"}),[]);return s.jsxs(E,{children:[s.jsx(mr,{tabs:Bn,current:e,onChange:t}),s.jsx(E,{style:o,children:r[e]})]})}var O=function(t,n,r){return or.call(n,"css")?s.jsx(ir,ar(t,n),r):s.jsx(t,n,r)},Ke=function(t,n,r){return or.call(n,"css")?s.jsxs(ir,ar(t,n),r):s.jsxs(t,n,r)};/**
206
+ `,jt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Yi(){var I,C,T;const{api:e}=Te(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=pr(),i=(I=t==null?void 0:t.meta)==null?void 0:I.did,a=Object.assign({...jt},((T=(C=t==null?void 0:t.settings)==null?void 0:C.notification)==null?void 0:T.email)||{}),{handleSubmit:l,control:c,formState:u,watch:f,reset:h}=hr({defaultValues:vr(a,Object.keys(jt))}),p=br({testReceiver:"",testReceiverError:""}),y=f("enabled"),S=q(async(m,_,A=!0)=>{var D,B;try{const{blocklet:K}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:m})}}),xt=Object.assign({...jt},((B=(D=K==null?void 0:K.settings)==null?void 0:D.notification)==null?void 0:B.email)||{});h(xt),A&&N.success(n("oauth.saveSuccess"))}catch(K){if(A)N.error(K.message||n("oauth.saveFailed"));else throw K}}),b=q(async(m,_,A)=>{try{u.isDirty&&await S(m,_,!1),await e.sendEmail({input:{did:i,receiver:A,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),N.success(n("notification.email.testSuccess"))}catch(D){N.error(D.message||n("notification.email.testfailed"))}}),k=q((m,_)=>{p.testReceiver="",p.testReceiverError="",r.open({title:n("notification.email.testSendEmail"),content:()=>s.jsx(E,{sx:{width:"300px"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.email.inputTestReceiver"),value:p.testReceiver,onChange:A=>{p.testReceiver=A.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(A){var B;const D=(B=p.testReceiver)==null?void 0:B.trim();if(!D){p.testReceiverError=n("notification.email.receiverRequired");return}if(!kn(D)){p.testReceiverError=n("notification.email.receiverInvalid");return}p.testReceiverError="",await b(m,_,D),A()}})}),d=q(m=>{const _=m==null?void 0:m.trim();return _?kn(_)?!0:n("notification.email.fromInvalid"):n("notification.email.fromRequired")}),g=q(m=>{const _=m==null?void 0:m.trim();return _?qr(_,{require_host:!1,protocols:[]})?!0:n("notification.email.hostInvalid"):n("notification.email.hostRequired")}),x=q(m=>m?Zi(m)?!0:n("notification.email.portInvalid"):n("notification.email.portRequired")),P=q(m=>m!=null&&m.trim()?!0:n("notification.email.userRequired")),L=q(m=>m!=null&&m.trim()?!0:n("notification.email.passwordRequired")),v=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(ea,{component:"form",onSubmit:l(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.email.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:c,render:({field:m})=>s.jsx(De,{control:s.jsx(Tt,{checked:m.value,...m})})})}),s.jsx(Q,{title:n("notification.email.from"),children:s.jsx(te,{name:"from",control:c,rules:{validate:y?d:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,label:n("notification.email.from"),error:!!u.errors[m.name],helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.host"),children:s.jsx(te,{name:"host",control:c,rules:{validate:y?g:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.host"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.port"),children:s.jsx(te,{name:"port",control:c,rules:{validate:y?x:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"number",error:!!u.errors[m.name],label:n("notification.email.port"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.user"),children:s.jsx(te,{name:"user",control:c,rules:{validate:y?P:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.user"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.password"),children:s.jsx(te,{name:"password",control:c,rules:{validate:y?L:v},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"password",error:!!u.errors[m.name],label:n("notification.email.password"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!y})})}})}),s.jsx(Q,{title:n("notification.email.secure"),children:s.jsx(te,{name:"secure",control:c,rules:{validate:v},render:({field:m})=>s.jsx(ae,{fullWidth:!0,children:s.jsx(De,{control:s.jsx(Tt,{checked:m.value,...m,disabled:!y})})})})}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ve,{variant:"outlined",color:"warning",onClick:l(k),sx:{mr:2},disabled:!y,children:n("oauth.runTest")}),s.jsx(ve,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const ea=V(rt)``,wt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function ta(){var x,P,L;const{api:e}=Te(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=pr(),i=(x=t==null?void 0:t.meta)==null?void 0:x.did,a=Object.assign({...wt},((L=(P=t==null?void 0:t.settings)==null?void 0:P.notification)==null?void 0:L.pushKit)||{}),{handleSubmit:l,control:c,formState:u,watch:f,reset:h}=hr({defaultValues:vr(a,Object.keys(wt))}),p=br({testReceiver:"",testReceiverError:""}),y=f("enabled"),S=q(async(v,I,C=!0)=>{var T,m;try{const{blocklet:_}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:v})}}),A=Object.assign({...wt},((m=(T=_==null?void 0:_.settings)==null?void 0:T.notification)==null?void 0:m.pushKit)||{});h(A),C&&N.success(n("oauth.saveSuccess"))}catch(_){if(C)N.error(_.message||n("oauth.saveFailed"));else throw _}}),b=q(async(v,I)=>{var C,T,m;try{u.isDirty&&await S(v,I,!1);const _=(C=((t==null?void 0:t.configs)||[]).find(B=>B.key==="BLOCKLET_APP_URL"))==null?void 0:C.value,A=Kt(ge(_,"/.well-known/service/blocklet/logo"),{v:(T=t==null?void 0:t.meta)==null?void 0:T.version,t:new Date((t==null?void 0:t.updatedAt)||0).getTime()}),D={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:t==null?void 0:t.appDid,fullName:(m=t==null?void 0:t.meta)==null?void 0:m.title,avatar:A}}}};await e.sendPush({input:{did:i,receiver:p.testReceiver,notification:JSON.stringify(D)}}),N.success(n("notification.pushKit.testSuccess"))}catch(_){N.error(_.message||n("notification.pushKit.testfailed"))}}),k=q((v,I)=>{p.testReceiverError="",r.open({title:n("notification.pushKit.testSend"),content:()=>s.jsx(E,{sx:{width:"450px",maxWidth:"100%"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.pushKit.inputTestReceiver"),value:p.testReceiver,onChange:C=>{p.testReceiver=C.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(C){var m;if(!((m=p.testReceiver)==null?void 0:m.trim())){p.testReceiverError=n("notification.pushKit.receiverRequired");return}p.testReceiverError="",await b(v,I),C()}})}),d=q(v=>{const I=v==null?void 0:v.trim();return I?qr(I)?!0:n("notification.pushKit.endpointInvalid"):n("notification.pushKit.endpointRequired")}),g=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(na,{component:"form",onSubmit:l(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.pushKit.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:c,render:({field:v})=>s.jsx(De,{control:s.jsx(Tt,{checked:v.value,...v})})})}),s.jsx(Q,{title:n("notification.pushKit.endpoint"),children:s.jsx(te,{name:"endpoint",control:c,rules:{validate:y?d:g},render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",required:!0,label:n("notification.pushKit.endpoint"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}})}),s.jsxs(Q,{title:n("notification.pushKit.customOptions"),children:[s.jsx(te,{name:"did",control:c,render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",label:n("notification.pushKit.did"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}}),s.jsx(te,{name:"pushPath",control:c,render:({field:v})=>{var I;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...v,size:"small",label:n("notification.pushKit.pushPath"),error:!!u.errors[v.name],helperText:((I=u.errors[v.name])==null?void 0:I.message)||" ",disabled:!y})})}})]}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ve,{variant:"outlined",color:"warning",onClick:l(k),disabled:!y,children:n("oauth.runTest")}),s.jsx(ve,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const na=V(rt)``,Bn=[{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function ra(){const[e,t]=w.useState(Bn[0].value),{locale:n}=w.useContext(ft),r=ye(()=>({email:s.jsx(Yi,{}),pushKit:s.jsx(ta,{})}),[n]),o=w.useMemo(()=>({padding:"10px 0"}),[]);return s.jsxs(E,{children:[s.jsx(mr,{tabs:Bn,current:e,onChange:t}),s.jsx(E,{style:o,children:r[e]})]})}var O=function(t,n,r){return or.call(n,"css")?s.jsx(ir,ar(t,n),r):s.jsx(t,n,r)},Ke=function(t,n,r){return or.call(n,"css")?s.jsxs(ir,ar(t,n),r):s.jsxs(t,n,r)};/**
207
207
  * (c) Iconify
208
208
  *
209
209
  * For the full copyright and license information, please view the license.txt or license.gpl.txt
@@ -213,7 +213,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
213
213
  *
214
214
  * @license MIT
215
215
  * @version 3.1.1
216
- */const Fr=Object.freeze({left:0,top:0,width:16,height:16}),it=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$e=Object.freeze({...Fr,...it}),Pt=Object.freeze({...$e,body:"",hidden:!1});function sa(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function qn(e,t){const n=sa(e,t);for(const r in Pt)r in it?r in e&&!(r in n)&&(n[r]=it[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function oa(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=r[a]&&r[a].parent,c=l&&i(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function ia(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function a(l){i=qn(r[l]||o[l],i)}return a(t),n.forEach(a),qn(e,i)}function aa(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=oa(e);for(const o in r){const i=r[o];i&&(t(o,ia(e,o,i)),n.push(o))}return n}const ke=/^[a-z0-9]+(-[a-z0-9]+)*$/,Re=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:r,prefix:c,name:l};return t&&!Ye(u)?null:u}const i=o[0],a=i.split("-");if(a.length>1){const l={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ye(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:i};return t&&!Ye(l,n)?null:l}return null},Ye=(e,t)=>e?!!((e.provider===""||e.provider.match(ke))&&(t&&e.prefix===""||e.prefix.match(ke))&&e.name.match(ke)):!1,ca={provider:"",aliases:{},not_found:{},...Fr};function St(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function la(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!St(e,ca))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(ke)||typeof i.body!="string"||!St(i,Pt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],a=i.parent;if(!o.match(ke)||typeof a!="string"||!n[a]&&!r[a]||!St(i,Pt))return null}return t}const at=Object.create(null);function ua(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function oe(e,t){const n=at[e]||(at[e]=Object.create(null));return n[t]||(n[t]=ua(e,t))}function mn(e,t){return la(t)?aa(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function da(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function fa(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(at)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(at[o]||{})).forEach(a=>{const l=oe(o,a);n=n.concat(Object.keys(l.icons).map(c=>(o!==""?"@"+o+":":"")+a+":"+c))})}),n}let hn=!1;function pa(e){return hn}function Ne(e){const t=typeof e=="string"?Re(e,!0,hn):e;if(t){const n=oe(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function ma(e,t){const n=Re(e,!0,hn);if(!n)return!1;const r=oe(n.provider,n.prefix);return da(r,n.name,t)}function Vr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Ye({provider:t,prefix:n,name:"a"}))return!1;const r=oe(t,n);return!!mn(r,e)}function ha(e){return!!Ne(e)}function ga(e){const t=Ne(e);return t?{...$e,...t}:null}const Wr=Object.freeze({width:null,height:null}),Kr=Object.freeze({...Wr,...it}),xa=/(-?[0-9.]*[0-9]+[0-9.]*)/g,va=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(xa);if(r===null||!r.length)return e;const o=[];let i=r.shift(),a=va.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?o.push(i):o.push(Math.ceil(l*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");a=!a}}const ya=e=>e==="unset"||e==="undefined"||e==="none";function pt(e,t){const n={...$e,...e},r={...Kr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(S=>{const b=[],k=S.hFlip,d=S.vFlip;let g=S.rotate;k?d?g+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):d&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let x;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:x=o.height/2+o.top,b.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,b.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}g%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),b.length&&(i='<g transform="'+b.join(" ")+'">'+i+"</g>")});const a=r.width,l=r.height,c=o.width,u=o.height;let f,h;a===null?(h=l===null?"1em":l==="auto"?u:l,f=Lt(h,c/u)):(f=a==="auto"?c:a,h=l===null?Lt(f,u/c):l==="auto"?u:l);const p={},y=(S,b)=>{ya(b)||(p[S]=b.toString())};return y("width",f),y("height",h),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:p,body:i}}const ba=/\sid="(\S+)"/g,ja="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let wa=0;function Gr(e,t=ja){const n=[];let r;for(;r=ba.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(wa++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const xe={local:!0,session:!0},Qr={local:new Set,session:new Set};let gn=!1;function Sa(e){gn=e}const Fn="iconify2",Me="iconify",Zr=Me+"-count",Vn=Me+"-version",Jr=36e5,_a=168;function Dt(e,t){try{return e.getItem(t)}catch{}}function xn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Wn(e,t){try{e.removeItem(t)}catch{}}function At(e,t){return xn(e,Zr,t.toString())}function Ot(e){return parseInt(Dt(e,Zr))||0}let Ge=typeof window>"u"?{}:window;function Xr(e){const t=e+"Storage";try{if(Ge&&Ge[t]&&typeof Ge[t].length=="number")return Ge[t]}catch{}xe[e]=!1}function Yr(e,t){const n=Xr(e);if(!n)return;const r=Dt(n,Vn);if(r!==Fn){if(r){const l=Ot(n);for(let c=0;c<l;c++)Wn(n,Me+c.toString())}xn(n,Vn,Fn),At(n,0);return}const o=Math.floor(Date.now()/Jr)-_a,i=l=>{const c=Me+l.toString(),u=Dt(n,c);if(typeof u=="string"){try{const f=JSON.parse(u);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>o&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,l))return!0}catch{}Wn(n,c)}};let a=Ot(n);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,At(n,a)):Qr[e].add(l))}function es(){if(!gn){Sa(!0);for(const e in xe)Yr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=oe(r,o);if(!mn(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function ts(e,t){switch(e){case"local":case"session":xe[e]=t;break;case"all":for(const n in xe)xe[n]=t;break}}const Mt=Object.create(null);function ns(e,t){Mt[e]=t}function $t(e){return Mt[e]||Mt[""]}function vn(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 mt=Object.create(null),Ee=["https://api.simplesvg.com","https://api.unisvg.com"],et=[];for(;Ee.length>0;)Ee.length===1||Math.random()>.5?et.push(Ee.shift()):et.push(Ee.pop());mt[""]=vn({resources:["https://api.iconify.design"].concat(et)});function rs(e,t){const n=vn(t);return n===null?!1:(mt[e]=n,!0)}function ht(e){return mt[e]}function Ca(){return Object.keys(mt)}const Ta=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ct=Ta();function Ia(e){ct=e}function Ra(){return ct}function Ea(e,t){const n=ht(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function ka(e){return e===404}const Pa=(e,t,n)=>{const r=[],o=Ea(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),r.push(a),r};function La(e){if(typeof e=="string"){const t=ht(e);if(t)return t.path}return"/"}const Da=(e,t,n)=>{if(!ct){n("abort",424);return}let r=La(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});r+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;ct(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(ka(a)?"abort":"next",a)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},Aa={prepare:Pa,send:Da};function Oa(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,a=o.prefix,l=o.name,c=n[i]||(n[i]=Object.create(null)),u=c[a]||(c[a]=oe(i,a));let f;l in u.icons?f=t.loaded:a===""||u.missing.has(l)?f=t.missing:f=t.pending;const h={provider:i,prefix:a,name:l};f.push(h)}),t}function ss(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Ma(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const a=i.icons,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:r,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||ss([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let $a=0;function Na(e,t,n){const r=$a++,o=ss.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),o}function za(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?Re(o,t,n):o;i&&r.push(i)}),r}var Ua={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ha(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let v=e.resources.slice(0);for(a=[];v.length>1;){const I=Math.floor(Math.random()*v.length);a.push(v[I]),v=v.slice(0,I).concat(v.slice(I+1))}a=a.concat(v)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,f,h=null,p=[],y=[];typeof r=="function"&&y.push(r);function S(){h&&(clearTimeout(h),h=null)}function b(){c==="pending"&&(c="aborted"),S(),p.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),p=[]}function k(v,I){I&&(y=[]),typeof v=="function"&&y.push(v)}function d(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:k,abort:b}}function g(){c="failed",y.forEach(v=>{v(void 0,f)})}function x(){p.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),p=[]}function P(v,I,C){const T=I!=="success";switch(p=p.filter(m=>m!==v),c){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){f=C,g();return}if(T){f=C,p.length||(a.length?L():g());return}if(S(),x(),!e.random){const m=e.resources.indexOf(v.resource);m!==-1&&m!==e.index&&(e.index=m)}c="completed",y.forEach(m=>{m(C)})}function L(){if(c!=="pending")return;S();const v=a.shift();if(v===void 0){if(p.length){h=setTimeout(()=>{S(),c==="pending"&&(x(),g())},e.timeout);return}g();return}const I={status:"pending",resource:v,callback:(C,T)=>{P(I,C,T)}};p.push(I),u++,h=setTimeout(L,e.rotate),n(v,t,I.callback)}return setTimeout(L),d}function os(e){const t={...Ua,...e};let n=[];function r(){n=n.filter(l=>l().status==="pending")}function o(l,c,u){const f=Ha(t,l,c,(h,p)=>{r(),u&&u(h,p)});return n.push(f),f}function i(l){return n.find(c=>l(c))||null}return{query:o,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:r}}function Kn(){}const _t=Object.create(null);function Ba(e){if(!_t[e]){const t=ht(e);if(!t)return;const n=os(t),r={config:t,redundancy:n};_t[e]=r}return _t[e]}function is(e,t,n){let r,o;if(typeof e=="string"){const i=$t(e);if(!i)return n(void 0,424),Kn;o=i.send;const a=Ba(e);a&&(r=a.redundancy)}else{const i=vn(e);if(i){r=os(i);const a=e.resources?e.resources[0]:"",l=$t(a);l&&(o=l.send)}}return!r||!o?(n(void 0,424),Kn):r.query(t,o,n)().abort}function qa(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in xe)Yr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Fa(e,t){gn||es();function n(r){let o;if(!xe[r]||!(o=Xr(r)))return;const i=Qr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Ot(o),!At(o,a+1))return;const l={cached:Math.floor(Date.now()/Jr),provider:e.provider,data:t};return xn(o,Me+a.toString(),JSON.stringify(l))}t.lastModified&&!qa(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 Va(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ma(e)}))}function Wa(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=$t(n)))return;i.prepare(n,r,o).forEach(l=>{is(n,l,c=>{if(typeof c!="object")l.icons.forEach(u=>{e.missing.add(u)});else try{const u=mn(e,c);if(!u.length)return;const f=e.pendingIcons;f&&u.forEach(h=>{f.delete(h)}),Fa(e,c)}catch(u){console.error(u)}Va(e)})})}))}const Ka=e=>{const n=oe(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},yn=(e,t)=>{const n=za(e,!0,pa()),r=Oa(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Gn)}),()=>{c=!1}}const o=Object.create(null),i=[];let a,l;return r.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===l&&u===a)return;a=u,l=f,i.push(oe(u,f));const h=o[u]||(o[u]=Object.create(null));h[f]||(h[f]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:f,name:h}=c,p=oe(u,f),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(h)||(y.add(h),o[u][f].push(h))}),i.forEach(c=>{const{provider:u,prefix:f}=c;o[u][f].length&&Wa(c,o[u][f])}),t?Na(t,r,i):Gn},Ga=e=>new Promise((t,n)=>{const r=typeof e=="string"?Re(e,!0):e;if(!r){n(e);return}yn([r||e],o=>{if(o.length&&r){const i=Ne(r);if(i){t({...$e,...i});return}}n(e)})});function as(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Wr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const gt={...Kr,inline:!1},Ct="iconify",Nt="iconify-inline",de="iconifyData"+Date.now();let je=[];function ze(e){for(let t=0;t<je.length;t++){const n=je[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function cs(e,t=!1){let n=ze(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},je.push(n),n)}function Qa(){if(document.documentElement)return cs(document.documentElement);je.push({node:()=>document.documentElement})}function Za(e){je=je.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ue(){return je}function Ja(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Pe=null;const Xa={childList:!0,subtree:!0,attributes:!0};function ls(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Pe&&Pe(e)}))}function Ya(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[de]!==void 0){n.paused||ls(e);return}}}function us(e,t){e.observer.instance.observe(t,Xa)}function lt(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(Ya.bind(null,e)),us(e,n),t.paused||ls(e))}function Qn(){Ue().forEach(lt)}function ds(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function ec(e){const t=Pe!==null;if(Pe!==e&&(Pe=e,t&&Ue().forEach(ds)),t){Qn();return}Ja(Qn)}function zt(e){(e?[e]:Ue()).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 tc(e){if(e){const t=ze(e);t&&zt(t)}else zt()}function Ut(e){(e?[e]:Ue()).forEach(t=>{if(!t.observer){lt(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?us(t,r):lt(t);else return}})}function nc(e){if(e){const t=ze(e);t&&Ut(t)}else Ut()}function fs(e,t=!1){const n=cs(e,t);return lt(n),n}function ps(e){const t=ze(e);t&&(ds(t),Za(e))}function rc(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in gt)if(n[o]!==r[o])return!0;return!1}function sc(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const oc=/[\s,]+/;function ic(e,t){t.split(oc).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ac=["width","height"],cc=["inline","hFlip","vFlip"];function lc(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function uc(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&Re(t,!0);if(!n)return null;const r={...gt,inline:e.classList&&e.classList.contains(Nt)};ac.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(r[l]=c)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=sc(o));const i=e.getAttribute("data-flip");typeof i=="string"&&ic(r,i),cc.forEach(l=>{const c="data-"+l,u=lc(e.getAttribute(c),c);typeof u=="boolean"&&(r[l]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const dc="svg."+Ct+", i."+Ct+", span."+Ct+", i."+Nt+", span."+Nt;function fc(e){const t=[];return e.querySelectorAll(dc).forEach(n=>{const r=n[de]||n.tagName.toLowerCase()!=="svg"?uc(n):null;r&&t.push({node:n,props:r})}),t}function ms(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Le;function pc(){try{Le=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Le=null}}function mc(e){return Le===void 0&&pc(),Le?Le.createHTML(e):e}function hs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function gs(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(l=>{o.add(l)})}const i=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&i.push(a):(o.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),i}function xs(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function vs(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=pt(n,o),a=e[de],l=ms(Gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=mc(l);const c=r.childNodes[0],u=e.attributes;for(let S=0;S<u.length;S++){const b=u.item(S),k=b.name;k!=="class"&&!c.hasAttribute(k)&&c.setAttribute(k,b.value)}const f=hs(t.icon),h=gs(c,f,new Set(a&&a.addedClasses),e),p=xs(c,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),y={...t,status:"loaded",addedClasses:h,addedStyles:p};return c[de]=y,e.parentNode&&e.parentNode.replaceChild(c,e),c}function hc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function gc(e){return"data:image/svg+xml,"+hc(e)}function xc(e){return'url("'+gc(e)+'")'}const vc={display:"inline-block"},Ht={"background-color":"currentColor"},ys={"background-color":"transparent"},Zn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Jn={"-webkit-mask":Ht,mask:Ht,background:ys};for(const e in Jn){const t=Jn[e];for(const n in Zn)t[e+"-"+n]=Zn[n]}function Xn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yc(e,t,n,r){const o=t.customisations,i=pt(n,o),a=i.attributes,l=e[de],c=ms(i.body,{...a,width:n.width+"",height:n.height+""}),u=hs(t.icon),f=gs(e,u,new Set(l&&l.addedClasses)),p={"--svg":xc(c),width:Xn(a.width),height:Xn(a.height),...vc,...r?Ht:ys};o.inline&&(p["vertical-align"]="-0.125em");const y=xs(e,p,l&&l.addedStyles),S={...t,status:"loaded",addedClasses:f,addedStyles:y};return e[de]=S,e}let Qe=!1;function bc(){Qe||(Qe=!0,setTimeout(()=>{Qe&&(Qe=!1,Ce())}))}function Ce(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:a,prefix:l,name:c}=o,u=oe(a,l),f=u.icons[c];if(f)return{status:"loaded",icon:f};if(u.missing.has(c))return{status:"missing"};if(i&&!Ka(o)){const h=n[a]||(n[a]=Object.create(null));(h[l]||(h[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:Ue()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(u,f,h){if(l||(l=!0,zt(o)),u.tagName.toUpperCase()!=="SVG"){const p=f.mode,y=p==="mask"||(p==="bg"?!1:p==="style"?h.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){yc(u,f,{...$e,...h},y);return}}vs(u,f,h)}fc(i).forEach(({node:u,props:f})=>{const h=u[de];if(!h){const{status:y,icon:S}=r(f.icon,!0);if(S){c(u,f,S);return}a=a||y==="loading",u[de]={...f,status:y};return}let p;if(rc(h,f)){if(p=r(f.icon,h.name!==f.name),!p.icon){a=a||p.status==="loading",Object.assign(h,{...f,status:p.status});return}}else{if(h.status!=="loading")return;if(p=r(f.icon,!1),!p.icon){h.status=p.status;return}}c(u,f,p.icon)}),o.temporary&&!a?ps(i):t&&a?fs(i,!0):l&&o.observer&&Ut(o)});for(const o in n){const i=n[o];for(const a in i){const l=i[a];yn(Array.from(l).map(c=>({provider:o,prefix:a,name:c})),bc)}}}function jc(e){const t=ze(e);t?Ce(t):Ce({node:e,temporary:!0},!0)}function bs(e,t,n=!1){const r=Ne(e);if(!r)return null;const o=Re(e),i=as(gt,t||{}),a=vs(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?a.outerHTML:a}function wc(){return"3.1.1"}function Sc(e,t){return bs(e,t,!1)}function _c(e,t){return bs(e,t,!0)}function Cc(e,t){const n=Ne(e);if(!n)return null;const r=as(gt,t||{});return pt(n,r)}function Tc(e){e?jc(e):Ce()}if(typeof document<"u"&&typeof window<"u"){Qa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Vr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ec(Ce),Ce()})}function Ic(e,t){ts(e,t!==!1)}function Rc(e){ts(e,!0)}ns("",Aa);if(typeof document<"u"&&typeof window<"u"){es();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;rs(n,o)||console.error(r)}catch{console.error(r)}}}}const Ec={getAPIConfig:ht,setAPIModule:ns,sendAPIQuery:is,setFetch:Ia,getFetch:Ra,listAPIProviders:Ca},kc={_api:Ec,addAPIProvider:rs,loadIcons:yn,loadIcon:Ga,iconExists:ha,getIcon:ga,listIcons:fa,addIcon:ma,addCollection:Vr,replaceIDs:Gr,calculateSize:Lt,buildIcon:pt,getVersion:wc,renderSVG:Sc,renderHTML:_c,renderIcon:Cc,scan:Tc,observe:fs,stopObserving:ps,pauseObserver:tc,resumeObserver:nc,enableCache:Ic,disableCache:Rc};try{self.Iconify===void 0&&(self.Iconify=kc)}catch{}var bn={},Pc=Z;Object.defineProperty(bn,"__esModule",{value:!0});var js=bn.default=void 0,Lc=Pc(J()),Dc=s;js=bn.default=(0,Lc.default)((0,Dc.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function jn({infos:e}){const{t}=W(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
216
+ */const Fr=Object.freeze({left:0,top:0,width:16,height:16}),it=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$e=Object.freeze({...Fr,...it}),Pt=Object.freeze({...$e,body:"",hidden:!1});function sa(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function qn(e,t){const n=sa(e,t);for(const r in Pt)r in it?r in e&&!(r in n)&&(n[r]=it[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function oa(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=r[a]&&r[a].parent,c=l&&i(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function ia(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function a(l){i=qn(r[l]||o[l],i)}return a(t),n.forEach(a),qn(e,i)}function aa(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=oa(e);for(const o in r){const i=r[o];i&&(t(o,ia(e,o,i)),n.push(o))}return n}const ke=/^[a-z0-9]+(-[a-z0-9]+)*$/,Re=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:r,prefix:c,name:l};return t&&!Ye(u)?null:u}const i=o[0],a=i.split("-");if(a.length>1){const l={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Ye(l)?null:l}if(n&&r===""){const l={provider:r,prefix:"",name:i};return t&&!Ye(l,n)?null:l}return null},Ye=(e,t)=>e?!!((e.provider===""||e.provider.match(ke))&&(t&&e.prefix===""||e.prefix.match(ke))&&e.name.match(ke)):!1,ca={provider:"",aliases:{},not_found:{},...Fr};function St(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function la(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!St(e,ca))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(ke)||typeof i.body!="string"||!St(i,Pt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],a=i.parent;if(!o.match(ke)||typeof a!="string"||!n[a]&&!r[a]||!St(i,Pt))return null}return t}const at=Object.create(null);function ua(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function oe(e,t){const n=at[e]||(at[e]=Object.create(null));return n[t]||(n[t]=ua(e,t))}function mn(e,t){return la(t)?aa(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function da(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function fa(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(at)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(at[o]||{})).forEach(a=>{const l=oe(o,a);n=n.concat(Object.keys(l.icons).map(c=>(o!==""?"@"+o+":":"")+a+":"+c))})}),n}let hn=!1;function pa(e){return hn}function Ne(e){const t=typeof e=="string"?Re(e,!0,hn):e;if(t){const n=oe(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function ma(e,t){const n=Re(e,!0,hn);if(!n)return!1;const r=oe(n.provider,n.prefix);return da(r,n.name,t)}function Vr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Ye({provider:t,prefix:n,name:"a"}))return!1;const r=oe(t,n);return!!mn(r,e)}function ha(e){return!!Ne(e)}function ga(e){const t=Ne(e);return t?{...$e,...t}:null}const Wr=Object.freeze({width:null,height:null}),Kr=Object.freeze({...Wr,...it}),xa=/(-?[0-9.]*[0-9]+[0-9.]*)/g,va=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(xa);if(r===null||!r.length)return e;const o=[];let i=r.shift(),a=va.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?o.push(i):o.push(Math.ceil(l*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");a=!a}}const ya=e=>e==="unset"||e==="undefined"||e==="none";function pt(e,t){const n={...$e,...e},r={...Kr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(S=>{const b=[],k=S.hFlip,d=S.vFlip;let g=S.rotate;k?d?g+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):d&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let x;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:x=o.height/2+o.top,b.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,b.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}g%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),b.length&&(i='<g transform="'+b.join(" ")+'">'+i+"</g>")});const a=r.width,l=r.height,c=o.width,u=o.height;let f,h;a===null?(h=l===null?"1em":l==="auto"?u:l,f=Lt(h,c/u)):(f=a==="auto"?c:a,h=l===null?Lt(f,u/c):l==="auto"?u:l);const p={},y=(S,b)=>{ya(b)||(p[S]=b.toString())};return y("width",f),y("height",h),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:p,body:i}}const ba=/\sid="(\S+)"/g,ja="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let wa=0;function Gr(e,t=ja){const n=[];let r;for(;r=ba.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(wa++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const xe={local:!0,session:!0},Qr={local:new Set,session:new Set};let gn=!1;function Sa(e){gn=e}const Fn="iconify2",Me="iconify",Jr=Me+"-count",Vn=Me+"-version",Zr=36e5,_a=168;function Dt(e,t){try{return e.getItem(t)}catch{}}function xn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Wn(e,t){try{e.removeItem(t)}catch{}}function At(e,t){return xn(e,Jr,t.toString())}function Ot(e){return parseInt(Dt(e,Jr))||0}let Ge=typeof window>"u"?{}:window;function Xr(e){const t=e+"Storage";try{if(Ge&&Ge[t]&&typeof Ge[t].length=="number")return Ge[t]}catch{}xe[e]=!1}function Yr(e,t){const n=Xr(e);if(!n)return;const r=Dt(n,Vn);if(r!==Fn){if(r){const l=Ot(n);for(let c=0;c<l;c++)Wn(n,Me+c.toString())}xn(n,Vn,Fn),At(n,0);return}const o=Math.floor(Date.now()/Zr)-_a,i=l=>{const c=Me+l.toString(),u=Dt(n,c);if(typeof u=="string"){try{const f=JSON.parse(u);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>o&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,l))return!0}catch{}Wn(n,c)}};let a=Ot(n);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,At(n,a)):Qr[e].add(l))}function es(){if(!gn){Sa(!0);for(const e in xe)Yr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=oe(r,o);if(!mn(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function ts(e,t){switch(e){case"local":case"session":xe[e]=t;break;case"all":for(const n in xe)xe[n]=t;break}}const Mt=Object.create(null);function ns(e,t){Mt[e]=t}function $t(e){return Mt[e]||Mt[""]}function vn(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 mt=Object.create(null),Ee=["https://api.simplesvg.com","https://api.unisvg.com"],et=[];for(;Ee.length>0;)Ee.length===1||Math.random()>.5?et.push(Ee.shift()):et.push(Ee.pop());mt[""]=vn({resources:["https://api.iconify.design"].concat(et)});function rs(e,t){const n=vn(t);return n===null?!1:(mt[e]=n,!0)}function ht(e){return mt[e]}function Ca(){return Object.keys(mt)}const Ta=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let ct=Ta();function Ia(e){ct=e}function Ra(){return ct}function Ea(e,t){const n=ht(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function ka(e){return e===404}const Pa=(e,t,n)=>{const r=[],o=Ea(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),r.push(a),r};function La(e){if(typeof e=="string"){const t=ht(e);if(t)return t.path}return"/"}const Da=(e,t,n)=>{if(!ct){n("abort",424);return}let r=La(t.provider);switch(t.type){case"icons":{const i=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});r+=i+".json?"+c.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;ct(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(ka(a)?"abort":"next",a)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},Aa={prepare:Pa,send:Da};function Oa(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,a=o.prefix,l=o.name,c=n[i]||(n[i]=Object.create(null)),u=c[a]||(c[a]=oe(i,a));let f;l in u.icons?f=t.loaded:a===""||u.missing.has(l)?f=t.missing:f=t.pending;const h={provider:i,prefix:a,name:l};f.push(h)}),t}function ss(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Ma(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const a=i.icons,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:r,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||ss([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let $a=0;function Na(e,t,n){const r=$a++,o=ss.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),o}function za(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?Re(o,t,n):o;i&&r.push(i)}),r}var Ua={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ha(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let v=e.resources.slice(0);for(a=[];v.length>1;){const I=Math.floor(Math.random()*v.length);a.push(v[I]),v=v.slice(0,I).concat(v.slice(I+1))}a=a.concat(v)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",u=0,f,h=null,p=[],y=[];typeof r=="function"&&y.push(r);function S(){h&&(clearTimeout(h),h=null)}function b(){c==="pending"&&(c="aborted"),S(),p.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),p=[]}function k(v,I){I&&(y=[]),typeof v=="function"&&y.push(v)}function d(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:p.length,subscribe:k,abort:b}}function g(){c="failed",y.forEach(v=>{v(void 0,f)})}function x(){p.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),p=[]}function P(v,I,C){const T=I!=="success";switch(p=p.filter(m=>m!==v),c){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){f=C,g();return}if(T){f=C,p.length||(a.length?L():g());return}if(S(),x(),!e.random){const m=e.resources.indexOf(v.resource);m!==-1&&m!==e.index&&(e.index=m)}c="completed",y.forEach(m=>{m(C)})}function L(){if(c!=="pending")return;S();const v=a.shift();if(v===void 0){if(p.length){h=setTimeout(()=>{S(),c==="pending"&&(x(),g())},e.timeout);return}g();return}const I={status:"pending",resource:v,callback:(C,T)=>{P(I,C,T)}};p.push(I),u++,h=setTimeout(L,e.rotate),n(v,t,I.callback)}return setTimeout(L),d}function os(e){const t={...Ua,...e};let n=[];function r(){n=n.filter(l=>l().status==="pending")}function o(l,c,u){const f=Ha(t,l,c,(h,p)=>{r(),u&&u(h,p)});return n.push(f),f}function i(l){return n.find(c=>l(c))||null}return{query:o,find:i,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:r}}function Kn(){}const _t=Object.create(null);function Ba(e){if(!_t[e]){const t=ht(e);if(!t)return;const n=os(t),r={config:t,redundancy:n};_t[e]=r}return _t[e]}function is(e,t,n){let r,o;if(typeof e=="string"){const i=$t(e);if(!i)return n(void 0,424),Kn;o=i.send;const a=Ba(e);a&&(r=a.redundancy)}else{const i=vn(e);if(i){r=os(i);const a=e.resources?e.resources[0]:"",l=$t(a);l&&(o=l.send)}}return!r||!o?(n(void 0,424),Kn):r.query(t,o,n)().abort}function qa(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in xe)Yr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Fa(e,t){gn||es();function n(r){let o;if(!xe[r]||!(o=Xr(r)))return;const i=Qr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Ot(o),!At(o,a+1))return;const l={cached:Math.floor(Date.now()/Zr),provider:e.provider,data:t};return xn(o,Me+a.toString(),JSON.stringify(l))}t.lastModified&&!qa(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 Va(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ma(e)}))}function Wa(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=$t(n)))return;i.prepare(n,r,o).forEach(l=>{is(n,l,c=>{if(typeof c!="object")l.icons.forEach(u=>{e.missing.add(u)});else try{const u=mn(e,c);if(!u.length)return;const f=e.pendingIcons;f&&u.forEach(h=>{f.delete(h)}),Fa(e,c)}catch(u){console.error(u)}Va(e)})})}))}const Ka=e=>{const n=oe(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},yn=(e,t)=>{const n=za(e,!0,pa()),r=Oa(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Gn)}),()=>{c=!1}}const o=Object.create(null),i=[];let a,l;return r.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===l&&u===a)return;a=u,l=f,i.push(oe(u,f));const h=o[u]||(o[u]=Object.create(null));h[f]||(h[f]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:f,name:h}=c,p=oe(u,f),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(h)||(y.add(h),o[u][f].push(h))}),i.forEach(c=>{const{provider:u,prefix:f}=c;o[u][f].length&&Wa(c,o[u][f])}),t?Na(t,r,i):Gn},Ga=e=>new Promise((t,n)=>{const r=typeof e=="string"?Re(e,!0):e;if(!r){n(e);return}yn([r||e],o=>{if(o.length&&r){const i=Ne(r);if(i){t({...$e,...i});return}}n(e)})});function as(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Wr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const gt={...Kr,inline:!1},Ct="iconify",Nt="iconify-inline",de="iconifyData"+Date.now();let je=[];function ze(e){for(let t=0;t<je.length;t++){const n=je[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function cs(e,t=!1){let n=ze(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},je.push(n),n)}function Qa(){if(document.documentElement)return cs(document.documentElement);je.push({node:()=>document.documentElement})}function Ja(e){je=je.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ue(){return je}function Za(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Pe=null;const Xa={childList:!0,subtree:!0,attributes:!0};function ls(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Pe&&Pe(e)}))}function Ya(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[de]!==void 0){n.paused||ls(e);return}}}function us(e,t){e.observer.instance.observe(t,Xa)}function lt(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(Ya.bind(null,e)),us(e,n),t.paused||ls(e))}function Qn(){Ue().forEach(lt)}function ds(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function ec(e){const t=Pe!==null;if(Pe!==e&&(Pe=e,t&&Ue().forEach(ds)),t){Qn();return}Za(Qn)}function zt(e){(e?[e]:Ue()).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 tc(e){if(e){const t=ze(e);t&&zt(t)}else zt()}function Ut(e){(e?[e]:Ue()).forEach(t=>{if(!t.observer){lt(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?us(t,r):lt(t);else return}})}function nc(e){if(e){const t=ze(e);t&&Ut(t)}else Ut()}function fs(e,t=!1){const n=cs(e,t);return lt(n),n}function ps(e){const t=ze(e);t&&(ds(t),Ja(e))}function rc(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in gt)if(n[o]!==r[o])return!0;return!1}function sc(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const oc=/[\s,]+/;function ic(e,t){t.split(oc).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ac=["width","height"],cc=["inline","hFlip","vFlip"];function lc(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function uc(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&Re(t,!0);if(!n)return null;const r={...gt,inline:e.classList&&e.classList.contains(Nt)};ac.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(r[l]=c)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=sc(o));const i=e.getAttribute("data-flip");typeof i=="string"&&ic(r,i),cc.forEach(l=>{const c="data-"+l,u=lc(e.getAttribute(c),c);typeof u=="boolean"&&(r[l]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const dc="svg."+Ct+", i."+Ct+", span."+Ct+", i."+Nt+", span."+Nt;function fc(e){const t=[];return e.querySelectorAll(dc).forEach(n=>{const r=n[de]||n.tagName.toLowerCase()!=="svg"?uc(n):null;r&&t.push({node:n,props:r})}),t}function ms(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Le;function pc(){try{Le=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Le=null}}function mc(e){return Le===void 0&&pc(),Le?Le.createHTML(e):e}function hs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function gs(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(l=>{o.add(l)})}const i=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&i.push(a):(o.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),i}function xs(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function vs(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=pt(n,o),a=e[de],l=ms(Gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=mc(l);const c=r.childNodes[0],u=e.attributes;for(let S=0;S<u.length;S++){const b=u.item(S),k=b.name;k!=="class"&&!c.hasAttribute(k)&&c.setAttribute(k,b.value)}const f=hs(t.icon),h=gs(c,f,new Set(a&&a.addedClasses),e),p=xs(c,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),y={...t,status:"loaded",addedClasses:h,addedStyles:p};return c[de]=y,e.parentNode&&e.parentNode.replaceChild(c,e),c}function hc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function gc(e){return"data:image/svg+xml,"+hc(e)}function xc(e){return'url("'+gc(e)+'")'}const vc={display:"inline-block"},Ht={"background-color":"currentColor"},ys={"background-color":"transparent"},Jn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Zn={"-webkit-mask":Ht,mask:Ht,background:ys};for(const e in Zn){const t=Zn[e];for(const n in Jn)t[e+"-"+n]=Jn[n]}function Xn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yc(e,t,n,r){const o=t.customisations,i=pt(n,o),a=i.attributes,l=e[de],c=ms(i.body,{...a,width:n.width+"",height:n.height+""}),u=hs(t.icon),f=gs(e,u,new Set(l&&l.addedClasses)),p={"--svg":xc(c),width:Xn(a.width),height:Xn(a.height),...vc,...r?Ht:ys};o.inline&&(p["vertical-align"]="-0.125em");const y=xs(e,p,l&&l.addedStyles),S={...t,status:"loaded",addedClasses:f,addedStyles:y};return e[de]=S,e}let Qe=!1;function bc(){Qe||(Qe=!0,setTimeout(()=>{Qe&&(Qe=!1,Ce())}))}function Ce(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:a,prefix:l,name:c}=o,u=oe(a,l),f=u.icons[c];if(f)return{status:"loaded",icon:f};if(u.missing.has(c))return{status:"missing"};if(i&&!Ka(o)){const h=n[a]||(n[a]=Object.create(null));(h[l]||(h[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:Ue()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(u,f,h){if(l||(l=!0,zt(o)),u.tagName.toUpperCase()!=="SVG"){const p=f.mode,y=p==="mask"||(p==="bg"?!1:p==="style"?h.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){yc(u,f,{...$e,...h},y);return}}vs(u,f,h)}fc(i).forEach(({node:u,props:f})=>{const h=u[de];if(!h){const{status:y,icon:S}=r(f.icon,!0);if(S){c(u,f,S);return}a=a||y==="loading",u[de]={...f,status:y};return}let p;if(rc(h,f)){if(p=r(f.icon,h.name!==f.name),!p.icon){a=a||p.status==="loading",Object.assign(h,{...f,status:p.status});return}}else{if(h.status!=="loading")return;if(p=r(f.icon,!1),!p.icon){h.status=p.status;return}}c(u,f,p.icon)}),o.temporary&&!a?ps(i):t&&a?fs(i,!0):l&&o.observer&&Ut(o)});for(const o in n){const i=n[o];for(const a in i){const l=i[a];yn(Array.from(l).map(c=>({provider:o,prefix:a,name:c})),bc)}}}function jc(e){const t=ze(e);t?Ce(t):Ce({node:e,temporary:!0},!0)}function bs(e,t,n=!1){const r=Ne(e);if(!r)return null;const o=Re(e),i=as(gt,t||{}),a=vs(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?a.outerHTML:a}function wc(){return"3.1.1"}function Sc(e,t){return bs(e,t,!1)}function _c(e,t){return bs(e,t,!0)}function Cc(e,t){const n=Ne(e);if(!n)return null;const r=as(gt,t||{});return pt(n,r)}function Tc(e){e?jc(e):Ce()}if(typeof document<"u"&&typeof window<"u"){Qa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Vr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ec(Ce),Ce()})}function Ic(e,t){ts(e,t!==!1)}function Rc(e){ts(e,!0)}ns("",Aa);if(typeof document<"u"&&typeof window<"u"){es();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;rs(n,o)||console.error(r)}catch{console.error(r)}}}}const Ec={getAPIConfig:ht,setAPIModule:ns,sendAPIQuery:is,setFetch:Ia,getFetch:Ra,listAPIProviders:Ca},kc={_api:Ec,addAPIProvider:rs,loadIcons:yn,loadIcon:Ga,iconExists:ha,getIcon:ga,listIcons:fa,addIcon:ma,addCollection:Vr,replaceIDs:Gr,calculateSize:Lt,buildIcon:pt,getVersion:wc,renderSVG:Sc,renderHTML:_c,renderIcon:Cc,scan:Tc,observe:fs,stopObserving:ps,pauseObserver:tc,resumeObserver:nc,enableCache:Ic,disableCache:Rc};try{self.Iconify===void 0&&(self.Iconify=kc)}catch{}var bn={},Pc=J;Object.defineProperty(bn,"__esModule",{value:!0});var js=bn.default=void 0,Lc=Pc(Z()),Dc=s;js=bn.default=(0,Lc.default)((0,Dc.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function jn({infos:e}){const{t}=W(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
217
217
  `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
218
218
 
219
219
 
@@ -223,7 +223,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
223
223
  ${r}
224
224
  * Page: ${window.location.href}
225
225
  -->
226
- `),O(E,{sx:{mx:{xs:0,md:2}},children:O(Ft,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}jn.propTypes={infos:j.arrayOf(j.shape({label:j.string,value:j.string}))};jn.defaultProps={infos:[]};var wn={},Ac=Z;Object.defineProperty(wn,"__esModule",{value:!0});var Bt=wn.default=void 0,Oc=Ac(J()),Yn=s;Bt=wn.default=(0,Oc.default)([(0,Yn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Yn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function le({children:e}){return se(n=>n.breakpoints.down("md"))?s.jsx(Ae,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:s.jsx(E,{sx:{display:"flex",alignItems:"center",gap:1},children:s.jsx(Bt,{fontSize:"small"})})}):s.jsxs(E,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(Bt,{fontSize:"small"}),e]})}le.propTypes={children:j.node.isRequired};const Mc="https://launcher.arcblock.io/",$c=30*24*60*60*1e3;function Sn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var L,v,I,C,T,m;const{t:i,locale:a}=W(),l=Te(),[c,u]=Sr({safeIframeRef:null,popoverAnchorEl:null}),f=w.useRef(null),h=se(_=>_.breakpoints.down("md")),{sx:p={},...y}=o,S=h?"mobile":"desktop",b=wr(async()=>{const[_,A]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),gr({launcherUrl:e||Mc,nftDid:n,launcherSessionId:r,locale:a})]);if(_!=null&&_.error)throw new Error(_.error);return{launcherSession:_.launcherSession,subscriptionURL:A}},[a]);if(b.loading)return s.jsx(he,{label:s.jsxs(le,{children:[!h&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(b.error)return console.error(b.error),s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>b.retry()});const k=_=>{u({popoverAnchorEl:_.currentTarget})},d=()=>{u({popoverAnchorEl:null})},g=(L=b.value)==null?void 0:L.launcherSession;let x="success";[z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((I=(v=b.value)==null?void 0:v.launcherSession)==null?void 0:I.status)&&(x="error");let P=null;if(g.expirationDate&&!g.subscription){const _=_e(g.expirationDate).diff(_e(),"ms");P=i(`expiration.${S}.tips.${x}`,{validity:jr(_,{locale:xr(a),compact:!0,verbose:!0})}),_>0&&_<=$c&&(x="warning")}return s.jsxs(s.Fragment,{children:[s.jsx(he,{label:s.jsx(le,{children:P||((T=(C=g==null?void 0:g.subscription)==null?void 0:C.product)==null?void 0:T.name)||i("common.subscription")}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:k}),s.jsx(cr,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(m=b.value)==null?void 0:m.subscriptionURL})})})]})}Sn.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};Sn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Nc=30*24*60*60*1e3,zc="https://launcher.arcblock.io/";function _n({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var v,I,C,T,m,_,A;const{t:i,locale:a}=W(),[l,c]=Sr({safeIframeRef:null,popoverAnchorEl:null}),u=w.useRef(null),f=se(D=>D.breakpoints.down("md")),h=Te(),{sx:p={},...y}=o,S=f?"mobile":"desktop",b=wr(async()=>{const[D,B]=await Promise.all([h.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),gr({launcherUrl:e||zc,nftDid:n,launcherSessionId:r,locale:a})]);if(D!=null&&D.error)throw new Error(D.error);return{launcherSession:D.launcherSession,subscriptionURL:B}},[a]);if(b.loading)return s.jsx(he,{label:s.jsxs(le,{children:[!f&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(b.error)return console.error(b.error),s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>b.retry()});const k=(I=(v=b.value)==null?void 0:v.launcherSession)==null?void 0:I.expirationDate,d=_e(k).isBefore(_e()),g=_e(k).diff(_e(),"ms");let x="success";g<=Nc&&(x="warning"),d&&(x="error");const P=D=>{c({popoverAnchorEl:D.currentTarget})},L=()=>{c({popoverAnchorEl:null})};return s.jsxs(s.Fragment,{children:[((T=(C=b.value)==null?void 0:C.launcherSession)==null?void 0:T.subscription)&&s.jsx(he,{label:s.jsx(le,{children:i("expiration.desktop.nextInvoice",{date:bo(k,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),!((_=(m=b.value)==null?void 0:m.launcherSession)!=null&&_.subscription)&&s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.tips.${x}`,{validity:jr(g,{locale:xr(a),compact:!0,verbose:!0})})}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),s.jsx(cr,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(A=b.value)==null?void 0:A.subscriptionURL})})})]})}_n.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};_n.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Cn={},Uc=Z;Object.defineProperty(Cn,"__esModule",{value:!0});var ws=Cn.default=void 0,Hc=Uc(J()),Bc=s;ws=Cn.default=(0,Hc.default)((0,Bc.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Tn={},qc=Z;Object.defineProperty(Tn,"__esModule",{value:!0});var Ss=Tn.default=void 0,Fc=qc(J()),Vc=s;Ss=Tn.default=(0,Fc.default)((0,Vc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const Wc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function In({children:e,style:t,...n}){return s.jsx(uo,{style:t,...n,children:e})}In.propTypes={children:j.any.isRequired,style:j.object};In.defaultProps={style:{}};const U={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},tt={added:U.grey,waiting:U.yellow,downloading:U.yellow,extracting:U.yellow,downloaded:U.grey,installing:U.yellow,installed:U.grey,starting:U.yellow,running:U.running,stopping:U.yellow,stopped:U.reverse,error:U.error,upgrading:U.yellow,restarting:U.yellow,corrupted:U.error,deleting:U.yellow,resource:U.primary},Kc={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 _s({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:a}=w.useContext(ft),l=F.isInProgress(t),c=e&&t==="stopped"?"resource":t,u=a(`blocklet.status.${c}`);return n==="pin"?s.jsx(Ae,{title:a("blocklet.statusTip",{status:u}),children:s.jsxs(E,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[s.jsx(E,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:tt[c],style:{opacity:.15}}),s.jsx(E,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:tt[c]})]})}):n==="dot"?s.jsx(Ae,{title:a("blocklet.statusTip",{status:u}),children:s.jsx(Ko,{color:tt[c],...i})}):s.jsxs(In,{type:Kc[c],...i,children:[l&&s.jsx(ue,{size:12,color:"inherit",style:{marginRight:5}}),u,c==="downloading"&&o?s.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}_s.propTypes={status:j.string.isRequired,variant:j.oneOf(["dot","tag","pin"]),source:j.string,progress:j.number,isResource:j.bool};_s.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Gc(){const{inFullPage:e,toggleFullPage:t}=$s();return O(ut,{onClick:t,children:e?O(Ss,{sx:{transform:"scale(1.3)"}}):O(ws,{sx:{transform:"scale(1.3)"}})})}function Rn({children:e}){var k;const{t}=W(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:a}=Ie(),{info:l}=jo(),c=to(),u=se(d=>d.breakpoints.down("md")),{appId:f,version:h}=i,p=[{label:"App ID",value:f},{label:"App Version",value:h},{label:"App Bundle Name",value:(k=a==null?void 0:a.meta)==null?void 0:k.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],y=d=>{var x,P,L,v;const g=Array.isArray(d)?d:[d];if(u||g.unshift(O(Gc,{})),a){const I={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};wo(a)?g.unshift(O(Sn,{chainHost:(x=a==null?void 0:a.controller)==null?void 0:x.chainHost,nftId:(P=a==null?void 0:a.controller)==null?void 0:P.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(v=a==null?void 0:a.controller)==null?void 0:v.launcherUrl,sx:I})):l.ownerNft&&l.launcher&&g.unshift(O(_n,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:I}))}return g},S=Vo({blocklet:a}),b={logo:S?O("img",{src:S,alt:"logo"}):null,brandAddon:O(E,{children:a&&Ke(E,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[O(Ae,{title:F.isRunning(a==null?void 0:a.status)?void 0:t(`blocklet.status.${a==null?void 0:a.status}`),children:O(E,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:tt[a==null?void 0:a.status]})}),O(E,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.getDisplayName(a)}),O(E,{component:fo,icon:Wc,sx:{color:"text.secondary"}})]})})};return Ke(Qc,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:b,footerProps:{addon:O(jn,{infos:p})},children:[!a&&n&&O(st,{relative:"parent",children:O(ue,{})}),!a&&r&&Ke(st,{relative:"parent",children:[Ke(E,{display:"flex",alignItems:"center",children:[O(js,{color:"error",sx:{marginRight:1}}),Gt(r)]}),O(ve,{onClick:()=>o(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(E,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(po,{FallbackComponent:Ms,resetKeys:[c.pathname],children:e})})]})}Rn.propTypes={children:j.any};Rn.defaultProps={children:null};const Qc=V(Os)`
226
+ `),O(E,{sx:{mx:{xs:0,md:2}},children:O(Ft,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}jn.propTypes={infos:j.arrayOf(j.shape({label:j.string,value:j.string}))};jn.defaultProps={infos:[]};var wn={},Ac=J;Object.defineProperty(wn,"__esModule",{value:!0});var Bt=wn.default=void 0,Oc=Ac(Z()),Yn=s;Bt=wn.default=(0,Oc.default)([(0,Yn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Yn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function le({children:e}){return se(n=>n.breakpoints.down("md"))?s.jsx(Ae,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:s.jsx(E,{sx:{display:"flex",alignItems:"center",gap:1},children:s.jsx(Bt,{fontSize:"small"})})}):s.jsxs(E,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(Bt,{fontSize:"small"}),e]})}le.propTypes={children:j.node.isRequired};const Mc="https://launcher.arcblock.io/",$c=30*24*60*60*1e3;function Sn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var L,v,I,C,T,m;const{t:i,locale:a}=W(),l=Te(),[c,u]=Sr({safeIframeRef:null,popoverAnchorEl:null}),f=w.useRef(null),h=se(_=>_.breakpoints.down("md")),{sx:p={},...y}=o,S=h?"mobile":"desktop",b=wr(async()=>{const[_,A]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),gr({launcherUrl:e||Mc,nftDid:n,launcherSessionId:r,locale:a})]);if(_!=null&&_.error)throw new Error(_.error);return{launcherSession:_.launcherSession,subscriptionURL:A}},[a]);if(b.loading)return s.jsx(he,{label:s.jsxs(le,{children:[!h&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(b.error)return console.error(b.error),s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>b.retry()});const k=_=>{u({popoverAnchorEl:_.currentTarget})},d=()=>{u({popoverAnchorEl:null})},g=(L=b.value)==null?void 0:L.launcherSession;let x="success";[z.LAUNCH_SESSION_STATUS.overdue,z.LAUNCH_SESSION_STATUS.canceled,z.LAUNCH_SESSION_STATUS.terminated].includes((I=(v=b.value)==null?void 0:v.launcherSession)==null?void 0:I.status)&&(x="error");let P=null;if(g.expirationDate&&!g.subscription){const _=_e(g.expirationDate).diff(_e(),"ms");P=i(`expiration.${S}.tips.${x}`,{validity:jr(_,{locale:xr(a),compact:!0,verbose:!0})}),_>0&&_<=$c&&(x="warning")}return s.jsxs(s.Fragment,{children:[s.jsx(he,{label:s.jsx(le,{children:P||((T=(C=g==null?void 0:g.subscription)==null?void 0:C.product)==null?void 0:T.name)||i("common.subscription")}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:k}),s.jsx(cr,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(m=b.value)==null?void 0:m.subscriptionURL})})})]})}Sn.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};Sn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Nc=30*24*60*60*1e3,zc="https://launcher.arcblock.io/";function _n({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var v,I,C,T,m,_,A;const{t:i,locale:a}=W(),[l,c]=Sr({safeIframeRef:null,popoverAnchorEl:null}),u=w.useRef(null),f=se(D=>D.breakpoints.down("md")),h=Te(),{sx:p={},...y}=o,S=f?"mobile":"desktop",b=wr(async()=>{const[D,B]=await Promise.all([h.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),gr({launcherUrl:e||zc,nftDid:n,launcherSessionId:r,locale:a})]);if(D!=null&&D.error)throw new Error(D.error);return{launcherSession:D.launcherSession,subscriptionURL:B}},[a]);if(b.loading)return s.jsx(he,{label:s.jsxs(le,{children:[!f&&i("expiration.desktop.loading"),s.jsx(ue,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(b.error)return console.error(b.error),s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>b.retry()});const k=(I=(v=b.value)==null?void 0:v.launcherSession)==null?void 0:I.expirationDate,d=_e(k).isBefore(_e()),g=_e(k).diff(_e(),"ms");let x="success";g<=Nc&&(x="warning"),d&&(x="error");const P=D=>{c({popoverAnchorEl:D.currentTarget})},L=()=>{c({popoverAnchorEl:null})};return s.jsxs(s.Fragment,{children:[((T=(C=b.value)==null?void 0:C.launcherSession)==null?void 0:T.subscription)&&s.jsx(he,{label:s.jsx(le,{children:i("expiration.desktop.nextInvoice",{date:jo(k,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),!((_=(m=b.value)==null?void 0:m.launcherSession)!=null&&_.subscription)&&s.jsx(he,{label:s.jsx(le,{children:i(`expiration.${S}.tips.${x}`,{validity:jr(g,{locale:xr(a),compact:!0,verbose:!0})})}),color:x,variant:x!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),s.jsx(cr,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(A=b.value)==null?void 0:A.subscriptionURL})})})]})}_n.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};_n.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Cn={},Uc=J;Object.defineProperty(Cn,"__esModule",{value:!0});var ws=Cn.default=void 0,Hc=Uc(Z()),Bc=s;ws=Cn.default=(0,Hc.default)((0,Bc.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Tn={},qc=J;Object.defineProperty(Tn,"__esModule",{value:!0});var Ss=Tn.default=void 0,Fc=qc(Z()),Vc=s;Ss=Tn.default=(0,Fc.default)((0,Vc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const Wc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function In({children:e,style:t,...n}){return s.jsx(fo,{style:t,...n,children:e})}In.propTypes={children:j.any.isRequired,style:j.object};In.defaultProps={style:{}};const U={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},tt={added:U.grey,waiting:U.yellow,downloading:U.yellow,extracting:U.yellow,downloaded:U.grey,installing:U.yellow,installed:U.grey,starting:U.yellow,running:U.running,stopping:U.yellow,stopped:U.reverse,error:U.error,upgrading:U.yellow,restarting:U.yellow,corrupted:U.error,deleting:U.yellow,resource:U.primary},Kc={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 _s({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:a}=w.useContext(ft),l=F.isInProgress(t),c=e&&t==="stopped"?"resource":t,u=a(`blocklet.status.${c}`);return n==="pin"?s.jsx(Ae,{title:a("blocklet.statusTip",{status:u}),children:s.jsxs(E,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[s.jsx(E,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:tt[c],style:{opacity:.15}}),s.jsx(E,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:tt[c]})]})}):n==="dot"?s.jsx(Ae,{title:a("blocklet.statusTip",{status:u}),children:s.jsx(Ko,{color:tt[c],...i})}):s.jsxs(In,{type:Kc[c],...i,children:[l&&s.jsx(ue,{size:12,color:"inherit",style:{marginRight:5}}),u,c==="downloading"&&o?s.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}_s.propTypes={status:j.string.isRequired,variant:j.oneOf(["dot","tag","pin"]),source:j.string,progress:j.number,isResource:j.bool};_s.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Gc(){const{inFullPage:e,toggleFullPage:t}=$s();return O(ut,{onClick:t,children:e?O(Ss,{sx:{transform:"scale(1.3)"}}):O(ws,{sx:{transform:"scale(1.3)"}})})}function Rn({children:e}){var k;const{t}=W(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:a}=Ie(),{info:l}=wo(),c=to(),u=se(d=>d.breakpoints.down("md")),{appId:f,version:h}=i,p=[{label:"App ID",value:f},{label:"App Version",value:h},{label:"App Bundle Name",value:(k=a==null?void 0:a.meta)==null?void 0:k.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],y=d=>{var x,P,L,v;const g=Array.isArray(d)?d:[d];if(u||g.unshift(O(Gc,{})),a){const I={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};So(a)?g.unshift(O(Sn,{chainHost:(x=a==null?void 0:a.controller)==null?void 0:x.chainHost,nftId:(P=a==null?void 0:a.controller)==null?void 0:P.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(v=a==null?void 0:a.controller)==null?void 0:v.launcherUrl,sx:I})):l.ownerNft&&l.launcher&&g.unshift(O(_n,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:I}))}return g},S=Vo({blocklet:a}),b={logo:S?O("img",{src:S,alt:"logo"}):null,brandAddon:O(E,{children:a&&Ke(E,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[O(Ae,{title:F.isRunning(a==null?void 0:a.status)?void 0:t(`blocklet.status.${a==null?void 0:a.status}`),children:O(E,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:tt[a==null?void 0:a.status]})}),O(E,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.getDisplayName(a)}),O(E,{component:po,icon:Wc,sx:{color:"text.secondary"}})]})})};return Ke(Qc,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:b,footerProps:{addon:O(jn,{infos:p})},children:[!a&&n&&O(st,{relative:"parent",children:O(ue,{})}),!a&&r&&Ke(st,{relative:"parent",children:[Ke(E,{display:"flex",alignItems:"center",children:[O(js,{color:"error",sx:{marginRight:1}}),Gt(r)]}),O(ve,{onClick:()=>o(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(E,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(mo,{FallbackComponent:Ms,resetKeys:[c.pathname],children:e})})]})}Rn.propTypes={children:j.any};Rn.defaultProps={children:null};const Qc=V(Os)`
227
227
  div.dashboard-content {
228
228
  padding: 0;
229
229
  }
@@ -235,7 +235,7 @@ ${r}
235
235
  .header-brand-addon {
236
236
  display: block;
237
237
  }
238
- `;function Zc(){var k;const{t:e,locale:t}=W(),{blocklet:n,launcherSession:r,refreshSubscription:o}=Ie(),{connectApi:i,session:a,api:l}=So(),[c,u]=w.useState(!1),[f,h]=w.useState(""),[p,y]=zo({subscriptionURL:"#"});if(w.useEffect(()=>{var d,g;Dn(n,r)&&_o({launcherSessionId:(d=n==null?void 0:n.controller)==null?void 0:d.launcherSessionId,launcherUrl:(g=n==null?void 0:n.controller)==null?void 0:g.launcherUrl,locale:t}).then(x=>{y({subscriptionURL:x})}).catch(x=>{console.error("get subscription url error:",x)})},[n,r]),w.useEffect(()=>{var d;if((d=n.controller)!=null&&d.launcherUrl){const g=ge(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(g).then(x=>x.json()).then(x=>{var v,I;const P=(I=(v=x.componentMountPoints)==null?void 0:v.find(C=>C.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:I.mountPoint,L=ge(n.controller.launcherUrl,P);h(L)})}},[(k=n.controller)==null?void 0:k.launcherUrl]),!An(r)&&(!n||!r||!Co(n)||r.status===z.LAUNCH_SESSION_STATUS.installed))return"";let S=null,b="";return An(r)?(S=s.jsx(Ys,{onClick:()=>u(!0),children:e("blocklet.paynow")}),b=e("blocklet.suspendedCausedByExpired",{deadline:yt(r==null?void 0:r.reservedUntil,t)})):Dn(n,r)?(S=s.jsx(Ft,{href:p.subscriptionURL,children:e("blocklet.manageSubscription")}),b=e("blocklet.suspendedCausedByExpired",{deadline:yt(r==null?void 0:r.reservedUntil,t)})):To(n,r)&&(S=s.jsx(lr,{to:ge(z.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),b=e("blocklet.suspendedCausedByTerminated",{canceledAt:yt(r==null?void 0:r.terminatedAt,t),deadline:Io(r==null?void 0:r.terminatedAt,t)})),s.jsxs(E,{component:mo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c&&f&&r&&s.jsx(Ro,{session:a,connect:i,baseUrl:f,authToken:r.subscription.authToken,children:s.jsx(Eo,{dialogProps:{open:c,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{l.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})}),b,s.jsx(H,{component:"span",sx:{marginLeft:"4px"},children:S})]})}const Cs=w.createContext({});function Wl(){return w.useContext(Cs)}const{Provider:Jc,Consumer:Kl}=Cs,{did:ee,appId:Xc}=window.env;function Yc({children:e}){var v,I;const{t,locale:n}=W(),{blocklet:r}=Ie(),[o,i]=w.useState([]),[a,l]=w.useState([]),[c,u]=w.useState([]),f=F.getDisplayName(r),h=((v=((r==null?void 0:r.environments)||[]).find(C=>C.key===me.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:v.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],S=(r==null?void 0:r.enablePassportIssuance)!==!1,b=async()=>{try{const C=await Ve.doBatchQuery({getRoles:{input:{teamDid:ee}},getPermissions:{input:{teamDid:ee}},getInvitations:{input:{teamDid:ee}}}),T=(C.getRoles.roles||[]).filter(m=>!z.RBAC_CONFIG.roles.some(_=>_.name===m.name&&(!_.passport||_.ci))).map(m=>(m.hasDescription=!!m.description,m.hasDescription||(m.description=t("team.passport.description",{teamName:f,title:m.title})),m));l($o(T,[m=>ko(m.name)],["desc"])),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){N.error(C.message)}},k=({did:C}={})=>{const T={teamDid:ee,user:{did:C}};return Ve.getUser({input:T})},d=({query:C,paging:T}={})=>{const m={teamDid:ee};return T&&(m.paging=T),C&&(m.query=C),m.sort={lastLoginAt:-1},Ve.getUsers({input:m})},g=()=>Ve.getUsersCountPerRole({input:{teamDid:ee}}),x=()=>b();w.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&b()},[(I=r==null?void 0:r.meta)==null?void 0:I.did]),w.useEffect(()=>{l(C=>C.map(T=>(T.hasDescription||(T.description=t("team.passport.description",{teamName:f,title:T.title})),{...T})))},[t,n]);const P=C=>{C.teamDid===ee&&b()};Ze(me.TeamEvents.userAdded,P,[ee]),Ze(me.TeamEvents.userRemoved,P,[ee]),Ze(me.TeamEvents.userUpdated,P,[ee]);const L={teamDid:ee,teamIssuerDid:Xc,teamName:f,invitations:o,roles:a,permissions:c,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:S,refresh:x,passportColor:h,endpoint:window.location.origin,blocklet:r,api:{getUser:k,getUsers:d,getUsersCountPerRole:g}};return s.jsx(Jc,{value:L,children:e})}const el=w.lazy(()=>M(()=>import("./log-CskQJ4o-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),tl=w.lazy(()=>M(()=>import("./index-CZqp_6Zr.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,3,40,41,42,43,44,45,46]))),nl=w.lazy(()=>M(()=>import("./index-DZ9Jqm_w.js"),__vite__mapDeps([47,4,2,5,1,6,7,8,43,10,9,11,48,33,29,37,38,3,40,41,24,42,44,30,45,46]))),rl=w.lazy(()=>M(()=>import("./index-Bpz-SuLt.js"),__vite__mapDeps([49,2,1,9,10,4,5,6,7,8,11,50,33,29,24,22,51,13,39,52,12,25,53,45,54,55,56,57,27,32,58,59,60,61,62,63,41,64,65,66,67]))),sl=w.lazy(()=>M(()=>import("./overview-DedgPJyh.js"),__vite__mapDeps([68,1,2,4,5,6,7,8,10,43,69,42,24,9,11,31,44,30,22,70,71,72,56,3,33,29,40,41,45,46]))),ol=w.lazy(()=>M(()=>import("./domains-D-YYFzTK.js"),__vite__mapDeps([73,2,4,5,1,6,7,8,9,10,11,74,48,23,24,44,30,33,29,37,38,63,25,75,45,43,31,76]))),il=w.lazy(()=>M(()=>import("./index-DQncaTCr.js"),__vite__mapDeps([77,2,6,5,1,4,7,8,9,10,11,22,78,17,18,19,20,21,34,35,23,24,79,80,81,33,29,52,45,82,3,40,41,42,43,44,30,46]))),al=w.lazy(()=>M(()=>import("./appearance-CuEL_wAd.js"),__vite__mapDeps([83,5,2,4,1,6,7,8,9,10,11]))),cl=w.lazy(()=>M(()=>import("./audit-logs-DXfN0Akp.js"),__vite__mapDeps([84,4,2,5,1,6,7,8,34,35,3,9,10,11,65,66,43,85,42,24,39,67,33,29,40,41,44,30,45,46]))),ll=w.lazy(()=>M(()=>import("./index-Ctbrsvlm.js"),__vite__mapDeps([86,2,1,5,4,6,7,8,9,10,11,39,31,87,55,13,42,24,85,43,76,17,18,19,20,21,34,35,22,88,44,30,89,90,91,57,92,29,27,28,3,33,40,41,45,46]))),ul=w.lazy(()=>M(()=>import("./config-navigation-BbbAAFTA.js"),__vite__mapDeps([93,2,4,5,1,6,7,8,71,80,10,94,9,11,95,96,64,56,42,24,58,59,89,29,3,33,40,41,43,44,30,45,46]))),dl=w.lazy(()=>M(()=>import("./index-BmpX2Oqa.js"),__vite__mapDeps([97,1,2,6,5,10,4,7,8,9,11,98,56,99,100,72,32,29,31,101,38,41,102,52,3,33,40,24,42,43,44,30,45,46]))),fl=w.lazy(()=>M(()=>import("./index-OVTGvi9j.js"),__vite__mapDeps([103,4,2,5,1,6,7,8,10,9,11,102,69,31,35,98,3,33,29,40,41,24,42,43,44,30,45,46]))),pl=w.lazy(()=>M(()=>import("./security-zb06EOxl.js"),__vite__mapDeps([104,4,2,5,1,6,7,8,9,10,11,96,105,98,3,33,29,40,41,24,42,43,44,30,45,46]))),ml=w.lazy(()=>M(()=>import("./branding-CVWmoAus.js"),__vite__mapDeps([106,2,1,4,5,6,7,8,10,62,107,54,81,64,9,11,23,24,42,3,33,29,40,41,43,44,30,45,46]))),hl=w.lazy(()=>M(()=>import("./advanced-C22Mc4mt.js"),__vite__mapDeps([108,2,1,9,10,4,5,6,7,8,11,23,24,33,29,45,25,31,22,70,71,3,40,41,42,43,44,30,46]))),gl=w.lazy(()=>M(()=>import("./traffic-Bo3Bp96o.js").then(e=>e.t),__vite__mapDeps([88,2,9,1,10,4,5,6,7,8,11,44,30,89,90,91,57,92,29,27,28]))),xl=w.lazy(()=>M(()=>import("./runtime-Dfcxeun4.js"),__vite__mapDeps([109,2,1,42,6,5,4,7,8,24,10,9,11,101,13,3,33,29,40,41,43,44,30,45,46]))),vl=w.lazy(()=>M(()=>import("./index-hgktawrH.js"),__vite__mapDeps([110,2,4,5,1,6,7,8,78,17,10,18,19,20,21,22,34,35,9,11,26,27,28,33,29,25,63,111,23,24,13,3,40,41,42,43,44,30,45,46]))),yl=w.lazy(()=>M(()=>import("./component-DFHLfmfe.js"),__vite__mapDeps([112,1,2,5,4,6,7,8,10,9,11,113,102,23,24,111,95,92,59,25,57,91,64,29,114,60,61,62,32,63,33,41,22,115,116,100,72,56,107,54,117,79,80,65,66,94,31,3,75,98,118,99,119,82,43,89,13,40,37,38,42,44,30,45,46]))),bl=w.lazy(()=>M(()=>import("./index-egCz4jdE.js"),__vite__mapDeps([120,1,2,9,10,4,5,6,7,8,11]))),jl=ge(z.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),wl=e=>{const{enqueueSnackbar:t}=fr(),n=w.useCallback(r=>Kt(jl,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Ze(`${e}/${z.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:i,description:a}=r||{},l=["error","warning"].includes(i)||r.sticky;r.source==="system"&&t(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>s.jsx(ki,{viewAllUrl:o,keyId:c,notification:r,content:s.jsx(Wi,{notification:r,minimal:!0,rows:0})})})},[],"user")};function Ts({blocklet:e,isAdmin:t}){const[n,r]=w.useState(!1),{t:o}=W(),i=_r();return t?s.jsxs(s.Fragment,{children:[s.jsx(ll,{blocklet:e,customTableButtons:[s.jsxs(E,{display:"flex",alignItems:"center",gap:1.5,children:[s.jsx(ut,{onClick:()=>r(!0),sx:{p:i?0:void 0},children:s.jsx(en,{})},"settings"),i?s.jsx(H,{children:o("common.setting")}):null]})]}),s.jsx(go,{title:`${o("common.notification")} ${o("common.setting")}`,fullWidth:!0,maxWidth:"md",open:n,onClose:()=>r(!1),PaperProps:{style:{minHeight:"500px"}},children:s.jsx(E,{sx:{mt:"-16px",overflowY:"hidden"},children:s.jsx(ra,{})})})]}):s.jsx(zs,{status:403})}Ts.propTypes={blocklet:j.object.isRequired,isAdmin:j.bool.isRequired};const Sl=e=>{var f,h;const{t}=W(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:i}=Ie(),a=(f=n==null?void 0:n.meta)==null?void 0:f.did,l=!n||Ao(n.status)?[]:F.getAppMissingConfigs(n),c={overview:[{label:t("common.overview"),value:"overview"},{label:s.jsx(eo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"}],developers:[{label:t("common.logs"),value:"logs",show:((h=n==null?void 0:n.children)==null?void 0:h.length)&&n.structVersion===z.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:sl,components:yl,members:s.jsx(tl,{type:"blocklet",createPassportSvg:On}),passports:s.jsx(il,{createPassportSvg:On}),settings:s.jsx(fl,{orientation:"vertical"}),security:s.jsx(pl,{}),"did-spaces":s.jsx(dl,{navOrientation:"horizontal"}),domains:ol,branding:s.jsx(ml,{blocklet:n,onUpdate:r}),theming:s.jsx(al,{}),navigation:ul,sitemap:s.jsx(ho,{children:t("common.comingSoon")}),notifications:s.jsx(Ts,{blocklet:n,isAdmin:e}),"audit-logs":s.jsx(cl,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:s.jsx(gl,{client:o,did:i}),advanced:s.jsx(hl,{blocklet:n,onUpdate:r}),webhooks:s.jsx(nl,{}),"access-keys":s.jsx(vl,{}),logs:el,performance:s.jsx(xl,{client:o,did:i}),docs:bl,publish:s.jsx(rl,{})};return{tabGroups:c,renders:u}};function _l(){var d,g;const e=ur(),{tab:t="overview",subtab:n}=no(),{blocklet:r,refreshFlag:o}=Ie(),{session:i}=yr(),a=ye(()=>{var x;return(x=i==null?void 0:i.user)==null?void 0:x.did},[i]),l=_r(),c=ye(()=>{var x;return((x=i.user)==null?void 0:x.role)&&Lo.includes(i.user.role)},[i]);wl(a);const{tabGroups:u,renders:f}=Sl(c),h=x=>{e(`${z.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${x}`)},p=(u[t]||[]).filter(x=>x.show===void 0||x.show),y=((d=(p||[]).find(x=>x.value===n))==null?void 0:d.value)||((g=p==null?void 0:p[0])==null?void 0:g.value)||t,S=f[y]||f.overview,b=["overview"].includes(t),k=r?s.jsxs(Qt,{type:"components",children:[p.length>0&&s.jsxs(E,{mb:2,display:"flex",alignItems:"center",gap:2,children:[s.jsx(E,{flex:1,children:s.jsx(mr,{tabs:p,current:y,onChange:h,scrollButtons:"auto"})}),b&&!l&&s.jsx(E,{component:"div",className:"page-header",children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null})]}),s.jsx(E,{className:"page-content",children:s.jsx(w.Suspense,{fallback:s.jsx(st,{relative:"parent",children:s.jsx(ue,{})}),children:w.isValidElement(S)?S:s.jsx(S,{blocklet:r})})})]}):s.jsx(st,{relative:"parent",children:s.jsx(ue,{})});return s.jsx(Do,{children:s.jsx(Yc,{children:s.jsx(Rn,{children:s.jsxs(Tl,{children:[l&&b&&s.jsx(E,{component:"div",className:"page-header",mb:2,children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null}),s.jsx(Dr,{}),s.jsx(Zc,{}),k]})},`${o}`)})})}function Cl(){var r;const{blocklet:e}=Ie(),{t}=W(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return w.useEffect(()=>{const o=Po();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),s.jsxs(s.Fragment,{children:[s.jsx(Ns,{children:s.jsx("title",{children:t("pageTitle.dashboard")})}),s.jsx(_l,{})]})}const Tl=V.main`
238
+ `;function Jc(){var k;const{t:e,locale:t}=W(),{blocklet:n,launcherSession:r,refreshSubscription:o}=Ie(),{connectApi:i,session:a,api:l}=_o(),[c,u]=w.useState(!1),[f,h]=w.useState(""),[p,y]=Uo({subscriptionURL:"#"});if(w.useEffect(()=>{var d,g;Dn(n,r)&&Co({launcherSessionId:(d=n==null?void 0:n.controller)==null?void 0:d.launcherSessionId,launcherUrl:(g=n==null?void 0:n.controller)==null?void 0:g.launcherUrl,locale:t}).then(x=>{y({subscriptionURL:x})}).catch(x=>{console.error("get subscription url error:",x)})},[n,r]),w.useEffect(()=>{var d;if((d=n.controller)!=null&&d.launcherUrl){const g=ge(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(g).then(x=>x.json()).then(x=>{var v,I;const P=(I=(v=x.componentMountPoints)==null?void 0:v.find(C=>C.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:I.mountPoint,L=ge(n.controller.launcherUrl,P);h(L)})}},[(k=n.controller)==null?void 0:k.launcherUrl]),!An(r)&&(!n||!r||!To(n)||r.status===z.LAUNCH_SESSION_STATUS.installed))return"";let S=null,b="";return An(r)?(S=s.jsx(Ys,{onClick:()=>u(!0),children:e("blocklet.paynow")}),b=e("blocklet.suspendedCausedByExpired",{deadline:yt(r==null?void 0:r.reservedUntil,t)})):Dn(n,r)?(S=s.jsx(Ft,{href:p.subscriptionURL,children:e("blocklet.manageSubscription")}),b=e("blocklet.suspendedCausedByExpired",{deadline:yt(r==null?void 0:r.reservedUntil,t)})):Io(n,r)&&(S=s.jsx(lr,{to:ge(z.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),b=e("blocklet.suspendedCausedByTerminated",{canceledAt:yt(r==null?void 0:r.terminatedAt,t),deadline:Ro(r==null?void 0:r.terminatedAt,t)})),s.jsxs(E,{component:ho,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c&&f&&r&&s.jsx(Eo,{session:a,connect:i,baseUrl:f,authToken:r.subscription.authToken,children:s.jsx(ko,{dialogProps:{open:c,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{l.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})}),b,s.jsx(H,{component:"span",sx:{marginLeft:"4px"},children:S})]})}const Cs=w.createContext({});function Wl(){return w.useContext(Cs)}const{Provider:Zc,Consumer:Kl}=Cs,{did:ee,appId:Xc}=window.env;function Yc({children:e}){var v,I;const{t,locale:n}=W(),{blocklet:r}=Ie(),[o,i]=w.useState([]),[a,l]=w.useState([]),[c,u]=w.useState([]),f=F.getDisplayName(r),h=((v=((r==null?void 0:r.environments)||[]).find(C=>C.key===me.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:v.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],S=(r==null?void 0:r.enablePassportIssuance)!==!1,b=async()=>{try{const C=await Ve.doBatchQuery({getRoles:{input:{teamDid:ee}},getPermissions:{input:{teamDid:ee}},getInvitations:{input:{teamDid:ee}}}),T=(C.getRoles.roles||[]).filter(m=>!z.RBAC_CONFIG.roles.some(_=>_.name===m.name&&(!_.passport||_.ci))).map(m=>(m.hasDescription=!!m.description,m.hasDescription||(m.description=t("team.passport.description",{teamName:f,title:m.title})),m));l(No(T,[m=>Po(m.name)],["desc"])),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){N.error(C.message)}},k=({did:C}={})=>{const T={teamDid:ee,user:{did:C}};return Ve.getUser({input:T})},d=({query:C,paging:T}={})=>{const m={teamDid:ee};return T&&(m.paging=T),C&&(m.query=C),m.sort={lastLoginAt:-1},Ve.getUsers({input:m})},g=()=>Ve.getUsersCountPerRole({input:{teamDid:ee}}),x=()=>b();w.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&b()},[(I=r==null?void 0:r.meta)==null?void 0:I.did]),w.useEffect(()=>{l(C=>C.map(T=>(T.hasDescription||(T.description=t("team.passport.description",{teamName:f,title:T.title})),{...T})))},[t,n]);const P=C=>{C.teamDid===ee&&b()};Je(me.TeamEvents.userAdded,P,[ee]),Je(me.TeamEvents.userRemoved,P,[ee]),Je(me.TeamEvents.userUpdated,P,[ee]);const L={teamDid:ee,teamIssuerDid:Xc,teamName:f,invitations:o,roles:a,permissions:c,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:S,refresh:x,passportColor:h,endpoint:window.location.origin,blocklet:r,api:{getUser:k,getUsers:d,getUsersCountPerRole:g}};return s.jsx(Zc,{value:L,children:e})}const el=w.lazy(()=>M(()=>import("./log-BdBIH8S_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),tl=w.lazy(()=>M(()=>import("./index-aQxEawZE.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,3,40,41,42,43,44,45,46]))),nl=w.lazy(()=>M(()=>import("./index-m_po8k60.js"),__vite__mapDeps([47,4,2,5,1,6,7,8,43,10,9,11,48,33,29,37,38,3,40,41,24,42,44,30,45,46]))),rl=w.lazy(()=>M(()=>import("./index-BSuIcvk6.js"),__vite__mapDeps([49,2,1,9,10,4,5,6,7,8,11,50,33,29,24,22,51,13,39,52,12,25,53,45,54,55,56,57,27,32,58,59,60,61,62,63,41,64,65,66,67]))),sl=w.lazy(()=>M(()=>import("./overview-D5q1KD9x.js"),__vite__mapDeps([68,1,2,4,5,6,7,8,10,43,69,42,24,9,11,31,44,30,22,70,71,72,56,3,33,29,40,41,45,46]))),ol=w.lazy(()=>M(()=>import("./domains-bZXw9tDX.js"),__vite__mapDeps([73,2,4,5,1,6,7,8,9,10,11,74,48,23,24,44,30,33,29,37,38,63,25,75,45,43,31,76]))),il=w.lazy(()=>M(()=>import("./index-DpW-Ik8u.js"),__vite__mapDeps([77,2,6,5,1,4,7,8,9,10,11,22,78,17,18,19,20,21,34,35,23,24,79,80,81,33,29,52,45,82,3,40,41,42,43,44,30,46]))),al=w.lazy(()=>M(()=>import("./appearance-DROrcrHA.js"),__vite__mapDeps([83,5,2,4,1,6,7,8,9,10,11]))),cl=w.lazy(()=>M(()=>import("./audit-logs-CcVb9ghw.js"),__vite__mapDeps([84,4,2,5,1,6,7,8,34,35,3,9,10,11,65,66,43,85,42,24,39,67,33,29,40,41,44,30,45,46]))),ll=w.lazy(()=>M(()=>import("./index-cs-08BqN.js"),__vite__mapDeps([86,2,1,5,4,6,7,8,9,10,11,39,31,87,55,13,42,24,85,43,76,17,18,19,20,21,34,35,22,88,44,30,89,90,91,57,92,29,27,28,3,33,40,41,45,46]))),ul=w.lazy(()=>M(()=>import("./config-navigation-BEcY6Wrz.js"),__vite__mapDeps([93,2,4,5,1,6,7,8,71,80,10,94,9,11,95,96,64,56,42,24,58,59,89,29,3,33,40,41,43,44,30,45,46]))),dl=w.lazy(()=>M(()=>import("./index-Djpx18Tz.js"),__vite__mapDeps([97,1,2,6,5,10,4,7,8,9,11,98,56,99,100,72,32,29,31,101,38,41,102,52,3,33,40,24,42,43,44,30,45,46]))),fl=w.lazy(()=>M(()=>import("./index-DW75AsWb.js"),__vite__mapDeps([103,4,2,5,1,6,7,8,10,9,11,102,69,31,35,98,3,33,29,40,41,24,42,43,44,30,45,46]))),pl=w.lazy(()=>M(()=>import("./security-fwRPOvQx.js"),__vite__mapDeps([104,4,2,5,1,6,7,8,9,10,11,96,105,98,3,33,29,40,41,24,42,43,44,30,45,46]))),ml=w.lazy(()=>M(()=>import("./branding-Be5nWHmr.js"),__vite__mapDeps([106,2,1,4,5,6,7,8,10,62,107,54,81,64,9,11,23,24,42,3,33,29,40,41,43,44,30,45,46]))),hl=w.lazy(()=>M(()=>import("./advanced-u-DAzAIF.js"),__vite__mapDeps([108,2,1,9,10,4,5,6,7,8,11,23,24,33,29,45,25,31,22,70,71,3,40,41,42,43,44,30,46]))),gl=w.lazy(()=>M(()=>import("./traffic-38eCC37i.js").then(e=>e.t),__vite__mapDeps([88,2,9,1,10,4,5,6,7,8,11,44,30,89,90,91,57,92,29,27,28]))),xl=w.lazy(()=>M(()=>import("./runtime-CRViKGyG.js"),__vite__mapDeps([109,2,1,42,6,5,4,7,8,24,10,9,11,101,13,3,33,29,40,41,43,44,30,45,46]))),vl=w.lazy(()=>M(()=>import("./index-CXDRY0Gs.js"),__vite__mapDeps([110,2,4,5,1,6,7,8,78,17,10,18,19,20,21,22,34,35,9,11,26,27,28,33,29,25,63,111,23,24,13,3,40,41,42,43,44,30,45,46]))),yl=w.lazy(()=>M(()=>import("./component-B79RqFMg.js"),__vite__mapDeps([112,1,2,5,4,6,7,8,10,9,11,113,102,23,24,111,95,92,59,25,57,91,64,29,114,60,61,62,32,63,33,41,22,115,116,100,72,56,107,54,117,79,80,65,66,94,31,3,75,98,118,99,119,82,43,89,13,40,37,38,42,44,30,45,46]))),bl=w.lazy(()=>M(()=>import("./index-TE82Z_py.js"),__vite__mapDeps([120,1,2,9,10,4,5,6,7,8,11]))),jl=ge(z.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),wl=e=>{const{enqueueSnackbar:t}=fr(),n=w.useCallback(r=>Kt(jl,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Je(`${e}/${z.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:i,description:a}=r||{},l=["error","warning"].includes(i)||r.sticky;r.source==="system"&&t(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>s.jsx(ki,{viewAllUrl:o,keyId:c,notification:r,content:s.jsx(Wi,{notification:r,minimal:!0,rows:0})})})},[],"user")};function Ts({blocklet:e,isAdmin:t}){const[n,r]=w.useState(!1),{t:o}=W(),i=_r();return t?s.jsxs(s.Fragment,{children:[s.jsx(ll,{blocklet:e,customTableButtons:[s.jsxs(E,{display:"flex",alignItems:"center",gap:1.5,children:[s.jsx(ut,{onClick:()=>r(!0),sx:{p:i?0:void 0},children:s.jsx(en,{})},"settings"),i?s.jsx(H,{children:o("common.setting")}):null]})]}),s.jsx(xo,{title:`${o("common.notification")} ${o("common.setting")}`,fullWidth:!0,maxWidth:"md",open:n,onClose:()=>r(!1),PaperProps:{style:{minHeight:"500px"}},children:s.jsx(E,{sx:{mt:"-16px",overflowY:"hidden"},children:s.jsx(ra,{})})})]}):s.jsx(zs,{status:403})}Ts.propTypes={blocklet:j.object.isRequired,isAdmin:j.bool.isRequired};const Sl=e=>{var f,h;const{t}=W(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:i}=Ie(),a=(f=n==null?void 0:n.meta)==null?void 0:f.did,l=!n||Oo(n.status)?[]:F.getAppMissingConfigs(n),c={overview:[{label:t("common.overview"),value:"overview"},{label:s.jsx(eo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"}],developers:[{label:t("common.logs"),value:"logs",show:((h=n==null?void 0:n.children)==null?void 0:h.length)&&n.structVersion===z.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:sl,components:yl,members:s.jsx(tl,{type:"blocklet",createPassportSvg:On}),passports:s.jsx(il,{createPassportSvg:On}),settings:s.jsx(fl,{orientation:"vertical"}),security:s.jsx(pl,{}),"did-spaces":s.jsx(dl,{navOrientation:"horizontal"}),domains:ol,branding:s.jsx(ml,{blocklet:n,onUpdate:r}),theming:s.jsx(al,{}),navigation:ul,sitemap:s.jsx(go,{children:t("common.comingSoon")}),notifications:s.jsx(Ts,{blocklet:n,isAdmin:e}),"audit-logs":s.jsx(cl,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:s.jsx(gl,{client:o,did:i}),advanced:s.jsx(hl,{blocklet:n,onUpdate:r}),webhooks:s.jsx(nl,{}),"access-keys":s.jsx(vl,{}),logs:el,performance:s.jsx(xl,{client:o,did:i}),docs:bl,publish:s.jsx(rl,{})};return{tabGroups:c,renders:u}};function _l(){var d,g;const e=ur(),{tab:t="overview",subtab:n}=no(),{blocklet:r,refreshFlag:o}=Ie(),{session:i}=yr(),a=ye(()=>{var x;return(x=i==null?void 0:i.user)==null?void 0:x.did},[i]),l=_r(),c=ye(()=>{var x;return((x=i.user)==null?void 0:x.role)&&Do.includes(i.user.role)},[i]);wl(a);const{tabGroups:u,renders:f}=Sl(c),h=x=>{e(`${z.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${x}`)},p=(u[t]||[]).filter(x=>x.show===void 0||x.show),y=((d=(p||[]).find(x=>x.value===n))==null?void 0:d.value)||((g=p==null?void 0:p[0])==null?void 0:g.value)||t,S=f[y]||f.overview,b=["overview"].includes(t),k=r?s.jsxs(Qt,{type:"components",children:[p.length>0&&s.jsxs(E,{mb:2,display:"flex",alignItems:"center",gap:2,children:[s.jsx(E,{flex:1,children:s.jsx(mr,{tabs:p,current:y,onChange:h,scrollButtons:"auto"})}),b&&!l&&s.jsx(E,{component:"div",className:"page-header",children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null})]}),s.jsx(E,{className:"page-content",children:s.jsx(w.Suspense,{fallback:s.jsx(st,{relative:"parent",children:s.jsx(ue,{})}),children:w.isValidElement(S)?S:s.jsx(S,{blocklet:r})})})]}):s.jsx(st,{relative:"parent",children:s.jsx(ue,{})});return s.jsx(Ao,{children:s.jsx(Yc,{children:s.jsx(Rn,{children:s.jsxs(Tl,{children:[l&&b&&s.jsx(E,{component:"div",className:"page-header",mb:2,children:r?s.jsx(Un,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:x}={})=>{x&&N.error(x.message)},variant:"group"}):null}),s.jsx(Dr,{}),s.jsx(Jc,{}),k]})},`${o}`)})})}function Cl(){var r;const{blocklet:e}=Ie(),{t}=W(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return w.useEffect(()=>{const o=Lo();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),s.jsxs(s.Fragment,{children:[s.jsx(Ns,{children:s.jsx("title",{children:t("pageTitle.dashboard")})}),s.jsx(_l,{})]})}const Tl=V.main`
239
239
  .page-header {
240
240
  display: flex;
241
241
  justify-content: space-between;