@abtnode/blocklet-services 1.16.41-beta-20250325-154552-2bf78c26 → 1.16.41-beta-20250329-232306-53c45e3b
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/emails/_components/actions.js +9 -0
- package/api/emails/{components → _components}/article.js +1 -1
- package/api/emails/{components → _components}/asset.js +2 -2
- package/api/emails/{components → _components}/attachments.js +15 -13
- package/api/emails/{components → _components}/compose.js +2 -2
- package/api/emails/_components/content.js +15 -0
- package/api/emails/{components → _components}/footer.js +1 -1
- package/api/emails/{components → _components}/powered-by.js +1 -1
- package/api/emails/{components → _components}/token.js +2 -2
- package/api/emails/{components → _components}/transaction.js +1 -1
- package/api/emails/{pages → _templates}/notification.js +10 -10
- package/api/emails/_templates/verify-code-body.js +49 -0
- package/api/emails/_templates/verify-code.js +37 -0
- package/api/index.js +59 -71
- package/api/libs/auth/utils.js +20 -1
- package/api/libs/connect/session.js +55 -3
- package/api/libs/email.js +48 -16
- package/api/middlewares/body-parser.js +10 -0
- package/api/routes/blocklet.js +17 -4
- package/api/routes/federated.js +36 -13
- package/api/routes/mcp.js +87 -0
- package/api/routes/user-session.js +16 -1
- package/api/routes/user.js +442 -40
- package/api/services/auth/connect/issue-passport.js +4 -3
- package/api/services/auth/connect/receive-transfer-app-owner.js +17 -1
- package/api/services/auth/connect/verify-destroy.js +20 -0
- package/api/services/auth/connect/verify-elevated.js +20 -0
- package/api/services/auth/index.js +0 -2
- package/api/services/auth/session.js +1 -1
- package/api/services/kyc/index.js +1 -1
- package/api/services/mcp/server.js +37 -0
- package/api/services/notification/queue.js +5 -4
- package/api/services/studio/index.js +4 -0
- package/api/util/federated.js +16 -0
- package/dist/assets/{ArrowDropDown-DH8_DBvh.js → ArrowDropDown-odHjNJIs.js} +1 -1
- package/dist/assets/{CheckCircle-W4GlzCdu.js → CheckCircle-BqOSvJMp.js} +1 -1
- package/dist/assets/{ChevronLeft-B2SRhM5v.js → ChevronLeft-Dv7rlUf5.js} +1 -1
- package/dist/assets/{ChevronRight-ZvmzY6T1.js → ChevronRight-CWeJn1iz.js} +1 -1
- package/dist/assets/{Community-DxXfm8O3.js → Community-CMFBTMi_.js} +1 -1
- package/dist/assets/{DeleteOutline-ClZd2kP1.js → DeleteOutline-Cr-TyrUV.js} +1 -1
- package/dist/assets/{Done-DAdEZjfp.js → Done-C1TA1wbA.js} +1 -1
- package/dist/assets/{Download-fAYCJ3Zn.js → Download-DxhnUTM_.js} +1 -1
- package/dist/assets/{EditIcon-jPGouFji.js → EditIcon-Bgmg6UE0.js} +1 -1
- package/dist/assets/{Email-Cj6caJ_8.js → Email-BphlAPta.js} +1 -1
- package/dist/assets/{Error-DzDuzV0d.js → Error-pXXvJFxN.js} +1 -1
- package/dist/assets/{ExpandLess-CSwVcrV9.js → ExpandLess-Dc_dI20M.js} +1 -1
- package/dist/assets/{Google-DaNgbmbg.js → Google-DNUuYFIA.js} +1 -1
- package/dist/assets/{Holiday-1uY1QmAp.js → Holiday-DKefG3Bb.js} +1 -1
- package/dist/assets/{InfoOutlined-o8YCo8qy.js → InfoOutlined-CEUhR4DY.js} +1 -1
- package/dist/assets/{Launch-B5cUT_sx.js → Launch-BUTOr3cR.js} +1 -1
- package/dist/assets/{LaunchOutlined-CqJ3-tbE.js → LaunchOutlined-QHq-RUJt.js} +1 -1
- package/dist/assets/{Location-C1pAq6lI.js → Location-BuaxMxu4.js} +1 -1
- package/dist/assets/{LockIcon-CydBoNUN.js → LockIcon-CQ1tExIY.js} +1 -1
- package/dist/assets/{Meeting-tZebh2B1.js → Meeting-Cs60QtvP.js} +1 -1
- package/dist/assets/{MoreHoriz-C_oNEMFs.js → MoreHoriz-D1SOL47a.js} +1 -1
- package/dist/assets/{OffSick-BYC1oqk1.js → OffSick-DinPaelp.js} +1 -1
- package/dist/assets/{Phone-DIzOgVDd.js → Phone-BmouKMyi.js} +1 -1
- package/dist/assets/{PlayArrow-BVARrWHX.js → PlayArrow-D7cGSxeN.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-B5JWLChh.js → QuestionMarkCircle-Dt9XJWEe.js} +1 -1
- package/dist/assets/{ServerLogo-DIfW0NaH.js → ServerLogo-B33ZRE5q.js} +1 -1
- package/dist/assets/{Timezone-D7zhOyHu.js → Timezone-CyMhRxlx.js} +1 -1
- package/dist/assets/{ViewList-93ffk7kT.js → ViewList-vu1qOJ6P.js} +1 -1
- package/dist/assets/{WorkingRemotely-0VF9S3Zo.js → WorkingRemotely-BP_VIHeM.js} +1 -1
- package/dist/assets/access-control-CpxcJItK.js +14 -0
- package/dist/assets/{actions-D-igEkC_.js → actions-4oGfCMlR.js} +1 -1
- package/dist/assets/add-component-core-CE0nArG4.js +761 -0
- package/dist/assets/add-resource-BYM4JwzE.js +1 -0
- package/dist/assets/{addon-DKPnFM-d.js → addon-B9bb2bvM.js} +1 -1
- package/dist/assets/analytics-BXLe73MI.js +11 -0
- package/dist/assets/api-D9Yi7Zdr.js +1 -0
- package/dist/assets/appearance-DX7SoW1u.js +1 -0
- package/dist/assets/ar-2k9jaPIk.js +3 -0
- package/dist/assets/{audit-logs-BQlJ8qXs.js → audit-logs-D8H5E0fC.js} +3 -3
- package/dist/assets/{base32-CUcA0Dp2.js → base32-BNpDT-6Q.js} +1 -1
- package/dist/assets/{branding-DxSd76KG.js → branding-BW1rhy8d.js} +2 -2
- package/dist/assets/bundle-avatar-DHwmIozH.js +1 -0
- package/dist/assets/button-CNnuiac8.js +1 -0
- package/dist/assets/{click-to-copy-DiELz5Xb.js → click-to-copy-B0HMuCN_.js} +1 -1
- package/dist/assets/complete-BNf0-iqY.js +45 -0
- package/dist/assets/{component-DXUL6eiU.js → component-1r0VSsqq.js} +2 -2
- package/dist/assets/{config-CCTS8ZgJ.js → config-BeD5_8kr.js} +2 -2
- package/dist/assets/config-CqHmZdZv.js +1 -0
- package/dist/assets/{config-navigation-DH0a1AcG.js → config-navigation-DtN0_qFZ.js} +3 -3
- package/dist/assets/{config-space-CDBT30Fy.js → config-space-DlwZewcm.js} +1 -1
- package/dist/assets/{confirm-H5SukzMZ.js → confirm-DmMN-34s.js} +2 -2
- package/dist/assets/connect-BfSOEYV-.js +1 -0
- package/dist/assets/{connect-BQBuxZq7.js → connect-CC9dcVMV.js} +1 -1
- package/dist/assets/{connect-to-DqrgfOZi.js → connect-to-CzffwD9G.js} +1 -1
- package/dist/assets/{content-layout-CIzNOca5.js → content-layout-7vu3yv_f.js} +1 -1
- package/dist/assets/dashboard-C_Q4TjPa.js +216 -0
- package/dist/assets/de-B9cLhykn.js +3 -0
- package/dist/assets/{delete-confirm-CdzeQQ8r.js → delete-confirm-BTaU_6Kx.js} +1 -1
- package/dist/assets/did-address-BC-0j4Pt.js +1 -0
- package/dist/assets/{domain-B79dyXvl.js → domain-CLMRXecU.js} +1 -1
- package/dist/assets/{domain-action-card-DB2tCUnz.js → domain-action-card-DwQ7Q8wY.js} +2 -2
- package/dist/assets/domains-DF7TtN5q.js +1 -0
- package/dist/assets/{email-DArp9y3R.js → email-mj0bVFDS.js} +2 -2
- package/dist/assets/es-BoQohonz.js +3 -0
- package/dist/assets/{exchange-passport-CcBW-4OT.js → exchange-passport--DeUPzbW.js} +1 -1
- package/dist/assets/form-text-input-BYF6lVnE.js +11 -0
- package/dist/assets/fr-doSYAOrt.js +3 -0
- package/dist/assets/{fuel-BXqPbUK0.js → fuel-D-kOZuF6.js} +1 -1
- package/dist/assets/{fullpage-BAGs-W5J.js → fullpage-DO8Hcbkl.js} +1 -1
- package/dist/assets/{get-safe-url-Bs400iLS.js → get-safe-url-BKl2A9x2.js} +1 -1
- package/dist/assets/{get-safe-url-DtTGgWbn.js → get-safe-url-QFq5JNoE.js} +1 -1
- package/dist/assets/hi-B_BwhpD8.js +1 -0
- package/dist/assets/{home-C9GJ4K7b.js → home-CpnMpXiw.js} +1 -1
- package/dist/assets/id-BgYIZCvk.js +3 -0
- package/dist/assets/{iframe-_xmo1lin.js → iframe-B9mCpo4I.js} +1 -1
- package/dist/assets/{index-BHs362aB.js → index-79U1RPaq.js} +1 -1
- package/dist/assets/{index-CfSdyisA.js → index-B4Q2DAdn.js} +11 -11
- package/dist/assets/index-BJ2lJo7L.js +346 -0
- package/dist/assets/{index-Ca7t5vsG.js → index-BMSA5TdD.js} +1 -1
- package/dist/assets/{index-B8YUhcxT.js → index-BVOYP6aR.js} +2 -2
- package/dist/assets/{index-Dz061vzT.js → index-BZvVDfZ4.js} +1 -1
- package/dist/assets/index-BsUr7wGb.js +104 -0
- package/dist/assets/index-C44fECmB.js +138 -0
- package/dist/assets/{index-CHdEjF6N.js → index-CGK3FEjY.js} +2 -2
- package/dist/assets/{index-Cr3r3Dk2.js → index-CJCg9yIK.js} +1 -1
- package/dist/assets/index-CmKAznDh.js +109 -0
- package/dist/assets/{index-G1H3TvXv.js → index-Ct7s2LPI.js} +3 -3
- package/dist/assets/{index-cfNltkU-.js → index-DQ_RzIwU.js} +2 -2
- package/dist/assets/{index-Dq2tckVf.js → index-D_wVtHmh.js} +1 -1
- package/dist/assets/{index-CyBY00Un.js → index-DqC2o5PB.js} +1 -1
- package/dist/assets/index-DyTFEgKr.js +1 -0
- package/dist/assets/index-eCY24sH9.js +137 -0
- package/dist/assets/{index-CHtbhPPM.js → index-fWGZM-oP.js} +1 -1
- package/dist/assets/index-gTQQ3SoE.js +290 -0
- package/dist/assets/index-gcSQTx25.js +1 -0
- package/dist/assets/{index-rEtARSUO.js → index-m8CaSxXx.js} +1 -1
- package/dist/assets/{index-BI7HW_KL.js → index-u-lA6P_E.js} +1 -1
- package/dist/assets/invitation-B8Qx_pFq.js +176 -0
- package/dist/assets/invite-BBaF_vyc.js +1 -0
- package/dist/assets/{issue-passport-D2H1iXFG.js → issue-passport-DC-ly7xg.js} +1 -1
- package/dist/assets/{item-BZnflB1r.js → item-BSGXym2I.js} +1 -1
- package/dist/assets/ja-FMMLI8YD.js +3 -0
- package/dist/assets/ko-C0kmRXYE.js +3 -0
- package/dist/assets/{launch-result-message-JdCxLBHF.js → launch-result-message-ByEG8r_7.js} +1 -1
- package/dist/assets/{layout-BKTXvgtN.js → layout-BqhTD729.js} +1 -1
- package/dist/assets/list-BHs8uNT5.js +200 -0
- package/dist/assets/{list-header-C3JMIP96.js → list-header-BmTDmRY0.js} +1 -1
- package/dist/assets/localization-daPAWMzR.js +1 -0
- package/dist/assets/{log-DSC3nDef.js → log-o_Cadt8j.js} +7 -7
- package/dist/assets/{login-B_V3KWS7.js → login-BQozrLDm.js} +1 -1
- package/dist/assets/{login-oauth-callback-GH6m7W6J.js → login-oauth-callback-D7lIww1c.js} +1 -1
- package/dist/assets/{logo-uploader-B-xodQLr.js → logo-uploader-CUQ3aWZJ.js} +3 -3
- package/dist/assets/{lost-passport-BY5kSBj4.js → lost-passport-DkETH2Lu.js} +3 -3
- package/dist/assets/{omit-Ci0YZl3b.js → omit-DZNQhOf-.js} +1 -1
- package/dist/assets/{open-window-BZb1m3jN.js → open-window-BOl-kTC2.js} +1 -1
- package/dist/assets/{overview-5mVt0_gG.js → overview-Bxm05EH6.js} +1 -1
- package/dist/assets/{page-header-Mpx7DhlL.js → page-header-Dm1v9v5q.js} +1 -1
- package/dist/assets/{permission-EnWLSYpS.js → permission-B5jnw9r2.js} +1 -1
- package/dist/assets/{preferences-BzIch5vg.js → preferences-uri2RXdB.js} +1 -1
- package/dist/assets/profile-embed-DnIQcD-H.js +1 -0
- package/dist/assets/pt-C2UJZK-O.js +1 -0
- package/dist/assets/publish-resource-V53U1NNv.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-DMqCPytx.js → react-beautiful-dnd.esm-B9MfX9Xl.js} +1 -1
- package/dist/assets/{relative-time-DmrCbKZi.js → relative-time-RQnsWZQc.js} +1 -1
- package/dist/assets/ru-DDA5s4-r.js +1 -0
- package/dist/assets/sdk-BKSsfgrc.js +1 -0
- package/dist/assets/{session-hH9Eluc3.js → session-6ZeN-aF2.js} +1 -1
- package/dist/assets/{setup-BQ9DJQAR.js → setup-7Gq9K_8k.js} +3 -3
- package/dist/assets/{shorten-label-Blq5nIR4.js → shorten-label-DkFTGSoy.js} +1 -1
- package/dist/assets/simple-select-CqakAZFe.js +1 -0
- package/dist/assets/{slicedToArray-0JAP92RR.js → slicedToArray-BuQur6Mi.js} +2 -2
- package/dist/assets/{start-Cqxem84z.js → start-BSUY3DBl.js} +1 -1
- package/dist/assets/{status-BEcCvVw5.js → status-C52-BFuY.js} +1 -1
- package/dist/assets/{step-actions-D1R71ufh.js → step-actions-CA74dwgt.js} +1 -1
- package/dist/assets/{studio-CWSkuYqL.js → studio-CAnZfyBM.js} +1 -1
- package/dist/assets/{switch-control-j36Oahia.js → switch-control-BBlLGjaH.js} +1 -1
- package/dist/assets/th-DmqOUn4C.js +1 -0
- package/dist/assets/{traffic-G34OrdMK.js → traffic-CJDIGmp5.js} +3 -3
- package/dist/assets/{transfer-CN7lhztm.js → transfer-cG2e24sz.js} +1 -1
- package/dist/assets/{unsubscribe-DO25Mrza.js → unsubscribe-afXXIHEf.js} +1 -1
- package/dist/assets/{use-mobile-Cz1u01jc.js → use-mobile-CUT5hy9q.js} +1 -1
- package/dist/assets/{useAsync-C8pcYSnj.js → useAsync-DM8qaMe4.js} +1 -1
- package/dist/assets/{useAsyncRetry-Hh30zerD.js → useAsyncRetry-B7SbzXVI.js} +1 -1
- package/dist/assets/{useLocalStorage-CBIpQ2Ch.js → useLocalStorage-Dd4pybDP.js} +1 -1
- package/dist/assets/user-center-T8Xw464s.js +67 -0
- package/dist/assets/{util-0vNCtiZj.js → util-C_BCTHfw.js} +1 -1
- package/dist/assets/{util-BfC763vn.js → util-YyWTpLT7.js} +1 -1
- package/dist/assets/vendor-arcblock-DvaaLvvM.js +2361 -0
- package/dist/assets/{vendor-hooks-CBQlROWx.js → vendor-hooks-sw5wvnca.js} +2 -2
- package/dist/assets/vendor-mui-core-DxqV1NVn.js +266 -0
- package/dist/assets/{vendor-mui-x-Bv7Ku5uo.js → vendor-mui-x-BjL1xCkk.js} +1 -1
- package/dist/assets/{vendor-utils-C7-Bj8sT.js → vendor-utils-DR57WNxP.js} +7 -7
- package/dist/assets/{vendor-ux-did-connect-BH_4FkUq.js → vendor-ux-did-connect-Bciw9Ypu.js} +56 -56
- package/dist/assets/vi-Cf__CtPD.js +1 -0
- package/dist/assets/wrap-locale-CX50Vz0w.js +1 -0
- package/dist/assets/zh-NXspK2yu.js +4 -0
- package/dist/assets/zh-tw-DYYDVX5I.js +3 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +2 -2
- package/package.json +41 -36
- package/api/emails/components/actions.js +0 -9
- package/api/emails/components/content.js +0 -15
- package/dist/assets/ExternalIssuerIcon-D0E4reWK.js +0 -1
- package/dist/assets/access-control-DjkJ52P9.js +0 -13
- package/dist/assets/add-component-core-CcInVCBe.js +0 -765
- package/dist/assets/add-resource-Bcw4sA7r.js +0 -1
- package/dist/assets/analytics-Co9lkVsN.js +0 -11
- package/dist/assets/api-tckMpb-p.js +0 -1
- package/dist/assets/ar-2G9aaruy.js +0 -3
- package/dist/assets/bundle-avatar-BwOOmJKx.js +0 -1
- package/dist/assets/button-DmhvlTQK.js +0 -1
- package/dist/assets/complete-ClE81Ny0.js +0 -45
- package/dist/assets/config-Bn72hRZH.js +0 -1
- package/dist/assets/connect-CWgAo1rD.js +0 -1
- package/dist/assets/dashboard-Bqm_hK4M.js +0 -218
- package/dist/assets/de-DuOaMdcm.js +0 -3
- package/dist/assets/did-address-xFa47-Qp.js +0 -1
- package/dist/assets/domains-A7coEqfv.js +0 -1
- package/dist/assets/es-B_z4kZV7.js +0 -3
- package/dist/assets/form-text-input-CFoWUNjT.js +0 -11
- package/dist/assets/fr-U4jlLji5.js +0 -3
- package/dist/assets/hi-CgWMOeSW.js +0 -1
- package/dist/assets/id-DcVdw_iD.js +0 -3
- package/dist/assets/index-BAJ44Gvx.js +0 -104
- package/dist/assets/index-BGBHkKrL.js +0 -109
- package/dist/assets/index-BPRjg-Ha.js +0 -346
- package/dist/assets/index-CJi_sgz3.js +0 -137
- package/dist/assets/index-CscSMswD.js +0 -1
- package/dist/assets/index-CvTkROvr.js +0 -1
- package/dist/assets/index-Dkv68xvd.js +0 -138
- package/dist/assets/index-DuWgtqAp.js +0 -134
- package/dist/assets/invitation-D8ocHjTZ.js +0 -176
- package/dist/assets/invite-CtafhjzX.js +0 -1
- package/dist/assets/ja-CqyNiw8I.js +0 -3
- package/dist/assets/ko-CwboHZNL.js +0 -3
- package/dist/assets/list-BiMW09TE.js +0 -195
- package/dist/assets/localization-B4PX_18r.js +0 -1
- package/dist/assets/login-bg-CBktcoss.jpg +0 -0
- package/dist/assets/profile-embed-BAeyCzz5.js +0 -1
- package/dist/assets/pt-UQ_ShTDa.js +0 -1
- package/dist/assets/publish-resource-OFt0IRNl.js +0 -1
- package/dist/assets/ru-BJ0AXHkS.js +0 -1
- package/dist/assets/sdk-B1fQwlHL.js +0 -1
- package/dist/assets/simple-select-DZdEq8ET.js +0 -1
- package/dist/assets/th-CxA-Ohjf.js +0 -1
- package/dist/assets/user-center-He8jbYsT.js +0 -79
- package/dist/assets/vendor-arcblock-CxRF9kO4.js +0 -2361
- package/dist/assets/vendor-mui-core-ClwXKILA.js +0 -266
- package/dist/assets/vi-Dp8eof12.js +0 -1
- package/dist/assets/wrap-locale-BI93VtNG.js +0 -1
- package/dist/assets/zh-D2dwMdph.js +0 -4
- package/dist/assets/zh-tw-9pjBCUZn.js +0 -3
- /package/api/emails/{components → _components}/copyright.js +0 -0
- /package/api/emails/{components → _components}/dapp.js +0 -0
- /package/api/emails/{components → _components}/header.js +0 -0
- /package/api/emails/{components → _components}/layout.js +0 -0
- /package/api/emails/{libs → _libs}/chain.js +0 -0
- /package/api/emails/{libs → _libs}/config.js +0 -0
- /package/api/emails/{libs → _libs}/constant.js +0 -0
- /package/api/emails/{libs → _libs}/explorer-url.js +0 -0
- /package/api/emails/{libs → _libs}/func.js +0 -0
- /package/api/emails/{libs → _libs}/highlight.js +0 -0
- /package/api/emails/{libs → _libs}/style.js +0 -0
- /package/api/emails/{libs → _libs}/util.js +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-5mVt0_gG.js","assets/vendor-mui-core-ClwXKILA.js","assets/vendor-react-DoD83n6N.js","assets/vendor-ux-did-connect-BH_4FkUq.js","assets/vendor-utils-C7-Bj8sT.js","assets/vendor-hooks-CBQlROWx.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-DhgPdlEj.css","assets/vendor-arcblock-CxRF9kO4.js","assets/InfoOutlined-o8YCo8qy.js","assets/status-BEcCvVw5.js","assets/omit-Ci0YZl3b.js","assets/index-Dz061vzT.js","assets/index-BAJ44Gvx.js","assets/did-address-xFa47-Qp.js","assets/useLocalStorage-CBIpQ2Ch.js","assets/confirm-H5SukzMZ.js","assets/format-error-LAoTjvJe.js","assets/PlayArrow-BVARrWHX.js","assets/get-safe-url-DtTGgWbn.js","assets/index-CscSMswD.js","assets/session-hH9Eluc3.js","assets/useAsyncRetry-Hh30zerD.js","assets/useAsync-C8pcYSnj.js","assets/useSetState-BL3ktMon.js","assets/domains-A7coEqfv.js","assets/domain-action-card-DB2tCUnz.js","assets/ExpandLess-CSwVcrV9.js","assets/permission-EnWLSYpS.js","assets/actions-D-igEkC_.js","assets/MoreHoriz-C_oNEMFs.js","assets/delete-confirm-CdzeQQ8r.js","assets/click-to-copy-DiELz5Xb.js","assets/shorten-label-Blq5nIR4.js","assets/util-0vNCtiZj.js","assets/CheckCircle-W4GlzCdu.js","assets/index-BPRjg-Ha.js","assets/index-tUQxVYYQ.js","assets/ViewList-93ffk7kT.js","assets/ExternalIssuerIcon-D0E4reWK.js","assets/DeleteOutline-ClZd2kP1.js","assets/util-BfC763vn.js","assets/base32-CUcA0Dp2.js","assets/sdk-B1fQwlHL.js","assets/index-BI7HW_KL.js","assets/index-DuWgtqAp.js","assets/EditIcon-jPGouFji.js","assets/LockIcon-CydBoNUN.js","assets/list-header-C3JMIP96.js","assets/Google-DaNgbmbg.js","assets/index-CJi_sgz3.js","assets/iframe-_xmo1lin.js","assets/config-Bn72hRZH.js","assets/form-text-input-CFoWUNjT.js","assets/Done-DAdEZjfp.js","assets/logo-uploader-B-xodQLr.js","assets/ArrowDropDown-DH8_DBvh.js","assets/ChevronRight-ZvmzY6T1.js","assets/bundle-avatar-BwOOmJKx.js","assets/index.esm-CWepf7I_.js","assets/switch-control-j36Oahia.js","assets/simple-select-DZdEq8ET.js","assets/audit-logs-BQlJ8qXs.js","assets/index-rEtARSUO.js","assets/index-D4PP6P2d.css","assets/relative-time-DmrCbKZi.js","assets/index-CHtbhPPM.js","assets/index-BGBHkKrL.js","assets/list-BiMW09TE.js","assets/index-Dq2tckVf.js","assets/traffic-G34OrdMK.js","assets/LaunchOutlined-CqJ3-tbE.js","assets/ChevronLeft-B2SRhM5v.js","assets/index-Ca7t5vsG.js","assets/vendor-mui-x-Bv7Ku5uo.js","assets/log-DSC3nDef.js","assets/Download-fAYCJ3Zn.js","assets/log-D33dFtt_.css","assets/index-CfSdyisA.js","assets/Error-DzDuzV0d.js","assets/react-beautiful-dnd.esm-DMqCPytx.js","assets/raf-schd.esm-GV-XhwE0.js","assets/QuestionMarkCircle-B5JWLChh.js","assets/api-tckMpb-p.js","assets/item-BZnflB1r.js","assets/Launch-B5cUT_sx.js","assets/config-navigation-DH0a1AcG.js","assets/slicedToArray-0JAP92RR.js","assets/index-Cr3r3Dk2.js","assets/index-CHdEjF6N.js","assets/use-mobile-Cz1u01jc.js","assets/connect-to-DqrgfOZi.js","assets/config-space-CDBT30Fy.js","assets/index-BHs362aB.js","assets/index-Dkv68xvd.js","assets/component-DXUL6eiU.js","assets/add-component-core-CcInVCBe.js","assets/launch-result-message-JdCxLBHF.js","assets/page-header-Mpx7DhlL.js","assets/index-B8YUhcxT.js","assets/content-layout-CIzNOca5.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-Co9lkVsN.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as Jr,D as Yr,E as es,u as ts,H as ns,_ as M,R as rs}from"./vendor-arcblock-CxRF9kO4.js";import{a1 as H,j as o,E as m,a9 as te,I as vt,ah as ss,ac as Rn,aj as yt,ai as os,b1 as is,a2 as re,b2 as as,bq as cs,T as B,bz as ls,bn as cn,bA as ln,a3 as S,a4 as ze,bB as us,t as Q,Z as Ke,bC as ds,a5 as fs,bD as ps,bp as bt,bE as Pn,bF as hs,ak as ms,aa as gs,bG as kn,bH as Dn,bI as An,A as ae,b0 as $n,bf as xs}from"./vendor-mui-core-ClwXKILA.js";import{r as F,aZ as vs,aX as jt,a_ as ys,B as wt,p as O,_ as un,V as Y,u as X,am as bs,a$ as js,b0 as On,b1 as ws,f as Ss,P as St,j as Mn,Q as Cs,C as Be,b2 as _s,b3 as Is,aq as Es}from"./vendor-ux-did-connect-BH_4FkUq.js";import{z as Qe,f as z,h as ee,A as et,B as Ls,b as Ts,C as Rs,D as Ps,E as Nn,F as zn,G as fe,H as Bn,I as ks,o as je,J as Ds,K as As,k as dn,g as $s,j as Os,m as fn,l as Ms,n as Ns,L as $e,e as Pe,M as zs,O as Bs,Q as pn,N as Us,c as hn}from"./index-BAJ44Gvx.js";import{r as x,L as Un,k as Hn,u as Hs,l as Fs}from"./vendor-react-DoD83n6N.js";import{f as Ue,v as Vs}from"./vendor-hooks-CBQlROWx.js";import{x as Ct,a9 as qs,aa as Ws,y as Oe,w as Gs}from"./vendor-utils-C7-Bj8sT.js";import{_ as mn}from"./useLocalStorage-CBIpQ2Ch.js";import{C as gn}from"./confirm-H5SukzMZ.js";import{d as Ks}from"./PlayArrow-BVARrWHX.js";import{g as xn}from"./get-safe-url-DtTGgWbn.js";import{f as _t}from"./format-error-LAoTjvJe.js";import{c as ye,s as He,H as Qs,h as Fe,f as Fn,p as Vn,B as Zs}from"./index-CscSMswD.js";import{u as qn}from"./session-hH9Eluc3.js";import{D as Xs,_ as Wn}from"./useAsyncRetry-Hh30zerD.js";import{d as Js}from"./InfoOutlined-o8YCo8qy.js";import{_ as Gn}from"./useSetState-BL3ktMon.js";var It={},Ys=H;Object.defineProperty(It,"__esModule",{value:!0});var Kn=It.default=void 0,eo=Ys(F()),to=o;Kn=It.default=(0,eo.default)((0,to.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Et={},no=H;Object.defineProperty(Et,"__esModule",{value:!0});var Qn=Et.default=void 0,ro=no(F()),so=o;Qn=Et.default=(0,ro.default)((0,so.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 Lt={},oo=H;Object.defineProperty(Lt,"__esModule",{value:!0});var Zn=Lt.default=void 0,io=oo(F()),ao=o;Zn=Lt.default=(0,io.default)((0,ao.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 Tt={},co=H;Object.defineProperty(Tt,"__esModule",{value:!0});var Xn=Tt.default=void 0,lo=co(F()),uo=o;Xn=Tt.default=(0,lo.default)((0,uo.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 Rt={},fo=H;Object.defineProperty(Rt,"__esModule",{value:!0});var Jn=Rt.default=void 0,po=fo(F()),ho=o;Jn=Rt.default=(0,po.default)((0,ho.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 Pt={},mo=H;Object.defineProperty(Pt,"__esModule",{value:!0});var Yn=Pt.default=void 0,go=mo(F()),xo=o;Yn=Pt.default=(0,go.default)((0,xo.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 kt={},vo=H;Object.defineProperty(kt,"__esModule",{value:!0});var er=kt.default=void 0,yo=vo(F()),bo=o;er=kt.default=(0,yo.default)((0,bo.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 Dt=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};Dt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Dt.displayName="dashboard";var At={},jo=H;Object.defineProperty(At,"__esModule",{value:!0});var tr=At.default=void 0,wo=jo(F()),So=o;tr=At.default=(0,wo.default)((0,So.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Ks,Stop:Kn,Restart:Qn,Reload:Zn,Remove:vs,Config:Xn,Log:Jn,Group:Yn,Cancel:er,Dashboard:Dt,Overview:tr},Co=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(Ct(n.origin,t));return s.search=r.toString(),s.toString()},_o="internal",Io="external";function $t({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Qe(),[u,d]=x.useState(null),[f,p]=x.useState(null),[y,w]=x.useState(!1),[h,C]=x.useState(null),{t:b}=x.useContext(jt),[T]=mn("skip-blocklet-setup",!1),{loading:I,recommendedUrl:P}=a(e),[D]=mn("blocklet-type-filter",_o),j=z.isInProgress(e.status),[E,g]=x.useState(!1);x.useEffect(()=>{var k,U;if(!(e!=null&&e.controller))return;g(((U=(k=e==null?void 0:e.controller)==null?void 0:k.status)==null?void 0:U.value)===ee.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,J,oe;try{const W=await l.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(W!=null&&W.error){console.error("get launcher session failed",W.error);return}g([O.LAUNCH_SESSION_STATUS.overdue,O.LAUNCH_SESSION_STATUS.canceled,O.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(v,k,U=!1)=>async()=>{const q=async Le=>{var Re;t({action:v,blocklet:e}),w(!0),p(v);let Te=!1;try{if(v==="remove")await k(Le);else if(v==="start"){if(!z.hasRunnableComponent(e)){Y.error(b("blocklet.noComponent"));return}if(!_&&!T&&!((Re=e.settings)!=null&&Re.initialized)&&e.mode!==ee.BLOCKLET_MODES.DEVELOPMENT){if(!P||!un(P)){Y.error(b("blocklet.gotoVisitError"));return}const K=Ls(l.info),an=new URL(P);an.searchParams.set("serverUrl",K),window.open(xn(an.href,{allowDomains:null})),n({action:v,blocklet:e});return}const ie=e.children.filter(K=>!z.isInProgress(K.status)&&K.status!=="running").map(K=>K.meta.did),ue={did:e.meta.did,componentDids:ie};await k({input:ue})}else if(["stop","restart","reload"].includes(v)){const ie=e.children.filter(K=>K.status==="running").map(K=>K.meta.did),ue={did:e.meta.did,componentDids:ie};await k({input:ue})}else{const ie={did:e.meta.did};await k({input:ie})}v==="remove"?Te=!0:await Ts(1e3),v==="reload"&&Y.success(b("blocklet.reloadSuccess")),C(null),n({action:v,blocklet:e})}catch(ie){const ue=`Blocklet ${v} failed: ${_t(ie)}`;throw n({action:v,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Te||w(!1)}},J=()=>{w(!1),C(null)},oe=z.getDisplayName(e,!0),W=e.mode===ee.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(B,{component:"div",children:o.jsx(B,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Le,Te)=>o.jsxs(B,{component:"div",children:[o.jsx(B,{gutterBottom:!0,children:b("blocklet.action.removeApplicationDescription")}),o.jsxs(ls,{name:"removeType",value:Le.removeType,onChange:Re=>Te({...Le,removeType:Re.target.value}),children:[o.jsx(cn,{value:"backup",control:o.jsx(ln,{}),label:b("blocklet.action.removeApplicationAfterBackup")}),o.jsx(cn,{value:"complete",control:o.jsx(ln,{}),label:b("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Xr={stop:{title:`${b("common.stop")} ${oe}`,description:b("blocklet.action.stopDescription"),confirm:b("blocklet.action.confirmStop"),cancel:b("common.cancel"),onConfirm:q,onCancel:J},restart:{title:`${b("common.restart")} ${oe}`,description:b("blocklet.action.restartDescription"),confirm:b("blocklet.action.confirmRestart"),cancel:b("common.cancel"),onConfirm:q,onCancel:J},remove:{title:`${b("common.remove")} ${oe}`,confirm:b("blocklet.action.confirmRemove"),cancel:b("common.cancel"),onConfirm:q,onCancel:J,...W},cancelDownload:{title:`${b("common.cancel")}`,description:b("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:b("common.confirm"),cancel:b("common.cancel"),onConfirm:q,onCancel:J}};U?C(Xr[v]):await q()},R=!!u,V=v=>{try{v.stopPropagation(),v.preventDefault()}catch{}d(v.currentTarget)},N=v=>{try{v.stopPropagation(),v.preventDefault()}catch{}d(null)},Ie=async(v,k)=>{try{k.stopPropagation(),k.preventDefault()}catch{}if(typeof v.handler=="function")try{w(!0),p(v.action),await v.handler()}catch(U){console.error(`Blocklet ${v.name} failed: `,U)}finally{w(!1),d(null)}else d(null)},Gr=!_&&z.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:b("common.remove"),handler:L("remove",async({removeType:v})=>{v==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Kr={action:"remove",icon:({sx:v,...k})=>o.jsx(de.Cancel,{sx:{...v,paddingRight:"2px",zoom:.95},...k}),name:b("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},Qr=z.getAppMissingConfigs(e),Zr=()=>{var q;const v=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),k=i==null?void 0:i({mountPoint:v,blocklet:e});if(!k||!un(k)){Y.error(b("blocklet.gotoVisitError"));return}const U=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(xn(Co(k,".well-known/service/admin"),{allowDomains:U==null?void 0:U.map(J=>J.value)}))};let Ee=[{action:"start",icon:de.Start,inExternal:!0,name:b("common.start"),handler:L("start",l.api.startBlocklet),disabled:E||e.children.every(v=>v.status==="running")||et(e.status)||I||j},{action:"stop",icon:de.Stop,inExternal:!0,name:b("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:b("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:E||e.status!=="running"},et(e.status)?Kr:Gr,{separator:!0},_?null:{action:"dashboard",icon:({style:v,...k})=>o.jsx(de.Dashboard,{...k,style:{...v,width:"26px",height:"26px",paddingRight:"3px"}}),name:b("sidebar.dashboard"),handler:Zr}].filter(Boolean);return D===Io&&(Ee=Ee.filter(v=>v.inExternal)),r==="menu"?o.jsxs(vn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:V,size:"small",disabled:!s||!et(e.status)&&y,children:o.jsx(ys,{})}),o.jsxs(ss,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:R,onClose:N,PaperProps:{},children:[Qr.length>0&&o.jsxs(Rn,{style:{maxWidth:"400px"},severity:"error",children:[b("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Un,{to:`/blocklets/${e.meta.did}/components`,children:b("blocklet.config.gotoFix")})]}),Ee.map((v,k)=>v.separator?o.jsx(yt,{},`separator-${k}`):o.jsxs(os,{dense:!0,onClick:U=>Ie(v,U),disabled:y||v.disabled,"data-cy":`${v.action}-blocklet`,children:[o.jsx(is,{style:{minWidth:24},children:f===v.action&&y?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(v.icon,{fontSize:"small"})}),o.jsx(as,{primary:v.name})]},v.name))]}),h&&o.jsx(gn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(vn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(cs,{children:Ee.filter(v=>!v.separator&&!v.onlyInMenu).map(v=>o.jsxs(wt,{title:v.name,"data-cy":`${v.action}-blocklet`,onClick:()=>Ie(v),disabled:!!v.disabled||y,children:[f===v.action&&y?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(v.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:v.name})]},v.name))}),h&&o.jsx(gn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}$t.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};$t.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 vn=te.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.MuiButton-root {
|
|
8
|
-
padding: 4px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,Eo=x.memo($t),Lo=e=>{const t={};let n=null;return z.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=z.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},To=(e,t,n)=>{var i;const{hostname:r,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return s;const l=c[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith(O.DEFAULT_DID_DOMAIN))||"").replace(`.${O.DEFAULT_DID_DOMAIN}`,"");return d?s.replace(r,`${d}-${l}.${O.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function nr(){const{t:e}=X(),{api:t}=qn(),{blocklet:n}=Rs(),{inService:r}=Qe(),[s,i]=x.useState(!1),[a,c]=x.useState(5),l=n&&n.structVersion!==O.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){Y.error(e("blocklet.migrate.tip.running"));return}const p=Lo(n);if(p){Y.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){Y.error(_t(p))}},d=()=>{const p=To(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(y=>y-1)},1e3)},f=()=>i(!1);return[l&&o.jsxs(Rn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(S,{display:"flex",alignItems:"center",children:[o.jsx(wt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>o.jsx(S,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&o.jsx(bs,{popup:!0,open:s,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:Ps(n,!0),title:z.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:f},"connect")]}nr.propTypes={};function Ot({children:e,style:t,...n}){return o.jsx(js,{style:t,...n,children:e})}Ot.propTypes={children:m.any.isRequired,style:m.object};Ot.defaultProps={style:{}};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function Mt({isResource:e,status:t,variant:n,source:r,progress:s,...i}){const{t:a}=x.useContext(jt),c={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:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},u=z.isInProgress(t),d=e&&t==="stopped"?"resource":t,f=a(`blocklet.status.${d}`);return n==="pin"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsxs(S,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(S,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:l[d],style:{opacity:.15}}),o.jsx(S,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:l[d]})]})}):n==="dot"?o.jsx(ze,{title:a("blocklet.statusTip",{status:f}),children:o.jsx(Xs,{color:l[d],...i})}):o.jsxs(Ot,{type:c[d],...i,children:[u&&o.jsx(re,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Mt.propTypes={status:m.string.isRequired,variant:m.oneOf(["dot","tag","pin"]),source:m.string,progress:m.number,isResource:m.bool};Mt.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};const rr=x.createContext({});function Nt({children:e,type:t}){const[n,r]=x.useState([]),s=x.useRef([]),i=l=>{if(!s.current.includes(l)){const u=[...s.current,l];r(u),s.current=u}},a=l=>{if(s.current.includes(l)){const u=s.current.filter(d=>d!==l);r(u),s.current=u}},c=l=>{const u=n.filter(f=>l.find(p=>p===f));qs(u,n).forEach(f=>a(f))};return o.jsx(rr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}Nt.propTypes={type:m.string,children:m.node.isRequired};Nt.defaultProps={type:"blocklets"};function Lc(){return x.useContext(rr)}function Ro(){const e=us();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=Q(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function Po(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function ko(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Do(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Ao(e){return o.jsx(Ke,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const ke={fontSize:20,marginInlineEnd:8},$o={success:o.jsx(Po,{style:ke}),warning:o.jsx(ko,{style:ke}),error:o.jsx(Do,{style:ke}),info:o.jsx(Ao,{style:ke})},Oo=ds(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${fs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${ps[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function zt({keyId:e,notification:t={},viewAllUrl:n,content:r},s){const i=Oo({breakpoint:Ro()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=$o[t.severity],{closeSnackbar:l}=On(),u=()=>l(e),d=Hn(),f=()=>{l(e),d(n)};return o.jsxs(ws,{ref:s,className:a,children:[o.jsxs("div",{className:i.message,children:[c,o.jsxs(No,{onClick:f,children:[o.jsx("span",{className:"title",children:t.title}),r||o.jsx("span",{className:"desc",children:t.description})]})]}),o.jsx("div",{className:i.action,children:o.jsx(vt,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:o.jsx(Ss,{className:i.icon})},"close")})]})}const Mo=x.forwardRef(zt);zt.propTypes={viewAllUrl:m.string.isRequired,keyId:m.number.isRequired,notification:m.object.isRequired,content:m.node};zt.defaultProps={content:null};const No=te.div`
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
.title {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
-webkit-box-orient: vertical;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
}
|
|
24
|
-
.desc {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
text-overflow: ellipsis;
|
|
27
|
-
display: -webkit-box;
|
|
28
|
-
-webkit-line-clamp: 3;
|
|
29
|
-
-webkit-box-orient: vertical;
|
|
30
|
-
word-break: break-word;
|
|
31
|
-
}
|
|
32
|
-
`;function sr({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return o.jsxs(bt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},children:[!!n&&o.jsx("span",{className:"url",children:n}),!!t.title&&o.jsx(S,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(S,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&o.jsx("img",{src:Nn.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}sr.propTypes={attachment:m.object.isRequired};function or({attachment:e}){const{data:t}=e;return o.jsx("img",{src:Nn.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}or.propTypes={attachment:m.object.isRequired};function Bt({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,s=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return s==="small"?a="12px":s==="normal"?a="14px":s==="big"?a="16px":s==="large"&&(a="18px"),o.jsx("span",{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}Bt.propTypes={attachment:m.object.isRequired};Ut.propTypes={locale:m.string,data:m.object.isRequired};Ut.defaultProps={locale:"en"};function Ut({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:o.jsxs(S,{display:"flex",flexDirection:"column",children:[o.jsxs(S,{sx:c,children:[o.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),o.jsxs(B,{component:"div",align:"right",style:He.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),o.jsxs(S,{sx:c,children:[o.jsx(B,{component:"div",style:{...He.remarkStyle,fontSize:14},children:n}),o.jsx(S,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Ht.propTypes={locale:m.string,data:m.object.isRequired};Ht.defaultProps={locale:"en"};function Ht({locale:e,data:t}){var l,u;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=ye.getUrlHost(t.chainHost)||ye.getChainHost(t.chainId),i=t.did||((u=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:u.id)||"",a=`https://${s}/explorer/assets/${i}`,c=Ue(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(S,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},rel:"noreferrer",children:o.jsxs(S,{display:"flex",flexDirection:"column",children:[o.jsxs(S,{sx:c,children:[o.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),o.jsx(B,{component:"div",align:"right",style:He.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(S,{sx:c,children:[o.jsx(B,{component:"div",style:{...He.remarkStyle,fontSize:14},children:r}),o.jsx(S,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(St,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}ir.propTypes={data:m.object.isRequired,locale:m.string};function ir({data:e,locale:t="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:o.jsx(St,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Ft.propTypes={locale:m.string,data:m.object.isRequired};Ft.defaultProps={locale:"en"};function Ft({locale:e,data:t}){const n=ye.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,s={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function ar({data:e,isMd:t=!1}){return o.jsx(S,{display:"flex",flexDirection:t?"row":"column",justifyContent:"space-between",sx:{width:t?"100%":"auto"},children:e.items.map((n,r)=>o.jsx(Bt,{attachment:n,color:r===0?"rgba(156, 163, 175, 1)":"",size:r===0?"normal":"big",fontWeight:r===0?400:600},r))})}ar.propTypes={data:m.array.isRequired,isMd:m.bool};function cr({attachment:e,...t}){const{local:n}=x.useContext(jt),r=Q(s=>s.breakpoints.down("md"));return o.jsxs(zo,{"data-testid":"attachment-preview",...t,isMd:r,children:[e.type==="link"&&o.jsx(sr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(or,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(Bt,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Ut,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?o.jsx(Ht,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&o.jsx(ir,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(Ft,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(yt,{sx:{mb:1,mt:1},style:{color:Mn.dividerColor}}),e.type==="combined"&&o.jsx(ar,{data:e,isMd:r})]})}const zo=te.div`
|
|
33
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
34
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
35
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
36
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
37
|
-
&:last-child {
|
|
38
|
-
margin-bottom: 0;
|
|
39
|
-
}
|
|
40
|
-
`;cr.propTypes={attachment:m.object.isRequired};function lr({data:e,...t}){const{items:n}=e;return o.jsx(Bo,{...t,children:n.map(r=>o.jsxs(Pn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(S,{display:"flex",alignItems:"center",gap:1,children:[r.icon?o.jsx("img",{src:r.icon,alt:r.title,style:{width:16,height:16}}):null,o.jsxs(S,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?o.jsx(ze,{title:r.subtitle,arrow:!0,placement:"top",children:o.jsx(Js,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(S,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?o.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const Bo=te(S)`
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: flex-start;
|
|
43
|
-
flex-wrap: wrap;
|
|
44
|
-
gap: 16px;
|
|
45
|
-
.metric-number {
|
|
46
|
-
font-size: 18px;
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
.sub-content {
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
font-weight: 400;
|
|
51
|
-
margin-left: 4px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.metric-name {
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
color: rgba(156, 163, 175, 1);
|
|
57
|
-
}
|
|
58
|
-
`;lr.propTypes={data:m.object.isRequired};function ur({data:e}){const{items:t}=e,n=Q(a=>a.breakpoints.down("sm")),r=Q(a=>a.breakpoints.down("md")),s=Q(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:s?4:6;return o.jsx(hs,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?o.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(ms,{children:o.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}ur.propTypes={data:m.object.isRequired};function Vt({data:e,feedType:t,...n}){return o.jsxs(Uo,{...n,children:[t==="data-tracker"&&e.type==="table"&&o.jsx(lr,{data:e}),(t==="graphic"||t==="gallery")&&o.jsx(ur,{data:e})]})}const Uo=te.div`
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
width: 100%;
|
|
62
|
-
margin-bottom: 4px;
|
|
63
|
-
&:last-child {
|
|
64
|
-
margin-bottom: 0;
|
|
65
|
-
}
|
|
66
|
-
`;Vt.propTypes={data:m.object.isRequired,feedType:m.string};Vt.defaultProps={feedType:"data-tracker"};const Ho=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},Fo=e=>e.every(t=>t.type==="text"),Vo=e=>e.every(t=>t.type==="image"),qo=e=>Ws(e,2).map(t=>({type:"combined",items:t})),Wo=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Go=async(e,t)=>{const r=new Cs().user;if(r)try{return await r.getUserPublicInfo({did:e})?await r.getProfileUrl({did:e,locale:t}):void 0}catch(s){console.error(s);return}};function qt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...i}=e,a=Q(d=>d.breakpoints.down("md"));if((!r||!r.length)&&Oe(s))return null;const c=Ho(t),l=(d,f=!1)=>{if(!d&&!Array.isArray(d))return null;let p=d,y={},w="horizontal";f&&Fo(d)&&(p=qo(d),w="vertical",y={display:"flex",gap:1,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const h=Wo(p);return o.jsx(S,{sx:{display:"flex",gap:1,flexDirection:f?"row":"column",justifyContent:"flex-start",alignItems:f?"center":"unset",flexWrap:"wrap"},children:p.map((C,b)=>C.type==="section"?o.jsx(x.Fragment,{children:l(C.fields,!0)},b):o.jsxs(x.Fragment,{children:[o.jsx(cr,{attachment:C,sx:y,...i}),!(a&&w==="vertical")&&h&&p.length>1&&b!==p.length-1?o.jsx(yt,{orientation:w,style:{color:Mn.dividerColor},sx:w==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},b))})},u=Vo(r);return o.jsx(Ko,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",children:u?l(r):o.jsx(Pn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!Oe(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(Vt,{data:s,feedType:e.feedType})})}),r.length===0&&Oe(s)&&n&&o.jsx(gs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Ko=te.div`
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
.message-in-list {
|
|
70
|
-
padding: 8px 8px 8px 0;
|
|
71
|
-
display: flex;
|
|
72
|
-
border-radius: 8px;
|
|
73
|
-
}
|
|
74
|
-
.message-title {
|
|
75
|
-
color: #25292f;
|
|
76
|
-
font-size: 18px;
|
|
77
|
-
font-weight: bold;
|
|
78
|
-
word-break: break-all;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.attach-ske {
|
|
82
|
-
position: relative;
|
|
83
|
-
margin-left: 10px;
|
|
84
|
-
&::after {
|
|
85
|
-
content: '';
|
|
86
|
-
position: absolute;
|
|
87
|
-
left: -10px;
|
|
88
|
-
top: 0;
|
|
89
|
-
height: 100%;
|
|
90
|
-
width: 4px;
|
|
91
|
-
background-color: ${e=>e.leftLineColor};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.message-body {
|
|
96
|
-
color: #25292f;
|
|
97
|
-
font-size: 16px;
|
|
98
|
-
word-break: break-all;
|
|
99
|
-
white-space: pre-line;
|
|
100
|
-
}
|
|
101
|
-
.message-container {
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
justify-content: flex-start;
|
|
105
|
-
.data-container,
|
|
106
|
-
.attachment-container {
|
|
107
|
-
display: flex;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
width: 100%;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
.actions-container {
|
|
113
|
-
margin-top: 10px;
|
|
114
|
-
.actions-item {
|
|
115
|
-
margin-right: 8px;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
`;qt.propTypes={severity:m.string.isRequired,notification:m.object.isRequired,showSke:m.bool};qt.defaultProps={showSke:!0};const tt=e=>Jr.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Qo=async(e,t)=>{const{type:n,did:r}=e;return Fn.isSameAddr(n,"did")?await Go(r,t)||Fe.getLink(e):Fe.getLink(e)},Zo=async(e,t,n=!0)=>{const r=Fe.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof Fe.Link){if(n){const a=await Qo(i,t),{type:c,chainId:l,did:u}=i;return Fn.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};dr.propTypes={notification:m.object,rows:m.number,minimal:m.bool};function dr({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=x.useState(!1),[i,a]=x.useState(""),{t:c,locale:l}=X(),u=x.useMemo(()=>{const{attachments:C}=e||{};if(!C)return!1;try{return C.length>0}catch{return!1}},[e]),d=x.useMemo(()=>{const{blocks:C}=e||{};if(!C)return!1;try{return C.length>0}catch{return!1}},[e]),f=x.useMemo(()=>{const{description:C}=e||{};return!!C},[e]),p=x.useMemo(()=>{const{data:C}=e||{};return!Oe(C)},[e]),y=x.useMemo(()=>u||d||f||p,[u,d,f,p]);if(x.useEffect(()=>{Zo((e==null?void 0:e.description)??"",l).then(C=>{a(C)})},[e==null?void 0:e.description,l]),!y)return null;const w=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,h=C=>{const{target:b}=C;b.getAttribute("data-name")==="toggle-expanded"&&s(!r)};return o.jsxs(Xo,{color:n?"#fff":"",children:[o.jsx(S,{className:"text-container",children:o.jsx(S,{component:"div",sx:{marginBottom:"4px"},onClick:h,children:i&&(!r&&t>0?o.jsx(Qs,{basedOn:"letters",unsafeHTML:tt(i),maxLine:t,ellipsisHTML:tt(w())}):o.jsx(B,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important",fontSize:"14px"},dangerouslySetInnerHTML:{__html:tt(`${i}${w()}`)}}))})}),!n&&(u||p)?o.jsx(qt,{severity:e.severity,notification:e}):null]})}const Xo=te(S)`
|
|
119
|
-
margin-bottom: 6px;
|
|
120
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
121
|
-
.text-container {
|
|
122
|
-
word-wrap: break-word;
|
|
123
|
-
word-break: break-all;
|
|
124
|
-
font-size: 14px;
|
|
125
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
126
|
-
.toggle-btn {
|
|
127
|
-
display: inline-block;
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
margin-left: 4px;
|
|
131
|
-
font-size: 14px;
|
|
132
|
-
color: rgba(59, 130, 246, 1);
|
|
133
|
-
}
|
|
134
|
-
.content.ellipsis {
|
|
135
|
-
overflow: hidden;
|
|
136
|
-
text-overflow: ellipsis;
|
|
137
|
-
word-break: break-all;
|
|
138
|
-
display: block;
|
|
139
|
-
display: -webkit-box;
|
|
140
|
-
-webkit-box-orient: vertical;
|
|
141
|
-
-webkit-line-clamp: 2;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
`,Jo=x.memo(dr);function $(e,t,n){return kn.call(t,"css")?o.jsx(Dn,An(e,t),n):o.jsx(e,t,n)}function nt(e,t,n){return kn.call(t,"css")?o.jsxs(Dn,An(e,t),n):o.jsxs(e,t,n)}/**
|
|
145
|
-
* (c) Iconify
|
|
146
|
-
*
|
|
147
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
148
|
-
* files at https://github.com/iconify/iconify
|
|
149
|
-
*
|
|
150
|
-
* Licensed under MIT.
|
|
151
|
-
*
|
|
152
|
-
* @license MIT
|
|
153
|
-
* @version 3.1.1
|
|
154
|
-
*/const fr=Object.freeze({left:0,top:0,width:16,height:16}),Ve=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),we=Object.freeze({...fr,...Ve}),it=Object.freeze({...we,body:"",hidden:!1});function Yo(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 yn(e,t){const n=Yo(e,t);for(const r in it)r in Ve?r in e&&!(r in n)&&(n[r]=Ve[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function ei(e,t){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function i(a){if(n[a])return s[a]=[];if(!(a in s)){s[a]=null;const c=r[a]&&r[a].parent,l=c&&i(c);l&&(s[a]=[c].concat(l))}return s[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),s}function ti(e,t,n){const r=e.icons,s=e.aliases||Object.create(null);let i={};function a(c){i=yn(r[c]||s[c],i)}return a(t),n.forEach(a),yn(e,i)}function ni(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const r=ei(e);for(const s in r){const i=r[s];i&&(t(s,ti(e,s,i)),n.push(s))}return n}const ge=/^[a-z0-9]+(-[a-z0-9]+)*$/,he=(e,t,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),l=s.pop(),u={provider:s.length>0?s[0]:r,prefix:l,name:c};return t&&!Me(u)?null:u}const i=s[0],a=i.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Me(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:i};return t&&!Me(c,n)?null:c}return null},Me=(e,t)=>e?!!((e.provider===""||e.provider.match(ge))&&(t&&e.prefix===""||e.prefix.match(ge))&&e.name.match(ge)):!1,ri={provider:"",aliases:{},not_found:{},...fr};function rt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function si(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!rt(e,ri))return null;const n=t.icons;for(const s in n){const i=n[s];if(!s.match(ge)||typeof i.body!="string"||!rt(i,it))return null}const r=t.aliases||Object.create(null);for(const s in r){const i=r[s],a=i.parent;if(!s.match(ge)||typeof a!="string"||!n[a]&&!r[a]||!rt(i,it))return null}return t}const qe=Object.create(null);function oi(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Z(e,t){const n=qe[e]||(qe[e]=Object.create(null));return n[t]||(n[t]=oi(e,t))}function Wt(e,t){return si(t)?ni(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ii(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function ai(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(qe)).forEach(s=>{(typeof s=="string"&&typeof t=="string"?[t]:Object.keys(qe[s]||{})).forEach(a=>{const c=Z(s,a);n=n.concat(Object.keys(c.icons).map(l=>(s!==""?"@"+s+":":"")+a+":"+l))})}),n}let Gt=!1;function ci(e){return Gt}function Se(e){const t=typeof e=="string"?he(e,!0,Gt):e;if(t){const n=Z(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function li(e,t){const n=he(e,!0,Gt);if(!n)return!1;const r=Z(n.provider,n.prefix);return ii(r,n.name,t)}function pr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Me({provider:t,prefix:n,name:"a"}))return!1;const r=Z(t,n);return!!Wt(r,e)}function ui(e){return!!Se(e)}function di(e){const t=Se(e);return t?{...we,...t}:null}const hr=Object.freeze({width:null,height:null}),mr=Object.freeze({...hr,...Ve}),fi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pi=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function at(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(fi);if(r===null||!r.length)return e;const s=[];let i=r.shift(),a=pi.test(i);for(;;){if(a){const c=parseFloat(i);isNaN(c)?s.push(i):s.push(Math.ceil(c*t*n)/n)}else s.push(i);if(i=r.shift(),i===void 0)return s.join("");a=!a}}const hi=e=>e==="unset"||e==="undefined"||e==="none";function Ze(e,t){const n={...we,...e},r={...mr,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(w=>{const h=[],C=w.hFlip,b=w.vFlip;let T=w.rotate;C?b?T+=2:(h.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),h.push("scale(-1 1)"),s.top=s.left=0):b&&(h.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),h.push("scale(1 -1)"),s.top=s.left=0);let I;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:I=s.height/2+s.top,h.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:h.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:I=s.width/2+s.left,h.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}T%2===1&&(s.left!==s.top&&(I=s.left,s.left=s.top,s.top=I),s.width!==s.height&&(I=s.width,s.width=s.height,s.height=I)),h.length&&(i='<g transform="'+h.join(" ")+'">'+i+"</g>")});const a=r.width,c=r.height,l=s.width,u=s.height;let d,f;a===null?(f=c===null?"1em":c==="auto"?u:c,d=at(f,l/u)):(d=a==="auto"?l:a,f=c===null?at(d,u/l):c==="auto"?u:c);const p={},y=(w,h)=>{hi(h)||(p[w]=h.toString())};return y("width",d),y("height",f),p.viewBox=s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const mi=/\sid="(\S+)"/g,gi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xi=0;function gr(e,t=gi){const n=[];let r;for(;r=mi.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(xi++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const ce={local:!0,session:!0},xr={local:new Set,session:new Set};let Kt=!1;function vi(e){Kt=e}const bn="iconify2",be="iconify",vr=be+"-count",jn=be+"-version",yr=36e5,yi=168;function ct(e,t){try{return e.getItem(t)}catch{}}function Qt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function wn(e,t){try{e.removeItem(t)}catch{}}function lt(e,t){return Qt(e,vr,t.toString())}function ut(e){return parseInt(ct(e,vr))||0}let De=typeof window>"u"?{}:window;function br(e){const t=e+"Storage";try{if(De&&De[t]&&typeof De[t].length=="number")return De[t]}catch{}ce[e]=!1}function jr(e,t){const n=br(e);if(!n)return;const r=ct(n,jn);if(r!==bn){if(r){const c=ut(n);for(let l=0;l<c;l++)wn(n,be+l.toString())}Qt(n,jn,bn),lt(n,0);return}const s=Math.floor(Date.now()/yr)-yi,i=c=>{const l=be+c.toString(),u=ct(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>s&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}wn(n,l)}};let a=ut(n);for(let c=a-1;c>=0;c--)i(c)||(c===a-1?(a--,lt(n,a)):xr[e].add(c))}function wr(){if(!Kt){vi(!0);for(const e in ce)jr(e,t=>{const n=t.data,r=t.provider,s=n.prefix,i=Z(r,s);if(!Wt(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Sr(e,t){switch(e){case"local":case"session":ce[e]=t;break;case"all":for(const n in ce)ce[n]=t;break}}const dt=Object.create(null);function Cr(e,t){dt[e]=t}function ft(e){return dt[e]||dt[""]}function Zt(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 Xe=Object.create(null),me=["https://api.simplesvg.com","https://api.unisvg.com"],Ne=[];for(;me.length>0;)me.length===1||Math.random()>.5?Ne.push(me.shift()):Ne.push(me.pop());Xe[""]=Zt({resources:["https://api.iconify.design"].concat(Ne)});function _r(e,t){const n=Zt(t);return n===null?!1:(Xe[e]=n,!0)}function Je(e){return Xe[e]}function bi(){return Object.keys(Xe)}const ji=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let We=ji();function wi(e){We=e}function Si(){return We}function Ci(e,t){const n=Je(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(a=>{s=Math.max(s,a.length)});const i=t+".json?icons=";r=n.maxURL-s-n.path.length-i.length}return r}function _i(e){return e===404}const Ii=(e,t,n)=>{const r=[],s=Ci(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=s&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function Ei(e){if(typeof e=="string"){const t=Je(e);if(t)return t.path}return"/"}const Li=(e,t,n)=>{if(!We){n("abort",424);return}let r=Ei(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let s=503;We(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(_i(a)?"abort":"next",a)});return}return s=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",s)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",s)})},Ti={prepare:Ii,send:Li};function Ri(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,i)=>s.provider!==i.provider?s.provider.localeCompare(i.provider):s.prefix!==i.prefix?s.prefix.localeCompare(i.prefix):s.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const i=s.provider,a=s.prefix,c=s.name,l=n[i]||(n[i]=Object.create(null)),u=l[a]||(l[a]=Z(i,a));let d;c in u.icons?d=t.loaded:a===""||u.missing.has(c)?d=t.missing:d=t.pending;const f={provider:i,prefix:a,name:c};d.push(f)}),t}function Ir(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==t))})}function Pi(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,s=e.prefix;t.forEach(i=>{const a=i.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==s)return!0;const u=l.name;if(e.icons[u])a.loaded.push({provider:r,prefix:s,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:s,name:u});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||Ir([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let ki=0;function Di(e,t,n){const r=ki++,s=Ir.bind(null,n,r);if(!t.pending.length)return s;const i={id:r,icons:t,callback:e,abort:s};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),s}function Ai(e,t=!0,n=!1){const r=[];return e.forEach(s=>{const i=typeof s=="string"?he(s,t,n):s;i&&r.push(i)}),r}var $i={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oi(e,t,n,r){const s=e.resources.length,i=e.random?Math.floor(Math.random()*s):e.index;let a;if(e.random){let j=e.resources.slice(0);for(a=[];j.length>1;){const E=Math.floor(Math.random()*j.length);a.push(j[E]),j=j.slice(0,E).concat(j.slice(E+1))}a=a.concat(j)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",u=0,d,f=null,p=[],y=[];typeof r=="function"&&y.push(r);function w(){f&&(clearTimeout(f),f=null)}function h(){l==="pending"&&(l="aborted"),w(),p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function C(j,E){E&&(y=[]),typeof j=="function"&&y.push(j)}function b(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:C,abort:h}}function T(){l="failed",y.forEach(j=>{j(void 0,d)})}function I(){p.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),p=[]}function P(j,E,g){const _=E!=="success";switch(p=p.filter(L=>L!==j),l){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){d=g,T();return}if(_){d=g,p.length||(a.length?D():T());return}if(w(),I(),!e.random){const L=e.resources.indexOf(j.resource);L!==-1&&L!==e.index&&(e.index=L)}l="completed",y.forEach(L=>{L(g)})}function D(){if(l!=="pending")return;w();const j=a.shift();if(j===void 0){if(p.length){f=setTimeout(()=>{w(),l==="pending"&&(I(),T())},e.timeout);return}T();return}const E={status:"pending",resource:j,callback:(g,_)=>{P(E,g,_)}};p.push(E),u++,f=setTimeout(D,e.rotate),n(j,t,E.callback)}return setTimeout(D),b}function Er(e){const t={...$i,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function s(c,l,u){const d=Oi(t,c,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(c){return n.find(l=>c(l))||null}return{query:s,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Sn(){}const st=Object.create(null);function Mi(e){if(!st[e]){const t=Je(e);if(!t)return;const n=Er(t),r={config:t,redundancy:n};st[e]=r}return st[e]}function Lr(e,t,n){let r,s;if(typeof e=="string"){const i=ft(e);if(!i)return n(void 0,424),Sn;s=i.send;const a=Mi(e);a&&(r=a.redundancy)}else{const i=Zt(e);if(i){r=Er(i);const a=e.resources?e.resources[0]:"",c=ft(a);c&&(s=c.send)}}return!r||!s?(n(void 0,424),Sn):r.query(t,s,n)().abort}function Ni(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in ce)jr(r,s=>{const i=s.data;return s.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function zi(e,t){Kt||wr();function n(r){let s;if(!ce[r]||!(s=br(r)))return;const i=xr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=ut(s),!lt(s,a+1))return;const c={cached:Math.floor(Date.now()/yr),provider:e.provider,data:t};return Qt(s,be+a.toString(),JSON.stringify(c))}t.lastModified&&!Ni(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Cn(){}function Bi(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Pi(e)}))}function Ui(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,s=e.iconsToLoad;delete e.iconsToLoad;let i;if(!s||!(i=ft(n)))return;i.prepare(n,r,s).forEach(c=>{Lr(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=Wt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),zi(e,l)}catch(u){console.error(u)}Bi(e)})})}))}const Hi=e=>{const n=Z(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Xt=(e,t)=>{const n=Ai(e,!0,ci()),r=Ri(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Cn)}),()=>{l=!1}}const s=Object.create(null),i=[];let a,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===a)return;a=u,c=d,i.push(Z(u,d));const f=s[u]||(s[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=Z(u,d),y=p.pendingIcons||(p.pendingIcons=new Set);y.has(f)||(y.add(f),s[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;s[u][d].length&&Ui(l,s[u][d])}),t?Di(t,r,i):Cn},Fi=e=>new Promise((t,n)=>{const r=typeof e=="string"?he(e,!0):e;if(!r){n(e);return}Xt([r||e],s=>{if(s.length&&r){const i=Se(r);if(i){t({...we,...i});return}}n(e)})});function Tr(e,t){const n={...e};for(const r in t){const s=t[r],i=typeof s;r in hr?(s===null||s&&(i==="string"||i==="number"))&&(n[r]=s):i===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const Ye={...mr,inline:!1},ot="iconify",pt="iconify-inline",se="iconifyData"+Date.now();let le=[];function Ce(e){for(let t=0;t<le.length;t++){const n=le[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Rr(e,t=!1){let n=Ce(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},le.push(n),n)}function Vi(){if(document.documentElement)return Rr(document.documentElement);le.push({node:()=>document.documentElement})}function qi(e){le=le.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function _e(){return le}function Wi(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let xe=null;const Gi={childList:!0,subtree:!0,attributes:!0};function Pr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,xe&&xe(e)}))}function Ki(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const s=t[r];if(s.addedNodes&&s.addedNodes.length>0||s.type==="attributes"&&s.target[se]!==void 0){n.paused||Pr(e);return}}}function kr(e,t){e.observer.instance.observe(t,Gi)}function Ge(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(Ki.bind(null,e)),kr(e,n),t.paused||Pr(e))}function _n(){_e().forEach(Ge)}function Dr(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Qi(e){const t=xe!==null;if(xe!==e&&(xe=e,t&&_e().forEach(Dr)),t){_n();return}Wi(_n)}function ht(e){(e?[e]:_e()).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 Zi(e){if(e){const t=Ce(e);t&&ht(t)}else ht()}function mt(e){(e?[e]:_e()).forEach(t=>{if(!t.observer){Ge(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?kr(t,r):Ge(t);else return}})}function Xi(e){if(e){const t=Ce(e);t&&mt(t)}else mt()}function Ar(e,t=!1){const n=Rr(e,t);return Ge(n),n}function $r(e){const t=Ce(e);t&&(Dr(t),qi(e))}function Ji(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const s in Ye)if(n[s]!==r[s])return!0;return!1}function Yi(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/s,i%1===0?r(i):0)}}return t}const ea=/[\s,]+/;function ta(e,t){t.split(ea).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const na=["width","height"],ra=["inline","hFlip","vFlip"];function sa(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function oa(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&he(t,!0);if(!n)return null;const r={...Ye,inline:e.classList&&e.classList.contains(pt)};na.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const s=e.getAttribute("data-rotate");typeof s=="string"&&(r.rotate=Yi(s));const i=e.getAttribute("data-flip");typeof i=="string"&&ta(r,i),ra.forEach(c=>{const l="data-"+c,u=sa(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const ia="svg."+ot+", i."+ot+", span."+ot+", i."+pt+", span."+pt;function aa(e){const t=[];return e.querySelectorAll(ia).forEach(n=>{const r=n[se]||n.tagName.toLowerCase()!=="svg"?oa(n):null;r&&t.push({node:n,props:r})}),t}function Or(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 ve;function ca(){try{ve=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ve=null}}function la(e){return ve===void 0&&ca(),ve?ve.createHTML(e):e}function Mr(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Nr(e,t,n,r){const s=e.classList;if(r){const a=r.classList;Array.from(a).forEach(c=>{s.add(c)})}const i=[];return t.forEach(a=>{s.contains(a)?n.has(a)&&i.push(a):(s.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||s.remove(a)}),i}function zr(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const s=[];for(const i in t)r.getPropertyValue(i)||(s.push(i),r.setProperty(i,t[i]));return s}function Br(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const s=t.customisations,i=Ze(n,s),a=e[se],c=Or(gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=la(c);const l=r.childNodes[0],u=e.attributes;for(let w=0;w<u.length;w++){const h=u.item(w),C=h.name;C!=="class"&&!l.hasAttribute(C)&&l.setAttribute(C,h.value)}const d=Mr(t.icon),f=Nr(l,d,new Set(a&&a.addedClasses),e),p=zr(l,s.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),y={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[se]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function ua(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function da(e){return"data:image/svg+xml,"+ua(e)}function fa(e){return'url("'+da(e)+'")'}const pa={display:"inline-block"},gt={"background-color":"currentColor"},Ur={"background-color":"transparent"},In={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},En={"-webkit-mask":gt,mask:gt,background:Ur};for(const e in En){const t=En[e];for(const n in In)t[e+"-"+n]=In[n]}function Ln(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ha(e,t,n,r){const s=t.customisations,i=Ze(n,s),a=i.attributes,c=e[se],l=Or(i.body,{...a,width:n.width+"",height:n.height+""}),u=Mr(t.icon),d=Nr(e,u,new Set(c&&c.addedClasses)),p={"--svg":fa(l),width:Ln(a.width),height:Ln(a.height),...pa,...r?gt:Ur};s.inline&&(p["vertical-align"]="-0.125em");const y=zr(e,p,c&&c.addedStyles),w={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[se]=w,e}let Ae=!1;function ma(){Ae||(Ae=!0,setTimeout(()=>{Ae&&(Ae=!1,pe())}))}function pe(e,t=!1){const n=Object.create(null);function r(s,i){const{provider:a,prefix:c,name:l}=s,u=Z(a,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!Hi(s)){const f=n[a]||(n[a]=Object.create(null));(f[c]||(f[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:_e()).forEach(s=>{const i=typeof s.node=="function"?s.node():s.node;if(!i||!i.querySelectorAll)return;let a=!1,c=!1;function l(u,d,f){if(c||(c=!0,ht(s)),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"){ha(u,d,{...we,...f},y);return}}Br(u,d,f)}aa(i).forEach(({node:u,props:d})=>{const f=u[se];if(!f){const{status:y,icon:w}=r(d.icon,!0);if(w){l(u,d,w);return}a=a||y==="loading",u[se]={...d,status:y};return}let p;if(Ji(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){a=a||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)}),s.temporary&&!a?$r(i):t&&a?Ar(i,!0):c&&s.observer&&mt(s)});for(const s in n){const i=n[s];for(const a in i){const c=i[a];Xt(Array.from(c).map(l=>({provider:s,prefix:a,name:l})),ma)}}}function ga(e){const t=Ce(e);t?pe(t):pe({node:e,temporary:!0},!0)}function Hr(e,t,n=!1){const r=Se(e);if(!r)return null;const s=he(e),i=Tr(Ye,t||{}),a=Br(document.createElement("span"),{name:e,icon:s,customisations:i},r);return n?a.outerHTML:a}function xa(){return"3.1.1"}function va(e,t){return Hr(e,t,!1)}function ya(e,t){return Hr(e,t,!0)}function ba(e,t){const n=Se(e);if(!n)return null;const r=Tr(Ye,t||{});return Ze(n,r)}function ja(e){e?ga(e):pe()}if(typeof document<"u"&&typeof window<"u"){Vi();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"||!pr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Qi(pe),pe()})}function wa(e,t){Sr(e,t!==!1)}function Sa(e){Sr(e,!0)}Cr("",Ti);if(typeof document<"u"&&typeof window<"u"){wr();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 s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;_r(n,s)||console.error(r)}catch{console.error(r)}}}}const Ca={getAPIConfig:Je,setAPIModule:Cr,sendAPIQuery:Lr,setFetch:wi,getFetch:Si,listAPIProviders:bi},_a={_api:Ca,addAPIProvider:_r,loadIcons:Xt,loadIcon:Fi,iconExists:ui,getIcon:di,listIcons:ai,addIcon:li,addCollection:pr,replaceIDs:gr,calculateSize:at,buildIcon:Ze,getVersion:xa,renderSVG:va,renderHTML:ya,renderIcon:ba,scan:ja,observe:Ar,stopObserving:$r,pauseObserver:Zi,resumeObserver:Xi,enableCache:wa,disableCache:Sa};try{self.Iconify===void 0&&(self.Iconify=_a)}catch{}var Jt={},Ia=H;Object.defineProperty(Jt,"__esModule",{value:!0});var Fr=Jt.default=void 0,Ea=Ia(F()),La=o;Fr=Jt.default=(0,Ea.default)((0,La.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 Yt({infos:e}){const{t}=X(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(s=>{n.searchParams.set(s.label,s.value)});const r=e.map(s=>`* ${s.label}: ${s.value}`).join(`
|
|
155
|
-
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<!--
|
|
160
|
-
[Server Info]
|
|
161
|
-
${r}
|
|
162
|
-
* Page: ${window.location.href}
|
|
163
|
-
-->
|
|
164
|
-
`),$(S,{sx:{mx:{xs:0,md:2}},children:$(bt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Yt.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};Yt.defaultProps={infos:[]};var en={},Ta=H;Object.defineProperty(en,"__esModule",{value:!0});var xt=en.default=void 0,Ra=Ta(F()),Tn=o;xt=en.default=(0,Ra.default)([(0,Tn.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,Tn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ne({children:e}){return Q(n=>n.breakpoints.down("md"))?o.jsx(ze,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(S,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(xt,{fontSize:"small"})})}):o.jsxs(S,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(xt,{fontSize:"small"}),e]})}ne.propTypes={children:m.node.isRequired};const Pa="https://launcher.arcblock.io/",ka=30*24*60*60*1e3;function tn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var D,j,E,g,_,L;const{t:i,locale:a}=X(),c=Qe(),[l,u]=Gn({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),f=Q(R=>R.breakpoints.down("md")),{sx:p={},...y}=s,w=f?"mobile":"desktop",h=Wn(async()=>{const[R,V]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),zn({launcherUrl:e||Pa,nftDid:n,launcherSessionId:r,locale:a})]);if(R!=null&&R.error)throw new Error(R.error);return{launcherSession:R.launcherSession,subscriptionURL:V}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!f&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>h.retry()});const C=R=>{u({popoverAnchorEl:R.currentTarget})},b=()=>{u({popoverAnchorEl:null})},T=(D=h.value)==null?void 0:D.launcherSession;let I="success";[O.LAUNCH_SESSION_STATUS.overdue,O.LAUNCH_SESSION_STATUS.canceled,O.LAUNCH_SESSION_STATUS.terminated].includes((E=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:E.status)&&(I="error");let P=null;if(T.expirationDate&&!T.subscription){const R=fe(T.expirationDate).diff(fe(),"ms");P=i(`expiration.${w}.tips.${I}`,{validity:Vn(R,{locale:Bn(a),compact:!0,verbose:!0})}),R>0&&R<=ka&&(I="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(ne,{children:P||((_=(g=T==null?void 0:T.subscription)==null?void 0:g.product)==null?void 0:_.name)||i("common.subscription")}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:C}),o.jsx($n,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(S,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(L=h.value)==null?void 0:L.subscriptionURL})})})]})}tn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};tn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Da=30*24*60*60*1e3,Aa="https://launcher.arcblock.io/";function nn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,E,g,_,L,R,V;const{t:i,locale:a}=X(),[c,l]=Gn({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=Q(N=>N.breakpoints.down("md")),f=Qe(),{sx:p={},...y}=s,w=d?"mobile":"desktop",h=Wn(async()=>{const[N,Ie]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),zn({launcherUrl:e||Aa,nftDid:n,launcherSessionId:r,locale:a})]);if(N!=null&&N.error)throw new Error(N.error);return{launcherSession:N.launcherSession,subscriptionURL:Ie}},[a]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!d&&i("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...y});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...y,onClick:()=>h.retry()});const C=(E=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:E.expirationDate,b=fe(C).isBefore(fe()),T=fe(C).diff(fe(),"ms");let I="success";T<=Da&&(I="warning"),b&&(I="error");const P=N=>{l({popoverAnchorEl:N.currentTarget})},D=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((_=(g=h.value)==null?void 0:g.launcherSession)==null?void 0:_.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i("expiration.desktop.nextInvoice",{date:ks(C,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),!((R=(L=h.value)==null?void 0:L.launcherSession)!=null&&R.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:i(`expiration.${w}.tips.${I}`,{validity:Vn(T,{locale:Bn(a),compact:!0,verbose:!0})})}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...y,onClick:P}),o.jsx($n,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(S,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(V=h.value)==null?void 0:V.subscriptionURL})})})]})}nn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};nn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var rn={},$a=H;Object.defineProperty(rn,"__esModule",{value:!0});var Vr=rn.default=void 0,Oa=$a(F()),Ma=o;Vr=rn.default=(0,Oa.default)((0,Ma.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var sn={},Na=H;Object.defineProperty(sn,"__esModule",{value:!0});var qr=sn.default=void 0,za=Na(F()),Ba=o;qr=sn.default=(0,za.default)((0,Ba.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Ua(){const{inFullPage:e,toggleFullPage:t}=ts();return $(vt,{onClick:t,children:e?$(qr,{sx:{transform:"scale(1.3)"}}):$(Vr,{sx:{transform:"scale(1.3)"}})})}function on({children:e}){var I,P,D;const{t}=X(),{loading:n,error:r,actions:{refreshBlocklet:s},env:i,blocklet:a}=je(),{info:c}=Ds(),l=Hs(),u=Q(j=>j.breakpoints.down("md")),[d,f]=x.useState(null),{appId:p,version:y}=i,w=[{label:"App ID",value:p},{label:"App Version",value:y},{label:"App Bundle Name",value:(I=a==null?void 0:a.meta)==null?void 0:I.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=j=>{var g,_,L,R;const E=Array.isArray(j)?j:[j];if(u||E.unshift($(Ua,{})),a){const V={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};As(a)?E.unshift($(tn,{chainHost:(g=a==null?void 0:a.controller)==null?void 0:g.chainHost,nftId:(_=a==null?void 0:a.controller)==null?void 0:_.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(R=a==null?void 0:a.controller)==null?void 0:R.launcherUrl,sx:V})):c.ownerNft&&c.launcher&&E.unshift($(nn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:V}))}return E},C=(P=((a==null?void 0:a.environments)||[]).find(j=>j.key===ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:P.value,b=(D=((a==null?void 0:a.environments)||[]).find(j=>j.key===ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:D.value;return x.useEffect(()=>{if(u)f(null);else{const{appLogo:j,appLogoRect:E}=window.blocklet??{};(E||j)&&f(`${E||j}&v=${Date.now()}`)}},[C,b,u]),nt(Ha,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:{logo:d?$("img",{src:d,alt:"logo"}):null},footerProps:{addon:$(Yt,{infos:w})},children:[!a&&n&&$(Be,{relative:"parent",children:$(re,{})}),!a&&r&&nt(Be,{relative:"parent",children:[nt(S,{display:"flex",alignItems:"center",children:[$(Fr,{color:"error",sx:{marginRight:1}}),_t(r)]}),$(wt,{onClick:()=>s(),children:$("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&$(S,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:$(_s,{FallbackComponent:es,resetKeys:[l.pathname],children:e})})]})}on.propTypes={children:m.any};on.defaultProps={children:null};const Ha=te(Yr)`
|
|
165
|
-
div.dashboard-content {
|
|
166
|
-
padding: 0;
|
|
167
|
-
}
|
|
168
|
-
.header-addons .locales {
|
|
169
|
-
max-height: 400px;
|
|
170
|
-
overflow-y: auto;
|
|
171
|
-
}
|
|
172
|
-
`;function Fa(){const{t:e,locale:t}=X(),{blocklet:n,launcherSession:r}=je(),[s,i]=Vs({subscriptionURL:"#"});if(x.useEffect(()=>{var l,u;dn(n,r)&&$s({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(u=n==null?void 0:n.controller)==null?void 0:u.launcherUrl,locale:t}).then(d=>{i({subscriptionURL:d})}).catch(d=>{console.error("get subscription url error:",d)})},[n,r]),!n||!r||!Os(n)||r.status===O.LAUNCH_SESSION_STATUS.installed)return"";let a=null,c="";return dn(n,r)?(a=o.jsx(bt,{href:s.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:fn(r==null?void 0:r.reservedUntil,t)})):Ms(n,r)&&(a=o.jsx(Un,{to:Ct(O.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:fn(r==null?void 0:r.terminatedAt,t),deadline:Ns(r==null?void 0:r.terminatedAt,t)})),o.jsxs(S,{component:Is,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,o.jsx(B,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const Wr=x.createContext({});function Tc(){return x.useContext(Wr)}const{Provider:Va,Consumer:Rc}=Wr,{did:G,appId:qa}=window.env;function Wa({children:e}){var j,E;const{t,locale:n}=X(),{blocklet:r}=je(),[s,i]=x.useState([]),[a,c]=x.useState([]),[l,u]=x.useState([]),d=z.getDisplayName(r),f=((j=((r==null?void 0:r.environments)||[]).find(g=>g.key===ee.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)||[],w=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const g=await Pe.doBatchQuery({getRoles:{input:{teamDid:G}},getPermissions:{input:{teamDid:G}},getInvitations:{input:{teamDid:G}}});c((g.getRoles.roles||[]).filter(_=>!O.RBAC_CONFIG.roles.some(L=>L.name===_.name&&(!L.passport||L.ci))).map(_=>(_.hasDescription=!!_.description,_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),_))),u(g.getPermissions.permissions||[]),i(g.getInvitations.invitations||[])}catch(g){Y.error(g.message)}},C=({did:g}={})=>{const _={teamDid:G,user:{did:g}};return Pe.getUser({input:_})},b=({query:g,paging:_}={})=>{const L={teamDid:G};return _&&(L.paging=_),g&&(L.query=g),L.sort={lastLoginAt:-1},Pe.getUsers({input:L})},T=()=>Pe.getUsersCountPerRole({input:{teamDid:G}}),I=()=>h();x.useEffect(()=>{var g;(g=r==null?void 0:r.meta)!=null&&g.did&&h()},[(E=r==null?void 0:r.meta)==null?void 0:E.did]),x.useEffect(()=>{c(g=>g.map(_=>(_.hasDescription||(_.description=t("team.passport.description",{teamName:d,title:_.title})),{..._})))},[t,n]);const P=g=>{g.teamDid===G&&h()};$e(ee.TeamEvents.userAdded,P,[G]),$e(ee.TeamEvents.userRemoved,P,[G]),$e(ee.TeamEvents.userUpdated,P,[G]);const D={teamDid:G,teamIssuerDid:qa,teamName:d,invitations:s,roles:a,permissions:l,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:w,refresh:I,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:C,getUsers:b,getUsersCountPerRole:T}};return o.jsx(Va,{value:D,children:e})}const Ga=x.lazy(()=>M(()=>import("./overview-5mVt0_gG.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]))),Ka=x.lazy(()=>M(()=>import("./domains-A7coEqfv.js"),__vite__mapDeps([25,2,3,4,1,5,6,7,13,8,26,27,28,21,22,23,16,17,29,30,31,32,33,34,24,9,12,35]))),Qa=x.lazy(()=>M(()=>import("./index-BPRjg-Ha.js"),__vite__mapDeps([36,2,1,4,37,3,5,6,7,8,38,39,13,14,28,21,32,17,23,12,40,16,41,42,43,44,29,30,33,15,18,19,20,22,9,24]))),Za=x.lazy(()=>M(()=>import("./index-DuWgtqAp.js"),__vite__mapDeps([45,2,1,8,3,4,5,6,7,46,47,39,13,28,21,48,16,17,49,14,24,15,18,19,20,22,23,9]))),Xa=x.lazy(()=>M(()=>import("./index-CJi_sgz3.js"),__vite__mapDeps([50,2,1,51,8,3,4,5,6,7,52,53,54,55,37,46,56,57,13,58,20,28,21,16,17,24,32,12,14,10,11,59,60,42,61,15,18,19,22,23,9]))),Ja=x.lazy(()=>M(()=>import("./audit-logs-BQlJ8qXs.js"),__vite__mapDeps([62,3,2,4,1,5,6,7,41,42,15,13,8,63,64,9,65,20,33,66,16,17,18,19,21,22,23,24]))),Ya=x.lazy(()=>M(()=>import("./index-BGBHkKrL.js"),__vite__mapDeps([67,2,1,4,3,5,6,7,13,8,33,12,68,69,58,20,65,9,14,41,42,70,22,23,51,71,72,57,73,17,74,15,16,18,19,21,24]))),ec=x.lazy(()=>M(()=>import("./log-DSC3nDef.js"),__vite__mapDeps([75,1,2,15,3,4,5,6,7,13,8,76,58,77]))),tc=x.lazy(()=>M(()=>import("./index-CfSdyisA.js"),__vite__mapDeps([78,2,1,13,8,3,4,5,6,7,79,16,17,21,14,80,81,58,33,48,76,32,82,24,37,69,44,83,57,74,40,84,85,54,31,19,56,63,64,66]))),nc=x.lazy(()=>M(()=>import("./config-navigation-DH0a1AcG.js"),__vite__mapDeps([86,2,3,4,1,5,6,7,87,8,13,59,11,49,88,61,83,20,17,15,16,18,19,21,22,23,9,24]))),rc=x.lazy(()=>M(()=>import("./index-CHdEjF6N.js"),__vite__mapDeps([89,1,2,5,4,13,8,3,6,7,90,83,91,92,40,17,12,93,30,19,60,48,15,16,18,20,21,22,23,9,24]))),sc=x.lazy(()=>M(()=>import("./index-Dkv68xvd.js"),__vite__mapDeps([94,3,2,4,1,5,6,7,9,13,8,59,27,16,17,29,30,15,18,19,20,21,22,23,24]))),oc=x.lazy(()=>M(()=>import("./component-DXUL6eiU.js"),__vite__mapDeps([95,1,2,4,3,5,6,7,8,53,54,55,37,46,56,13,60,28,21,87,73,81,32,57,72,17,96,84,85,40,31,33,16,19,14,97,98,92,83,99,49,63,64,88,12,15,34,90,100,91,101,47,9,58,18,29,30,20,22,23,24]))),ic=x.lazy(()=>M(()=>import("./analytics-Co9lkVsN.js"),__vite__mapDeps([102,1,2,3,4,5,6,7,70,13,8,22,23,51,71,72,57,73,17,74,20,93,58,48,15,16,18,19,21,9,24]))),ac=Ct(O.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications");function cc(){var D,j,E;const e=Hn(),{tab:t="overview"}=Fs(),{blocklet:n,actions:{refreshBlocklet:r}}=je(),{t:s}=X(),{session:i}=qn(),a=Ue(()=>{var g;return(g=i==null?void 0:i.user)==null?void 0:g.did},[i]),{enqueueSnackbar:c}=On(),l=Ue(()=>{var g;return((g=i.user)==null?void 0:g.role)&&Bs.includes(i.user.role)},[i]),u=(D=n==null?void 0:n.meta)==null?void 0:D.did,d=g=>{e(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${g}`)},f=()=>{r()},p=!n||pn(n.status)?[]:z.getAppMissingConfigs(n),y=[{label:s("common.overview"),value:"overview"},{label:o.jsx(xs,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!p.length,children:s("common.components")}),value:"components"},{label:s("common.domains"),value:"domains"}];pn(n==null?void 0:n.status)||y.push({label:s("common.configuration"),value:"configuration"}),y.push({label:s("common.auditLogs"),value:"audit-logs"}),l&&y.push({label:s("common.notificationRecords"),value:"notifications"}),n&&((j=n.children)!=null&&j.length)&&n.structVersion===O.APP_STRUCT_VERSION&&y.push({label:s("common.logs"),value:"logs"}),y.push({label:s("common.configNavigation"),value:"navigation"}),["admin","owner"].includes((E=i.user)==null?void 0:E.role)&&y.push({label:"Webhooks",value:"webhooks"});const w=o.jsx(Ja,{scope:u,categories:["blocklet","team","security","certificates","gateway"]}),h=x.useCallback(g=>Gs(ac,{id:g.id,severity:g.severity||"all",componentDid:g.source==="system"?"system":g.componentDid||"all"}),[]);$e(`${a}/${O.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,g=>{const _=h(g),{severity:L,description:R}=g||{},V=["error","warning"].includes(L)||g.sticky;c(R,{variant:L,autoHideDuration:V?null:5e3,content:N=>o.jsx(Mo,{viewAllUrl:_,keyId:N,notification:g,content:o.jsx(Jo,{notification:g,minimal:!0,rows:0})})})},[],"user");const C=x.useCallback(()=>l?o.jsx(Ya,{blocklet:n}):o.jsx(rs,{status:403}),[n,l]),b={overview:o.jsx(Ga,{}),domains:o.jsx(Ka,{}),members:o.jsx(S,{mt:-5,children:o.jsx(Qa,{type:"blocklet",createPassportSvg:hn})}),passports:o.jsx(S,{mt:-3,children:o.jsx(Za,{createPassportSvg:hn})}),components:oc,configuration:o.jsx(Xa,{blocklet:n,onUpdate:f}),"audit-logs":w,notifications:C,logs:ec,navigation:nc,"did-spaces":o.jsx(S,{mt:-3,children:o.jsx(rc,{navOrientation:"horizontal"})}),analytics:o.jsx(S,{mt:-5,children:o.jsx(ic,{})}),publish:o.jsx(S,{mt:-3,children:o.jsx(tc,{})}),webhooks:o.jsx(sc,{})},T=b[t]||b.overview,I=!["members","passports","analytics","publish","did-spaces"].includes(t),P=n?o.jsxs(Nt,{type:"components",children:[I&&o.jsx(S,{pt:3,children:o.jsx(Es,{tabs:y,current:t,onChange:d,scrollButtons:"auto"})}),o.jsx("div",{className:"page-content",children:o.jsx(x.Suspense,{fallback:o.jsx(Be,{relative:"parent",children:o.jsx(re,{})}),children:x.isValidElement(T)?T:o.jsx(T,{blocklet:n})})})]}):o.jsx(Be,{relative:"parent",children:o.jsx(re,{})});return o.jsx(Us,{children:o.jsx(Wa,{children:o.jsx(on,{children:o.jsxs(uc,{children:[I&&o.jsxs(S,{component:"div",className:"page-header",children:[o.jsxs(B,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?o.jsx(Zs,{blocklet:n,style:{marginRight:16}}):null,n?o.jsxs(S,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(S,{children:z.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&o.jsx(Mt,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${s("common.blocklet")} ${s("common.detail")}`]}),n?o.jsx(Eo,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:g}={})=>{g&&Y.error(g.message)},variant:"group"}):null]}),o.jsx(nr,{}),o.jsx(Fa,{}),P]})})})})}function lc(){var r;const{blocklet:e}=je(),{t}=X(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const s=zs();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(ns,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(cc,{})]})}const uc=te.main`
|
|
173
|
-
.page-header {
|
|
174
|
-
display: flex;
|
|
175
|
-
justify-content: space-between;
|
|
176
|
-
align-items: center;
|
|
177
|
-
flex-wrap: wrap;
|
|
178
|
-
gap: 16px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.page-title {
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
|
|
185
|
-
.page-link {
|
|
186
|
-
font-size: 15px;
|
|
187
|
-
margin-top: 8px;
|
|
188
|
-
margin-left: 8px;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.page-content {
|
|
193
|
-
margin-top: 24px;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
197
|
-
.page-header {
|
|
198
|
-
flex-direction: column;
|
|
199
|
-
align-items: flex-start;
|
|
200
|
-
.page-actions,
|
|
201
|
-
.MuiButtonGroup-root {
|
|
202
|
-
width: 100%;
|
|
203
|
-
}
|
|
204
|
-
.MuiButtonGroup-root {
|
|
205
|
-
.MuiButtonBase-root {
|
|
206
|
-
flex: 1;
|
|
207
|
-
}
|
|
208
|
-
.blocklet-action-text {
|
|
209
|
-
display: none;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.page-title {
|
|
215
|
-
margin-bottom: 15px;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
`,Pc=Object.freeze(Object.defineProperty({__proto__:null,default:lc},Symbol.toStringTag,{value:"Module"}));export{Mt as B,Ot as W,Yn as a,Qn as b,Kn as c,Fr as d,de as e,Lc as f,Pc as g,Tc as u};
|