@abtnode/blocklet-services 1.16.27-beta-d27e19fa → 1.16.27-beta-8f022f16
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.
- package/api/libs/connect/shared.js +18 -85
- package/dist/assets/{Add-BVQoXLYQ.js → Add-BfGbf5fM.js} +1 -1
- package/dist/assets/{AddBox-UlAOF4HY.js → AddBox-CIsbWF-N.js} +1 -1
- package/dist/assets/{Alert-BF_lUd2O.js → Alert-DhIUHY_Y.js} +1 -1
- package/dist/assets/{ArrowDropDown-CnOX1-Ta.js → ArrowDropDown-DbKEcNzg.js} +1 -1
- package/dist/assets/{Avatar-CSYNG_ap.js → Avatar-u9A7w1uS.js} +1 -1
- package/dist/assets/{ButtonGroup-UgLBgaoA.js → ButtonGroup-BtWCyRpR.js} +1 -1
- package/dist/assets/{CheckCircle-DPdzuO0O.js → CheckCircle-Kfhz7ziK.js} +1 -1
- package/dist/assets/{ChevronRight-DXVqG2uX.js → ChevronRight-B0jQ1ZQU.js} +1 -1
- package/dist/assets/{Close-DUbNK6Vh.js → Close-Djl_EWhz.js} +1 -1
- package/dist/assets/{CloseOutlined-BgtNQh0m.js → CloseOutlined-DqxN9Rwg.js} +1 -1
- package/dist/assets/{Delete-BlrxAXJe.js → Delete-Cpd8FOmd.js} +1 -1
- package/dist/assets/{DeleteOutline-zK8BDvYs.js → DeleteOutline-FfHSR8rg.js} +1 -1
- package/dist/assets/{Done-DLuhKlDY.js → Done-Be6q-JLL.js} +1 -1
- package/dist/assets/{Download-VzhM36Mk.js → Download-chfr705H.js} +1 -1
- package/dist/assets/{Edit-YBRVo81g.js → Edit-CwaqKZ3U.js} +1 -1
- package/dist/assets/{EditIcon-Bz0X-WjK.js → EditIcon-DdpwVUQF.js} +1 -1
- package/dist/assets/{Error-DcGEnpfC.js → Error-DGcp_I5U.js} +1 -1
- package/dist/assets/{ExpandMore-BndjDFrJ.js → ExpandMore-Bmc991mR.js} +1 -1
- package/dist/assets/{FilterList-D6SbWS9N.js → FilterList-DmdrZZw7.js} +1 -1
- package/dist/assets/{FormControl-ZxrMEHzm.js → FormControl-ClV6bw9J.js} +1 -1
- package/dist/assets/{FormControlLabel-CQ-384sE.js → FormControlLabel-9KA35zPZ.js} +1 -1
- package/dist/assets/{FormGroup-CDYURYYc.js → FormGroup-Bg7QggRn.js} +1 -1
- package/dist/assets/{Google-CMn_H5AB.js → Google-qlMjYK1-.js} +1 -1
- package/dist/assets/{Hidden-BMZwRl0J.js → Hidden-DA9ywHhR.js} +1 -1
- package/dist/assets/{InfoOutlined-BAWBdaLv.js → InfoOutlined-D1lpk2Qr.js} +1 -1
- package/dist/assets/{InputAdornment-Dj0-ZTzp.js → InputAdornment-BzQ3c-E3.js} +1 -1
- package/dist/assets/{InputLabel-D4U8NUgG.js → InputLabel-DN6OfB3A.js} +1 -1
- package/dist/assets/{LastPage-DBHVYwPT.js → LastPage-CDZ5JAj2.js} +1 -1
- package/dist/assets/{Launch-B-9FZftI.js → Launch-sa0zbPVh.js} +1 -1
- package/dist/assets/{LaunchOutlined-CuKBcPBF.js → LaunchOutlined-DxT18366.js} +1 -1
- package/dist/assets/{Link-CiUtxKAN.js → Link-CQSt46qQ.js} +1 -1
- package/dist/assets/{ListItemText-CB7ytq-7.js → ListItemText-Ba0FMRbi.js} +1 -1
- package/dist/assets/{LoadingButton-CPv_vsmV.js → LoadingButton-BGVanlpP.js} +1 -1
- package/dist/assets/{LockIcon-BNztd01P.js → LockIcon-CwR1Wr8T.js} +1 -1
- package/dist/assets/{Loop-0pyy_NjN.js → Loop-DbXoWlWL.js} +1 -1
- package/dist/assets/{MoreHoriz-BCwX51Ah.js → MoreHoriz-BwAZLDwN.js} +1 -1
- package/dist/assets/{MoreVert-B-H_HhQs.js → MoreVert-tVywlmBc.js} +1 -1
- package/dist/assets/{OpenInNew-BxB42JEm.js → OpenInNew-BytIBfg-.js} +1 -1
- package/dist/assets/{Pagination-BOAWzdOF.js → Pagination-CCq9jc57.js} +1 -1
- package/dist/assets/{PlayArrow-DTQuX8YK.js → PlayArrow-BSY89sRP.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-BZmqi9hs.js → QuestionMarkCircle-BndoO-vP.js} +1 -1
- package/dist/assets/{RadioGroup-BW-fx4rg.js → RadioGroup-BIXMwxZw.js} +1 -1
- package/dist/assets/{Search-_oBTcmFu.js → Search-2bXEizB_.js} +1 -1
- package/dist/assets/{Select-BQfv7_s7.js → Select-1Dinc8Yp.js} +1 -1
- package/dist/assets/{ServerLogo-CNqQ4_-P.js → ServerLogo-DUbYd44w.js} +1 -1
- package/dist/assets/{Skeleton-C6XbpMEl.js → Skeleton-BTn7VLB8.js} +1 -1
- package/dist/assets/{Slider-CpKT5r2s.js → Slider-DqwF7WWE.js} +1 -1
- package/dist/assets/{Stepper-BwID29j4.js → Stepper-Xx7c-2Tg.js} +1 -1
- package/dist/assets/{TextField-D20aQmWP.js → TextField-CLMWLIuC.js} +1 -1
- package/dist/assets/{Toolbar-d-s6ylOk.js → Toolbar-1EuU30BI.js} +1 -1
- package/dist/assets/{ViewList-DhDK5Yf-.js → ViewList-B149pUW0.js} +1 -1
- package/dist/assets/{access-control-C-O_KHXf.js → access-control-L7JciFJX.js} +1 -1
- package/dist/assets/{actions-BcCGz9Re.js → actions-B17gi4AR.js} +1 -1
- package/dist/assets/{add-component-core-BUQN8K9L.js → add-component-core-CJA9PjM8.js} +1 -1
- package/dist/assets/{add-resource-C63pANOb.js → add-resource-BweeBZJK.js} +1 -1
- package/dist/assets/{addon-Dbrmb-1q.js → addon-BN40kvJb.js} +1 -1
- package/dist/assets/{analytics-UTia3DwK.js → analytics-DMRryrbp.js} +1 -1
- package/dist/assets/api-B7uSDjXA.js +1 -0
- package/dist/assets/ar-DqmJV4p8.js +1 -0
- package/dist/assets/{audit-logs-DryUHEFi.js → audit-logs-BSYj2Eqk.js} +1 -1
- package/dist/assets/{button-Z83xVcbE.js → button-hy7vfMWz.js} +1 -1
- package/dist/assets/{click-to-copy-D7fl-E0W.js → click-to-copy-CsvH74tu.js} +1 -1
- package/dist/assets/{complete-CQ7QbRcJ.js → complete-BRc2jUMv.js} +1 -1
- package/dist/assets/{component-CCkg4hKZ.js → component-BVC9S5oR.js} +2 -2
- package/dist/assets/{config-6lu1MTxg.js → config-D8dh02SI.js} +1 -1
- package/dist/assets/{config-navigation-CDgETtNr.js → config-navigation-B9ZF6bIT.js} +1 -1
- package/dist/assets/{config-space-BNPDP--2.js → config-space-DArp6G85.js} +1 -1
- package/dist/assets/{config-D27NuXtj.js → config-uuaV6CSC.js} +1 -1
- package/dist/assets/{confirm-B79ZFvOv.js → confirm-CC9pusf0.js} +1 -1
- package/dist/assets/{connect-BUyBQ-mt.js → connect-B9X_v5SB.js} +1 -1
- package/dist/assets/{connect-BCOCZysb.js → connect-CrSv2K1U.js} +1 -1
- package/dist/assets/{connect-to-BP9YJLOy.js → connect-to-BGZ7Fofh.js} +1 -1
- package/dist/assets/{content-layout-BDjWsMvh.js → content-layout-DuQjcHhv.js} +1 -1
- package/dist/assets/{dashboard-D6g-wywx.js → dashboard-DTGyFn00.js} +8 -13
- package/dist/assets/de-CHOUObJ5.js +1 -0
- package/dist/assets/{did-address-CBQ9FVsK.js → did-address-DVnFoCGu.js} +1 -1
- package/dist/assets/{domain-Di1np3I-.js → domain-C3mu2Hxo.js} +1 -1
- package/dist/assets/{domain-list-aj4kZKC5.js → domain-list-DnS4QZQH.js} +1 -1
- package/dist/assets/es-aZ4oYeVs.js +1 -0
- package/dist/assets/{exchange-passport-Bb3aYKYp.js → exchange-passport-xs4D_u1s.js} +1 -1
- package/dist/assets/{fallback-D6VL83P_.js → fallback-DW1BPmkT.js} +1 -1
- package/dist/assets/fr-Bi9vptGI.js +1 -0
- package/dist/assets/{fuel-0B4rp4Z5.js → fuel-BvljCLv4.js} +1 -1
- package/dist/assets/{fullpage-DJMC0JSg.js → fullpage-DS-ncqft.js} +1 -1
- package/dist/assets/hi-BXYjfUTP.js +1 -0
- package/dist/assets/{home-QCaOyBCk.js → home-hsubLvr7.js} +1 -1
- package/dist/assets/id-VVXvzjmO.js +1 -0
- package/dist/assets/{iframe-BcYur1fq.js → iframe-DYHc53WZ.js} +1 -1
- package/dist/assets/{index-DD0BzPjf.js → index-81D-6Ofx.js} +1 -1
- package/dist/assets/index-BN0K5IgA.js +1 -0
- package/dist/assets/{index-Y9dYAFEw.js → index-BObX8X6d.js} +1 -1
- package/dist/assets/{index-Dyg6yC2m.js → index-BQJ2uDVC.js} +1 -1
- package/dist/assets/{index-kAF1CJ4v.js → index-BVeqDJW5.js} +1 -1
- package/dist/assets/{index-CDnLCCCt.js → index-BY7dG1lw.js} +1 -1
- package/dist/assets/{index-DXPK7vPq.js → index-Bh_0qX8D.js} +3 -8
- package/dist/assets/{index-XXhxFMia.js → index-BlB9L1cj.js} +1 -1
- package/dist/assets/{index-CgxxYM2U.js → index-BoxjQ47z.js} +1 -1
- package/dist/assets/{index-BkSCYxhh.js → index-ByZIhpLO.js} +1 -1
- package/dist/assets/{index-Dyk6K-ww.js → index-CDph40kL.js} +1 -1
- package/dist/assets/{index-Bi4cm6G8.js → index-CLpANdOY.js} +1 -1
- package/dist/assets/{index-CNMFx3LC.js → index-CQCSfSoC.js} +1 -1
- package/dist/assets/{index-BIOB8MJl.js → index-Cr-HBE-f.js} +12 -17
- package/dist/assets/{index-Cb_mgWZJ.js → index-CuOICV_e.js} +1 -1
- package/dist/assets/{index-B1Mn59ac.js → index-D5-zht6p.js} +1 -1
- package/dist/assets/{index-DoNu9Eie.js → index-D6n3Sl-J.js} +1 -1
- package/dist/assets/{index-DHlSZXPc.js → index-DFcNK_4r.js} +1 -1
- package/dist/assets/{index-CTXi-amp.js → index-DHvwzf5L.js} +1 -1
- package/dist/assets/{index-DA_L5i46.js → index-DMLfjHw7.js} +1 -1
- package/dist/assets/{index-D3oM7uBi.js → index-DSPY1tXp.js} +1 -1
- package/dist/assets/{index-CCTM8ykz.js → index-Dgnhn1Xb.js} +1 -1
- package/dist/assets/{index-C2_bBSe0.js → index-Dif3kXIs.js} +1 -1
- package/dist/assets/index-DjHVJgEb.js +1285 -0
- package/dist/assets/{index-BR28SABx.js → index-DjvzkTr4.js} +1 -1
- package/dist/assets/{index-DlJUlpsg.js → index-DlwIp1my.js} +1 -1
- package/dist/assets/{index-BIAlibiF.js → index-Dvctn93d.js} +1 -1
- package/dist/assets/{index-BkBZ1jSw.js → index-DyE15ANN.js} +1 -1
- package/dist/assets/{index-BJkjo5Va.js → index-OrmONpg6.js} +1 -1
- package/dist/assets/{index-ChMr9QKn.js → index-PLOHydaJ.js} +1 -1
- package/dist/assets/{index-DSR9ZMoV.js → index-_5UNf-lD.js} +1 -1
- package/dist/assets/{index-BZITk3Yw.js → index-zu3Rca7R.js} +1 -1
- package/dist/assets/{index.es-Bl-nXb6Q.js → index.es-TiIjCxWV.js} +1 -1
- package/dist/assets/{index.esm-CyDCVTJ_.js → index.esm-Iufk0TOV.js} +1 -1
- package/dist/assets/{invitation-Dp5HVYxg.js → invitation-BF_gFLng.js} +1 -1
- package/dist/assets/{invite-sRCm2BlP.js → invite-DQaf4oOK.js} +1 -1
- package/dist/assets/{issue-passport-CDlNO04M.js → issue-passport-BPb_0Wsh.js} +1 -1
- package/dist/assets/{item-BNT4w86f.js → item-DTQY9ESG.js} +1 -1
- package/dist/assets/ja-DqJiajLu.js +1 -0
- package/dist/assets/{jss-plugin-props-sort.esm-C5hx4gxd.js → jss-plugin-props-sort.esm-CB7H7rcz.js} +1 -1
- package/dist/assets/ko-DQKmtlbI.js +1 -0
- package/dist/assets/{launch-result-message-C9zUfHXn.js → launch-result-message-DjAhiZ71.js} +1 -1
- package/dist/assets/{layout-cBDNvn6_.js → layout-CVzmyg9y.js} +1 -1
- package/dist/assets/{list-header-CSYg0zSD.js → list-header-Bczk_hYE.js} +1 -1
- package/dist/assets/localization-IqR2cFNn.js +1 -0
- package/dist/assets/{log-C5Bbb3l_.js → log-TIkOb3Jo.js} +1 -1
- package/dist/assets/{login-DNvWmsBD.js → login-DkTcCl9D.js} +1 -1
- package/dist/assets/{login-oauth-callback-BWtoKdT-.js → login-oauth-callback-C0Yzn98t.js} +1 -1
- package/dist/assets/{logo-uploader-C92RygU-.js → logo-uploader-Yiqh8Xsb.js} +3 -8
- package/dist/assets/{lost-passport-CyvlJVDU.js → lost-passport-CBEJtvpg.js} +3 -8
- package/dist/assets/{lottie-CiB5mRGQ.js → lottie-DCTKhPgK.js} +1 -1
- package/dist/assets/{notifications-DFJK_CK6.js → notifications-DlfutjZo.js} +1 -1
- package/dist/assets/{overview-ByKKC0Wf.js → overview-C3WvKiL8.js} +1 -1
- package/dist/assets/{page-header-D76-NKse.js → page-header-DB1oMxYZ.js} +1 -1
- package/dist/assets/{permission-BXkWisAp.js → permission-CVeDIziy.js} +1 -1
- package/dist/assets/{preferences-fcLALEf2.js → preferences-BF4TPaXU.js} +1 -1
- package/dist/assets/pt-si0ACe2m.js +1 -0
- package/dist/assets/publish-resource-CCcYHEdF.js +1 -0
- package/dist/assets/{react-BwCQpP1G.js → react-D9FeWmbF.js} +3 -8
- package/dist/assets/{redux-DmpN9W19.js → redux-BKFBM9c1.js} +1 -1
- package/dist/assets/{resource-dialog-D8ldNnHf.js → resource-dialog-DH4JN1dL.js} +1 -1
- package/dist/assets/ru-B36cpSA6.js +1 -0
- package/dist/assets/{selector-kydVKpOQ.js → selector-IWkHBJf_.js} +1 -1
- package/dist/assets/session-ILNIeI9B.js +1 -0
- package/dist/assets/{setup-dzxcOhmN.js → setup-Diuvu3PS.js} +3 -8
- package/dist/assets/{slicedToArray-DU-eek8d.js → slicedToArray-DnHIoP5Z.js} +1 -1
- package/dist/assets/{spaces-DRYZXLFG.js → spaces-BUpHalh2.js} +1 -1
- package/dist/assets/{start-c4xOf-_F.js → start-DSxrmuxL.js} +1 -1
- package/dist/assets/{step-actions-TeXA3nwv.js → step-actions--TIaLKQU.js} +1 -1
- package/dist/assets/{studio-BZyhPL0d.js → studio-D5qdrFFI.js} +1 -1
- package/dist/assets/{switch-control-DCkMN9BF.js → switch-control-DILMHf2e.js} +1 -1
- package/dist/assets/th-Dtc8_3Sk.js +1 -0
- package/dist/assets/{toUpper-CjV9m3Ri.js → toUpper-CIFpCqkj.js} +1 -1
- package/dist/assets/{transfer-DpLvcguv.js → transfer-CpDy03zQ.js} +1 -1
- package/dist/assets/{uniqBy-ZldLRpLn.js → uniqBy-nL0VNfmb.js} +1 -1
- package/dist/assets/{unsubscribe-BNiX1pQv.js → unsubscribe-BZZ6EJOH.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-KNpxhy8g.js → use-blocklet-info-for-connect-did-spaces-CoByyNYN.js} +1 -1
- package/dist/assets/{use-mobile-BJSItgsm.js → use-mobile-BODCjobT.js} +1 -1
- package/dist/assets/{useAsync-BCfTib8l.js → useAsync-h4yDkpBS.js} +1 -1
- package/dist/assets/{useFormControl-DjiWGw-4.js → useFormControl-C4z0mhkQ.js} +1 -1
- package/dist/assets/{useLocalStorage-X4ICANhs.js → useLocalStorage-CTDge60_.js} +1 -1
- package/dist/assets/{useSetState-Iv3vIu_6.js → useSetState-CohfnYJo.js} +1 -1
- package/dist/assets/{useSlot-CNuX1YPx.js → useSlot-DtZ9Ook-.js} +1 -1
- package/dist/assets/{user-center-D6qz1f_j.js → user-center-CshVonJy.js} +1 -1
- package/dist/assets/{user-sessions-BG3ptK_D.js → user-sessions-CVpJfcNl.js} +1 -1
- package/dist/assets/{util-uv4gXBvt.js → util-BcUfkqlN.js} +1 -1
- package/dist/assets/vi-DpH7bkpR.js +1 -0
- package/dist/assets/wrap-locale-CdxCC0ih.js +1 -0
- package/dist/assets/{zh-DFYC7Fxs.js → zh-Dizc5DZz.js} +1 -1
- package/dist/assets/zh-tw-Cb93tcSH.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +2 -2
- package/package.json +30 -30
- package/dist/assets/api-B1VCXDAO.js +0 -1
- package/dist/assets/ar-Dddeww2o.js +0 -1
- package/dist/assets/de-DW4wvz69.js +0 -1
- package/dist/assets/es-BC4y7ekp.js +0 -1
- package/dist/assets/fr-Bh7X0LzV.js +0 -1
- package/dist/assets/hi-C5T6hnmr.js +0 -1
- package/dist/assets/id--i3hYqpH.js +0 -1
- package/dist/assets/index-BMO4Ihe3.js +0 -1290
- package/dist/assets/index-FY6eeiZ6.js +0 -1
- package/dist/assets/ja-C77QFmoi.js +0 -1
- package/dist/assets/ko-8QnVzDQ_.js +0 -1
- package/dist/assets/localization-C8U3WpEe.js +0 -1
- package/dist/assets/pt-oJhQi3Od.js +0 -1
- package/dist/assets/publish-resource-CHtrWfuw.js +0 -1
- package/dist/assets/ru-B7iGcoyf.js +0 -1
- package/dist/assets/session-DPlS_DYv.js +0 -1
- package/dist/assets/th-CjtaiYYH.js +0 -1
- package/dist/assets/vi-UpnuPHCz.js +0 -1
- package/dist/assets/wrap-locale-D7pXP66z.js +0 -1
- package/dist/assets/zh-tw-BoPjNipK.js +0 -1
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
-
__vite__mapDeps.viteFileDeps = ["assets/overview-ByKKC0Wf.js","assets/index-BMO4Ihe3.js","assets/index-CCovGSMB.css","assets/domain-list-aj4kZKC5.js","assets/Add-BVQoXLYQ.js","assets/ExpandMore-BndjDFrJ.js","assets/LockIcon-BNztd01P.js","assets/index-BkSCYxhh.js","assets/did-address-CBQ9FVsK.js","assets/Link-CiUtxKAN.js","assets/permission-BXkWisAp.js","assets/useAsync-BCfTib8l.js","assets/session-DPlS_DYv.js","assets/index-C2_bBSe0.js","assets/confirm-B79ZFvOv.js","assets/Alert-BF_lUd2O.js","assets/useSlot-CNuX1YPx.js","assets/useSetState-Iv3vIu_6.js","assets/use-mobile-BJSItgsm.js","assets/InfoOutlined-BAWBdaLv.js","assets/OpenInNew-BxB42JEm.js","assets/index-BJkjo5Va.js","assets/api-B1VCXDAO.js","assets/index-Dyk6K-ww.js","assets/util-uv4gXBvt.js","assets/TextField-D20aQmWP.js","assets/FormControl-ZxrMEHzm.js","assets/useFormControl-DjiWGw-4.js","assets/InputLabel-D4U8NUgG.js","assets/Select-BQfv7_s7.js","assets/LoadingButton-CPv_vsmV.js","assets/Delete-BlrxAXJe.js","assets/actions-BcCGz9Re.js","assets/MoreHoriz-BCwX51Ah.js","assets/ListItemText-CB7ytq-7.js","assets/index-DSR9ZMoV.js","assets/index-BZITk3Yw.js","assets/useLocalStorage-X4ICANhs.js","assets/MoreVert-B-H_HhQs.js","assets/PlayArrow-DTQuX8YK.js","assets/ButtonGroup-UgLBgaoA.js","assets/RadioGroup-BW-fx4rg.js","assets/FormControlLabel-CQ-384sE.js","assets/FormGroup-CDYURYYc.js","assets/Avatar-CSYNG_ap.js","assets/spaces-DRYZXLFG.js","assets/index-BIAlibiF.js","assets/fallback-D6VL83P_.js","assets/index-Bi4cm6G8.js","assets/Toolbar-d-s6ylOk.js","assets/Hidden-BMZwRl0J.js","assets/index-CNMFx3LC.js","assets/selector-kydVKpOQ.js","assets/index-DHlSZXPc.js","assets/index-CDnLCCCt.js","assets/Loop-0pyy_NjN.js","assets/ViewList-DhDK5Yf-.js","assets/list-header-CSYg0zSD.js","assets/Search-_oBTcmFu.js","assets/index-Dyg6yC2m.js","assets/FilterList-D6SbWS9N.js","assets/toPropertyKey-hKuLU48H.js","assets/LastPage-DBHVYwPT.js","assets/index-DlJUlpsg.js","assets/redux-DmpN9W19.js","assets/index-DoNu9Eie.js","assets/resource-dialog-D8ldNnHf.js","assets/CloseOutlined-BgtNQh0m.js","assets/index-kAF1CJ4v.js","assets/user-sessions-BG3ptK_D.js","assets/click-to-copy-D7fl-E0W.js","assets/index-FY6eeiZ6.js","assets/index-BkBZ1jSw.js","assets/index-Y9dYAFEw.js","assets/EditIcon-Bz0X-WjK.js","assets/Google-CMn_H5AB.js","assets/InputAdornment-Dj0-ZTzp.js","assets/index-XXhxFMia.js","assets/iframe-BcYur1fq.js","assets/Edit-YBRVo81g.js","assets/Done-DLuhKlDY.js","assets/logo-uploader-C92RygU-.js","assets/ArrowDropDown-CnOX1-Ta.js","assets/ChevronRight-DXVqG2uX.js","assets/index.esm-CyDCVTJ_.js","assets/mode-B2dWMeTO.js","assets/Launch-B-9FZftI.js","assets/config-D27NuXtj.js","assets/switch-control-DCkMN9BF.js","assets/Slider-CpKT5r2s.js","assets/index-CCTM8ykz.js","assets/index-DU3JORH0.css","assets/audit-logs-DryUHEFi.js","assets/index-D3oM7uBi.js","assets/index-D4PP6P2d.css","assets/Pagination-BOAWzdOF.js","assets/index-ChMr9QKn.js","assets/log-C5Bbb3l_.js","assets/Download-VzhM36Mk.js","assets/log-D33dFtt_.css","assets/index-BIOB8MJl.js","assets/AddBox-UlAOF4HY.js","assets/Error-DcGEnpfC.js","assets/QuestionMarkCircle-BZmqi9hs.js","assets/DeleteOutline-zK8BDvYs.js","assets/item-BNT4w86f.js","assets/jss-plugin-props-sort.esm-C5hx4gxd.js","assets/Stepper-BwID29j4.js","assets/config-navigation-CDgETtNr.js","assets/slicedToArray-DU-eek8d.js","assets/index-B1Mn59ac.js","assets/Skeleton-C6XbpMEl.js","assets/index-BR28SABx.js","assets/use-blocklet-info-for-connect-did-spaces-KNpxhy8g.js","assets/component-CCkg4hKZ.js","assets/index-CgxxYM2U.js","assets/toUpper-CjV9m3Ri.js","assets/add-component-core-BUQN8K9L.js","assets/lottie-CiB5mRGQ.js","assets/config-space-BNPDP--2.js","assets/launch-result-message-C9zUfHXn.js","assets/Close-DUbNK6Vh.js","assets/page-header-D76-NKse.js","assets/uniqBy-ZldLRpLn.js","assets/index-DA_L5i46.js","assets/connect-to-BP9YJLOy.js","assets/content-layout-BDjWsMvh.js","assets/preact.module-B1z5cdvs.js","assets/add-component-core-CxkJY_14.css","assets/analytics-UTia3DwK.js","assets/LaunchOutlined-CuKBcPBF.js","assets/notifications-DFJK_CK6.js"]
|
|
4
|
-
}
|
|
5
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
|
-
}
|
|
7
|
-
import{r as m,aC as Yn,aD as Xn,aE as kt,aF as W,aG as Zn,aH as xe,aI as Pn,aJ as yt,j as c,aK as Jn,aL as vo,aM as yo,ar as qe,X as Y,Y as X,P as v,Z as nt,e as rt,aN as F,a0 as Nt,aO as xt,a9 as N,aP as xo,aQ as er,aR as ve,aA as Ut,aS as bo,L as tr,aT as bt,aU as wo,S as oe,a1 as be,z as Q,a7 as De,T as re,aV as So,p as U,aW as jo,aX as _o,aY as Co,aZ as wt,u as z,a_ as Se,B as $,G as Po,a$ as Oo,b0 as Eo,a as Qe,b1 as Ro,b2 as Io,b3 as Lo,b4 as To,b5 as Do,b6 as Ao,b7 as $o,b8 as Bo,b9 as Mo,ba as nr,bb as ko,bc as No,bd as Uo,be as Ft,bf as ot,bg as rr,bh as or,bi as sr,$ as st,bj as ir,bk as fe,bl as ye,bm as zt,bn as ar,bo as Fo,ab as St,bp as zo,bq as Ho,br as Vo,bs as qo,af as Ko,bt as Go,bu as Wo,ag as Ae,bv as Qo,az as Yo,C as Ye,bw as Xo,bx as Zo,aa as On,a6 as Jo,by as Ke,a5 as ze,bz as es,H as ts,a2 as H,bA as ns,al as rs,Q as En}from"./index-BMO4Ihe3.js";import{T as os}from"./index-BZITk3Yw.js";import{_ as ss}from"./useLocalStorage-X4ICANhs.js";import{d as is}from"./MoreVert-B-H_HhQs.js";import{C as Rn}from"./confirm-B79ZFvOv.js";import{d as as}from"./Delete-BlrxAXJe.js";import{d as cs,u as ls}from"./PlayArrow-DTQuX8YK.js";import{A as us}from"./Alert-BF_lUd2O.js";import{L as ds,a as cr}from"./ListItemText-CB7ytq-7.js";import{B as fs}from"./ButtonGroup-UgLBgaoA.js";import{R as ps,a as In}from"./RadioGroup-BW-fx4rg.js";import{F as jt,C as ms}from"./FormControlLabel-CQ-384sE.js";import{f as $e,A as lr}from"./index-C2_bBSe0.js";import{A as ur}from"./Avatar-CSYNG_ap.js";import{u as hs}from"./session-DPlS_DYv.js";import{D as gs,_ as dr,P as vs}from"./permission-BXkWisAp.js";import{T as fr}from"./index-DSR9ZMoV.js";import{g as ys,a as xs}from"./spaces-DRYZXLFG.js";import{E as pr}from"./Link-CiUtxKAN.js";import{_ as mr}from"./useSetState-Iv3vIu_6.js";import{E as bs}from"./fallback-D6VL83P_.js";import{u as ws}from"./index-Bi4cm6G8.js";import{L as Ss,D as js}from"./index-CNMFx3LC.js";import{c as _s}from"./useSlot-CNuX1YPx.js";const hr=e=>{const t=m.useRef({});return m.useEffect(()=>{t.current=e}),t.current};function Cs(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=hr({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:e,u=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:u}}function Ps(e){return Xn("MuiBadge",e)}const Os=Yn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ie=Os,Es=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],dt=10,ft=4,Rs=_s(),Is=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${W(n.vertical)}${W(n.horizontal)}`,`anchorOrigin${W(n.vertical)}${W(n.horizontal)}${W(o)}`,`overlap${W(o)}`,t!=="default"&&`color${W(t)}`]};return Jn(a,Ps,s)},Ls=kt("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Ts=kt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${W(n.anchorOrigin.vertical)}${W(n.anchorOrigin.horizontal)}${W(n.overlap)}`],n.color!=="default"&&t[`color${W(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:dt*2,lineHeight:1,padding:"0 6px",height:dt*2,borderRadius:dt,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:ft,height:ft*2,minWidth:ft*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),Ds=m.forwardRef(function(t,n){var r,o,i,s,a,l;const u=Rs({props:t,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:f,component:p,components:y={},componentsProps:b={},children:g,overlap:w="rectangular",color:R="default",invisible:h=!1,max:C=99,badgeContent:S,slots:P,slotProps:j,showZero:I=!1,variant:_="standard"}=u,E=Zn(u,Es),{badgeContent:L,invisible:T,max:Z,displayValue:B}=Cs({max:C,invisible:h,badgeContent:S,showZero:I}),le=hr({anchorOrigin:d,color:R,overlap:w,variant:_,badgeContent:S}),ue=T||L==null&&_!=="dot",{color:_e=R,overlap:Ce=w,anchorOrigin:O=d,variant:se=_}=ue?le:u,x=se!=="dot"?B:void 0,D=xe({},u,{badgeContent:L,invisible:ue,max:Z,displayValue:x,showZero:I,anchorOrigin:O,color:_e,overlap:Ce,variant:se}),V=Is(D),q=(r=(o=P==null?void 0:P.root)!=null?o:y.Root)!=null?r:Ls,J=(i=(s=P==null?void 0:P.badge)!=null?s:y.Badge)!=null?i:Ts,K=(a=j==null?void 0:j.root)!=null?a:b.root,M=(l=j==null?void 0:j.badge)!=null?l:b.badge,ut=Pn({elementType:q,externalSlotProps:K,externalForwardedProps:E,additionalProps:{ref:n,as:p},ownerState:D,className:yt(K==null?void 0:K.className,V.root,f)}),he=Pn({elementType:J,externalSlotProps:M,ownerState:D,className:yt(V.badge,M==null?void 0:M.className)});return c.jsxs(q,xe({},ut,{children:[g,c.jsx(J,xe({},he,{children:x}))]}))}),gr=Ds;function As(e){return Xn("MuiListItemAvatar",e)}Yn("MuiListItemAvatar",["root","alignItemsFlexStart"]);const $s=["className"],Bs=e=>{const{alignItems:t,classes:n}=e;return Jn({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},As,n)},Ms=kt("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>xe({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),ks=m.forwardRef(function(t,n){const r=vo({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=Zn(r,$s),s=m.useContext(yo),a=xe({},r,{alignItems:s.alignItems}),l=Bs(a);return c.jsx(Ms,xe({className:yt(l.root,o),ownerState:a,ref:n},i))}),Ns=ks,Us=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(qe(n.origin,t));return o.search=r.toString(),o.toString()};var Ht={},Fs=X;Object.defineProperty(Ht,"__esModule",{value:!0});var vr=Ht.default=void 0,zs=Fs(Y()),Hs=c;vr=Ht.default=(0,zs.default)((0,Hs.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Vt={},Vs=X;Object.defineProperty(Vt,"__esModule",{value:!0});var yr=Vt.default=void 0,qs=Vs(Y()),Ks=c;yr=Vt.default=(0,qs.default)((0,Ks.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 qt={},Gs=X;Object.defineProperty(qt,"__esModule",{value:!0});var xr=qt.default=void 0,Ws=Gs(Y()),Qs=c;xr=qt.default=(0,Ws.default)((0,Qs.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 Kt={},Ys=X;Object.defineProperty(Kt,"__esModule",{value:!0});var br=Kt.default=void 0,Xs=Ys(Y()),Zs=c;br=Kt.default=(0,Xs.default)((0,Zs.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 Gt={},Js=X;Object.defineProperty(Gt,"__esModule",{value:!0});var wr=Gt.default=void 0,ei=Js(Y()),ti=c;wr=Gt.default=(0,ei.default)((0,ti.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 Wt={},ni=X;Object.defineProperty(Wt,"__esModule",{value:!0});var Sr=Wt.default=void 0,ri=ni(Y()),oi=c;Sr=Wt.default=(0,ri.default)((0,oi.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 Qt={},si=X;Object.defineProperty(Qt,"__esModule",{value:!0});var jr=Qt.default=void 0,ii=si(Y()),ai=c;jr=Qt.default=(0,ii.default)((0,ai.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 Yt={};Object.defineProperty(Yt,"__esModule",{value:!0});var _r=Yt.default=void 0;ci(m);var Ln=c;function ci(e){return e&&e.__esModule?e:{default:e}}function Tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tn(Object(n),!0).forEach(function(r){li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function li(e,t,n){return t=ui(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e){var t=di(e,"string");return typeof t=="symbol"?t:String(t)}function di(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=function(t){return(0,Ln.jsx)("svg",Dn(Dn({},t),{},{children:(0,Ln.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33 8.207A11.52 11.52 0 0 1 23.504 26.34H8.496A11.52 11.52 0 0 1 9.33 8.207zM16 3.52a14.08 14.08 0 0 0-8.76 25.102c.226.18.506.278.796.278h15.928c.29 0 .57-.098.797-.278A14.08 14.08 0 0 0 16 3.52zm5.883 10.072a1.28 1.28 0 0 0-1.81-1.81l-2.205 2.205a4.124 4.124 0 1 0 1.81 1.81l2.205-2.205zm-7.447 4.073a1.564 1.564 0 1 1 3.128 0 1.564 1.564 0 0 1-3.129 0z",fill:"currentColor"})}))};Xt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Xt.displayName="dashboard";_r=Yt.default=Xt;const ne={Start:cs,Stop:vr,Restart:yr,Reload:xr,Remove:as,Config:br,Log:wr,Group:Sr,Cancel:jr,Dashboard:_r};function Zt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:s,...a}){const l=rt(),u=F(),[d,f]=m.useState(null),[p,y]=m.useState(null),[b,g]=m.useState(!1),[w,R]=m.useState(null),{t:h}=m.useContext(Nt),[C]=ss("skip-blocklet-setup",!1),{loading:S,recommendedUrl:P}=s(e),j=xt(e.status),[I,_]=m.useState(!1);m.useEffect(()=>{var D,V;if(!(e!=null&&e.controller))return;_(((V=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:V.value)===N.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,J,K;try{const M=await u.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(J=e==null?void 0:e.controller)==null?void 0:J.launcherUrl}});if(M!=null&&M.error){console.error("get launcher session failed",M.error);return}_([Q.LAUNCH_SESSION_STATUS.expired,Q.LAUNCH_SESSION_STATUS.terminated].includes((K=M==null?void 0:M.launcherSession)==null?void 0:K.status))}catch(M){console.error("call getLauncherSession error",M)}})()},[]);const{inService:E}=u,L=()=>{const x=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:x,blocklet:e});window.open(Us(D,".well-known/service/admin"))},T=(x,D,V=!1)=>async()=>{const q=async he=>{var Fe;t({action:x,blocklet:e}),g(!0),y(x);let Ue=!1;try{if(x==="remove")await D(he);else if(x==="start"){if(!So(e)){U.error(h("blocklet.noComponent"));return}if(!E&&!C&&!((Fe=e.settings)!=null&&Fe.initialized)&&e.mode!==N.BLOCKLET_MODES.DEVELOPMENT){const ee=jo(u.info),Cn=new URL(P);Cn.searchParams.set("serverUrl",ee),window.open(Cn.href),n({action:x,blocklet:e});return}const de=e.children.filter(ee=>!xt(ee.status)&&ee.status!=="running").map(ee=>ee.meta.did),ge={did:e.meta.did,componentDids:de};await D({input:ge})}else if(["stop","restart","reload"].includes(x)){const de=e.children.filter(ee=>ee.status==="running").map(ee=>ee.meta.did),ge={did:e.meta.did,componentDids:de};await D({input:ge})}else{const de={did:e.meta.did};await D({input:de})}x==="remove"?Ue=!0:await _o(1e3),x==="reload"&&U.success(h("blocklet.reloadSuccess")),R(null),n({action:x,blocklet:e})}catch(de){const ge=`Blocklet ${x} failed: ${$e(de)}`;throw n({action:x,blocklet:e,error:new Error(ge)}),new Error(ge)}finally{Ue||g(!1)}},J=()=>{g(!1),R(null)},K=De(e,!0),M=e.mode===N.BLOCKLET_MODES.DEVELOPMENT?{description:()=>c.jsx(re,{component:"div",children:c.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(he,Ue)=>c.jsxs(re,{component:"div",children:[c.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")}),c.jsxs(ps,{name:"removeType",value:he.removeType,onChange:Fe=>Ue({...he,removeType:Fe.target.value}),children:[c.jsx(jt,{value:"backup",control:c.jsx(In,{}),label:h("blocklet.action.removeApplicationAfterBackup")}),c.jsx(jt,{value:"complete",control:c.jsx(In,{}),label:h("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ut={stop:{title:`${h("common.stop")} ${K}`,description:h("blocklet.action.stopDescription"),confirm:h("blocklet.action.confirmStop"),cancel:h("common.cancel"),onConfirm:q,onCancel:J},restart:{title:`${h("common.restart")} ${K}`,description:h("blocklet.action.restartDescription"),confirm:h("blocklet.action.confirmRestart"),cancel:h("common.cancel"),onConfirm:q,onCancel:J},remove:{title:`${h("common.remove")} ${K}`,confirm:h("blocklet.action.confirmRemove"),cancel:h("common.cancel"),onConfirm:q,onCancel:J,...M},cancelDownload:{title:`${h("common.cancel")}`,description:h("blocklet.action.cancelDownloadDescription",{name:K}),confirm:h("common.confirm"),cancel:h("common.cancel"),onConfirm:q,onCancel:J}};V?R(ut[x]):await q()},Z=!!d,B=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}f(x.currentTarget)},le=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}f(null)},ue=async(x,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof x.handler=="function")try{g(!0),y(x.action),await x.handler()}catch(V){console.error(`Blocklet ${x.name} failed: `,V)}finally{g(!1),f(null)}else f(null)},_e=!E&&xo(e)?{action:"remove",icon:ne.Remove,name:h("common.remove"),handler:T("remove",async({removeType:x})=>{x==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Ce={action:"remove",icon:({sx:x,...D})=>c.jsx(ne.Cancel,{sx:{...x,paddingRight:"2px",zoom:.95},...D}),name:h("common.cancel"),handler:T("cancelDownload",u.api.cancelDownloadBlocklet,!0)},O=er(e),se=[{action:"start",icon:ne.Start,name:h("common.start"),handler:T("start",u.api.startBlocklet),disabled:I||e.children.every(x=>x.status==="running")||ve(e.status)||S||j},{action:"stop",icon:ne.Stop,name:h("common.stop"),handler:T("stop",u.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:ne.Restart,name:h("common.restart"),handler:T("restart",u.api.restartBlocklet,!0),disabled:I||e.status!=="running"},ve(e.status)?Ce:_e,{separator:!0},E?null:{action:"dashboard",icon:({style:x,...D})=>c.jsx(ne.Dashboard,{...D,style:{...x,width:"26px",height:"26px",paddingRight:"3px"}}),name:h("sidebar.dashboard"),handler:L,disabled:I||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:ne.Config,name:h("common.config"),handler:()=>{l(`/blocklets/${e.meta.did}/configuration`)},disabled:ve(e.status)},{onlyInMenu:!0,action:"team",icon:ne.Group,name:h("common.manageTeam"),handler:()=>{l(`/blocklets/${e.meta.did}/members`)},disabled:ve(e.status)},{onlyInMenu:!0,action:"log",icon:ne.Log,name:h("common.log"),handler:()=>{l(`/logs/blocklet-${e.meta.did}`)},disabled:ve(e.status)}].filter(Boolean);return r==="menu"?c.jsxs(An,{"data-cy":"blocklet-actions",children:[c.jsx(Ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:B,size:"small",disabled:!o||!ve(e.status)&&b,children:c.jsx(is,{})}),c.jsxs(bo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:Z,onClose:le,PaperProps:{},children:[O.length>0&&c.jsxs(us,{style:{maxWidth:"400px"},severity:"error",children:[h("blocklet.config.missingRequired"),c.jsx("br",{}),c.jsx(tr,{to:`/blocklets/${e.meta.did}/components`,children:h("blocklet.config.gotoFix")})]}),se.map((x,D)=>x.separator?c.jsx(bt,{},`separator-${D}`):c.jsxs(wo,{dense:!0,onClick:V=>ue(x,V),disabled:b||x.disabled,"data-cy":`${x.action}-blocklet`,children:[c.jsx(ds,{style:{minWidth:24},children:p===x.action&&b?c.jsx(oe,{size:16,sx:{marginRight:1}}):c.jsx(x.icon,{fontSize:"small"})}),c.jsx(cr,{primary:x.name})]},x.name))]}),w&&c.jsx(Rn,{title:w.title,description:w.description,confirm:w.confirm,cancel:w.cancel,params:w.params,onConfirm:w.onConfirm,onCancel:w.onCancel})]}):c.jsxs(An,{"data-cy":"blocklet-actions",...a,children:[c.jsx(fs,{children:se.filter(x=>!x.separator&&!x.onlyInMenu).map(x=>c.jsxs(be,{title:x.name,"data-cy":`${x.action}-blocklet`,onClick:()=>ue(x),disabled:!!x.disabled||b,children:[p===x.action&&b?c.jsx(oe,{size:16,sx:{marginRight:1}}):c.jsx(x.icon,{}),c.jsx("span",{className:"blocklet-action-text",children:x.name})]},x.name))}),w&&c.jsx(Rn,{title:w.title,description:w.description,confirm:w.confirm,cancel:w.cancel,params:w.params,onConfirm:w.onConfirm,onCancel:w.onCancel})]})}Zt.propTypes={getComponentUrl:v.func,blocklet:v.object.isRequired,onStart:v.func.isRequired,onComplete:v.func.isRequired,variant:v.oneOf(["menu","group"]),hasPermission:v.bool,useBlockletUrlEvaluation:v.func};Zt.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 An=nt.div`
|
|
1
|
+
const __vite__fileDeps=["assets/overview-C3WvKiL8.js","assets/index-DjHVJgEb.js","assets/index-CCovGSMB.css","assets/domain-list-DnS4QZQH.js","assets/Add-BfGbf5fM.js","assets/ExpandMore-Bmc991mR.js","assets/LockIcon-CwR1Wr8T.js","assets/index-ByZIhpLO.js","assets/did-address-DVnFoCGu.js","assets/Link-CQSt46qQ.js","assets/permission-CVeDIziy.js","assets/useAsync-h4yDkpBS.js","assets/session-ILNIeI9B.js","assets/index-Dif3kXIs.js","assets/confirm-CC9pusf0.js","assets/Alert-DhIUHY_Y.js","assets/useSlot-DtZ9Ook-.js","assets/useSetState-CohfnYJo.js","assets/use-mobile-BODCjobT.js","assets/InfoOutlined-D1lpk2Qr.js","assets/OpenInNew-BytIBfg-.js","assets/index-OrmONpg6.js","assets/api-B7uSDjXA.js","assets/index-CDph40kL.js","assets/util-BcUfkqlN.js","assets/TextField-CLMWLIuC.js","assets/FormControl-ClV6bw9J.js","assets/useFormControl-C4z0mhkQ.js","assets/InputLabel-DN6OfB3A.js","assets/Select-1Dinc8Yp.js","assets/LoadingButton-BGVanlpP.js","assets/Delete-Cpd8FOmd.js","assets/actions-B17gi4AR.js","assets/MoreHoriz-BwAZLDwN.js","assets/ListItemText-Ba0FMRbi.js","assets/index-_5UNf-lD.js","assets/index-zu3Rca7R.js","assets/useLocalStorage-CTDge60_.js","assets/MoreVert-tVywlmBc.js","assets/PlayArrow-BSY89sRP.js","assets/ButtonGroup-BtWCyRpR.js","assets/RadioGroup-BIXMwxZw.js","assets/FormControlLabel-9KA35zPZ.js","assets/FormGroup-Bg7QggRn.js","assets/Avatar-u9A7w1uS.js","assets/spaces-BUpHalh2.js","assets/index-Dvctn93d.js","assets/fallback-DW1BPmkT.js","assets/index-CLpANdOY.js","assets/Toolbar-1EuU30BI.js","assets/Hidden-DA9ywHhR.js","assets/index-CQCSfSoC.js","assets/selector-IWkHBJf_.js","assets/index-DFcNK_4r.js","assets/index-BY7dG1lw.js","assets/Loop-DbXoWlWL.js","assets/ViewList-B149pUW0.js","assets/list-header-Bczk_hYE.js","assets/Search-2bXEizB_.js","assets/index-BQJ2uDVC.js","assets/FilterList-DmdrZZw7.js","assets/toPropertyKey-hKuLU48H.js","assets/LastPage-CDZ5JAj2.js","assets/index-DlwIp1my.js","assets/redux-BKFBM9c1.js","assets/index-D6n3Sl-J.js","assets/resource-dialog-DH4JN1dL.js","assets/CloseOutlined-DqxN9Rwg.js","assets/index-BVeqDJW5.js","assets/user-sessions-CVpJfcNl.js","assets/click-to-copy-CsvH74tu.js","assets/index-BN0K5IgA.js","assets/index-DyE15ANN.js","assets/index-BObX8X6d.js","assets/EditIcon-DdpwVUQF.js","assets/Google-qlMjYK1-.js","assets/InputAdornment-BzQ3c-E3.js","assets/index-BlB9L1cj.js","assets/iframe-DYHc53WZ.js","assets/Edit-CwaqKZ3U.js","assets/Done-Be6q-JLL.js","assets/logo-uploader-Yiqh8Xsb.js","assets/ArrowDropDown-DbKEcNzg.js","assets/ChevronRight-B0jQ1ZQU.js","assets/index.esm-Iufk0TOV.js","assets/mode-B2dWMeTO.js","assets/Launch-sa0zbPVh.js","assets/config-uuaV6CSC.js","assets/switch-control-DILMHf2e.js","assets/Slider-DqwF7WWE.js","assets/index-Dgnhn1Xb.js","assets/index-DU3JORH0.css","assets/audit-logs-BSYj2Eqk.js","assets/index-DSPY1tXp.js","assets/index-D4PP6P2d.css","assets/Pagination-CCq9jc57.js","assets/index-PLOHydaJ.js","assets/log-TIkOb3Jo.js","assets/Download-chfr705H.js","assets/log-D33dFtt_.css","assets/index-Cr-HBE-f.js","assets/AddBox-CIsbWF-N.js","assets/Error-DGcp_I5U.js","assets/QuestionMarkCircle-BndoO-vP.js","assets/DeleteOutline-FfHSR8rg.js","assets/item-DTQY9ESG.js","assets/jss-plugin-props-sort.esm-CB7H7rcz.js","assets/Stepper-Xx7c-2Tg.js","assets/config-navigation-B9ZF6bIT.js","assets/slicedToArray-DnHIoP5Z.js","assets/index-D5-zht6p.js","assets/Skeleton-BTn7VLB8.js","assets/index-DjvzkTr4.js","assets/use-blocklet-info-for-connect-did-spaces-CoByyNYN.js","assets/component-BVC9S5oR.js","assets/index-BoxjQ47z.js","assets/toUpper-CIFpCqkj.js","assets/add-component-core-CJA9PjM8.js","assets/lottie-DCTKhPgK.js","assets/config-space-DArp6G85.js","assets/launch-result-message-DjAhiZ71.js","assets/Close-Djl_EWhz.js","assets/page-header-DB1oMxYZ.js","assets/uniqBy-nL0VNfmb.js","assets/index-DMLfjHw7.js","assets/connect-to-BGZ7Fofh.js","assets/content-layout-DuQjcHhv.js","assets/preact.module-B1z5cdvs.js","assets/add-component-core-CxkJY_14.css","assets/analytics-DMRryrbp.js","assets/LaunchOutlined-DxT18366.js","assets/notifications-DlfutjZo.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{r as m,aC as Yn,aD as Xn,aE as Nt,aF as W,aG as Zn,aH as xe,aI as Pn,aJ as yt,j as c,aK as Jn,aL as vo,aM as yo,ar as qe,X as Y,Y as X,P as v,Z as nt,e as rt,aN as F,a0 as kt,aO as xt,a9 as k,aP as xo,aQ as er,aR as ve,aA as Ut,aS as bo,L as tr,aT as bt,aU as wo,S as oe,a1 as be,z as Q,a7 as De,T as re,aV as So,p as U,aW as jo,aX as _o,aY as Co,aZ as wt,u as z,a_ as Se,B as A,G as Po,a$ as Oo,b0 as Eo,a as Qe,b1 as Ro,b2 as Io,b3 as Lo,b4 as To,b5 as Do,b6 as Ao,b7 as $o,b8 as Bo,b9 as Mo,ba as nr,bb as No,bc as ko,bd as Uo,be as Ft,bf as ot,bg as rr,bh as or,bi as sr,$ as st,bj as ir,bk as fe,bl as ye,bm as zt,bn as ar,bo as Fo,ab as St,bp as zo,bq as Ho,br as Vo,bs as qo,af as Ko,bt as Go,bu as Wo,ag as Ae,bv as Qo,az as Yo,C as Ye,bw as Xo,bx as Zo,aa as On,a6 as Jo,by as Ke,a5 as ze,bz as es,H as ts,a2 as H,bA as ns,al as rs,Q as En}from"./index-DjHVJgEb.js";import{T as os}from"./index-zu3Rca7R.js";import{_ as ss}from"./useLocalStorage-CTDge60_.js";import{d as is}from"./MoreVert-tVywlmBc.js";import{C as Rn}from"./confirm-CC9pusf0.js";import{d as as}from"./Delete-Cpd8FOmd.js";import{d as cs,u as ls}from"./PlayArrow-BSY89sRP.js";import{A as us}from"./Alert-DhIUHY_Y.js";import{L as ds,a as cr}from"./ListItemText-Ba0FMRbi.js";import{B as fs}from"./ButtonGroup-BtWCyRpR.js";import{R as ps,a as In}from"./RadioGroup-BIXMwxZw.js";import{F as jt,C as ms}from"./FormControlLabel-9KA35zPZ.js";import{f as $e,A as lr}from"./index-Dif3kXIs.js";import{A as ur}from"./Avatar-u9A7w1uS.js";import{u as hs}from"./session-ILNIeI9B.js";import{D as gs,_ as dr,P as vs}from"./permission-CVeDIziy.js";import{T as fr}from"./index-_5UNf-lD.js";import{g as ys,a as xs}from"./spaces-BUpHalh2.js";import{E as pr}from"./Link-CQSt46qQ.js";import{_ as mr}from"./useSetState-CohfnYJo.js";import{E as bs}from"./fallback-DW1BPmkT.js";import{u as ws}from"./index-CLpANdOY.js";import{L as Ss,D as js}from"./index-CQCSfSoC.js";import{c as _s}from"./useSlot-DtZ9Ook-.js";const hr=e=>{const t=m.useRef({});return m.useEffect(()=>{t.current=e}),t.current};function Cs(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=hr({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:e,u=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:u}}function Ps(e){return Xn("MuiBadge",e)}const Os=Yn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),ie=Os,Es=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],dt=10,ft=4,Rs=_s(),Is=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${W(n.vertical)}${W(n.horizontal)}`,`anchorOrigin${W(n.vertical)}${W(n.horizontal)}${W(o)}`,`overlap${W(o)}`,t!=="default"&&`color${W(t)}`]};return Jn(a,Ps,s)},Ls=Nt("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Ts=Nt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${W(n.anchorOrigin.vertical)}${W(n.anchorOrigin.horizontal)}${W(n.overlap)}`],n.color!=="default"&&t[`color${W(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:dt*2,lineHeight:1,padding:"0 6px",height:dt*2,borderRadius:dt,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:ft,height:ft*2,minWidth:ft*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ie.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),Ds=m.forwardRef(function(t,n){var r,o,i,s,a,l;const u=Rs({props:t,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:f,component:p,components:y={},componentsProps:b={},children:g,overlap:w="rectangular",color:R="default",invisible:h=!1,max:C=99,badgeContent:S,slots:P,slotProps:j,showZero:I=!1,variant:_="standard"}=u,E=Zn(u,Es),{badgeContent:L,invisible:T,max:Z,displayValue:B}=Cs({max:C,invisible:h,badgeContent:S,showZero:I}),le=hr({anchorOrigin:d,color:R,overlap:w,variant:_,badgeContent:S}),ue=T||L==null&&_!=="dot",{color:_e=R,overlap:Ce=w,anchorOrigin:O=d,variant:se=_}=ue?le:u,x=se!=="dot"?B:void 0,D=xe({},u,{badgeContent:L,invisible:ue,max:Z,displayValue:x,showZero:I,anchorOrigin:O,color:_e,overlap:Ce,variant:se}),V=Is(D),q=(r=(o=P==null?void 0:P.root)!=null?o:y.Root)!=null?r:Ls,J=(i=(s=P==null?void 0:P.badge)!=null?s:y.Badge)!=null?i:Ts,K=(a=j==null?void 0:j.root)!=null?a:b.root,M=(l=j==null?void 0:j.badge)!=null?l:b.badge,ut=Pn({elementType:q,externalSlotProps:K,externalForwardedProps:E,additionalProps:{ref:n,as:p},ownerState:D,className:yt(K==null?void 0:K.className,V.root,f)}),he=Pn({elementType:J,externalSlotProps:M,ownerState:D,className:yt(V.badge,M==null?void 0:M.className)});return c.jsxs(q,xe({},ut,{children:[g,c.jsx(J,xe({},he,{children:x}))]}))}),gr=Ds;function As(e){return Xn("MuiListItemAvatar",e)}Yn("MuiListItemAvatar",["root","alignItemsFlexStart"]);const $s=["className"],Bs=e=>{const{alignItems:t,classes:n}=e;return Jn({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},As,n)},Ms=Nt("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>xe({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),Ns=m.forwardRef(function(t,n){const r=vo({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=Zn(r,$s),s=m.useContext(yo),a=xe({},r,{alignItems:s.alignItems}),l=Bs(a);return c.jsx(Ms,xe({className:yt(l.root,o),ownerState:a,ref:n},i))}),ks=Ns,Us=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(qe(n.origin,t));return o.search=r.toString(),o.toString()};var Ht={},Fs=X;Object.defineProperty(Ht,"__esModule",{value:!0});var vr=Ht.default=void 0,zs=Fs(Y()),Hs=c;vr=Ht.default=(0,zs.default)((0,Hs.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Vt={},Vs=X;Object.defineProperty(Vt,"__esModule",{value:!0});var yr=Vt.default=void 0,qs=Vs(Y()),Ks=c;yr=Vt.default=(0,qs.default)((0,Ks.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 qt={},Gs=X;Object.defineProperty(qt,"__esModule",{value:!0});var xr=qt.default=void 0,Ws=Gs(Y()),Qs=c;xr=qt.default=(0,Ws.default)((0,Qs.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 Kt={},Ys=X;Object.defineProperty(Kt,"__esModule",{value:!0});var br=Kt.default=void 0,Xs=Ys(Y()),Zs=c;br=Kt.default=(0,Xs.default)((0,Zs.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 Gt={},Js=X;Object.defineProperty(Gt,"__esModule",{value:!0});var wr=Gt.default=void 0,ei=Js(Y()),ti=c;wr=Gt.default=(0,ei.default)((0,ti.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 Wt={},ni=X;Object.defineProperty(Wt,"__esModule",{value:!0});var Sr=Wt.default=void 0,ri=ni(Y()),oi=c;Sr=Wt.default=(0,ri.default)((0,oi.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 Qt={},si=X;Object.defineProperty(Qt,"__esModule",{value:!0});var jr=Qt.default=void 0,ii=si(Y()),ai=c;jr=Qt.default=(0,ii.default)((0,ai.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 Yt={};Object.defineProperty(Yt,"__esModule",{value:!0});var _r=Yt.default=void 0;ci(m);var Ln=c;function ci(e){return e&&e.__esModule?e:{default:e}}function Tn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tn(Object(n),!0).forEach(function(r){li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function li(e,t,n){return t=ui(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e){var t=di(e,"string");return typeof t=="symbol"?t:String(t)}function di(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=function(t){return(0,Ln.jsx)("svg",Dn(Dn({},t),{},{children:(0,Ln.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33 8.207A11.52 11.52 0 0 1 23.504 26.34H8.496A11.52 11.52 0 0 1 9.33 8.207zM16 3.52a14.08 14.08 0 0 0-8.76 25.102c.226.18.506.278.796.278h15.928c.29 0 .57-.098.797-.278A14.08 14.08 0 0 0 16 3.52zm5.883 10.072a1.28 1.28 0 0 0-1.81-1.81l-2.205 2.205a4.124 4.124 0 1 0 1.81 1.81l2.205-2.205zm-7.447 4.073a1.564 1.564 0 1 1 3.128 0 1.564 1.564 0 0 1-3.129 0z",fill:"currentColor"})}))};Xt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Xt.displayName="dashboard";_r=Yt.default=Xt;const ne={Start:cs,Stop:vr,Restart:yr,Reload:xr,Remove:as,Config:br,Log:wr,Group:Sr,Cancel:jr,Dashboard:_r};function Zt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:s,...a}){const l=rt(),u=F(),[d,f]=m.useState(null),[p,y]=m.useState(null),[b,g]=m.useState(!1),[w,R]=m.useState(null),{t:h}=m.useContext(kt),[C]=ss("skip-blocklet-setup",!1),{loading:S,recommendedUrl:P}=s(e),j=xt(e.status),[I,_]=m.useState(!1);m.useEffect(()=>{var D,V;if(!(e!=null&&e.controller))return;_(((V=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:V.value)===k.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,J,K;try{const M=await u.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(J=e==null?void 0:e.controller)==null?void 0:J.launcherUrl}});if(M!=null&&M.error){console.error("get launcher session failed",M.error);return}_([Q.LAUNCH_SESSION_STATUS.expired,Q.LAUNCH_SESSION_STATUS.terminated].includes((K=M==null?void 0:M.launcherSession)==null?void 0:K.status))}catch(M){console.error("call getLauncherSession error",M)}})()},[]);const{inService:E}=u,L=()=>{const x=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:x,blocklet:e});window.open(Us(D,".well-known/service/admin"))},T=(x,D,V=!1)=>async()=>{const q=async he=>{var Fe;t({action:x,blocklet:e}),g(!0),y(x);let Ue=!1;try{if(x==="remove")await D(he);else if(x==="start"){if(!So(e)){U.error(h("blocklet.noComponent"));return}if(!E&&!C&&!((Fe=e.settings)!=null&&Fe.initialized)&&e.mode!==k.BLOCKLET_MODES.DEVELOPMENT){const ee=jo(u.info),Cn=new URL(P);Cn.searchParams.set("serverUrl",ee),window.open(Cn.href),n({action:x,blocklet:e});return}const de=e.children.filter(ee=>!xt(ee.status)&&ee.status!=="running").map(ee=>ee.meta.did),ge={did:e.meta.did,componentDids:de};await D({input:ge})}else if(["stop","restart","reload"].includes(x)){const de=e.children.filter(ee=>ee.status==="running").map(ee=>ee.meta.did),ge={did:e.meta.did,componentDids:de};await D({input:ge})}else{const de={did:e.meta.did};await D({input:de})}x==="remove"?Ue=!0:await _o(1e3),x==="reload"&&U.success(h("blocklet.reloadSuccess")),R(null),n({action:x,blocklet:e})}catch(de){const ge=`Blocklet ${x} failed: ${$e(de)}`;throw n({action:x,blocklet:e,error:new Error(ge)}),new Error(ge)}finally{Ue||g(!1)}},J=()=>{g(!1),R(null)},K=De(e,!0),M=e.mode===k.BLOCKLET_MODES.DEVELOPMENT?{description:()=>c.jsx(re,{component:"div",children:c.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(he,Ue)=>c.jsxs(re,{component:"div",children:[c.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")}),c.jsxs(ps,{name:"removeType",value:he.removeType,onChange:Fe=>Ue({...he,removeType:Fe.target.value}),children:[c.jsx(jt,{value:"backup",control:c.jsx(In,{}),label:h("blocklet.action.removeApplicationAfterBackup")}),c.jsx(jt,{value:"complete",control:c.jsx(In,{}),label:h("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ut={stop:{title:`${h("common.stop")} ${K}`,description:h("blocklet.action.stopDescription"),confirm:h("blocklet.action.confirmStop"),cancel:h("common.cancel"),onConfirm:q,onCancel:J},restart:{title:`${h("common.restart")} ${K}`,description:h("blocklet.action.restartDescription"),confirm:h("blocklet.action.confirmRestart"),cancel:h("common.cancel"),onConfirm:q,onCancel:J},remove:{title:`${h("common.remove")} ${K}`,confirm:h("blocklet.action.confirmRemove"),cancel:h("common.cancel"),onConfirm:q,onCancel:J,...M},cancelDownload:{title:`${h("common.cancel")}`,description:h("blocklet.action.cancelDownloadDescription",{name:K}),confirm:h("common.confirm"),cancel:h("common.cancel"),onConfirm:q,onCancel:J}};V?R(ut[x]):await q()},Z=!!d,B=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}f(x.currentTarget)},le=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}f(null)},ue=async(x,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof x.handler=="function")try{g(!0),y(x.action),await x.handler()}catch(V){console.error(`Blocklet ${x.name} failed: `,V)}finally{g(!1),f(null)}else f(null)},_e=!E&&xo(e)?{action:"remove",icon:ne.Remove,name:h("common.remove"),handler:T("remove",async({removeType:x})=>{x==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Ce={action:"remove",icon:({sx:x,...D})=>c.jsx(ne.Cancel,{sx:{...x,paddingRight:"2px",zoom:.95},...D}),name:h("common.cancel"),handler:T("cancelDownload",u.api.cancelDownloadBlocklet,!0)},O=er(e),se=[{action:"start",icon:ne.Start,name:h("common.start"),handler:T("start",u.api.startBlocklet),disabled:I||e.children.every(x=>x.status==="running")||ve(e.status)||S||j},{action:"stop",icon:ne.Stop,name:h("common.stop"),handler:T("stop",u.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:ne.Restart,name:h("common.restart"),handler:T("restart",u.api.restartBlocklet,!0),disabled:I||e.status!=="running"},ve(e.status)?Ce:_e,{separator:!0},E?null:{action:"dashboard",icon:({style:x,...D})=>c.jsx(ne.Dashboard,{...D,style:{...x,width:"26px",height:"26px",paddingRight:"3px"}}),name:h("sidebar.dashboard"),handler:L,disabled:I||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:ne.Config,name:h("common.config"),handler:()=>{l(`/blocklets/${e.meta.did}/configuration`)},disabled:ve(e.status)},{onlyInMenu:!0,action:"team",icon:ne.Group,name:h("common.manageTeam"),handler:()=>{l(`/blocklets/${e.meta.did}/members`)},disabled:ve(e.status)},{onlyInMenu:!0,action:"log",icon:ne.Log,name:h("common.log"),handler:()=>{l(`/logs/blocklet-${e.meta.did}`)},disabled:ve(e.status)}].filter(Boolean);return r==="menu"?c.jsxs(An,{"data-cy":"blocklet-actions",children:[c.jsx(Ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:B,size:"small",disabled:!o||!ve(e.status)&&b,children:c.jsx(is,{})}),c.jsxs(bo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:Z,onClose:le,PaperProps:{},children:[O.length>0&&c.jsxs(us,{style:{maxWidth:"400px"},severity:"error",children:[h("blocklet.config.missingRequired"),c.jsx("br",{}),c.jsx(tr,{to:`/blocklets/${e.meta.did}/components`,children:h("blocklet.config.gotoFix")})]}),se.map((x,D)=>x.separator?c.jsx(bt,{},`separator-${D}`):c.jsxs(wo,{dense:!0,onClick:V=>ue(x,V),disabled:b||x.disabled,"data-cy":`${x.action}-blocklet`,children:[c.jsx(ds,{style:{minWidth:24},children:p===x.action&&b?c.jsx(oe,{size:16,sx:{marginRight:1}}):c.jsx(x.icon,{fontSize:"small"})}),c.jsx(cr,{primary:x.name})]},x.name))]}),w&&c.jsx(Rn,{title:w.title,description:w.description,confirm:w.confirm,cancel:w.cancel,params:w.params,onConfirm:w.onConfirm,onCancel:w.onCancel})]}):c.jsxs(An,{"data-cy":"blocklet-actions",...a,children:[c.jsx(fs,{children:se.filter(x=>!x.separator&&!x.onlyInMenu).map(x=>c.jsxs(be,{title:x.name,"data-cy":`${x.action}-blocklet`,onClick:()=>ue(x),disabled:!!x.disabled||b,children:[p===x.action&&b?c.jsx(oe,{size:16,sx:{marginRight:1}}):c.jsx(x.icon,{}),c.jsx("span",{className:"blocklet-action-text",children:x.name})]},x.name))}),w&&c.jsx(Rn,{title:w.title,description:w.description,confirm:w.confirm,cancel:w.cancel,params:w.params,onConfirm:w.onConfirm,onCancel:w.onCancel})]})}Zt.propTypes={getComponentUrl:v.func,blocklet:v.object.isRequired,onStart:v.func.isRequired,onComplete:v.func.isRequired,variant:v.oneOf(["menu","group"]),hasPermission:v.bool,useBlockletUrlEvaluation:v.func};Zt.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 An=nt.div`
|
|
8
3
|
display: flex;
|
|
9
4
|
align-items: center;
|
|
10
5
|
|
|
@@ -14,7 +9,7 @@ import{r as m,aC as Yn,aD as Xn,aE as kt,aF as W,aG as Zn,aH as xe,aI as Pn,aJ a
|
|
|
14
9
|
font-size: 10px;
|
|
15
10
|
}
|
|
16
11
|
}
|
|
17
|
-
`,pt=(e,t)=>{var r;let n="?v=";return t?n+=Co(t):n+=`${(r=e==null?void 0:e.meta)==null?void 0:r.version}${wt(e==null?void 0:e.status)?"~":""}`,n};function fi({blocklet:e}){var u,d,f,p;const{inService:t}=F(),n=(u=((e==null?void 0:e.environments)||[]).find(y=>y.key===N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:u.value,r=(d=((e==null?void 0:e.environments)||[]).find(y=>y.key===N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:d.value,o=(f=((e==null?void 0:e.environments)||[]).find(y=>y.key===N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:f.value,i=((p=window.env)==null?void 0:p.apiPrefix)||"/",s=qe(i,`/blocklet/logo/${t?"":e.meta.did}`,pt(e,n)),a=qe(i,`/blocklet/logo-rect/${t?"":e.meta.did}`,pt(e,r)),l=qe(i,`/blocklet/logo-favicon/${t?"":e.meta.did}`,pt(e,o));return{logoUrl:s,rectLogoUrl:a,faviconUrl:l}}function Jt({blocklet:e,style:t,size:n,...r}){const{logoUrl:o}=fi({blocklet:e}),{variant:i}=r;return c.jsx(ur,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},t),...r,children:c.jsx("img",{src:o,alt:"",style:{width:n}})})}Jt.propTypes={blocklet:v.object.isRequired,style:v.object,size:v.oneOfType([v.number,v.string])};Jt.defaultProps={style:{},size:40};const pi=e=>{const t={};let n=null;return Eo(e,r=>{t[r.meta.bundleDid]?n=De(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},mi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;const l=a[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith(Q.DEFAULT_DID_DOMAIN))||"").replace(`.${Q.DEFAULT_DID_DOMAIN}`,"");return d?o.replace(r,`${d}-${l}.${Q.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Cr(){const{t:e}=z(),{api:t}=hs(),{blocklet:n}=Se(),{inService:r}=F(),[o,i]=m.useState(!1),[s,a]=m.useState(5),l=n&&n.structVersion!==Q.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){U.error(e("blocklet.migrate.tip.running"));return}const p=pi(n);if(p){U.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){U.error($e(p))}},d=()=>{const p=mi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),a(5),setInterval(()=>{a(y=>y-1)},1e3)},f=()=>i(!1);return[l&&c.jsxs(lr,{type:"warning",style:{margin:"12px 0"},children:[c.jsxs($,{display:"flex",alignItems:"center",children:[c.jsx(be,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),c.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>c.jsx($,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&c.jsx(Po,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Oo(n,!0),title:De(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:f},"connect")]}Cr.propTypes={};function en({children:e,style:t,...n}){return c.jsx(fr,{style:t,...n,children:e})}en.propTypes={children:v.any.isRequired,style:v.object};en.defaultProps={style:{}};const k={yellow:"#FFCF71",grey:"#888888"};function tn({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:s}=m.useContext(Nt),a={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:k.grey,waiting:k.yellow,downloading:k.yellow,extracting:k.yellow,downloaded:k.grey,installing:k.yellow,installed:k.grey,starting:k.yellow,running:"success",stopping:k.yellow,stopped:k.grey,error:"error",upgrading:k.yellow,restarting:k.yellow,corrupted:"error",deleting:k.yellow,resource:"primary"},u=xt(t),d=e&&t==="stopped"?"resource":t,f=s(`blocklet.status.${d}`);return n==="dot"?c.jsx(Qe,{title:s("blocklet.statusTip",{status:f}),children:c.jsx(gs,{color:l[d],...i})}):c.jsxs(en,{type:a[d],...i,children:[u&&c.jsx(oe,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&o?c.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}tn.propTypes={status:v.string.isRequired,variant:v.oneOf(["dot","tag"]),source:v.string,progress:v.number,isResource:v.bool};tn.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};var hi=Ro,gi=To,vi=Do,yi=Io,xi=Lo,bi=Ao,wi=200;function Si(e,t,n,r){var o=-1,i=gi,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=yi(t,xi(n))),r?(i=vi,s=!1):t.length>=wi&&(i=bi,s=!1,t=new hi(t));e:for(;++o<a;){var d=e[o],f=n==null?d:n(d);if(d=r||d!==0?d:0,s&&f===f){for(var p=u;p--;)if(t[p]===f)continue e;l.push(d)}else i(t,f,r)||l.push(d)}return l}var ji=Si,_i=ji,Ci=$o,$n=Bo;function Pi(e,t,n){var r=e.length;if(r<2)return r?$n(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var s=e[o],a=-1;++a<r;)a!=o&&(i[o]=_i(i[o]||s,e[a],t,n));return $n(Ci(i,1),t,n)}var Oi=Pi,Ei=ko,Ri=Mo,Ii=Oi,Li=Uo,Ti=No,Di=Ri(function(e){var t=Ti(e);return t=typeof t=="function"?t:void 0,Ii(Ei(e,Li),void 0,t)}),Ai=Di;const $i=nr(Ai),Pr=m.createContext({});function nn({children:e,type:t}){const[n,r]=m.useState([]),o=m.useRef([]),i=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},s=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},a=l=>{const u=n.filter(f=>l.find(p=>p===f));$i(u,n).forEach(f=>s(f))};return c.jsx(Pr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:s,matchDeletingDid:a},children:e})}nn.propTypes={type:v.string,children:v.node.isRequired};nn.defaultProps={type:"blocklets"};function kl(){return m.useContext(Pr)}async function Bi({blockletDid:e,nodeApi:t,spaceGateways:n}){let r=!1;const o=await Promise.all(n.map(async i=>{let{name:s}=i;const a=await ys(i.endpoint);return!Ft.isEmpty(a)&&a!==s&&(s=a,r=!0),{...i,name:s}}));return r&&await Promise.all(o.filter(i=>i.did).map(i=>t.updateBlockletSpaceGateway({input:{did:e,where:{did:i.did},spaceGateway:{...i}}}))),o}function Mi({setLoading:e,refresh:t}={}){var l;const{blocklet:n,actions:{refreshBlocklet:r}}=Se(),o=(l=n==null?void 0:n.meta)==null?void 0:l.did,[i,s]=m.useState([]),{api:a}=F();return ot(async()=>{try{if(!o){s([]);return}e==null||e(!0);const{spaceGateways:u}=await a.getBlockletSpaceGateways({input:{did:o}}),d=await Bi({blockletDid:o,nodeApi:a,spaceGateways:u});s(d??[])}catch(u){console.error(u),U.error($e(u))}finally{e==null||e(!1)}},[o,r,t]),{spaceGateways:i}}function Or({deps:e,setLoading:t}={deps:[],setLoading:()=>{}}){var a;const{blocklet:n}=Se(),[r,o]=m.useState([]),{api:i}=F(),s=Ft.debounce(async()=>{try{if(t(!0),!n){o([]);return}const{backups:l}=await i.getBlockletBackups({input:{did:n.meta.did}});o(l??[])}catch(l){console.error(l),U.error($e(l))}finally{t(!1)}},2e3);return ot(async()=>{s()},[(a=n==null?void 0:n.meta)==null?void 0:a.did].concat(e)),{backups:r}}function ki({appDid:e}){const{backups:t}=Or(),[n,r]=m.useState({message:"",progress:0,completed:!1}),o=F(),{ws:{useSubscription:i}}=o;return i(N.BlockletEvents.backupProgress,s=>{e===(s==null?void 0:s.appDid)&&r(()=>({...s}))},[e]),m.useEffect(()=>{var s;if(t!=null&&t.length&&Ft.isNull((s=t[0])==null?void 0:s.status)){const[a]=t;r(()=>({message:a.message,progress:a.progress,completed:a.progress>=100}))}},[t]),n}function Ni({deps:e}={deps:[]}){var i;const{blocklet:t}=Se(),{api:n}=F(),[r,o]=m.useState(null);return ot(async()=>{var s;if((s=t==null?void 0:t.meta)!=null&&s.did){const{autoBackup:a}=await n.getAutoBackup({input:{did:t.meta.did}});o(a)}},[(i=t==null?void 0:t.meta)==null?void 0:i.did].concat(e)),r}function Ui({deps:e}={deps:[]}){var i;const{blocklet:t}=Se(),{api:n}=F(),[r,o]=m.useState(null);return ot(async()=>{var s;if((s=t==null?void 0:t.meta)!=null&&s.did){const{autoCheckUpdate:a}=await n.getAutoCheckUpdate({input:{did:t.meta.did}});o(a)}},[(i=t==null?void 0:t.meta)==null?void 0:i.did].concat(e)),r}const Er=m.createContext({}),{Provider:Fi,Consumer:Nl}=Er;function rn({children:e}){const{t}=z(),{api:n}=F(),{blocklet:r}=Se(),[o,i]=m.useState(!1),[s,a]=m.useState(!1),{spaceGateways:l}=Mi({refresh:s,setLoading:i}),u=ki({appDid:r==null?void 0:r.appDid}),[d,f]=m.useState(!1),p=m.useMemo(()=>xs(r==null?void 0:r.environments),[r,s,d]),[y,b]=m.useState(!1),{backups:g}=Or({deps:[u],setLoading:b}),[w,R]=m.useState(l==null?void 0:l.find(O=>O.endpoint===p)),[h,C]=m.useState(!1),S=Ni({deps:[h]}),[P,j]=m.useState(!1),I=Ui({deps:[P]}),_=()=>{a(O=>!O)},E=()=>{f(O=>!O)},L=()=>{C(O=>!O)},T=()=>{j(O=>!O)},Z=async(O,se)=>{l.push({...O,loading:!0}),await n.addBlockletSpaceGateway({input:{did:r.meta.did,spaceGateway:O}}),p!==se&&await n.configBlocklet({input:{did:[r.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:se}]}}),_(),R(O)},B=async O=>{O&&(await n.deleteBlockletSpaceGateway({input:{did:r.meta.did,spaceGatewayDid:O==null?void 0:O.did}}),_(),R(O))},le=async O=>{await n.updateBlockletSpaceGateway({input:{did:r.meta.did,where:{did:O.did},spaceGateway:O}}),p!==O.endpoint&&await n.configBlocklet({input:{did:[r.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:O.endpoint}]}}),U.success(t("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"})),_()},ue=O=>(O==null?void 0:O.endpoint)===p,_e=async O=>{await n.updateAutoBackup({input:{did:r.meta.did,autoBackup:O}}),L()},Ce=async O=>{await n.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:O}}),T()};return c.jsx(Fi,{value:{spaceGateways:l,selectedSpaceGateway:w,addSpaceGateway:Z,deleteSpaceGateway:B,updateSpaceGateway:le,refreshSpaceGateways:_,spaceGatewaysLoading:o,spaceGatewayIsSelected:ue,updateAutoBackup:_e,updateAutoCheckUpdate:Ce,autoCheckUpdate:I,backupEndpoint:p,backupProgress:u,backups:g,backupsLoading:y,refreshBackupEndpoint:E,autoBackup:S},children:e})}rn.propTypes={children:v.any.isRequired};rn.defaultProps={};function Ul(){return m.useContext(Er)}function A(e,t,n){return rr.call(t,"css")?c.jsx(or,sr(e,t),n):c.jsx(e,t,n)}function mt(e,t,n){return rr.call(t,"css")?c.jsxs(or,sr(e,t),n):c.jsxs(e,t,n)}/**
|
|
12
|
+
`,pt=(e,t)=>{var r;let n="?v=";return t?n+=Co(t):n+=`${(r=e==null?void 0:e.meta)==null?void 0:r.version}${wt(e==null?void 0:e.status)?"~":""}`,n};function fi({blocklet:e}){var u,d,f,p;const{inService:t}=F(),n=(u=((e==null?void 0:e.environments)||[]).find(y=>y.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:u.value,r=(d=((e==null?void 0:e.environments)||[]).find(y=>y.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:d.value,o=(f=((e==null?void 0:e.environments)||[]).find(y=>y.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:f.value,i=((p=window.env)==null?void 0:p.apiPrefix)||"/",s=qe(i,`/blocklet/logo/${t?"":e.meta.did}`,pt(e,n)),a=qe(i,`/blocklet/logo-rect/${t?"":e.meta.did}`,pt(e,r)),l=qe(i,`/blocklet/logo-favicon/${t?"":e.meta.did}`,pt(e,o));return{logoUrl:s,rectLogoUrl:a,faviconUrl:l}}function Jt({blocklet:e,style:t,size:n,...r}){const{logoUrl:o}=fi({blocklet:e}),{variant:i}=r;return c.jsx(ur,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},t),...r,children:c.jsx("img",{src:o,alt:"",style:{width:n}})})}Jt.propTypes={blocklet:v.object.isRequired,style:v.object,size:v.oneOfType([v.number,v.string])};Jt.defaultProps={style:{},size:40};const pi=e=>{const t={};let n=null;return Eo(e,r=>{t[r.meta.bundleDid]?n=De(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},mi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;const l=a[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith(Q.DEFAULT_DID_DOMAIN))||"").replace(`.${Q.DEFAULT_DID_DOMAIN}`,"");return d?o.replace(r,`${d}-${l}.${Q.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Cr(){const{t:e}=z(),{api:t}=hs(),{blocklet:n}=Se(),{inService:r}=F(),[o,i]=m.useState(!1),[s,a]=m.useState(5),l=n&&n.structVersion!==Q.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){U.error(e("blocklet.migrate.tip.running"));return}const p=pi(n);if(p){U.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){U.error($e(p))}},d=()=>{const p=mi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),a(5),setInterval(()=>{a(y=>y-1)},1e3)},f=()=>i(!1);return[l&&c.jsxs(lr,{type:"warning",style:{margin:"12px 0"},children:[c.jsxs(A,{display:"flex",alignItems:"center",children:[c.jsx(be,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),c.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>c.jsx(A,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&c.jsx(Po,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Oo(n,!0),title:De(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:f},"connect")]}Cr.propTypes={};function en({children:e,style:t,...n}){return c.jsx(fr,{style:t,...n,children:e})}en.propTypes={children:v.any.isRequired,style:v.object};en.defaultProps={style:{}};const N={yellow:"#FFCF71",grey:"#888888"};function tn({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:s}=m.useContext(kt),a={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:N.grey,waiting:N.yellow,downloading:N.yellow,extracting:N.yellow,downloaded:N.grey,installing:N.yellow,installed:N.grey,starting:N.yellow,running:"success",stopping:N.yellow,stopped:N.grey,error:"error",upgrading:N.yellow,restarting:N.yellow,corrupted:"error",deleting:N.yellow,resource:"primary"},u=xt(t),d=e&&t==="stopped"?"resource":t,f=s(`blocklet.status.${d}`);return n==="dot"?c.jsx(Qe,{title:s("blocklet.statusTip",{status:f}),children:c.jsx(gs,{color:l[d],...i})}):c.jsxs(en,{type:a[d],...i,children:[u&&c.jsx(oe,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&o?c.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}tn.propTypes={status:v.string.isRequired,variant:v.oneOf(["dot","tag"]),source:v.string,progress:v.number,isResource:v.bool};tn.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};var hi=Ro,gi=To,vi=Do,yi=Io,xi=Lo,bi=Ao,wi=200;function Si(e,t,n,r){var o=-1,i=gi,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=yi(t,xi(n))),r?(i=vi,s=!1):t.length>=wi&&(i=bi,s=!1,t=new hi(t));e:for(;++o<a;){var d=e[o],f=n==null?d:n(d);if(d=r||d!==0?d:0,s&&f===f){for(var p=u;p--;)if(t[p]===f)continue e;l.push(d)}else i(t,f,r)||l.push(d)}return l}var ji=Si,_i=ji,Ci=$o,$n=Bo;function Pi(e,t,n){var r=e.length;if(r<2)return r?$n(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var s=e[o],a=-1;++a<r;)a!=o&&(i[o]=_i(i[o]||s,e[a],t,n));return $n(Ci(i,1),t,n)}var Oi=Pi,Ei=No,Ri=Mo,Ii=Oi,Li=Uo,Ti=ko,Di=Ri(function(e){var t=Ti(e);return t=typeof t=="function"?t:void 0,Ii(Ei(e,Li),void 0,t)}),Ai=Di;const $i=nr(Ai),Pr=m.createContext({});function nn({children:e,type:t}){const[n,r]=m.useState([]),o=m.useRef([]),i=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},s=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},a=l=>{const u=n.filter(f=>l.find(p=>p===f));$i(u,n).forEach(f=>s(f))};return c.jsx(Pr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:s,matchDeletingDid:a},children:e})}nn.propTypes={type:v.string,children:v.node.isRequired};nn.defaultProps={type:"blocklets"};function Nl(){return m.useContext(Pr)}async function Bi({blockletDid:e,nodeApi:t,spaceGateways:n}){let r=!1;const o=await Promise.all(n.map(async i=>{let{name:s}=i;const a=await ys(i.endpoint);return!Ft.isEmpty(a)&&a!==s&&(s=a,r=!0),{...i,name:s}}));return r&&await Promise.all(o.filter(i=>i.did).map(i=>t.updateBlockletSpaceGateway({input:{did:e,where:{did:i.did},spaceGateway:{...i}}}))),o}function Mi({setLoading:e,refresh:t}={}){var l;const{blocklet:n,actions:{refreshBlocklet:r}}=Se(),o=(l=n==null?void 0:n.meta)==null?void 0:l.did,[i,s]=m.useState([]),{api:a}=F();return ot(async()=>{try{if(!o){s([]);return}e==null||e(!0);const{spaceGateways:u}=await a.getBlockletSpaceGateways({input:{did:o}}),d=await Bi({blockletDid:o,nodeApi:a,spaceGateways:u});s(d??[])}catch(u){console.error(u),U.error($e(u))}finally{e==null||e(!1)}},[o,r,t]),{spaceGateways:i}}function Or({deps:e,setLoading:t}={deps:[],setLoading:()=>{}}){var a;const{blocklet:n}=Se(),[r,o]=m.useState([]),{api:i}=F(),s=Ft.debounce(async()=>{try{if(t(!0),!n){o([]);return}const{backups:l}=await i.getBlockletBackups({input:{did:n.meta.did}});o(l??[])}catch(l){console.error(l),U.error($e(l))}finally{t(!1)}},2e3);return ot(async()=>{s()},[(a=n==null?void 0:n.meta)==null?void 0:a.did].concat(e)),{backups:r}}function Ni({appDid:e}){const{backups:t}=Or(),[n,r]=m.useState({message:"",progress:0,completed:!1}),o=F(),{ws:{useSubscription:i}}=o;return i(k.BlockletEvents.backupProgress,s=>{e===(s==null?void 0:s.appDid)&&r(()=>({...s}))},[e]),m.useEffect(()=>{var s;if(t!=null&&t.length&&Ft.isNull((s=t[0])==null?void 0:s.status)){const[a]=t;r(()=>({message:a.message,progress:a.progress,completed:a.progress>=100}))}},[t]),n}function ki({deps:e}={deps:[]}){var i;const{blocklet:t}=Se(),{api:n}=F(),[r,o]=m.useState(null);return ot(async()=>{var s;if((s=t==null?void 0:t.meta)!=null&&s.did){const{autoBackup:a}=await n.getAutoBackup({input:{did:t.meta.did}});o(a)}},[(i=t==null?void 0:t.meta)==null?void 0:i.did].concat(e)),r}function Ui({deps:e}={deps:[]}){var i;const{blocklet:t}=Se(),{api:n}=F(),[r,o]=m.useState(null);return ot(async()=>{var s;if((s=t==null?void 0:t.meta)!=null&&s.did){const{autoCheckUpdate:a}=await n.getAutoCheckUpdate({input:{did:t.meta.did}});o(a)}},[(i=t==null?void 0:t.meta)==null?void 0:i.did].concat(e)),r}const Er=m.createContext({}),{Provider:Fi,Consumer:kl}=Er;function rn({children:e}){const{t}=z(),{api:n}=F(),{blocklet:r}=Se(),[o,i]=m.useState(!1),[s,a]=m.useState(!1),{spaceGateways:l}=Mi({refresh:s,setLoading:i}),u=Ni({appDid:r==null?void 0:r.appDid}),[d,f]=m.useState(!1),p=m.useMemo(()=>xs(r==null?void 0:r.environments),[r,s,d]),[y,b]=m.useState(!1),{backups:g}=Or({deps:[u],setLoading:b}),[w,R]=m.useState(l==null?void 0:l.find(O=>O.endpoint===p)),[h,C]=m.useState(!1),S=ki({deps:[h]}),[P,j]=m.useState(!1),I=Ui({deps:[P]}),_=()=>{a(O=>!O)},E=()=>{f(O=>!O)},L=()=>{C(O=>!O)},T=()=>{j(O=>!O)},Z=async(O,se)=>{l.push({...O,loading:!0}),await n.addBlockletSpaceGateway({input:{did:r.meta.did,spaceGateway:O}}),p!==se&&await n.configBlocklet({input:{did:[r.meta.did],configs:[{key:k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:se}]}}),_(),R(O)},B=async O=>{O&&(await n.deleteBlockletSpaceGateway({input:{did:r.meta.did,spaceGatewayDid:O==null?void 0:O.did}}),_(),R(O))},le=async O=>{await n.updateBlockletSpaceGateway({input:{did:r.meta.did,where:{did:O.did},spaceGateway:O}}),p!==O.endpoint&&await n.configBlocklet({input:{did:[r.meta.did],configs:[{key:k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:O.endpoint}]}}),U.success(t("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"})),_()},ue=O=>(O==null?void 0:O.endpoint)===p,_e=async O=>{await n.updateAutoBackup({input:{did:r.meta.did,autoBackup:O}}),L()},Ce=async O=>{await n.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:O}}),T()};return c.jsx(Fi,{value:{spaceGateways:l,selectedSpaceGateway:w,addSpaceGateway:Z,deleteSpaceGateway:B,updateSpaceGateway:le,refreshSpaceGateways:_,spaceGatewaysLoading:o,spaceGatewayIsSelected:ue,updateAutoBackup:_e,updateAutoCheckUpdate:Ce,autoCheckUpdate:I,backupEndpoint:p,backupProgress:u,backups:g,backupsLoading:y,refreshBackupEndpoint:E,autoBackup:S},children:e})}rn.propTypes={children:v.any.isRequired};rn.defaultProps={};function Ul(){return m.useContext(Er)}function $(e,t,n){return rr.call(t,"css")?c.jsx(or,sr(e,t),n):c.jsx(e,t,n)}function mt(e,t,n){return rr.call(t,"css")?c.jsxs(or,sr(e,t),n):c.jsxs(e,t,n)}/**
|
|
18
13
|
* (c) Iconify
|
|
19
14
|
*
|
|
20
15
|
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
@@ -24,7 +19,7 @@ import{r as m,aC as Yn,aD as Xn,aE as kt,aF as W,aG as Zn,aH as xe,aI as Pn,aJ a
|
|
|
24
19
|
*
|
|
25
20
|
* @license MIT
|
|
26
21
|
* @version 3.1.1
|
|
27
|
-
*/const Rr=Object.freeze({left:0,top:0,width:16,height:16}),Xe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Be=Object.freeze({...Rr,...Xe}),_t=Object.freeze({...Be,body:"",hidden:!1});function zi(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 Bn(e,t){const n=zi(e,t);for(const r in _t)r in Xe?r in e&&!(r in n)&&(n[r]=Xe[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Hi(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=r[s]&&r[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(i),o}function Vi(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=Bn(r[a]||o[a],i)}return s(t),n.forEach(s),Bn(e,i)}function Ir(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=Hi(e);for(const o in r){const i=r[o];i&&(t(o,Vi(e,o,i)),n.push(o))}return n}const Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,je=(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 a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:a};return t&&!Ge(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Ge(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!Ge(a,n)?null:a}return null},Ge=(e,t)=>e?!!((e.provider===""||e.provider.match(Ee))&&(t&&e.prefix===""||e.prefix.match(Ee))&&e.name.match(Ee)):!1,qi={provider:"",aliases:{},not_found:{},...Rr};function ht(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Lr(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ht(e,qi))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Ee)||typeof i.body!="string"||!ht(i,_t))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],s=i.parent;if(!o.match(Ee)||typeof s!="string"||!n[s]&&!r[s]||!ht(i,_t))return null}return t}const Ze=Object.create(null);function Ki(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function te(e,t){const n=Ze[e]||(Ze[e]=Object.create(null));return n[t]||(n[t]=Ki(e,t))}function on(e,t){return Lr(t)?Ir(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Gi(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Wi(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ze)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ze[o]||{})).forEach(s=>{const a=te(o,s);n=n.concat(Object.keys(a.icons).map(l=>(o!==""?"@"+o+":":"")+s+":"+l))})}),n}let Le=!1;function Qi(e){return typeof e=="boolean"&&(Le=e),Le}function Me(e){const t=typeof e=="string"?je(e,!0,Le):e;if(t){const n=te(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Tr(e,t){const n=je(e,!0,Le);if(!n)return!1;const r=te(n.provider,n.prefix);return Gi(r,n.name,t)}function Dr(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Le&&!t&&!e.prefix){let o=!1;return Lr(e)&&(e.prefix="",Ir(e,(i,s)=>{s&&Tr(i,s)&&(o=!0)})),o}const n=e.prefix;if(!Ge({provider:t,prefix:n,name:"a"}))return!1;const r=te(t,n);return!!on(r,e)}function Yi(e){return!!Me(e)}function Xi(e){const t=Me(e);return t?{...Be,...t}:null}const Ar=Object.freeze({width:null,height:null}),$r=Object.freeze({...Ar,...Xe}),Zi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ji=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ct(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Zi);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Ji.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}const ea=e=>e==="unset"||e==="undefined"||e==="none";function it(e,t){const n={...Be,...e},r={...$r,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(b=>{const g=[],w=b.hFlip,R=b.vFlip;let h=b.rotate;w?R?h+=2:(g.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),g.push("scale(-1 1)"),o.top=o.left=0):R&&(g.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),g.push("scale(1 -1)"),o.top=o.left=0);let C;switch(h<0&&(h-=Math.floor(h/4)*4),h=h%4,h){case 1:C=o.height/2+o.top,g.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:g.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:C=o.width/2+o.left,g.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}h%2===1&&(o.left!==o.top&&(C=o.left,o.left=o.top,o.top=C),o.width!==o.height&&(C=o.width,o.width=o.height,o.height=C)),g.length&&(i='<g transform="'+g.join(" ")+'">'+i+"</g>")});const s=r.width,a=r.height,l=o.width,u=o.height;let d,f;s===null?(f=a===null?"1em":a==="auto"?u:a,d=Ct(f,l/u)):(d=s==="auto"?l:s,f=a===null?Ct(d,u/l):a==="auto"?u:a);const p={},y=(b,g)=>{ea(g)||(p[b]=g.toString())};return y("width",d),y("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const ta=/\sid="(\S+)"/g,na="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ra=0;function Br(e,t=na){const n=[];let r;for(;r=ta.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 s=typeof t=="function"?t(i):t+(ra++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const pe={local:!0,session:!0},Mr={local:new Set,session:new Set};let sn=!1;function oa(e){sn=e}const Mn="iconify2",Te="iconify",kr=Te+"-count",kn=Te+"-version",Nr=36e5,sa=168;function Pt(e,t){try{return e.getItem(t)}catch{}}function an(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Nn(e,t){try{e.removeItem(t)}catch{}}function Ot(e,t){return an(e,kr,t.toString())}function Et(e){return parseInt(Pt(e,kr))||0}let He=typeof window>"u"?{}:window;function Ur(e){const t=e+"Storage";try{if(He&&He[t]&&typeof He[t].length=="number")return He[t]}catch{}pe[e]=!1}function Fr(e,t){const n=Ur(e);if(!n)return;const r=Pt(n,kn);if(r!==Mn){if(r){const a=Et(n);for(let l=0;l<a;l++)Nn(n,Te+l.toString())}an(n,kn,Mn),Ot(n,0);return}const o=Math.floor(Date.now()/Nr)-sa,i=a=>{const l=Te+a.toString(),u=Pt(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,a))return!0}catch{}Nn(n,l)}};let s=Et(n);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,Ot(n,s)):Mr[e].add(a))}function zr(){if(!sn){oa(!0);for(const e in pe)Fr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=te(r,o);if(!on(i,n).length)return!1;const s=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function Hr(e,t){switch(e){case"local":case"session":pe[e]=t;break;case"all":for(const n in pe)pe[n]=t;break}}const Rt=Object.create(null);function Vr(e,t){Rt[e]=t}function It(e){return Rt[e]||Rt[""]}function cn(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 at=Object.create(null),Pe=["https://api.simplesvg.com","https://api.unisvg.com"],We=[];for(;Pe.length>0;)Pe.length===1||Math.random()>.5?We.push(Pe.shift()):We.push(Pe.pop());at[""]=cn({resources:["https://api.iconify.design"].concat(We)});function qr(e,t){const n=cn(t);return n===null?!1:(at[e]=n,!0)}function ct(e){return at[e]}function ia(){return Object.keys(at)}const aa=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Je=aa();function ca(e){Je=e}function la(){return Je}function ua(e,t){const n=ct(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function da(e){return e===404}const fa=(e,t,n)=>{const r=[],o=ua(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function pa(e){if(typeof e=="string"){const t=ct(e);if(t)return t.path}return"/"}const ma=(e,t,n)=>{if(!Je){n("abort",424);return}let r=pa(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;Je(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(da(s)?"abort":"next",s)});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)})},ha={prepare:fa,send:ma};function ga(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,s=o.prefix,a=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[s]||(l[s]=te(i,s));let d;a in u.icons?d=t.loaded:s===""||u.missing.has(a)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:a};d.push(f)}),t}function Kr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function va(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 s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Kr([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let ya=0;function xa(e,t,n){const r=ya++,o=Kr.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function ba(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?je(o,t,n):o;i&&r.push(i)}),r}var wa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Sa(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let j=e.resources.slice(0);for(s=[];j.length>1;){const I=Math.floor(Math.random()*j.length);s.push(j[I]),j=j.slice(0,I).concat(j.slice(I+1))}s=s.concat(j)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,d,f=null,p=[],y=[];typeof r=="function"&&y.push(r);function b(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),b(),p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function w(j,I){I&&(y=[]),typeof j=="function"&&y.push(j)}function R(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:w,abort:g}}function h(){l="failed",y.forEach(j=>{j(void 0,d)})}function C(){p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function S(j,I,_){const E=I!=="success";switch(p=p.filter(L=>L!==j),l){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){d=_,h();return}if(E){d=_,p.length||(s.length?P():h());return}if(b(),C(),!e.random){const L=e.resources.indexOf(j.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",y.forEach(L=>{L(_)})}function P(){if(l!=="pending")return;b();const j=s.shift();if(j===void 0){if(p.length){f=setTimeout(()=>{b(),l==="pending"&&(C(),h())},e.timeout);return}h();return}const I={status:"pending",resource:j,callback:(_,E)=>{S(I,_,E)}};p.push(I),u++,f=setTimeout(P,e.rotate),n(j,t,I.callback)}return setTimeout(P),R}function Gr(e){const t={...wa,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,l,u){const d=Sa(t,a,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(a){return n.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Un(){}const gt=Object.create(null);function ja(e){if(!gt[e]){const t=ct(e);if(!t)return;const n=Gr(t),r={config:t,redundancy:n};gt[e]=r}return gt[e]}function Wr(e,t,n){let r,o;if(typeof e=="string"){const i=It(e);if(!i)return n(void 0,424),Un;o=i.send;const s=ja(e);s&&(r=s.redundancy)}else{const i=cn(e);if(i){r=Gr(i);const s=e.resources?e.resources[0]:"",a=It(s);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Un):r.query(t,o,n)().abort}function _a(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in pe)Fr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Ca(e,t){sn||zr();function n(r){let o;if(!pe[r]||!(o=Ur(r)))return;const i=Mr[r];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=Et(o),!Ot(o,s+1))return;const a={cached:Math.floor(Date.now()/Nr),provider:e.provider,data:t};return an(o,Te+s.toString(),JSON.stringify(a))}t.lastModified&&!_a(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fn(){}function Pa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,va(e)}))}function Oa(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=It(n)))return;i.prepare(n,r,o).forEach(a=>{Wr(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{e.missing.add(u)});else try{const u=on(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),Ca(e,l)}catch(u){console.error(u)}Pa(e)})})}))}const Ea=e=>{const n=te(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},ln=(e,t)=>{const n=ba(e,!0,Qi()),r=ga(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fn)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===a&&u===s)return;s=u,a=d,i.push(te(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=te(u,d),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(f)||(y.add(f),o[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&Oa(l,o[u][d])}),t?xa(t,r,i):Fn},Ra=e=>new Promise((t,n)=>{const r=typeof e=="string"?je(e,!0):e;if(!r){n(e);return}ln([r||e],o=>{if(o.length&&r){const i=Me(r);if(i){t({...Be,...i});return}}n(e)})});function Qr(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Ar?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const lt={...$r,inline:!1},vt="iconify",Lt="iconify-inline",ce="iconifyData"+Date.now();let me=[];function ke(e){for(let t=0;t<me.length;t++){const n=me[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Yr(e,t=!1){let n=ke(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},me.push(n),n)}function Ia(){if(document.documentElement)return Yr(document.documentElement);me.push({node:()=>document.documentElement})}function La(e){me=me.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ne(){return me}function Ta(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Re=null;const Da={childList:!0,subtree:!0,attributes:!0};function Xr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Re&&Re(e)}))}function Aa(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[ce]!==void 0){n.paused||Xr(e);return}}}function Zr(e,t){e.observer.instance.observe(t,Da)}function et(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(Aa.bind(null,e)),Zr(e,n),t.paused||Xr(e))}function zn(){Ne().forEach(et)}function Jr(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 $a(e){const t=Re!==null;if(Re!==e&&(Re=e,t&&Ne().forEach(Jr)),t){zn();return}Ta(zn)}function Tt(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Ba(e){if(e){const t=ke(e);t&&Tt(t)}else Tt()}function Dt(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){et(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?Zr(t,r):et(t);else return}})}function Ma(e){if(e){const t=ke(e);t&&Dt(t)}else Dt()}function eo(e,t=!1){const n=Yr(e,t);return et(n),n}function to(e){const t=ke(e);t&&(Jr(t),La(e))}function ka(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in lt)if(n[o]!==r[o])return!0;return!1}function Na(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 Ua=/[\s,]+/;function Fa(e,t){t.split(Ua).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const za=["width","height"],Ha=["inline","hFlip","vFlip"];function Va(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function qa(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&je(t,!0);if(!n)return null;const r={...lt,inline:e.classList&&e.classList.contains(Lt)};za.forEach(a=>{const l=e.getAttribute("data-"+a);l&&(r[a]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=Na(o));const i=e.getAttribute("data-flip");typeof i=="string"&&Fa(r,i),Ha.forEach(a=>{const l="data-"+a,u=Va(e.getAttribute(l),l);typeof u=="boolean"&&(r[a]=u)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:s}}const Ka="svg."+vt+", i."+vt+", span."+vt+", i."+Lt+", span."+Lt;function Ga(e){const t=[];return e.querySelectorAll(Ka).forEach(n=>{const r=n[ce]||n.tagName.toLowerCase()!=="svg"?qa(n):null;r&&t.push({node:n,props:r})}),t}function no(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 Ie;function Wa(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function Qa(e){return Ie===void 0&&Wa(),Ie?Ie.createHTML(e):e}function ro(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function oo(e,t,n,r){const o=e.classList;if(r){const s=r.classList;Array.from(s).forEach(a=>{o.add(a)})}const i=[];return t.forEach(s=>{o.contains(s)?n.has(s)&&i.push(s):(o.add(s),i.push(s))}),n.forEach(s=>{t.has(s)||o.remove(s)}),i}function so(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 io(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=it(n,o),s=e[ce],a=no(Br(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=Qa(a);const l=r.childNodes[0],u=e.attributes;for(let b=0;b<u.length;b++){const g=u.item(b),w=g.name;w!=="class"&&!l.hasAttribute(w)&&l.setAttribute(w,g.value)}const d=ro(t.icon),f=oo(l,d,new Set(s&&s.addedClasses),e),p=so(l,o.inline?{"vertical-align":"-0.125em"}:{},s&&s.addedStyles),y={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[ce]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function Ya(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Xa(e){return"data:image/svg+xml,"+Ya(e)}function Za(e){return'url("'+Xa(e)+'")'}const Ja={display:"inline-block"},At={"background-color":"currentColor"},ao={"background-color":"transparent"},Hn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Vn={"-webkit-mask":At,mask:At,background:ao};for(const e in Vn){const t=Vn[e];for(const n in Hn)t[e+"-"+n]=Hn[n]}function qn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ec(e,t,n,r){const o=t.customisations,i=it(n,o),s=i.attributes,a=e[ce],l=no(i.body,{...s,width:n.width+"",height:n.height+""}),u=ro(t.icon),d=oo(e,u,new Set(a&&a.addedClasses)),p={"--svg":Za(l),width:qn(s.width),height:qn(s.height),...Ja,...r?At:ao};o.inline&&(p["vertical-align"]="-0.125em");const y=so(e,p,a&&a.addedStyles),b={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[ce]=b,e}let Ve=!1;function tc(){Ve||(Ve=!0,setTimeout(()=>{Ve&&(Ve=!1,we())}))}function we(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:s,prefix:a,name:l}=o,u=te(s,a),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!Ea(o)){const f=n[s]||(n[s]=Object.create(null));(f[a]||(f[a]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Ne()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let s=!1,a=!1;function l(u,d,f){if(a||(a=!0,Tt(o)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,y=p==="mask"||(p==="bg"?!1:p==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){ec(u,d,{...Be,...f},y);return}}io(u,d,f)}Ga(i).forEach(({node:u,props:d})=>{const f=u[ce];if(!f){const{status:y,icon:b}=r(d.icon,!0);if(b){l(u,d,b);return}s=s||y==="loading",u[ce]={...d,status:y};return}let p;if(ka(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){s=s||p.status==="loading",Object.assign(f,{...d,status:p.status});return}}else{if(f.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){f.status=p.status;return}}l(u,d,p.icon)}),o.temporary&&!s?to(i):t&&s?eo(i,!0):a&&o.observer&&Dt(o)});for(const o in n){const i=n[o];for(const s in i){const a=i[s];ln(Array.from(a).map(l=>({provider:o,prefix:s,name:l})),tc)}}}function nc(e){const t=ke(e);t?we(t):we({node:e,temporary:!0},!0)}function co(e,t,n=!1){const r=Me(e);if(!r)return null;const o=je(e),i=Qr(lt,t||{}),s=io(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?s.outerHTML:s}function rc(){return"3.1.1"}function oc(e,t){return co(e,t,!1)}function sc(e,t){return co(e,t,!0)}function ic(e,t){const n=Me(e);if(!n)return null;const r=Qr(lt,t||{});return it(n,r)}function ac(e){e?nc(e):we()}if(typeof document<"u"&&typeof window<"u"){Ia();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"||!Dr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{$a(we),we()})}function cc(e,t){Hr(e,t!==!1)}function lc(e){Hr(e,!0)}Vr("",ha);if(typeof document<"u"&&typeof window<"u"){zr();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;qr(n,o)||console.error(r)}catch{console.error(r)}}}}const uc={getAPIConfig:ct,setAPIModule:Vr,sendAPIQuery:Wr,setFetch:ca,getFetch:la,listAPIProviders:ia},dc={_api:uc,addAPIProvider:qr,loadIcons:ln,loadIcon:Ra,iconExists:Yi,getIcon:Xi,listIcons:Wi,addIcon:Tr,addCollection:Dr,replaceIDs:Br,calculateSize:Ct,buildIcon:it,getVersion:rc,renderSVG:oc,renderHTML:sc,renderIcon:ic,scan:ac,observe:eo,stopObserving:to,pauseObserver:Ba,resumeObserver:Ma,enableCache:cc,disableCache:lc};try{self.Iconify===void 0&&(self.Iconify=dc)}catch{}var un={},fc=X;Object.defineProperty(un,"__esModule",{value:!0});var lo=un.default=void 0,pc=fc(Y()),mc=c;lo=un.default=(0,pc.default)((0,mc.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 dn({infos:e}){const{t}=z(),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(`
|
|
22
|
+
*/const Rr=Object.freeze({left:0,top:0,width:16,height:16}),Xe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Be=Object.freeze({...Rr,...Xe}),_t=Object.freeze({...Be,body:"",hidden:!1});function zi(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 Bn(e,t){const n=zi(e,t);for(const r in _t)r in Xe?r in e&&!(r in n)&&(n[r]=Xe[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Hi(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=r[s]&&r[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(i),o}function Vi(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=Bn(r[a]||o[a],i)}return s(t),n.forEach(s),Bn(e,i)}function Ir(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=Hi(e);for(const o in r){const i=r[o];i&&(t(o,Vi(e,o,i)),n.push(o))}return n}const Ee=/^[a-z0-9]+(-[a-z0-9]+)*$/,je=(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 a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:a};return t&&!Ge(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Ge(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!Ge(a,n)?null:a}return null},Ge=(e,t)=>e?!!((e.provider===""||e.provider.match(Ee))&&(t&&e.prefix===""||e.prefix.match(Ee))&&e.name.match(Ee)):!1,qi={provider:"",aliases:{},not_found:{},...Rr};function ht(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Lr(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ht(e,qi))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Ee)||typeof i.body!="string"||!ht(i,_t))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],s=i.parent;if(!o.match(Ee)||typeof s!="string"||!n[s]&&!r[s]||!ht(i,_t))return null}return t}const Ze=Object.create(null);function Ki(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function te(e,t){const n=Ze[e]||(Ze[e]=Object.create(null));return n[t]||(n[t]=Ki(e,t))}function on(e,t){return Lr(t)?Ir(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Gi(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Wi(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ze)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ze[o]||{})).forEach(s=>{const a=te(o,s);n=n.concat(Object.keys(a.icons).map(l=>(o!==""?"@"+o+":":"")+s+":"+l))})}),n}let Le=!1;function Qi(e){return typeof e=="boolean"&&(Le=e),Le}function Me(e){const t=typeof e=="string"?je(e,!0,Le):e;if(t){const n=te(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Tr(e,t){const n=je(e,!0,Le);if(!n)return!1;const r=te(n.provider,n.prefix);return Gi(r,n.name,t)}function Dr(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Le&&!t&&!e.prefix){let o=!1;return Lr(e)&&(e.prefix="",Ir(e,(i,s)=>{s&&Tr(i,s)&&(o=!0)})),o}const n=e.prefix;if(!Ge({provider:t,prefix:n,name:"a"}))return!1;const r=te(t,n);return!!on(r,e)}function Yi(e){return!!Me(e)}function Xi(e){const t=Me(e);return t?{...Be,...t}:null}const Ar=Object.freeze({width:null,height:null}),$r=Object.freeze({...Ar,...Xe}),Zi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ji=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ct(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Zi);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Ji.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}const ea=e=>e==="unset"||e==="undefined"||e==="none";function it(e,t){const n={...Be,...e},r={...$r,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(b=>{const g=[],w=b.hFlip,R=b.vFlip;let h=b.rotate;w?R?h+=2:(g.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),g.push("scale(-1 1)"),o.top=o.left=0):R&&(g.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),g.push("scale(1 -1)"),o.top=o.left=0);let C;switch(h<0&&(h-=Math.floor(h/4)*4),h=h%4,h){case 1:C=o.height/2+o.top,g.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:g.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:C=o.width/2+o.left,g.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}h%2===1&&(o.left!==o.top&&(C=o.left,o.left=o.top,o.top=C),o.width!==o.height&&(C=o.width,o.width=o.height,o.height=C)),g.length&&(i='<g transform="'+g.join(" ")+'">'+i+"</g>")});const s=r.width,a=r.height,l=o.width,u=o.height;let d,f;s===null?(f=a===null?"1em":a==="auto"?u:a,d=Ct(f,l/u)):(d=s==="auto"?l:s,f=a===null?Ct(d,u/l):a==="auto"?u:a);const p={},y=(b,g)=>{ea(g)||(p[b]=g.toString())};return y("width",d),y("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const ta=/\sid="(\S+)"/g,na="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ra=0;function Br(e,t=na){const n=[];let r;for(;r=ta.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 s=typeof t=="function"?t(i):t+(ra++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const pe={local:!0,session:!0},Mr={local:new Set,session:new Set};let sn=!1;function oa(e){sn=e}const Mn="iconify2",Te="iconify",Nr=Te+"-count",Nn=Te+"-version",kr=36e5,sa=168;function Pt(e,t){try{return e.getItem(t)}catch{}}function an(e,t,n){try{return e.setItem(t,n),!0}catch{}}function kn(e,t){try{e.removeItem(t)}catch{}}function Ot(e,t){return an(e,Nr,t.toString())}function Et(e){return parseInt(Pt(e,Nr))||0}let He=typeof window>"u"?{}:window;function Ur(e){const t=e+"Storage";try{if(He&&He[t]&&typeof He[t].length=="number")return He[t]}catch{}pe[e]=!1}function Fr(e,t){const n=Ur(e);if(!n)return;const r=Pt(n,Nn);if(r!==Mn){if(r){const a=Et(n);for(let l=0;l<a;l++)kn(n,Te+l.toString())}an(n,Nn,Mn),Ot(n,0);return}const o=Math.floor(Date.now()/kr)-sa,i=a=>{const l=Te+a.toString(),u=Pt(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,a))return!0}catch{}kn(n,l)}};let s=Et(n);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,Ot(n,s)):Mr[e].add(a))}function zr(){if(!sn){oa(!0);for(const e in pe)Fr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=te(r,o);if(!on(i,n).length)return!1;const s=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function Hr(e,t){switch(e){case"local":case"session":pe[e]=t;break;case"all":for(const n in pe)pe[n]=t;break}}const Rt=Object.create(null);function Vr(e,t){Rt[e]=t}function It(e){return Rt[e]||Rt[""]}function cn(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 at=Object.create(null),Pe=["https://api.simplesvg.com","https://api.unisvg.com"],We=[];for(;Pe.length>0;)Pe.length===1||Math.random()>.5?We.push(Pe.shift()):We.push(Pe.pop());at[""]=cn({resources:["https://api.iconify.design"].concat(We)});function qr(e,t){const n=cn(t);return n===null?!1:(at[e]=n,!0)}function ct(e){return at[e]}function ia(){return Object.keys(at)}const aa=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Je=aa();function ca(e){Je=e}function la(){return Je}function ua(e,t){const n=ct(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function da(e){return e===404}const fa=(e,t,n)=>{const r=[],o=ua(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function pa(e){if(typeof e=="string"){const t=ct(e);if(t)return t.path}return"/"}const ma=(e,t,n)=>{if(!Je){n("abort",424);return}let r=pa(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;Je(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(da(s)?"abort":"next",s)});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)})},ha={prepare:fa,send:ma};function ga(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,s=o.prefix,a=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[s]||(l[s]=te(i,s));let d;a in u.icons?d=t.loaded:s===""||u.missing.has(a)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:a};d.push(f)}),t}function Kr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function va(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 s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Kr([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let ya=0;function xa(e,t,n){const r=ya++,o=Kr.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function ba(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?je(o,t,n):o;i&&r.push(i)}),r}var wa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Sa(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let j=e.resources.slice(0);for(s=[];j.length>1;){const I=Math.floor(Math.random()*j.length);s.push(j[I]),j=j.slice(0,I).concat(j.slice(I+1))}s=s.concat(j)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,d,f=null,p=[],y=[];typeof r=="function"&&y.push(r);function b(){f&&(clearTimeout(f),f=null)}function g(){l==="pending"&&(l="aborted"),b(),p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function w(j,I){I&&(y=[]),typeof j=="function"&&y.push(j)}function R(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:w,abort:g}}function h(){l="failed",y.forEach(j=>{j(void 0,d)})}function C(){p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function S(j,I,_){const E=I!=="success";switch(p=p.filter(L=>L!==j),l){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){d=_,h();return}if(E){d=_,p.length||(s.length?P():h());return}if(b(),C(),!e.random){const L=e.resources.indexOf(j.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",y.forEach(L=>{L(_)})}function P(){if(l!=="pending")return;b();const j=s.shift();if(j===void 0){if(p.length){f=setTimeout(()=>{b(),l==="pending"&&(C(),h())},e.timeout);return}h();return}const I={status:"pending",resource:j,callback:(_,E)=>{S(I,_,E)}};p.push(I),u++,f=setTimeout(P,e.rotate),n(j,t,I.callback)}return setTimeout(P),R}function Gr(e){const t={...wa,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,l,u){const d=Sa(t,a,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(a){return n.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Un(){}const gt=Object.create(null);function ja(e){if(!gt[e]){const t=ct(e);if(!t)return;const n=Gr(t),r={config:t,redundancy:n};gt[e]=r}return gt[e]}function Wr(e,t,n){let r,o;if(typeof e=="string"){const i=It(e);if(!i)return n(void 0,424),Un;o=i.send;const s=ja(e);s&&(r=s.redundancy)}else{const i=cn(e);if(i){r=Gr(i);const s=e.resources?e.resources[0]:"",a=It(s);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Un):r.query(t,o,n)().abort}function _a(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in pe)Fr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Ca(e,t){sn||zr();function n(r){let o;if(!pe[r]||!(o=Ur(r)))return;const i=Mr[r];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=Et(o),!Ot(o,s+1))return;const a={cached:Math.floor(Date.now()/kr),provider:e.provider,data:t};return an(o,Te+s.toString(),JSON.stringify(a))}t.lastModified&&!_a(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fn(){}function Pa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,va(e)}))}function Oa(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=It(n)))return;i.prepare(n,r,o).forEach(a=>{Wr(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{e.missing.add(u)});else try{const u=on(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),Ca(e,l)}catch(u){console.error(u)}Pa(e)})})}))}const Ea=e=>{const n=te(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},ln=(e,t)=>{const n=ba(e,!0,Qi()),r=ga(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fn)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===a&&u===s)return;s=u,a=d,i.push(te(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=te(u,d),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(f)||(y.add(f),o[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&Oa(l,o[u][d])}),t?xa(t,r,i):Fn},Ra=e=>new Promise((t,n)=>{const r=typeof e=="string"?je(e,!0):e;if(!r){n(e);return}ln([r||e],o=>{if(o.length&&r){const i=Me(r);if(i){t({...Be,...i});return}}n(e)})});function Qr(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Ar?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const lt={...$r,inline:!1},vt="iconify",Lt="iconify-inline",ce="iconifyData"+Date.now();let me=[];function Ne(e){for(let t=0;t<me.length;t++){const n=me[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Yr(e,t=!1){let n=Ne(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},me.push(n),n)}function Ia(){if(document.documentElement)return Yr(document.documentElement);me.push({node:()=>document.documentElement})}function La(e){me=me.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function ke(){return me}function Ta(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Re=null;const Da={childList:!0,subtree:!0,attributes:!0};function Xr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Re&&Re(e)}))}function Aa(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[ce]!==void 0){n.paused||Xr(e);return}}}function Zr(e,t){e.observer.instance.observe(t,Da)}function et(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(Aa.bind(null,e)),Zr(e,n),t.paused||Xr(e))}function zn(){ke().forEach(et)}function Jr(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 $a(e){const t=Re!==null;if(Re!==e&&(Re=e,t&&ke().forEach(Jr)),t){zn();return}Ta(zn)}function Tt(e){(e?[e]:ke()).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 Ba(e){if(e){const t=Ne(e);t&&Tt(t)}else Tt()}function Dt(e){(e?[e]:ke()).forEach(t=>{if(!t.observer){et(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?Zr(t,r):et(t);else return}})}function Ma(e){if(e){const t=Ne(e);t&&Dt(t)}else Dt()}function eo(e,t=!1){const n=Yr(e,t);return et(n),n}function to(e){const t=Ne(e);t&&(Jr(t),La(e))}function Na(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in lt)if(n[o]!==r[o])return!0;return!1}function ka(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 Ua=/[\s,]+/;function Fa(e,t){t.split(Ua).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const za=["width","height"],Ha=["inline","hFlip","vFlip"];function Va(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function qa(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&je(t,!0);if(!n)return null;const r={...lt,inline:e.classList&&e.classList.contains(Lt)};za.forEach(a=>{const l=e.getAttribute("data-"+a);l&&(r[a]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=ka(o));const i=e.getAttribute("data-flip");typeof i=="string"&&Fa(r,i),Ha.forEach(a=>{const l="data-"+a,u=Va(e.getAttribute(l),l);typeof u=="boolean"&&(r[a]=u)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:s}}const Ka="svg."+vt+", i."+vt+", span."+vt+", i."+Lt+", span."+Lt;function Ga(e){const t=[];return e.querySelectorAll(Ka).forEach(n=>{const r=n[ce]||n.tagName.toLowerCase()!=="svg"?qa(n):null;r&&t.push({node:n,props:r})}),t}function no(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 Ie;function Wa(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function Qa(e){return Ie===void 0&&Wa(),Ie?Ie.createHTML(e):e}function ro(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function oo(e,t,n,r){const o=e.classList;if(r){const s=r.classList;Array.from(s).forEach(a=>{o.add(a)})}const i=[];return t.forEach(s=>{o.contains(s)?n.has(s)&&i.push(s):(o.add(s),i.push(s))}),n.forEach(s=>{t.has(s)||o.remove(s)}),i}function so(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 io(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=it(n,o),s=e[ce],a=no(Br(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=Qa(a);const l=r.childNodes[0],u=e.attributes;for(let b=0;b<u.length;b++){const g=u.item(b),w=g.name;w!=="class"&&!l.hasAttribute(w)&&l.setAttribute(w,g.value)}const d=ro(t.icon),f=oo(l,d,new Set(s&&s.addedClasses),e),p=so(l,o.inline?{"vertical-align":"-0.125em"}:{},s&&s.addedStyles),y={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[ce]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function Ya(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Xa(e){return"data:image/svg+xml,"+Ya(e)}function Za(e){return'url("'+Xa(e)+'")'}const Ja={display:"inline-block"},At={"background-color":"currentColor"},ao={"background-color":"transparent"},Hn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Vn={"-webkit-mask":At,mask:At,background:ao};for(const e in Vn){const t=Vn[e];for(const n in Hn)t[e+"-"+n]=Hn[n]}function qn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ec(e,t,n,r){const o=t.customisations,i=it(n,o),s=i.attributes,a=e[ce],l=no(i.body,{...s,width:n.width+"",height:n.height+""}),u=ro(t.icon),d=oo(e,u,new Set(a&&a.addedClasses)),p={"--svg":Za(l),width:qn(s.width),height:qn(s.height),...Ja,...r?At:ao};o.inline&&(p["vertical-align"]="-0.125em");const y=so(e,p,a&&a.addedStyles),b={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[ce]=b,e}let Ve=!1;function tc(){Ve||(Ve=!0,setTimeout(()=>{Ve&&(Ve=!1,we())}))}function we(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:s,prefix:a,name:l}=o,u=te(s,a),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!Ea(o)){const f=n[s]||(n[s]=Object.create(null));(f[a]||(f[a]=new Set)).add(l)}return{status:"loading"}}(e?[e]:ke()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let s=!1,a=!1;function l(u,d,f){if(a||(a=!0,Tt(o)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,y=p==="mask"||(p==="bg"?!1:p==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){ec(u,d,{...Be,...f},y);return}}io(u,d,f)}Ga(i).forEach(({node:u,props:d})=>{const f=u[ce];if(!f){const{status:y,icon:b}=r(d.icon,!0);if(b){l(u,d,b);return}s=s||y==="loading",u[ce]={...d,status:y};return}let p;if(Na(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){s=s||p.status==="loading",Object.assign(f,{...d,status:p.status});return}}else{if(f.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){f.status=p.status;return}}l(u,d,p.icon)}),o.temporary&&!s?to(i):t&&s?eo(i,!0):a&&o.observer&&Dt(o)});for(const o in n){const i=n[o];for(const s in i){const a=i[s];ln(Array.from(a).map(l=>({provider:o,prefix:s,name:l})),tc)}}}function nc(e){const t=Ne(e);t?we(t):we({node:e,temporary:!0},!0)}function co(e,t,n=!1){const r=Me(e);if(!r)return null;const o=je(e),i=Qr(lt,t||{}),s=io(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?s.outerHTML:s}function rc(){return"3.1.1"}function oc(e,t){return co(e,t,!1)}function sc(e,t){return co(e,t,!0)}function ic(e,t){const n=Me(e);if(!n)return null;const r=Qr(lt,t||{});return it(n,r)}function ac(e){e?nc(e):we()}if(typeof document<"u"&&typeof window<"u"){Ia();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"||!Dr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{$a(we),we()})}function cc(e,t){Hr(e,t!==!1)}function lc(e){Hr(e,!0)}Vr("",ha);if(typeof document<"u"&&typeof window<"u"){zr();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;qr(n,o)||console.error(r)}catch{console.error(r)}}}}const uc={getAPIConfig:ct,setAPIModule:Vr,sendAPIQuery:Wr,setFetch:ca,getFetch:la,listAPIProviders:ia},dc={_api:uc,addAPIProvider:qr,loadIcons:ln,loadIcon:Ra,iconExists:Yi,getIcon:Xi,listIcons:Wi,addIcon:Tr,addCollection:Dr,replaceIDs:Br,calculateSize:Ct,buildIcon:it,getVersion:rc,renderSVG:oc,renderHTML:sc,renderIcon:ic,scan:ac,observe:eo,stopObserving:to,pauseObserver:Ba,resumeObserver:Ma,enableCache:cc,disableCache:lc};try{self.Iconify===void 0&&(self.Iconify=dc)}catch{}var un={},fc=X;Object.defineProperty(un,"__esModule",{value:!0});var lo=un.default=void 0,pc=fc(Y()),mc=c;lo=un.default=(0,pc.default)((0,mc.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 dn({infos:e}){const{t}=z(),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(`
|
|
28
23
|
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
29
24
|
|
|
30
25
|
|
|
@@ -34,7 +29,7 @@ import{r as m,aC as Yn,aD as Xn,aE as kt,aF as W,aG as Zn,aH as xe,aI as Pn,aJ a
|
|
|
34
29
|
${r}
|
|
35
30
|
* Page: ${window.location.href}
|
|
36
31
|
-->
|
|
37
|
-
`),A($,{sx:{mx:{xs:0,md:2}},children:A(pr,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}dn.propTypes={infos:v.arrayOf(v.shape({label:v.string,value:v.string}))};dn.defaultProps={infos:[]};var hc={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},gc={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const $t=new Map,vc=(e,t)=>{$t.set(e,t)},yc=(e="en_US")=>$t.get(e)||$t.get("en_US");var uo={registerLang:vc,getLang:yc},xc=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const bc=xc,{getLang:Oe}=uo,wc=(e,t)=>t===1?e:`${e}s`,Sc=1e-7;var jc=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const n=Oe(t.locale),r=[],o=(a,l)=>{const u=Math.floor(a*10**l+Sc);return(Math.round(u)/10**l).toFixed(l)},i=(a,l,u)=>{if((r.length===0||!t.colonNotation)&&a===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=n[l]||Oe("en_US")[l],{short:f}=n[l]||Oe("en_US")[l];let p=(u||a||"0").toString(),y,b;if(t.colonNotation){y=r.length>0?":":"",b="";const g=p.includes(".")?p.split(".")[0].length:p.length,w=r.length>0?2:1;p="0".repeat(Math.max(0,w-g))+p}else y="",t.locale==="zh_CN"?Object.values(s).filter(g=>g>0).length>1?!s.days&&!s.hours&&s.minutes&&t.compact?b=d:b=f:s.minutes?b=d:b=f:b=t.verbose?` ${wc(d,a)}`:f;r.push(y+p+b)},s=bc(e);if(i(Math.trunc(s.days/365),"year"),i(s.days%365,"day"),i(s.hours,"hour"),i(s.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(i(s.seconds,"second"),t.formatSubMilliseconds)i(s.milliseconds,"millisecond"),i(s.microseconds,"microsecond"),i(s.nanoseconds,"nanosecond");else{const a=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=a>=1?Math.round(a):Math.ceil(a),d=l?a.toFixed(l):u;i(Number.parseFloat(d,10),"millisecond",d)}else{const a=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=o(a,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");i(Number.parseFloat(d,10),"second",d)}if(r.length===0){const a=(n.millisecond||Oe("en_US").millisecond).long,l=(n.millisecond||Oe("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${a}`:l}`:`0${t.verbose?` ${a}s`:l}`}if(t.compact)return r[0];if(typeof t.unitCount=="number"){const a=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(a)}return t.colonNotation?r.join(""):r.join(" ")};const _c=hc,Cc=gc,{registerLang:fn}=uo,fo=jc;fn("en_US",_c);fn("zh_CN",Cc);fo.registerLang=fn;var Pc=fo;const tt=nr(Pc);var pn={},Oc=X;Object.defineProperty(pn,"__esModule",{value:!0});var Bt=pn.default=void 0,Ec=Oc(Y()),Kn=c;Bt=pn.default=(0,Ec.default)([(0,Kn.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,Kn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ae({children:e}){return st(n=>n.breakpoints.down("md"))?c.jsx(Qe,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:c.jsx($,{sx:{display:"flex",alignItems:"center",gap:1},children:c.jsx(Bt,{fontSize:"small"})})}):c.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(Bt,{fontSize:"small"}),e]})}ae.propTypes={children:v.node.isRequired};const Rc="https://launcher.arcblock.io/",Ic=30*24*60*60*1e3;function mn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var P,j,I,_,E,L;const{t:i,locale:s}=z(),a=F(),[l,u]=mr({safeIframeRef:null,popoverAnchorEl:null}),d=m.useRef(null),f=st(T=>T.breakpoints.down("md")),{sx:p={},...y}=o,b=f?"mobile":"desktop",g=dr(async()=>{const[T,Z]=await Promise.all([a.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),ir({launcherUrl:e||Rc,nftDid:n,launcherSessionId:r,locale:s})]);if(T!=null&&T.error)throw new Error(T.error);return{launcherSession:T.launcherSession,subscriptionURL:Z}},[s]);if(g.loading)return c.jsx(fe,{label:c.jsxs(ae,{children:[!f&&i("expiration.desktop.loading"),c.jsx(oe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(g.error)return console.error(g.error),c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>g.retry()});const w=T=>{u({popoverAnchorEl:T.currentTarget})},R=()=>{u({popoverAnchorEl:null})},h=(P=g.value)==null?void 0:P.launcherSession;let C="success";["expired","terminated"].includes((I=(j=g.value)==null?void 0:j.launcherSession)==null?void 0:I.statusText)&&(C="error");let S=null;if(h.expirationDate&&!h.subscription){const T=ye(h.expirationDate).diff(ye(),"ms");S=i(`expiration.${b}.tips.${C}`,{validity:tt(T,{locale:zt(s),compact:!0,verbose:!0})}),T>0&&T<=Ic&&(C="warning")}return c.jsxs(c.Fragment,{children:[c.jsx(fe,{label:c.jsx(ae,{children:S||((E=(_=h==null?void 0:h.subscription)==null?void 0:_.product)==null?void 0:E.name)||i("common.subscription")}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:w}),c.jsx(ar,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(L=g.value)==null?void 0:L.subscriptionURL})})]})}mn.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};mn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Lc=30*24*60*60*1e3,Tc="https://launcher.arcblock.io/";function hn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var j,I,_,E,L,T,Z;const{t:i,locale:s}=z(),[a,l]=mr({safeIframeRef:null,popoverAnchorEl:null}),u=m.useRef(null),d=st(B=>B.breakpoints.down("md")),f=F(),{sx:p={},...y}=o,b=d?"mobile":"desktop",g=dr(async()=>{const[B,le]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),ir({launcherUrl:e||Tc,nftDid:n,launcherSessionId:r,locale:s})]);if(B!=null&&B.error)throw new Error(B.error);return{launcherSession:B.launcherSession,subscriptionURL:le}},[s]);if(g.loading)return c.jsx(fe,{label:c.jsxs(ae,{children:[!d&&i("expiration.desktop.loading"),c.jsx(oe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(g.error)return console.error(g.error),c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>g.retry()});const w=(I=(j=g.value)==null?void 0:j.launcherSession)==null?void 0:I.expirationDate,R=ye(w).isBefore(ye()),h=ye(w).diff(ye(),"ms");let C="success";h<=Lc&&(C="warning"),R&&(C="error");const S=B=>{l({popoverAnchorEl:B.currentTarget})},P=()=>{l({popoverAnchorEl:null})};return c.jsxs(c.Fragment,{children:[((E=(_=g.value)==null?void 0:_.launcherSession)==null?void 0:E.subscription)&&c.jsx(fe,{label:c.jsx(ae,{children:i("expiration.desktop.nextInvoice",{date:Fo(w,s)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...y,onClick:S}),!((T=(L=g.value)==null?void 0:L.launcherSession)!=null&&T.subscription)&&c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.tips.${C}`,{validity:tt(h,{locale:zt(s),compact:!0,verbose:!0})})}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:S}),c.jsx(ar,{id:"popover-info",open:!!a.popoverAnchorEl,anchorEl:a.popoverAnchorEl,onClose:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(Z=g.value)==null?void 0:Z.subscriptionURL})})]})}hn.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};hn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var gn={},Dc=X;Object.defineProperty(gn,"__esModule",{value:!0});var po=gn.default=void 0,Ac=Dc(Y()),$c=c;po=gn.default=(0,Ac.default)((0,$c.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var vn={},Bc=X;Object.defineProperty(vn,"__esModule",{value:!0});var mo=vn.default=void 0,Mc=Bc(Y()),kc=c;mo=vn.default=(0,Mc.default)((0,kc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var Mt=yn.default=void 0;Nc(m);var Gn=c;function Nc(e){return e&&e.__esModule?e:{default:e}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wn(Object(n),!0).forEach(function(r){Uc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uc(e,t,n){return t=Fc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fc(e){var t=zc(e,"string");return typeof t=="symbol"?t:String(t)}function zc(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=function(t){return(0,Gn.jsx)("svg",Qn(Qn({},t),{},{children:(0,Gn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.251 2.5c-2.576-.006-4.747 2.1-4.766 4.506v5.784c0 .793-.084 1.778-.58 2.71h12.19c-.496-.932-.58-1.917-.58-2.711V7.01c-.035-2.403-2.21-4.502-4.797-4.508L9.25 2.5zM17.015 7v5.789c0 .79.1 1.562.53 2.219l.287.438c.436.664-.033 1.554-.817 1.554H2.985c-.785 0-1.255-.89-.818-1.554l.287-.438c.43-.657.53-1.428.53-2.218V7c.024-3.291 2.927-6.008 6.27-6l1.467.003c3.344.008 6.254 2.706 6.294 5.998zM11.06 18.06A1.5 1.5 0 0 0 11.5 17H13a3 3 0 0 1-6 0h1.5a1.5 1.5 0 0 0 2.56 1.06z",fill:"currentColor"})}))};xn.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};xn.displayName="notification";Mt=yn.default=xn;function ho({status:e,...t}){const n={warning:"warning",error:"error",info:"primary"};return!e||e==="info"||e==="success"?null:c.jsx(fr,{type:n[e],style:{borderRadius:5,border:"1px solid #ccc"},...t,children:e})}ho.propTypes={status:v.string.isRequired};function bn({value:e,...t}){const{t:n,locale:r}=z();if(!e)return"-";const o={locale:zt(r),compact:!0},i=new Date(e).getTime(),s=Date.now();if(i>s){const l=tt(i-s,o);return c.jsx(Qe,{title:St(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.afterTime",{time:l})})})}const a=tt(s-i,o);return c.jsx(Qe,{title:St(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.timeAgo",{time:a})})})}bn.propTypes={value:v.any};bn.defaultProps={value:""};function Hc(e,t){const n=m.useRef(t);m.useEffect(()=>{const r=o=>n.current(o.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e])}function Vc(){window.dispatchEvent(new CustomEvent("checkUpdate"))}function Fl(e){const t=rt(),{t:n}=z(),r=()=>{const o=new URLSearchParams(window.location.search);o.get("checkUpdate")&&(o.delete("checkUpdate"),t(o.toString()),e(),U.success(n("notification.checkingForUpdates")))};m.useEffect(r,[]),Hc("checkUpdate",r)}function wn({onHide:e,api:t,notifications:n,updateNotifications:r,viewAllUrl:o,teamDid:i}){const{inService:s}=F(),{t:a,locale:l}=m.useContext(Nt),[u,d]=m.useState(!0),[f,p]=m.useState(!1),y=rt(),b=zo();let g=u?n:n.filter(S=>S.read===!1);g=g.slice(0,5);const w=n.filter(S=>S.read===!1).length>0,R=async()=>{p(!0);const S=n.filter(P=>P.read===!1).map(P=>P.id).join(",");s?await t.readBlockletNotifications({input:{id:S,teamDid:i}}):await t.readNotifications({input:{id:S}}),r(),p(!1)},h=(S,P)=>{P.read||(s?t.readBlockletNotifications({input:{id:P.id,teamDid:i}}).then(()=>r()):t.readNotifications({input:{id:P.id}}).then(()=>r())),e(S),y(o)},C=(S,P)=>{S.preventDefault(),S.stopPropagation(),y(P),Vc()};return c.jsxs(qc,{children:[c.jsxs(re,{component:"h3",variant:"h6",className:"notification-header",children:[a("notification.title"),c.jsx(be,{component:tr,to:o,"data-cy":"view-all-notifications-btn",onClick:e,children:a("notification.viewAll")})]}),c.jsx(bt,{}),c.jsxs(Ho,{className:"notification-list",style:{maxHeight:"calc(100vh - 200px)",overflow:"auto"},children:[g.length===0&&c.jsx(re,{component:"p",variant:"body1",className:"notification-tip",children:a("notification.empty")}),g.length>0&&g.map(S=>c.jsxs(Ss,{alignItems:"flex-start",disabled:S.read,onClick:P=>h(P,S),children:[c.jsx(Ns,{className:"list-item-avatar",children:c.jsxs(c.Fragment,{children:[c.jsx(ur,{children:S.entityType.substr(0,1).toUpperCase()}),c.jsx(ho,{className:"notification-tag",status:S.severity})]})}),c.jsx(cr,{primary:S.title,secondary:c.jsxs($,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsx(re,{component:"span",sx:{overflow:"hidden","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",display:"-webkit-box","text-overflow":"ellipsis"},children:S.description}),c.jsxs($,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[c.jsx(bn,{value:S.createdAt,locale:l,style:{color:b.palette.text.secondary,fontSize:"0.875rem",marginTop:"4px"}}),S.action&&!S.read?c.jsx(be,{color:"primary",variant:"outlined",onPointerDown:P=>{P.stopPropagation(),P.preventDefault()},onClick:P=>C(P,S.action),"data-cy":"check-for-updates",children:a("notification.proceed")}):null]})]})})]},S.id))]}),c.jsx(bt,{}),c.jsxs(re,{component:"div",className:"notification-footer",children:[c.jsx(jt,{control:c.jsx(ms,{checked:u,onChange:()=>d(!u),name:"showRead",color:"primary"}),label:a("notification.showRead")}),c.jsx(vs,{permission:s?"":"mutate_notification",role:s?Vo:[],children:w&&c.jsxs(be,{disabled:f,onClick:R,className:"",children:[f&&c.jsx(oe,{size:16,style:{marginRight:"1em"}}),a("notification.markAllAsRead")]})})]})]})}const qc=nt.div`
|
|
32
|
+
`),$(A,{sx:{mx:{xs:0,md:2}},children:$(pr,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}dn.propTypes={infos:v.arrayOf(v.shape({label:v.string,value:v.string}))};dn.defaultProps={infos:[]};var hc={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},gc={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const $t=new Map,vc=(e,t)=>{$t.set(e,t)},yc=(e="en_US")=>$t.get(e)||$t.get("en_US");var uo={registerLang:vc,getLang:yc},xc=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const bc=xc,{getLang:Oe}=uo,wc=(e,t)=>t===1?e:`${e}s`,Sc=1e-7;var jc=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const n=Oe(t.locale),r=[],o=(a,l)=>{const u=Math.floor(a*10**l+Sc);return(Math.round(u)/10**l).toFixed(l)},i=(a,l,u)=>{if((r.length===0||!t.colonNotation)&&a===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=n[l]||Oe("en_US")[l],{short:f}=n[l]||Oe("en_US")[l];let p=(u||a||"0").toString(),y,b;if(t.colonNotation){y=r.length>0?":":"",b="";const g=p.includes(".")?p.split(".")[0].length:p.length,w=r.length>0?2:1;p="0".repeat(Math.max(0,w-g))+p}else y="",t.locale==="zh_CN"?Object.values(s).filter(g=>g>0).length>1?!s.days&&!s.hours&&s.minutes&&t.compact?b=d:b=f:s.minutes?b=d:b=f:b=t.verbose?` ${wc(d,a)}`:f;r.push(y+p+b)},s=bc(e);if(i(Math.trunc(s.days/365),"year"),i(s.days%365,"day"),i(s.hours,"hour"),i(s.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(i(s.seconds,"second"),t.formatSubMilliseconds)i(s.milliseconds,"millisecond"),i(s.microseconds,"microsecond"),i(s.nanoseconds,"nanosecond");else{const a=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=a>=1?Math.round(a):Math.ceil(a),d=l?a.toFixed(l):u;i(Number.parseFloat(d,10),"millisecond",d)}else{const a=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=o(a,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");i(Number.parseFloat(d,10),"second",d)}if(r.length===0){const a=(n.millisecond||Oe("en_US").millisecond).long,l=(n.millisecond||Oe("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${a}`:l}`:`0${t.verbose?` ${a}s`:l}`}if(t.compact)return r[0];if(typeof t.unitCount=="number"){const a=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(a)}return t.colonNotation?r.join(""):r.join(" ")};const _c=hc,Cc=gc,{registerLang:fn}=uo,fo=jc;fn("en_US",_c);fn("zh_CN",Cc);fo.registerLang=fn;var Pc=fo;const tt=nr(Pc);var pn={},Oc=X;Object.defineProperty(pn,"__esModule",{value:!0});var Bt=pn.default=void 0,Ec=Oc(Y()),Kn=c;Bt=pn.default=(0,Ec.default)([(0,Kn.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,Kn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ae({children:e}){return st(n=>n.breakpoints.down("md"))?c.jsx(Qe,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:c.jsx(A,{sx:{display:"flex",alignItems:"center",gap:1},children:c.jsx(Bt,{fontSize:"small"})})}):c.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(Bt,{fontSize:"small"}),e]})}ae.propTypes={children:v.node.isRequired};const Rc="https://launcher.arcblock.io/",Ic=30*24*60*60*1e3;function mn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var P,j,I,_,E,L;const{t:i,locale:s}=z(),a=F(),[l,u]=mr({safeIframeRef:null,popoverAnchorEl:null}),d=m.useRef(null),f=st(T=>T.breakpoints.down("md")),{sx:p={},...y}=o,b=f?"mobile":"desktop",g=dr(async()=>{const[T,Z]=await Promise.all([a.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),ir({launcherUrl:e||Rc,nftDid:n,launcherSessionId:r,locale:s})]);if(T!=null&&T.error)throw new Error(T.error);return{launcherSession:T.launcherSession,subscriptionURL:Z}},[s]);if(g.loading)return c.jsx(fe,{label:c.jsxs(ae,{children:[!f&&i("expiration.desktop.loading"),c.jsx(oe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(g.error)return console.error(g.error),c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>g.retry()});const w=T=>{u({popoverAnchorEl:T.currentTarget})},R=()=>{u({popoverAnchorEl:null})},h=(P=g.value)==null?void 0:P.launcherSession;let C="success";["expired","terminated"].includes((I=(j=g.value)==null?void 0:j.launcherSession)==null?void 0:I.statusText)&&(C="error");let S=null;if(h.expirationDate&&!h.subscription){const T=ye(h.expirationDate).diff(ye(),"ms");S=i(`expiration.${b}.tips.${C}`,{validity:tt(T,{locale:zt(s),compact:!0,verbose:!0})}),T>0&&T<=Ic&&(C="warning")}return c.jsxs(c.Fragment,{children:[c.jsx(fe,{label:c.jsx(ae,{children:S||((E=(_=h==null?void 0:h.subscription)==null?void 0:_.product)==null?void 0:E.name)||i("common.subscription")}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:w}),c.jsx(ar,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(L=g.value)==null?void 0:L.subscriptionURL})})]})}mn.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};mn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Lc=30*24*60*60*1e3,Tc="https://launcher.arcblock.io/";function hn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var j,I,_,E,L,T,Z;const{t:i,locale:s}=z(),[a,l]=mr({safeIframeRef:null,popoverAnchorEl:null}),u=m.useRef(null),d=st(B=>B.breakpoints.down("md")),f=F(),{sx:p={},...y}=o,b=d?"mobile":"desktop",g=dr(async()=>{const[B,le]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),ir({launcherUrl:e||Tc,nftDid:n,launcherSessionId:r,locale:s})]);if(B!=null&&B.error)throw new Error(B.error);return{launcherSession:B.launcherSession,subscriptionURL:le}},[s]);if(g.loading)return c.jsx(fe,{label:c.jsxs(ae,{children:[!d&&i("expiration.desktop.loading"),c.jsx(oe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(g.error)return console.error(g.error),c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>g.retry()});const w=(I=(j=g.value)==null?void 0:j.launcherSession)==null?void 0:I.expirationDate,R=ye(w).isBefore(ye()),h=ye(w).diff(ye(),"ms");let C="success";h<=Lc&&(C="warning"),R&&(C="error");const S=B=>{l({popoverAnchorEl:B.currentTarget})},P=()=>{l({popoverAnchorEl:null})};return c.jsxs(c.Fragment,{children:[((E=(_=g.value)==null?void 0:_.launcherSession)==null?void 0:E.subscription)&&c.jsx(fe,{label:c.jsx(ae,{children:i("expiration.desktop.nextInvoice",{date:Fo(w,s)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...y,onClick:S}),!((T=(L=g.value)==null?void 0:L.launcherSession)!=null&&T.subscription)&&c.jsx(fe,{label:c.jsx(ae,{children:i(`expiration.${b}.tips.${C}`,{validity:tt(h,{locale:zt(s),compact:!0,verbose:!0})})}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:S}),c.jsx(ar,{id:"popover-info",open:!!a.popoverAnchorEl,anchorEl:a.popoverAnchorEl,onClose:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(Z=g.value)==null?void 0:Z.subscriptionURL})})]})}hn.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};hn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var gn={},Dc=X;Object.defineProperty(gn,"__esModule",{value:!0});var po=gn.default=void 0,Ac=Dc(Y()),$c=c;po=gn.default=(0,Ac.default)((0,$c.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var vn={},Bc=X;Object.defineProperty(vn,"__esModule",{value:!0});var mo=vn.default=void 0,Mc=Bc(Y()),Nc=c;mo=vn.default=(0,Mc.default)((0,Nc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var Mt=yn.default=void 0;kc(m);var Gn=c;function kc(e){return e&&e.__esModule?e:{default:e}}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wn(Object(n),!0).forEach(function(r){Uc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uc(e,t,n){return t=Fc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fc(e){var t=zc(e,"string");return typeof t=="symbol"?t:String(t)}function zc(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=function(t){return(0,Gn.jsx)("svg",Qn(Qn({},t),{},{children:(0,Gn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.251 2.5c-2.576-.006-4.747 2.1-4.766 4.506v5.784c0 .793-.084 1.778-.58 2.71h12.19c-.496-.932-.58-1.917-.58-2.711V7.01c-.035-2.403-2.21-4.502-4.797-4.508L9.25 2.5zM17.015 7v5.789c0 .79.1 1.562.53 2.219l.287.438c.436.664-.033 1.554-.817 1.554H2.985c-.785 0-1.255-.89-.818-1.554l.287-.438c.43-.657.53-1.428.53-2.218V7c.024-3.291 2.927-6.008 6.27-6l1.467.003c3.344.008 6.254 2.706 6.294 5.998zM11.06 18.06A1.5 1.5 0 0 0 11.5 17H13a3 3 0 0 1-6 0h1.5a1.5 1.5 0 0 0 2.56 1.06z",fill:"currentColor"})}))};xn.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};xn.displayName="notification";Mt=yn.default=xn;function ho({status:e,...t}){const n={warning:"warning",error:"error",info:"primary"};return!e||e==="info"||e==="success"?null:c.jsx(fr,{type:n[e],style:{borderRadius:5,border:"1px solid #ccc"},...t,children:e})}ho.propTypes={status:v.string.isRequired};function bn({value:e,...t}){const{t:n,locale:r}=z();if(!e)return"-";const o={locale:zt(r),compact:!0},i=new Date(e).getTime(),s=Date.now();if(i>s){const l=tt(i-s,o);return c.jsx(Qe,{title:St(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.afterTime",{time:l})})})}const a=tt(s-i,o);return c.jsx(Qe,{title:St(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.timeAgo",{time:a})})})}bn.propTypes={value:v.any};bn.defaultProps={value:""};function Hc(e,t){const n=m.useRef(t);m.useEffect(()=>{const r=o=>n.current(o.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e])}function Vc(){window.dispatchEvent(new CustomEvent("checkUpdate"))}function Fl(e){const t=rt(),{t:n}=z(),r=()=>{const o=new URLSearchParams(window.location.search);o.get("checkUpdate")&&(o.delete("checkUpdate"),t(o.toString()),e(),U.success(n("notification.checkingForUpdates")))};m.useEffect(r,[]),Hc("checkUpdate",r)}function wn({onHide:e,api:t,notifications:n,updateNotifications:r,viewAllUrl:o,teamDid:i}){const{inService:s}=F(),{t:a,locale:l}=m.useContext(kt),[u,d]=m.useState(!0),[f,p]=m.useState(!1),y=rt(),b=zo();let g=u?n:n.filter(S=>S.read===!1);g=g.slice(0,5);const w=n.filter(S=>S.read===!1).length>0,R=async()=>{p(!0);const S=n.filter(P=>P.read===!1).map(P=>P.id).join(",");s?await t.readBlockletNotifications({input:{id:S,teamDid:i}}):await t.readNotifications({input:{id:S}}),r(),p(!1)},h=(S,P)=>{P.read||(s?t.readBlockletNotifications({input:{id:P.id,teamDid:i}}).then(()=>r()):t.readNotifications({input:{id:P.id}}).then(()=>r())),e(S),y(o)},C=(S,P)=>{S.preventDefault(),S.stopPropagation(),y(P),Vc()};return c.jsxs(qc,{children:[c.jsxs(re,{component:"h3",variant:"h6",className:"notification-header",children:[a("notification.title"),c.jsx(be,{component:tr,to:o,"data-cy":"view-all-notifications-btn",onClick:e,children:a("notification.viewAll")})]}),c.jsx(bt,{}),c.jsxs(Ho,{className:"notification-list",style:{maxHeight:"calc(100vh - 200px)",overflow:"auto"},children:[g.length===0&&c.jsx(re,{component:"p",variant:"body1",className:"notification-tip",children:a("notification.empty")}),g.length>0&&g.map(S=>c.jsxs(Ss,{alignItems:"flex-start",disabled:S.read,onClick:P=>h(P,S),children:[c.jsx(ks,{className:"list-item-avatar",children:c.jsxs(c.Fragment,{children:[c.jsx(ur,{children:S.entityType.substr(0,1).toUpperCase()}),c.jsx(ho,{className:"notification-tag",status:S.severity})]})}),c.jsx(cr,{primary:S.title,secondary:c.jsxs(A,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsx(re,{component:"span",sx:{overflow:"hidden","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",display:"-webkit-box","text-overflow":"ellipsis"},children:S.description}),c.jsxs(A,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[c.jsx(bn,{value:S.createdAt,locale:l,style:{color:b.palette.text.secondary,fontSize:"0.875rem",marginTop:"4px"}}),S.action&&!S.read?c.jsx(be,{color:"primary",variant:"outlined",onPointerDown:P=>{P.stopPropagation(),P.preventDefault()},onClick:P=>C(P,S.action),"data-cy":"check-for-updates",children:a("notification.proceed")}):null]})]})})]},S.id))]}),c.jsx(bt,{}),c.jsxs(re,{component:"div",className:"notification-footer",children:[c.jsx(jt,{control:c.jsx(ms,{checked:u,onChange:()=>d(!u),name:"showRead",color:"primary"}),label:a("notification.showRead")}),c.jsx(vs,{permission:s?"":"mutate_notification",role:s?Vo:[],children:w&&c.jsxs(be,{disabled:f,onClick:R,className:"",children:[f&&c.jsx(oe,{size:16,style:{marginRight:"1em"}}),a("notification.markAllAsRead")]})})]})]})}const qc=nt.div`
|
|
38
33
|
width: 420px;
|
|
39
34
|
|
|
40
35
|
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
@@ -77,7 +72,7 @@ ${r}
|
|
|
77
72
|
background: ${e=>e.theme.palette.primary.light};
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
|
-
`;wn.propTypes={onHide:v.func,api:v.shape({readNotifications:v.func.isRequired,readBlockletNotifications:v.func.isRequired}).isRequired,notifications:v.arrayOf(v.shape({id:v.string,read:v.bool,entityType:v.string,title:v.string,createdAt:v.string,description:v.string}).isRequired).isRequired,updateNotifications:v.func.isRequired,viewAllUrl:v.string.isRequired,teamDid:v.string};wn.defaultProps={onHide:()=>{},teamDid:""};function Sn({api:e,notifications:t,updateNotifications:n,viewAllUrl:r,teamDid:o}){const[i,s]=m.useState(!1),a=m.useRef(null),l=()=>{s(f=>!f)},u=f=>{a.current&&a.current.contains(f.target)||s(!1)},d=t.filter(f=>f.read===!1).length;return c.jsxs("div",{className:"notification-addon",children:[c.jsx(Ut,{ref:a,"aria-controls":"notify-list-grow","aria-haspopup":"true","data-cy":"toggle-notification-btn",onClick:l,children:d>0?c.jsx(gr,{badgeContent:d,max:99,color:"primary",children:c.jsx(Mt,{style:{width:"auto",height:24}})}):c.jsx(Mt,{style:{width:"auto",height:24}})}),i&&c.jsx(qo,{open:!0,anchorEl:a.current,disablePortal:!0,placement:"bottom-end",children:c.jsx(Ko,{id:"notify-list-grow",children:c.jsx(Go,{onClickAway:u,children:c.jsx("div",{children:c.jsx(wn,{notifications:t,updateNotifications:n,api:e,viewAllUrl:r,onHide:u,teamDid:o})})})})})]})}Sn.propTypes={notifications:v.arrayOf(v.object),viewAllUrl:v.string.isRequired,api:v.object.isRequired,updateNotifications:v.func.isRequired,teamDid:v.string};Sn.defaultProps={notifications:[],teamDid:""};const Kc=`${Q.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/notifications`;function jn(){const{did:e}=window.env,{api:t,data:n,refresh:r}=Wo();return c.jsx(Sn,{api:t,viewAllUrl:Kc,notifications:n||[],updateNotifications:r,teamDid:e})}jn.propTypes={};jn.defaultProps={};function Gc(){const{inFullPage:e,toggleFullPage:t}=ws();return
|
|
75
|
+
`;wn.propTypes={onHide:v.func,api:v.shape({readNotifications:v.func.isRequired,readBlockletNotifications:v.func.isRequired}).isRequired,notifications:v.arrayOf(v.shape({id:v.string,read:v.bool,entityType:v.string,title:v.string,createdAt:v.string,description:v.string}).isRequired).isRequired,updateNotifications:v.func.isRequired,viewAllUrl:v.string.isRequired,teamDid:v.string};wn.defaultProps={onHide:()=>{},teamDid:""};function Sn({api:e,notifications:t,updateNotifications:n,viewAllUrl:r,teamDid:o}){const[i,s]=m.useState(!1),a=m.useRef(null),l=()=>{s(f=>!f)},u=f=>{a.current&&a.current.contains(f.target)||s(!1)},d=t.filter(f=>f.read===!1).length;return c.jsxs("div",{className:"notification-addon",children:[c.jsx(Ut,{ref:a,"aria-controls":"notify-list-grow","aria-haspopup":"true","data-cy":"toggle-notification-btn",onClick:l,children:d>0?c.jsx(gr,{badgeContent:d,max:99,color:"primary",children:c.jsx(Mt,{style:{width:"auto",height:24}})}):c.jsx(Mt,{style:{width:"auto",height:24}})}),i&&c.jsx(qo,{open:!0,anchorEl:a.current,disablePortal:!0,placement:"bottom-end",children:c.jsx(Ko,{id:"notify-list-grow",children:c.jsx(Go,{onClickAway:u,children:c.jsx("div",{children:c.jsx(wn,{notifications:t,updateNotifications:n,api:e,viewAllUrl:r,onHide:u,teamDid:o})})})})})]})}Sn.propTypes={notifications:v.arrayOf(v.object),viewAllUrl:v.string.isRequired,api:v.object.isRequired,updateNotifications:v.func.isRequired,teamDid:v.string};Sn.defaultProps={notifications:[],teamDid:""};const Kc=`${Q.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/notifications`;function jn(){const{did:e}=window.env,{api:t,data:n,refresh:r}=Wo();return c.jsx(Sn,{api:t,viewAllUrl:Kc,notifications:n||[],updateNotifications:r,teamDid:e})}jn.propTypes={};jn.defaultProps={};function Gc(){const{inFullPage:e,toggleFullPage:t}=ws();return $(Ut,{onClick:t,children:e?$(mo,{sx:{transform:"scale(1.3)"}}):$(po,{sx:{transform:"scale(1.3)"}})})}function _n({children:e}){var g;const{t}=z(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:s}=Ae(),{info:a}=Qo(),l=Yo(),u=st(w=>w.breakpoints.down("md")),{appId:d,version:f}=i,p=[{label:"App ID",value:d},{label:"App Version",value:f},{label:"App Bundle Name",value:(g=s==null?void 0:s.meta)==null?void 0:g.bundleName},{label:"Server Id",value:a.did},{label:"Server Version",value:a.version}],y=w=>{var h,C,S,P;const R=Array.isArray(w)?w:[w];if(R.unshift($(jn,{})),u||R.unshift($(Gc,{})),s){const j={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Zo(s)?R.unshift($(mn,{chainHost:(h=s==null?void 0:s.controller)==null?void 0:h.chainHost,nftId:(C=s==null?void 0:s.controller)==null?void 0:C.nftId,launcherSessionId:(S=s==null?void 0:s.controller)==null?void 0:S.launcherSessionId,launcherUrl:(P=s==null?void 0:s.controller)==null?void 0:P.launcherUrl,sx:j})):a.ownerNft&&a.launcher&&R.unshift($(hn,{chainHost:a.launcher.chainHost,launcherUrl:a.launcher.url,nftId:a.ownerNft.did,launcherSessionId:a.ownerNft.launcherSessionId,sx:j}))}return R},b={};return u&&(b.logo=null),mt(Wc,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:b,isMobile:u,footerProps:{addon:$(dn,{infos:p})},children:[!s&&n&&$(Ye,{relative:"parent",children:$(oe,{})}),!s&&r&&mt(Ye,{relative:"parent",children:[mt(A,{display:"flex",alignItems:"center",children:[$(lo,{color:"error",sx:{marginRight:1}}),$e(r)]}),$(be,{onClick:()=>o(),children:$("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!s&&$(A,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:$(Xo,{FallbackComponent:bs,resetKeys:[l.pathname],children:e})})]})}_n.propTypes={children:v.any};_n.defaultProps={children:null};const Wc=nt(js)`
|
|
81
76
|
div.dashboard-content {
|
|
82
77
|
padding: 0;
|
|
83
78
|
}
|
|
@@ -85,7 +80,7 @@ ${r}
|
|
|
85
80
|
max-height: 400px;
|
|
86
81
|
overflow-y: auto;
|
|
87
82
|
}
|
|
88
|
-
`;function Qc(){const{t:e,locale:t}=z(),{blocklet:n,launcherSession:r}=Ae(),[o,i]=ls({subscriptionURL:"#"});return m.useEffect(()=>{var s,a;On(n,r)&&Jo({launcherSessionId:(s=n==null?void 0:n.controller)==null?void 0:s.launcherSessionId,launcherUrl:(a=n==null?void 0:n.controller)==null?void 0:a.launcherUrl,locale:t}).then(l=>{i({subscriptionURL:l})}).catch(l=>{console.error("get subscription url error:",l)})},[n,r]),On(n,r)?c.jsxs(
|
|
83
|
+
`;function Qc(){const{t:e,locale:t}=z(),{blocklet:n,launcherSession:r}=Ae(),[o,i]=ls({subscriptionURL:"#"});return m.useEffect(()=>{var s,a;On(n,r)&&Jo({launcherSessionId:(s=n==null?void 0:n.controller)==null?void 0:s.launcherSessionId,launcherUrl:(a=n==null?void 0:n.controller)==null?void 0:a.launcherUrl,locale:t}).then(l=>{i({subscriptionURL:l})}).catch(l=>{console.error("get subscription url error:",l)})},[n,r]),On(n,r)?c.jsxs(A,{component:lr,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[e("blocklet.redemptionTip",{deadline:St(r==null?void 0:r.reservedUntil,t)}),o.subscriptionURL&&c.jsx(pr,{sx:{marginLeft:"4px"},href:o.subscriptionURL,children:e("blocklet.manageSubscription")})]}):""}const go=m.createContext({});function zl(){return m.useContext(go)}const{Provider:Yc,Consumer:Hl}=go,{did:G,appId:Xc}=window.env;function Zc({children:e}){var j,I;const{t,locale:n}=z(),{blocklet:r}=Ae(),[o,i]=m.useState([]),[s,a]=m.useState([]),[l,u]=m.useState([]),d=De(r),f=((j=((r==null?void 0:r.environments)||[]).find(_=>_.key===k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:j.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],b=(r==null?void 0:r.enablePassportIssuance)!==!1,g=async()=>{try{const _=await ze.doBatchQuery({getRoles:{input:{teamDid:G}},getPermissions:{input:{teamDid:G}},getInvitations:{input:{teamDid:G}}});a((_.getRoles.roles||[]).filter(E=>!Q.RBAC_CONFIG.roles.some(L=>L.name===E.name&&(!L.passport||L.ci))).map(E=>(E.hasDescription=!!E.description,E.hasDescription||(E.description=t("team.passport.description",{teamName:d,title:E.title})),E))),u(_.getPermissions.permissions||[]),i(_.getInvitations.invitations||[])}catch(_){U.error(_.message)}},w=({did:_}={})=>{const E={teamDid:G,user:{did:_}};return ze.getUser({input:E})},R=({query:_,paging:E}={})=>{const L={teamDid:G};return E&&(L.paging=E),_&&(L.query=_),L.sort={lastLoginAt:-1},ze.getUsers({input:L})},h=()=>ze.getUsersCountPerRole({input:{teamDid:G}}),C=()=>g();m.useEffect(()=>{var _;(_=r==null?void 0:r.meta)!=null&&_.did&&g()},[(I=r==null?void 0:r.meta)==null?void 0:I.did]),m.useEffect(()=>{a(_=>_.map(E=>(E.hasDescription||(E.description=t("team.passport.description",{teamName:d,title:E.title})),{...E})))},[t,n]);const S=_=>{_.teamDid===G&&g()};Ke(k.TeamEvents.userAdded,S,[G]),Ke(k.TeamEvents.userRemoved,S,[G]),Ke(k.TeamEvents.userUpdated,S,[G]);const P={teamDid:G,teamIssuerDid:Xc,teamName:d,invitations:o,roles:s,permissions:l,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:b,refresh:C,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:w,getUsers:R,getUsersCountPerRole:h}};return c.jsx(Yc,{value:P,children:e})}const Jc=m.lazy(()=>H(()=>import("./overview-C3WvKiL8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]))),el=m.lazy(()=>H(()=>import("./index-DFcNK_4r.js"),__vite__mapDeps([53,1,2,54,4,55,56,57,58,25,26,27,28,29,59,60,61,42,43,34,36,62,49,63,64,31,7,38,65,47,48,50,33,5,51,52,44,16,66,18,20,67,68,69,8,9,10,11,12,13,70,23,14,15,71,32,37,39,40,41,35,45,46,22,17]))),tl=m.lazy(()=>H(()=>import("./index-DyE15ANN.js"),__vite__mapDeps([72,1,2,4,73,5,40,74,6,57,58,25,26,27,28,29,10,11,12,14,13,15,16,42,75,7,8,9,35,17,76,36,37,38,31,39,34,41,43,44,45,46,22,47,48,49,50,33,51,52]))),nl=m.lazy(()=>H(()=>import("./index-BlB9L1cj.js"),__vite__mapDeps([77,1,2,78,79,80,81,54,74,82,40,25,26,27,28,29,83,44,16,5,36,55,84,15,85,10,11,12,14,13,17,70,42,68,7,86,87,34,63,64,61,88,89,59,60,43,62,49,58,31,38,23,90,46,37,39,41,35,45,22,9,47,48,50,33,51,52,91]))),rl=m.lazy(()=>H(()=>import("./audit-logs-BSYj2Eqk.js"),__vite__mapDeps([92,1,2,93,94,7,35,37,26,27,28,29,95,62,96,36,38,14,13,15,16,31,39,34,40,41,42,43,44,12,10,11,45,46,22,9,17,47,48,49,50,33,5,51,52]))),ol=m.lazy(()=>H(()=>import("./log-TIkOb3Jo.js"),__vite__mapDeps([97,1,2,37,40,98,26,27,29,99]))),sl=m.lazy(()=>H(()=>import("./index-Cr-HBE-f.js"),__vite__mapDeps([100,1,2,4,31,101,102,59,60,61,42,27,26,43,28,34,29,25,36,62,49,63,64,58,7,38,35,12,8,9,14,13,15,16,83,44,71,98,17,103,54,22,46,5,20,104,82,40,105,86,80,70,106,76,107,93,94,96]))),il=m.lazy(()=>H(()=>import("./config-navigation-B9ZF6bIT.js"),__vite__mapDeps([108,1,2,63,64,61,109,106,84,29,26,27,15,16,110,28,34,25,36,76,65,47,48,49,50,33,5,51,38,52,44,111,13,40,30,37,14,31,39,41,42,43,12,10,11,35,45,46,22,9,17]))),al=m.lazy(()=>H(()=>import("./index-DjvzkTr4.js"),__vite__mapDeps([112,1,2,73,5,40,13,22,113,67,45,46,25,26,27,28,29,23,9,8,88,68,42,16,38,104,34,85,35,59,60,61,43,36,62,49,63,64,58,31,7,37,14,15,39,41,44,12,10,11,17,47,48,50,33,51,52]))),cl=m.lazy(()=>H(()=>import("./component-BVC9S5oR.js"),__vite__mapDeps([114,1,2,4,79,80,81,54,74,82,40,25,26,27,28,29,7,88,68,42,16,10,11,12,36,60,61,43,34,62,49,64,58,115,83,44,104,101,109,106,111,76,116,70,31,15,13,117,118,119,50,45,46,22,120,121,122,123,124,75,93,94,23,8,9,107,105,38,86,14,24,125,113,67,73,5,126,37,47,127,128,6,19,41,39,32,33,35,17,48,51,52]))),ll=m.lazy(()=>H(()=>import("./analytics-DMRryrbp.js"),__vite__mapDeps([129,1,2,36,10,11,12,78,130,115,61,83,44,16,64,38,34,26,27,29,15,13,25,28,76,59,60,42,43,62,49,63,58,31,7,37,14,39,40,41,35,45,46,22,9,17,47,48,50,33,5,51,52]))),ul=m.lazy(()=>H(()=>import("./notifications-DlfutjZo.js"),__vite__mapDeps([131,1,2,10,11,12,42,27,38,44,16,34,95,62,36,37,14,13,15,31,39,40,41,43,35,45,46,22,9,17,47,48,49,50,33,5,51,52])));function dl(){var g,w;const e=rt(),{tab:t="overview"}=ns(),{blocklet:n,actions:{refreshBlocklet:r}}=Ae(),{t:o}=z(),i=(g=n==null?void 0:n.meta)==null?void 0:g.did,s=R=>{e(`${Q.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${R}`)},a=()=>{r()},l=!n||wt(n.status)?[]:er(n),u=[{label:o("common.overview"),value:"overview"},{label:c.jsx(gr,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:o("common.components")}),value:"components"}];wt(n==null?void 0:n.status)||u.push({label:o("common.configuration"),value:"configuration"}),u.push({label:o("common.auditLogs"),value:"audit-logs"}),n&&((w=n.children)!=null&&w.length)&&n.structVersion===Q.APP_STRUCT_VERSION&&u.push({label:o("common.logs"),value:"logs"}),u.push({label:o("common.configNavigation"),value:"navigation"}),u.push({label:o("common.storage"),value:"storage"});const d=c.jsx(rl,{scope:i,categories:["blocklet","team","security","certificates","gateway"]});Ke(Q.EVENTS.NOTIFICATION_BLOCKLET_CREATE,R=>{const{severity:h,title:C,description:S}=R||{};h==="error"?U.error(S||C):U.success(S||C)});const f={overview:c.jsx(Jc,{}),members:c.jsx(A,{mt:-5,children:c.jsx(el,{type:"blocklet",createPassportSvg:En})}),passports:c.jsx(A,{mt:-4.5,children:c.jsx(tl,{createPassportSvg:En})}),components:cl,configuration:c.jsx(nl,{blocklet:n,onUpdate:a}),"audit-logs":d,logs:ol,navigation:il,storage:c.jsx(al,{}),analytics:c.jsx(A,{mt:-5,children:c.jsx(ll,{})}),publish:c.jsx(A,{mt:-3,children:c.jsx(sl,{})}),notifications:c.jsx(ul,{})},p=f[t]||f.overview,y=!["members","passports","analytics","publish","notifications"].includes(t),b=n?c.jsxs(nn,{type:"components",children:[y&&c.jsx(A,{pt:3,children:c.jsx(os,{tabs:u,current:t,onChange:s,scrollButtons:"auto"})}),c.jsx("div",{className:"page-content",children:c.jsx(m.Suspense,{fallback:c.jsx(Ye,{relative:"parent",children:c.jsx(oe,{})}),children:m.isValidElement(p)?p:c.jsx(p,{blocklet:n})})})]}):c.jsx(Ye,{relative:"parent",children:c.jsx(oe,{})});return c.jsx(rs,{children:c.jsx(Zc,{children:c.jsx(_n,{children:c.jsx(rn,{children:c.jsxs(pl,{children:[y&&c.jsxs(A,{component:"div",className:"page-header",children:[c.jsxs(re,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[n?c.jsx(Jt,{blocklet:n,style:{marginRight:16}}):null,n?c.jsxs(A,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[c.jsx(A,{children:De(n)}),(n==null?void 0:n.status)!=="unknown"&&c.jsx(tn,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${o("common.blocklet")} ${o("common.detail")}`]}),n?c.jsx(Zt,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:R}={})=>{R&&U.error(R.message)},variant:"group"}):null]}),c.jsx(Cr,{}),c.jsx(Qc,{}),b]})})})})})}function fl(){var r;const{blocklet:e}=Ae(),{t}=z(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return m.useEffect(()=>{const o=es();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),c.jsxs(c.Fragment,{children:[c.jsx(ts,{children:c.jsx("title",{children:t("pageTitle.dashboard")})}),c.jsx(dl,{})]})}const pl=nt.main`
|
|
89
84
|
.page-header {
|
|
90
85
|
display: flex;
|
|
91
86
|
justify-content: space-between;
|
|
@@ -131,4 +126,4 @@ ${r}
|
|
|
131
126
|
margin-bottom: 15px;
|
|
132
127
|
}
|
|
133
128
|
}
|
|
134
|
-
`,Vl=Object.freeze(Object.defineProperty({__proto__:null,default:fl},Symbol.toStringTag,{value:"Module"}));export{tn as B,
|
|
129
|
+
`,Vl=Object.freeze(Object.defineProperty({__proto__:null,default:fl},Symbol.toStringTag,{value:"Module"}));export{tn as B,ks as L,ho as N,bn as R,en as W,ji as _,gr as a,fi as b,Sr as c,lo as d,Jt as e,hr as f,Ul as g,Vt as h,ne as i,vr as j,Nl as k,yr as l,Fl as m,Vl as n,tt as p,zl as u};
|