@abtnode/blocklet-services 1.16.54-beta-20251016-050817-2fc632b8 → 1.16.54-beta-20251017-133309-7d40faa6
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/asset.js +7 -2
- package/api/emails/_components/attachments.js +1 -1
- package/dist/assets/{AdapterDayjs-DyE9ImrK.js → AdapterDayjs-T-a0V_gA.js} +1 -1
- package/dist/assets/{Google-ZJmTt04Y.js → Google-BXi1gq6W.js} +1 -1
- package/dist/assets/{access-control-C5AwSG3T.js → access-control-m0S6yUo8.js} +1 -1
- package/dist/assets/{actions-C4-lIUPY.js → actions-C0hEY5iN.js} +1 -1
- package/dist/assets/{add-component-core-CrZWbFmf.js → add-component-core-BksM6C--.js} +17 -17
- package/dist/assets/{add-resource-Brh4F6D2.js → add-resource-CTnW2X8N.js} +1 -1
- package/dist/assets/{addon-DMW6BcQH.js → addon-CPEWVDQ1.js} +1 -1
- package/dist/assets/{advanced-ykwSXzlQ.js → advanced-BQT157yk.js} +2 -2
- package/dist/assets/{aigne-DmDL-WLj.js → aigne-CfRlP6kv.js} +1 -1
- package/dist/assets/api-C7Kyuutl.js +1 -0
- package/dist/assets/{appearance-CwaUUdyp.js → appearance-BddR68-e.js} +1 -1
- package/dist/assets/{ar-Ge3t6oI2.js → ar-BQm9lQ4M.js} +1 -1
- package/dist/assets/{arrow-down.svg-D3B8bxxx.js → arrow-down.svg-UHWRwrOh.js} +1 -1
- package/dist/assets/audit-logs-BzqpNyz0.js +35 -0
- package/dist/assets/{authorize-CmneXxos.js → authorize-D9fC-nXh.js} +1 -1
- package/dist/assets/{base-chart-C_jLgGFD.js → base-chart-CSJD1faI.js} +1 -1
- package/dist/assets/{base32-Cg02gOuu.js → base32-iOXf3Dyk.js} +1 -1
- package/dist/assets/{bind-account-B_UMGXib.js → bind-account-DhXOE_rG.js} +1 -1
- package/dist/assets/branding-BQslHJ3k.js +1 -0
- package/dist/assets/{branding-DETOdgiW.js → branding-B_hljukd.js} +1 -1
- package/dist/assets/{branding-B_eCdYJK.js → branding-PrRXFhYD.js} +3 -3
- package/dist/assets/{bundle-avatar-BFaxogKz.js → bundle-avatar-B6pd4JA-.js} +1 -1
- package/dist/assets/button-2y9b8ibp.js +1 -0
- package/dist/assets/{click-to-copy-CK42VmRr.js → click-to-copy-PW3ieO34.js} +1 -1
- package/dist/assets/{cloneDeep-gpb_g13N.js → cloneDeep-D3tVGEyF.js} +1 -1
- package/dist/assets/{collapse-D7GlSZQp.js → collapse-Cc8IqFzl.js} +1 -1
- package/dist/assets/{complete-Bqi3d0V1.js → complete-BpTFnpTf.js} +2 -2
- package/dist/assets/{component-CSPqPsOF.js → component-abZy96kt.js} +2 -2
- package/dist/assets/{config-CPdtVTio.js → config-B-efbAjK.js} +1 -1
- package/dist/assets/{config-BWSyA18z.js → config-CBb_1lBq.js} +5 -5
- package/dist/assets/{config-BHZS65kz.js → config-CRxkGlLw.js} +1 -1
- package/dist/assets/{config-navigation-BFsrGucq.js → config-navigation-V-jkhCe0.js} +3 -3
- package/dist/assets/{config-space-CSl6D7xo.js → config-space-uoEgpVj0.js} +1 -1
- package/dist/assets/{confirm-CEAKWDZJ.js → confirm-2zLPRflS.js} +1 -1
- package/dist/assets/{connect-FvriLilq.js → connect-Bg2fkKdJ.js} +1 -1
- package/dist/assets/{connect-BVXqic92.js → connect-CR6YXL6l.js} +1 -1
- package/dist/assets/{connect-to-dZwJX0bt.js → connect-to-DVzVPrNg.js} +1 -1
- package/dist/assets/{content-layout-W7JDm8iO.js → content-layout-DJL10aJT.js} +1 -1
- package/dist/assets/{create-passport-svg-BsR3hKFq.js → create-passport-svg-G2i9OoEB.js} +1 -1
- package/dist/assets/{createClass-B4I2IV47.js → createClass-Bf8maCzZ.js} +1 -1
- package/dist/assets/{dashboard-DyYLnek8.js → dashboard-DvbW_coF.js} +2 -2
- package/dist/assets/{de-CbARTvf4.js → de-D0uPENSq.js} +1 -1
- package/dist/assets/{delete-confirm-DpKJ9gtf.js → delete-confirm-tJr-kQGY.js} +1 -1
- package/dist/assets/{did-address-BQL5Zxlr.js → did-address-yNLicvuz.js} +1 -1
- package/dist/assets/{domain-action-card-CRdL2PFv.js → domain-action-card-oKAg2vcg.js} +2 -2
- package/dist/assets/{domain-Bq75ZuOm.js → domain-orOrS-66.js} +1 -1
- package/dist/assets/domains-CIKaHlMa.js +1 -0
- package/dist/assets/{email-OlQWpbtF.js → email-Bw5lhga1.js} +1 -1
- package/dist/assets/{empty-spinner-sNq-0DF5.js → empty-spinner-Dqkt-AHg.js} +1 -1
- package/dist/assets/engine-DrB5N6Vq.js +1 -0
- package/dist/assets/{es-CaCbzATO.js → es-Dh4_UfCu.js} +1 -1
- package/dist/assets/{exchange-passport-DK4-g9my.js → exchange-passport-D5N7TuyP.js} +1 -1
- package/dist/assets/{form-C5dLovtO.js → form-D9ZwMxUQ.js} +1 -1
- package/dist/assets/{form-text-input-AIMlcRaM.js → form-text-input-BdGN_cNn.js} +1 -1
- package/dist/assets/{form-wrapper-DINLdpTN.js → form-wrapper-SZH1FnTd.js} +1 -1
- package/dist/assets/{fr-B3yjKUFH.js → fr-CzZWQkiT.js} +1 -1
- package/dist/assets/{fuel-DkqmEB8D.js → fuel-DRu4UcZ3.js} +1 -1
- package/dist/assets/{gen-access-key-BnCg2Wu1.js → gen-access-key-Cg1WeFbg.js} +1 -1
- package/dist/assets/{gen-simple-access-key-zOQbFtZ8.js → gen-simple-access-key-DPQLOBVf.js} +1 -1
- package/dist/assets/get-safe-url-BEmXir96.js +1 -0
- package/dist/assets/{hi-q4mhHiIl.js → hi-Do9VCuRi.js} +1 -1
- package/dist/assets/{home-DTXdAvXT.js → home-drsp3cTN.js} +1 -1
- package/dist/assets/{id-DTf7aVH8.js → id-Dhhrveu9.js} +1 -1
- package/dist/assets/{iframe-DAoobOBi.js → iframe-D7RMzvnk.js} +1 -1
- package/dist/assets/{index-DHQkab_n.js → index--FkaQ0Dk.js} +1 -1
- package/dist/assets/index--OvsXAyb.js +1 -0
- package/dist/assets/{index-DNGdj2R4.js → index-4_vQ0fa1.js} +4 -4
- package/dist/assets/{index-IGBGBXd_.js → index-B31Z5yXU.js} +1 -1
- package/dist/assets/index-B486VukG.js +1 -0
- package/dist/assets/{index-DeVDiUjo.js → index-B80ObPIt.js} +1 -1
- package/dist/assets/index-BJkTWRHF.js +281 -0
- package/dist/assets/{index-D_vhPpT2.js → index-BMkkWtK-.js} +1 -1
- package/dist/assets/index-BPz1W1F5.js +7 -0
- package/dist/assets/{index-D6Y3sCzN.js → index-BTb5QwNU.js} +2 -2
- package/dist/assets/{index-BJrVQ6ch.js → index-B_9ypeKS.js} +1 -1
- package/dist/assets/{index-3yzleS_1.js → index-BnPTSmJZ.js} +87 -87
- package/dist/assets/index-Bv1DYw0_.js +55 -0
- package/dist/assets/{index-D1thq8eN.js → index-BwxEDC7M.js} +6 -6
- package/dist/assets/{index-VySXxf4w.js → index-CAMegfIe.js} +1 -1
- package/dist/assets/{index-ve-p7nSZ.js → index-CMOR5eza.js} +5 -5
- package/dist/assets/index-CR7OYm8K.js +120 -0
- package/dist/assets/{index-KpZGUssm.js → index-CXs5RZ6g.js} +1 -1
- package/dist/assets/{index-Bgt2qHLn.js → index-CcoIHAI8.js} +4 -4
- package/dist/assets/{index-Cd_Gml9C.js → index-CjUY4wYp.js} +1 -1
- package/dist/assets/{index-DJj8GmQS.js → index-Cs8-XzFL.js} +1 -1
- package/dist/assets/{index-BcGECSaf.js → index-D0c5zNE-.js} +1 -1
- package/dist/assets/{index-C80JxCSn.js → index-D5jPhzpV.js} +1 -1
- package/dist/assets/{index-Cs_I9KFa.js → index-DC4JoVqO.js} +1 -1
- package/dist/assets/{index-DlRa8Zeh.js → index-DD8Xcc3x.js} +1 -1
- package/dist/assets/index-DJgF8q_o.js +124 -0
- package/dist/assets/{index-B6a6aopU.js → index-DJhcYi8s.js} +11 -11
- package/dist/assets/{index-DX3L95vz.js → index-DKuLdlGi.js} +1 -1
- package/dist/assets/{index-rQAVknkX.js → index-DVsdJqbi.js} +1 -1
- package/dist/assets/{index-Cr5RxnHu.js → index-DacQww-t.js} +1 -1
- package/dist/assets/{index-iOD1kOar.js → index-DdeHXxqD.js} +4 -4
- package/dist/assets/{index-BdHbrnpK.js → index-Dj7hvho1.js} +1 -1
- package/dist/assets/{index-D_HqsEfj.js → index-Dz7IF3dR.js} +1 -1
- package/dist/assets/{index-DFceGCP0.js → index-Z2OlxmBy.js} +1 -1
- package/dist/assets/{invitation-P1aXUnIO.js → invitation-dxOWwXhI.js} +1 -1
- package/dist/assets/{invitations-dPkgiFPr.js → invitations-fxhgBZ7v.js} +1 -1
- package/dist/assets/{invite-Bz99qCDF.js → invite-BUfTFpm3.js} +1 -1
- package/dist/assets/{isURL-DYsELTMk.js → isURL-BWdci4BV.js} +2 -2
- package/dist/assets/{issue-passport-DPyxNFLD.js → issue-passport-CGjo4nFE.js} +1 -1
- package/dist/assets/{item-B1UaStjk.js → item-CpRxSfFl.js} +1 -1
- package/dist/assets/{ja-Csh_XwzF.js → ja-B70UYq5X.js} +1 -1
- package/dist/assets/{ko-xiNTwgO9.js → ko-C7TZwmXC.js} +1 -1
- package/dist/assets/{landing-page-CkVnGimh.js → landing-page-BeMOLJet.js} +1 -1
- package/dist/assets/{launch-result-message-Dt-T7zmz.js → launch-result-message-DZJ76kCs.js} +1 -1
- package/dist/assets/{layout-fFNOz6Xe.js → layout-DSuoHJe3.js} +1 -1
- package/dist/assets/list-DA_a9DhC.js +103 -0
- package/dist/assets/list-gCQikTBu.js +2 -0
- package/dist/assets/{list-header-CjohGZ9B.js → list-header-BNFs7V0b.js} +1 -1
- package/dist/assets/localization-NenbMmXN.js +1 -0
- package/dist/assets/{log-lPrpnnPZ.js → log-BRV1BCFu.js} +1 -1
- package/dist/assets/logger-CHXN98LU.js +1 -0
- package/dist/assets/{login-63olb_gZ.js → login-DP97VuHR.js} +1 -1
- package/dist/assets/{login-oauth-callback-DebmT1Db.js → login-oauth-callback-C2DR5bOf.js} +1 -1
- package/dist/assets/{logo-uploader-3OpHGD1n.js → logo-uploader-BNfVMS9b.js} +1 -1
- package/dist/assets/{lost-passport-xCmWuuxC.js → lost-passport-BdOj7Qyw.js} +3 -3
- package/dist/assets/{observability-B458LeIE.js → observability-BjKI3tFt.js} +1 -1
- package/dist/assets/{omit-DdfLLBNW.js → omit-CxhCIYKY.js} +1 -1
- package/dist/assets/{open-window-CzYfI7l7.js → open-window-Dm9n80Az.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-C5fynimj.js → over-due-invoice-payment-Cg-G2W1o.js} +1 -1
- package/dist/assets/{overview-BFzvEbcq.js → overview-BFV7mugn.js} +2 -2
- package/dist/assets/{page-header-gosgJ3fX.js → page-header-xpG0yfsa.js} +1 -1
- package/dist/assets/passport-CQWKOko9.js +1 -0
- package/dist/assets/passport-item-ZjtfZLBd.js +1 -0
- package/dist/assets/{permission-UeJPGiMm.js → permission-BZsLoL-d.js} +1 -1
- package/dist/assets/{playground-_1Dj8J_h.js → playground-DKMlueFr.js} +1 -1
- package/dist/assets/preferences-C5BaFHlg.js +1 -0
- package/dist/assets/profile-embed-HIW9YGAc.js +1 -0
- package/dist/assets/{pt-BvcG4R7B.js → pt-DObJ_ADK.js} +1 -1
- package/dist/assets/publish-resource-CG--uFPX.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CIwtis6a.js → react-beautiful-dnd.esm-DG8qQeEC.js} +1 -1
- package/dist/assets/{react-stripe.esm-omsK4b05.js → react-stripe.esm-BV6kfV2w.js} +1 -1
- package/dist/assets/{required-BPzIdi1N.js → required-C9DLcn9T.js} +1 -1
- package/dist/assets/revoke.svg-CmffMlcP.js +1 -0
- package/dist/assets/{ru-DzUPRLmr.js → ru-nYDmEUmY.js} +1 -1
- package/dist/assets/{runtime-iwxdTEke.js → runtime-tvucPK2o.js} +1 -1
- package/dist/assets/{sanitize-CEXE1rEu.js → sanitize-m8Fu6XGD.js} +1 -1
- package/dist/assets/sdk-BGPH_Nn6.js +1 -0
- package/dist/assets/{section-DOw43pby.js → section-MSasF4Cx.js} +1 -1
- package/dist/assets/{security-D4Sx6wQO.js → security-DTZHnwsj.js} +6 -6
- package/dist/assets/{session-Dnp_ufkx.js → session-ByI8mrad.js} +1 -1
- package/dist/assets/{setup-DpBiTcjv.js → setup-BUodqoBL.js} +1 -1
- package/dist/assets/{shorten-label-C-X_7vr2.js → shorten-label-dRmYvYJ7.js} +1 -1
- package/dist/assets/simple-select-C-ApYkD4.js +1 -0
- package/dist/assets/{spaces-Bu7-7u79.js → spaces-Bqe6pnFj.js} +1 -1
- package/dist/assets/{start-B1qawsPb.js → start-DCOjCV4F.js} +1 -1
- package/dist/assets/{starting-progress-BfM3wNuj.js → starting-progress-_tZGZM6B.js} +1 -1
- package/dist/assets/{status-LEG00uGL.js → status-DAIZaCUT.js} +1 -1
- package/dist/assets/{step-actions-BzwezgI2.js → step-actions-D_gKO0Cw.js} +1 -1
- package/dist/assets/{studio-Bk9PCaeS.js → studio-DCdXmXUq.js} +1 -1
- package/dist/assets/{switch-control-CRxlGq2g.js → switch-control-Ddqhf44I.js} +1 -1
- package/dist/assets/{table-tips-BMq3WO_p.js → table-tips-BUZ1mtAq.js} +1 -1
- package/dist/assets/{team-DmYSbFMF.js → team-CeANUXFV.js} +7 -7
- package/dist/assets/{th-BmW1qKpZ.js → th-DMcUw_9_.js} +1 -1
- package/dist/assets/{traffic-CzxoP9Vj.js → traffic-CVF4T2v4.js} +1 -1
- package/dist/assets/{transfer-CUe_bnhh.js → transfer-B4X6jlUA.js} +1 -1
- package/dist/assets/ua-parser-DP5omx3I.js +1 -0
- package/dist/assets/{unsubscribe-5Z1xcJ3T.js → unsubscribe-xvziXmXe.js} +1 -1
- package/dist/assets/{use-app-logo-0uziDh86.js → use-app-logo-Cp60-jm5.js} +1 -1
- package/dist/assets/{use-mobile-DLnLSQQq.js → use-mobile-Bjbo_Gou.js} +1 -1
- package/dist/assets/{use-mobile-Db5FIl07.js → use-mobile-CjZIGfWP.js} +1 -1
- package/dist/assets/{use-server-logo-CFlVReBS.js → use-server-logo-uMEEt675.js} +1 -1
- package/dist/assets/{use-window-close-CrHmRyVV.js → use-window-close-Coe8kRfa.js} +1 -1
- package/dist/assets/{useAsync-1_z8P8M4.js → useAsync-B9mMAdx5.js} +1 -1
- package/dist/assets/{useAsync-BKYfrNw7.js → useAsync-tu8lmT7w.js} +1 -1
- package/dist/assets/{useAsyncRetry-Dyo5t1bq.js → useAsyncRetry-n96jNDlD.js} +1 -1
- package/dist/assets/{useLocalStorage-Be_1V0gr.js → useLocalStorage-CPNhajTc.js} +1 -1
- package/dist/assets/user-center-CdyILvwP.js +126 -0
- package/dist/assets/user-follower-Brdja1Pl.js +32 -0
- package/dist/assets/{util-DXaZWduO.js → util-cUwto1hL.js} +1 -1
- package/dist/assets/{util-CQfGbjyT.js → util-d0fh6S9R.js} +1 -1
- package/dist/assets/{vendor-arcblock-DGOH9a3F.js → vendor-arcblock-BzYItNIN.js} +1 -1
- package/dist/assets/{vendor-hooks-DmThWyyG.js → vendor-hooks-tpeT8a0P.js} +2 -2
- package/dist/assets/{vendor-mui-core-BFPsXaTR.js → vendor-mui-core-BPcN1m8_.js} +1 -1
- package/dist/assets/{vendor-mui-x-C6iZOJbV.js → vendor-mui-x-DEgOZXst.js} +1 -1
- package/dist/assets/{vendor-utils-OrZFrHBP.js → vendor-utils-COYaMdo5.js} +1 -1
- package/dist/assets/{vendor-ux-CE4sOH7O.js → vendor-ux-D_B1Y7iC.js} +126 -133
- package/dist/assets/{vi-BPU54RQW.js → vi-B73oWQBC.js} +1 -1
- package/dist/assets/{wait-connect-Rle27g9O.js → wait-connect-B4jNvmkx.js} +1 -1
- package/dist/assets/{wizard-CewJTR0V.js → wizard-BZNmVb4z.js} +1 -1
- package/dist/assets/{wizard-components-B4yvBYZF.js → wizard-components-C5WSLWm-.js} +1 -1
- package/dist/assets/wrap-locale-CsR2MOap.js +1 -0
- package/dist/assets/{zh-Bg-a-bz5.js → zh-BsfsxdYb.js} +1 -1
- package/dist/assets/{zh-WrFfMVyM.js → zh-DCABA61W.js} +1 -1
- package/dist/assets/{zh-tw-DjWFpq-W.js → zh-tw-M_0Y4wmR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +34 -34
- package/dist/assets/api-txzyyizM.js +0 -1
- package/dist/assets/audit-logs-eJR1v94e.js +0 -35
- package/dist/assets/branding-CHRz3wuZ.js +0 -1
- package/dist/assets/button-CaqBEwnu.js +0 -1
- package/dist/assets/domains-BiIZZN7p.js +0 -1
- package/dist/assets/engine-B1U2TY7M.js +0 -1
- package/dist/assets/get-safe-url-3Xj-tgXY.js +0 -1
- package/dist/assets/index-CDCcuLh3.js +0 -7
- package/dist/assets/index-CZp06HHE.js +0 -281
- package/dist/assets/index-D9QTZSnh.js +0 -1
- package/dist/assets/index-D_s4QOu7.js +0 -1
- package/dist/assets/index-Dfmjh5-5.js +0 -124
- package/dist/assets/index-LeqLm9hN.js +0 -55
- package/dist/assets/index-RD-gFG7U.js +0 -113
- package/dist/assets/list-C-9EwvIL.js +0 -2
- package/dist/assets/list-CX2Q1hbc.js +0 -103
- package/dist/assets/localization-DQioZq4I.js +0 -1
- package/dist/assets/logger-DkBs7Soy.js +0 -1
- package/dist/assets/passport-BLmrTDdo.js +0 -1
- package/dist/assets/passport-item-CBB6usyJ.js +0 -1
- package/dist/assets/preferences-Da8NATLw.js +0 -1
- package/dist/assets/profile-embed-9LLnCulK.js +0 -1
- package/dist/assets/publish-resource-Chyv1Trw.js +0 -1
- package/dist/assets/sdk-D4xzRwM9.js +0 -1
- package/dist/assets/simple-select-Bg4XC1E_.js +0 -1
- package/dist/assets/user-center-u6FpYGow.js +0 -126
- package/dist/assets/user-follower-CyGK-1so.js +0 -32
- package/dist/assets/user-sessions-4qrRIOb8.js +0 -1
- package/dist/assets/wrap-locale-qW2Nj5Kt.js +0 -1
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import{g as Wt,r as v}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as y,z as Q,b6 as me,bg as qe,y as V,am as ut,d2 as Bt,bn as qt,at as ae,b1 as mt,W as h,T as ee,U as Je,d3 as pt,b5 as Ke,a5 as Me,Q as Fe,d4 as Ge,aN as Ue,a6 as ft,D as ht,d5 as Kt,ad as xt,d6 as Mt,d7 as Ut,c2 as st,n as Ht,x as $t,bc as Vt,M as it,cw as Jt,I as Gt,d8 as Yt}from"./vendor-mui-core-BFPsXaTR.js";import{A as gt,J as Xt,C as Qt,e as le,F as Zt,a3 as je}from"./vendor-utils-OrZFrHBP.js";import{V as te,H as M,p as ce,s as en,A as bt,a1 as tn,az as nn,m as jt,$ as vt,x as yt,aA as ke,q as St,U as sn,a8 as an}from"./vendor-ux-CE4sOH7O.js";import{aE as rn,Z as Ye,ab as Ct,aX as wt,J as _e,c as _,a0 as Z,o as on,aM as at}from"./index-3yzleS_1.js";import{g as ye,b as $,a as se}from"./vendor-hooks-DmThWyyG.js";import{u as Rt,C as Y}from"./index.esm-JPZAjt0x.js";import{i as He}from"./isURL-DYsELTMk.js";import{S as X}from"./section-DOw43pby.js";import{A as ln,a as cn,b as dn}from"./collapse-D7GlSZQp.js";import{S as Se}from"./shorten-label-C-X_7vr2.js";import{v as Tt}from"./index-IGBGBXd_.js";import{R as Nt,A as un,S as mn,a as pn,B as fn}from"./list-CX2Q1hbc.js";import{j as hn,c as xn,N as gn}from"./team-DmYSbFMF.js";import{W as bn}from"./did-address-BQL5Zxlr.js";import{p as It}from"./util-CQfGbjyT.js";import{D as jn,g as vn}from"./traffic-CzxoP9Vj.js";import{B as Et}from"./bundle-avatar-BFaxogKz.js";import{u as yn}from"./use-mobile-DLnLSQQq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DGOH9a3F.js";import"./required-BPzIdi1N.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./index-DeVDiUjo.js";import"./session-Dnp_ufkx.js";import"./use-app-logo-0uziDh86.js";import"./base32-Cg02gOuu.js";import"./useAsyncRetry-Dyo5t1bq.js";import"./useAsync-1_z8P8M4.js";import"./iframe-DAoobOBi.js";import"./index-BcGECSaf.js";import"./index-DBs9Ljax.js";import"./base-chart-C_jLgGFD.js";import"./index-KpZGUssm.js";import"./vendor-mui-x-C6iZOJbV.js";import"./AdapterDayjs-DyE9ImrK.js";var Te={exports:{}},Ne={exports:{}},Ie={exports:{}},rt;function Sn(){return rt||(rt=1,function(n,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(r){return r==null}n.exports=s.default,n.exports.default=s.default}(Ie,Ie.exports)),Ie.exports}var ot;function Cn(){return ot||(ot=1,function(n,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=u;var t=o(rn()),r=o(Sn());function o(p){return p&&p.__esModule?p:{default:p}}var l=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,b=/^[-+]?[0-9]+$/;function u(p,i){(0,t.default)(p),i=i||{};var N=i.allow_leading_zeroes===!1?l:b,I=!i.hasOwnProperty("min")||(0,r.default)(i.min)||p>=i.min,S=!i.hasOwnProperty("max")||(0,r.default)(i.max)||p<=i.max,j=!i.hasOwnProperty("lt")||(0,r.default)(i.lt)||p<i.lt,E=!i.hasOwnProperty("gt")||(0,r.default)(i.gt)||p>i.gt;return N.test(p)&&I&&S&&j&&E}n.exports=s.default,n.exports.default=s.default}(Ne,Ne.exports)),Ne.exports}var lt;function wn(){return lt||(lt=1,function(n,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=o;var t=r(Cn());function r(l){return l&&l.__esModule?l:{default:l}}function o(l){return(0,t.default)(l,{allow_leading_zeroes:!1,min:0,max:65535})}n.exports=s.default,n.exports.default=s.default}(Te,Te.exports)),Te.exports}var Rn=wn();const Tn=Wt(Rn),ze={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Nn(){const{api:n}=Ye(),{blocklet:s}=Ct(),{t}=te(),{confirmApi:r,confirmHolder:o}=wt(),l=s?.meta?.did,b=Object.assign({...ze},s?.settings?.notification?.email||{}),{handleSubmit:u,control:p,formState:i,watch:N,reset:I}=Rt({defaultValues:gt(b,Object.keys(ze))}),S=ye({testReceiver:"",testReceiverError:""}),j=N("enabled"),E=$(async(a,T,O=!0)=>{try{const{blocklet:D}=await n.configNotification({input:{did:l,notification:JSON.stringify({email:a})}}),re=Object.assign({...ze},D?.settings?.notification?.email||{});I(re),O&&M.success(t("oauth.saveSuccess"))}catch(D){if(O)M.error(D.message||t("oauth.saveFailed"));else throw D}}),J=$(async(a,T,O)=>{try{i.isDirty&&await E(a,T,!1),await n.sendEmail({input:{did:l,receiver:O,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),M.success(t("notification.email.testSuccess"))}catch(D){M.error(D.message||t("notification.email.testfailed"))}}),z=$((a,T)=>{S.testReceiver=localStorage.getItem("test-receiver")||"",S.testReceiverError="",r.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(y,{sx:{width:"300px"},children:e.jsx(Q,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:S.testReceiver,onChange:O=>{S.testReceiver=O.target.value},error:!!S.testReceiverError,helperText:S.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(O){const D=S.testReceiver?.trim();if(!D){S.testReceiverError=t("notification.email.receiverRequired");return}if(!_e(D)){S.testReceiverError=t("notification.email.receiverInvalid");return}S.testReceiverError="",await J(a,T,D),O()}})}),F=$(a=>{const T=a?.trim();return T?_e(T)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),B=$(a=>{const T=a?.trim();return T?He(T,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),w=$(a=>a?Tn(a)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),q=$(a=>a?.trim()?!0:t("notification.email.userRequired")),K=$(a=>a?.trim()?!0:t("notification.email.passwordRequired")),f=$(a=>a?.trim()&&!He(a,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),R=$(a=>a?.trim()&&!_e(a)?t("notification.email.emailInvalid"):!0),C=$(()=>!0);return e.jsxs(y,{children:[e.jsxs(In,{component:"form",onSubmit:u(E),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(X,{title:t("notification.email.enable"),my:2.5,children:e.jsx(Y,{name:"enabled",control:p,render:({field:a})=>e.jsx(me,{control:e.jsx(qe,{checked:a.value,...a})})})}),e.jsx(X,{title:t("notification.email.from"),children:e.jsx(Y,{name:"from",control:p,rules:{validate:j?F:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.host"),children:e.jsx(Y,{name:"host",control:p,rules:{validate:j?B:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",required:!0,error:!!i.errors[a.name],label:t("notification.email.host"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.port"),children:e.jsx(Y,{name:"port",control:p,rules:{validate:j?w:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",required:!0,type:"number",error:!!i.errors[a.name],label:t("notification.email.port"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.user"),children:e.jsx(Y,{name:"user",control:p,rules:{validate:j?q:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",required:!0,error:!!i.errors[a.name],label:t("notification.email.user"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.password"),children:e.jsx(Y,{name:"password",control:p,rules:{validate:j?K:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",required:!0,type:"password",error:!!i.errors[a.name],label:t("notification.email.password"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.secure"),children:e.jsx(Y,{name:"secure",control:p,rules:{validate:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(me,{control:e.jsx(qe,{checked:a.value,...a,disabled:!j})})})})}),e.jsxs(ln,{children:[e.jsxs(cn,{expandIcon:e.jsx(qt,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(ut,{title:t("notification.email.signatureTooltip"),children:e.jsx(Bt,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(dn,{children:[e.jsx(X,{title:t("notification.email.companyName"),children:e.jsx(Y,{name:"companyName",control:p,rules:{validate:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",error:!!i.errors[a.name],label:t("notification.email.companyName"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.companyLink"),children:e.jsx(Y,{name:"companyLink",control:p,rules:{validate:j?f:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",error:!!i.errors[a.name],label:t("notification.email.companyLink"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.companyAddress"),children:e.jsx(Y,{name:"companyAddress",control:p,rules:{validate:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",error:!!i.errors[a.name],label:t("notification.email.companyAddress"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})}),e.jsx(X,{title:t("notification.email.supportEmail"),children:e.jsx(Y,{name:"supportEmail",control:p,rules:{validate:j?R:C},render:({field:a})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...a,size:"small",type:"email",error:!!i.errors[a.name],label:t("notification.email.supportEmail"),helperText:i.errors[a.name]?.message||" ",disabled:!j})})})})]})]}),e.jsxs(y,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(ce,{variant:"outlined",color:"warning",onClick:u(z),disabled:!j,children:t("oauth.runTest")}),e.jsx(ce,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),o]})}const In=ae(mt)``,We={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function En(){const{api:n}=Ye(),{blocklet:s}=Ct(),{t}=te(),{confirmApi:r,confirmHolder:o}=wt(),l=s?.meta?.did,b=Object.assign({...We},s?.settings?.notification?.pushKit||{}),{handleSubmit:u,control:p,formState:i,watch:N,reset:I}=Rt({defaultValues:gt(b,Object.keys(We))}),S=ye({testReceiver:"",testReceiverError:""}),j=N("enabled"),E=$(async(w,q,K=!0)=>{try{const{blocklet:f}=await n.configNotification({input:{did:l,notification:JSON.stringify({pushKit:w})}}),R=Object.assign({...We},f?.settings?.notification?.pushKit||{});I(R),K&&M.success(t("oauth.saveSuccess"))}catch(f){if(K)M.error(f.message||t("oauth.saveFailed"));else throw f}}),J=$(async(w,q)=>{try{i.isDirty&&await E(w,q,!1);const K=(s?.configs||[]).find(C=>C.key==="BLOCKLET_APP_URL")?.value,f=Xt(Qt(K,_.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),R={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:f}}}};await n.sendPush({input:{did:l,receiver:S.testReceiver,notification:JSON.stringify(R)}}),M.success(t("notification.pushKit.testSuccess"))}catch(K){M.error(K.message||t("notification.pushKit.testfailed"))}}),z=$((w,q)=>{S.testReceiverError="",r.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(y,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(Q,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:S.testReceiver,onChange:K=>{S.testReceiver=K.target.value},error:!!S.testReceiverError,helperText:S.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(K){if(!S.testReceiver?.trim()){S.testReceiverError=t("notification.pushKit.receiverRequired");return}S.testReceiverError="",await J(w,q),K()}})}),F=$(w=>{const q=w?.trim();return q?He(q)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),B=$(()=>!0);return e.jsxs(y,{children:[e.jsxs(An,{component:"form",onSubmit:u(E),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(X,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(Y,{name:"enabled",control:p,render:({field:w})=>e.jsx(me,{control:e.jsx(qe,{checked:w.value,...w})})})}),e.jsx(X,{title:t("notification.pushKit.endpoint"),children:e.jsx(Y,{name:"endpoint",control:p,rules:{validate:j?F:B},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...w,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[w.name],helperText:i.errors[w.name]?.message||" ",disabled:!j})})})}),e.jsxs(X,{title:t("notification.pushKit.customOptions"),children:[e.jsx(Y,{name:"did",control:p,render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...w,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[w.name],helperText:i.errors[w.name]?.message||" ",disabled:!j})})}),e.jsx(Y,{name:"pushPath",control:p,render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(Q,{...w,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[w.name],helperText:i.errors[w.name]?.message||" ",disabled:!j})})})]}),e.jsxs(y,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(ce,{variant:"outlined",color:"warning",onClick:u(z),disabled:!j,children:t("oauth.runTest")}),e.jsx(ce,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),o]})}const An=ae(mt)``,ct=[{label:e.jsx(y,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(y,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function kn(){const[n,s]=v.useState(ct[0].value),{locale:t}=v.useContext(en),r=se(()=>({email:e.jsx(Nn,{}),pushKit:e.jsx(En,{})}),[t]),o=v.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(y,{children:[e.jsx(bt,{tabs:ct,current:n,onChange:s}),e.jsx(y,{style:o,children:r[n]})]})}const At=v.createContext({}),{Provider:On,Consumer:Ws}=At;function Dn({children:n,blocklet:s=""}){const{api:t,inService:r,ws:{useSubscription:o}}=Ye(),[l,b]=v.useState([]),[u,p]=v.useState({total:0,pageSize:20,pageCount:0,page:1}),i=se(()=>s.meta?.did,[s]),[N,I]=v.useState([]),[S,j]=v.useState({}),E=se(()=>l.length?new Set(l.map(f=>f.id)):new Set,[l]),J=async({page:f=1,pageSize:R=20,...C}={})=>{if(!i)return[];try{const a={paging:{page:f,pageSize:R},...C,teamDid:i,dateRange:C.dateRange?[Z(C.dateRange[0]).toISOString(),Z(C.dateRange[1]).toISOString()]:void 0},{dids:T,...O}=a;let D="";T&&T.includes("system")&&(D="system");const re=T?T.filter(pe=>pe!=="system"):[],ue={...O,source:D,componentDids:re},oe=await t.getNotificationSendLog({input:ue});return j(ue),b(oe.list),p(oe.paging),oe.list}catch(a){return M.error(a.message),[]}},z=async()=>{const f=await t.getNotificationComponents({input:{teamDid:i}});I(f.componentDids)},F=v.useCallback(f=>{const R=s.children.find(C=>C.meta?.did===f);if(R)return R.ancestors=[s],R},[s]),B=async({notificationId:f,receivers:R,channels:C,...a})=>{await t.resendNotification({input:{teamDid:i,notificationId:f,receivers:R,channels:C.map(T=>T==="wallet"?_.NOTIFICATION_SEND_CHANNEL.WALLET:T==="pushKit"?_.NOTIFICATION_SEND_CHANNEL.PUSH:T),...a}})},w=v.useCallback(async f=>(await t.getUser({input:{teamDid:i,user:{did:f},options:{enableConnectedAccount:!0}}})).user,[t,i]),q=v.useCallback(async({page:f=1,pageSize:R=20,...C}={})=>{try{const a={paging:{page:f,pageSize:R},...C,userName:C.searchText||"",teamDid:i,dateRange:C.dateRange?[Z(C.dateRange[0]).toISOString(),Z(C.dateRange[1]).toISOString()]:void 0};return await t.getReceivers({input:a})}catch(a){throw M.error(a.message),a}},[t,i]);v.useEffect(()=>{i&&z()},[i]),o(_.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,f=>{E.has(f.notificationId)&&J(S)},[E,S]),o(_.EVENTS.NOTIFICATION_BLOCKLET_CREATE,f=>{E.has(f.id)||J(S)},[E,S]);const K={fetch:J,data:l,paging:u,blocklet:s,getComponent:F,resendNotification:B,getUser:w,componentDids:N,getReceivers:q,inService:r,teamDid:i};return e.jsx(On,{value:{notificationRecords:K},children:n})}function Xe(){const{notificationRecords:n}=v.useContext(At);return n}Ce.propTypes={severity:h.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Ln={info:"primary",success:"success",error:"error",warning:"warning"};function Ce({severity:n="info"}){return e.jsx(tn,{type:Ln[n],children:n})}const Pn=(n,s,t="")=>{if(!t||!s)return"";switch(t){case _.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return n("notification.sendStatus.reason.disabled",{channel:s});case _.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return n("notification.sendStatus.reason.unavailable",{channel:s});case _.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return n("notification.sendStatus.reason.notSent",{channel:s});case _.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return n("notification.sendStatus.reason.offline");default:return t}};function kt(n,s,t={}){const{status:r,updatedAt:o,reason:l="",channel:b="wallet"}=t,u=o?n("notification.sendStatus.sentTime",{date:on(o,s)}):"",p=Pn(n,b,l);return r===_.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:n("notification.sendStatus.failed"),sentTime:u,reason:p}:r===_.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:n("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:n("notification.sendStatus.pending"),reason:p,sentTime:u}}const $e={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Ve=["wallet","pushKit","email"],dt=["info","success","error","warning"],Ot=n=>{const{settings:s}=n;return s?.notification?.email?.enabled},Dt=n=>{const{settings:s}=n;return s?.notification?.pushKit?.enabled},Fn=(n,s)=>{const t=le(s,"extra.notifications.email",!0);return{available:Ot(n),enabled:t}},_n=(n,s)=>{const t=le(s,"extra.notifications.push",!0);return{available:Dt(n),enabled:t}},zn=n=>({enabled:le(n,"extra.notifications.wallet",!0)}),Wn=n=>({enabled:le(n,"extra.webhooks",[]).length>0}),Ee=(n=3)=>new Promise(s=>{setTimeout(()=>{s()},n*1e3)}),Bn=(n,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:n("notification.sendStatus.reason.enabled",{channel:s}),fail:n("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:n("notification.sendStatus.reason.available",{channel:s}),fail:n("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:n("notification.sendStatus.reason.enabled",{channel:s}),fail:n("notification.sendStatus.reason.disabled",{channel:s})}]:[],Ae=(n=[])=>{const s=Z().startOf("day");return n.filter(t=>Z(t.sendAt).isSame(s,"day")).length},qn=(n,s="")=>{if(s&&Ve.includes(s)){const l=`${s}SendRecord`,b=le(n,l,[]);return Ae(b)}const t=le(n,"webhook",{}),r=Object.keys(t??{})??[];if(s&&r.includes(s)){const l=t[s]??[];return Ae(l)}const o={};return Ve.forEach(l=>{const b=`${l}SendRecord`,u=le(n,b,[]),p=Ae(u);o[l]=p}),r.length>0&&r.forEach(l=>{const b=t[l]??[],u=Ae(b);o[l]=u}),o},Oe=(n,s,t)=>{if(!Array.isArray(n))throw new Error("Invalid filterList or index");return n[t].splice(s,1),n},De=(n,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(n):!1},Kn=n=>{switch(n){case _.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case _.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case _.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case _.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},Lt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function de({config:n,enableTooltip:s=!0,showTitle:t=!1,children:r=null}){const{status:o,title:l="",sentTime:b="",reason:u=""}=n,p=[l,u].filter(Boolean).join(", ");return e.jsx(ut,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(ee,{color:"inherit",sx:{fontSize:12},children:p}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:$e[o]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:$e[o]}})]}),e.jsx(ee,{color:"inherit",sx:{fontSize:12},children:t?l:r})]})})}de.propTypes={config:h.object.isRequired,enableTooltip:h.bool,showTitle:h.bool,children:h.node};Le.propTypes={list:h.array.isRequired,label:h.string.isRequired,onDelete:h.func};function Le({list:n,label:s,onDelete:t=()=>{}}){const{t:r,locale:o}=te();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(ee,{children:[s,": "]}),n.map(l=>{const b=kt(r,o,{status:l});return e.jsx(Je,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(de,{config:b,enableTooltip:!1,children:b.title})}),onDelete:u=>t(u,l)},l)})]})}Qe.propTypes={filterList:h.array.isRequired,onChange:h.func.isRequired,index:h.number.isRequired,column:h.object.isRequired,filterValues:h.array.isRequired,label:h.string.isRequired,renderLabel:h.func.isRequired};function Qe({filterList:n,onChange:s,index:t,column:r,filterValues:o,label:l,renderLabel:b}){return e.jsxs(V,{className:"filter-container",children:[e.jsx(pt,{component:"legend",children:l}),e.jsx(Ke,{row:!0,children:o.map(u=>e.jsx(me,{control:e.jsx(Me,{checked:n[t].indexOf(u.value??u)>-1,onChange:p=>{const i=[...n];p.target.checked?i[t]=[...i[t],u.value??u]:i[t]=i[t].filter(N=>N!==(u.value??u)),s(i[t],t,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(u)})},u.value??u))})]})}function Be(n){return e.jsx(Qe,{...n,renderLabel:s=>e.jsx(de,{enableTooltip:!1,config:{status:s.status},children:s.label})})}xe.propTypes={status:h.number.isRequired,updatedAt:h.string.isRequired,reason:h.string,channel:h.string,onResend:h.func};function xe({status:n,updatedAt:s,reason:t="",channel:r="wallet",onResend:o}){const{t:l,locale:b}=te(),u=kt(l,b,{status:n,updatedAt:s,reason:t,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(de,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(Fe,{className:"resend-btn",size:"small",startIcon:e.jsx(Ge,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:o,children:l("notification.resend")})]})}Ze.propTypes={value:h.array.isRequired,onChange:h.func};function Ze({value:n,onChange:s}){const{locale:t}=te(),r=Z().toDate(),[o,l]=v.useState(null),b=v.useCallback(i=>{l(o?null:i.currentTarget)},[o]),u=!!o,p=v.useCallback(i=>{if(!i.startDate||!i.endDate){M.error("Please select a date range");return}if(Z(i.startDate).isAfter(i.endDate)||!Z(i.startDate).isValid()||!Z(i.endDate).isValid()){M.error("Invalid date range");return}s([i.startDate,i.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(ee,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Fe,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[at(n[0],t)," - ",at(n[1],t)]})}),e.jsx(Ue,{open:u,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(jn,{open:!0,maxDate:r,initialDateRange:{startDate:n[0],endDate:n[1]},toggle:b,definedRanges:vn(r),onChange:p})})]})}et.propTypes={itemComponent:h.elementType.isRequired};function et({itemComponent:n,...s}){const{t}=te();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:t("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(nn.TableFilterList,{...s,ItemComponent:n})})]})}function tt({label:n,onDelete:s,canDelete:t=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let l=!0;return t&&typeof t=="function"&&(l=t({label:n,...r})),e.jsx(Je,{label:n,variant:"outlined",...o&&l?{onDelete:o}:{}})}tt.propTypes={label:h.string.isRequired,onDelete:h.func,canDelete:h.func};const Mn=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];Pt.propTypes={loading:h.bool,onCancel:h.func,onConfirm:h.func};function Pt({loading:n=!1,onCancel:s=()=>{},onConfirm:t=()=>{}}){const{t:r}=te(),[o,l]=v.useState(Mn),[b,u]=v.useState(!0),p=(N,I)=>{I.checked=N.target.checked;const S=o.map(j=>({...j,checked:j.value===I.value?I.checked:j.checked}));l(S)},i=N=>{N.stopPropagation(),t({channels:o.filter(I=>I.checked).map(I=>I.value),isResendFailedOnly:b})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(ee,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(V,{component:"fieldset",variant:"standard",children:[e.jsx(pt,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Ke,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(N=>e.jsx(me,{control:e.jsx(Me,{checked:N.checked,onChange:I=>p(I,N),name:N.value}),label:N.label},N.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Ke,{children:e.jsx(me,{control:e.jsx(Me,{checked:b,onChange:N=>u(N.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Fe,{onClick:N=>{N.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Fe,{onClick:i,color:"primary",disabled:n,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[n&&e.jsx(ft,{size:16}),r("common.confirm")]})]})]})}Ft.propTypes={notificationId:h.string.isRequired,handleResend:h.func,resending:h.bool};function Ft({notificationId:n,handleResend:s,resending:t=!1}){const{t:r,locale:o}=te(),l=ht(),b=v.useMemo(()=>jt(l,Lt()),[l]),{getReceivers:u,inService:p,teamDid:i,getUser:N,blocklet:I}=Xe(),[S,j]=v.useState(!1),[E,J]=v.useState([]),z=ye({anchorEl:null,position:null}),F=ye({anchorEl:null,position:null}),[B,w]=v.useState(null),[q,K]=v.useState({total:0,pageSize:10,pageCount:0,page:1}),[f,R]=v.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[Z().subtract(1,"month").startOf("day").toDate(),Z().endOf("day").toDate()]}),[C,a]=v.useState([]),T=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],O=async()=>{if(!S&&n)try{j(!0);const c=await u({notificationId:n,...f}),d=c.list.map(m=>({...m,receiverUser:{...m.receiverUser,avatar:It(m.receiverUser.avatar,i,p)}}));J(d),K(c.paging),j(!1)}catch(c){M.error(c.message),j(!1)}};v.useEffect(()=>{O()},[f]);const D=c=>{c.stopPropagation();const d=c.currentTarget;F.anchorEl=d;const m=d.getBoundingClientRect();F.position={top:m.top+window.scrollY,left:m.left+window.scrollX}},re=c=>c.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(ce,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(Ge,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:D,children:r("notification.resend")})}):null,ue={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:q.page-1,rowsPerPage:q.pageSize,count:q.total,searchText:f.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:C,onRowSelectionChange:(c,d)=>{a(d.map(m=>m.dataIndex))},customToolbarSelect:re},oe=({page:c,rowsPerPage:d,searchText:m,filterList:k})=>{const[,U=[],ne=[],G=[]]=k;f.pageSize!==d?R(H=>({...H,pageSize:d,page:1})):f.page!==c+1?R(H=>({...H,page:c+1})):f.searchText!==m?R(H=>({...H,searchText:m,page:1})):je(U,f.walletSendStatus)?je(ne,f.pushKitSendStatus)?je(G,f.emailSendStatus)||R(H=>({...H,emailSendStatus:G,page:1})):R(H=>({...H,pushKitSendStatus:ne,page:1})):R(H=>({...H,walletSendStatus:U,page:1}))},pe=v.useCallback(async(c,d)=>{if(!d)return!1;const m=await N(d);return m?c==="wallet"?zn(m):c==="email"?Fn(I,m):c==="pushKit"?_n(I,m):c==="webhook"?Wn(m):!0:!1},[N,I]),we=v.useCallback(c=>Bn(r,c),[r]),fe=()=>{z.anchorEl=null,z.position=null,w(null)},he=()=>{F.anchorEl=null,F.position=null},g=async(c,d,m=!0,k="")=>{if(!(!d.length||!c.length))try{s(c,d,m,k),F.anchorEl||(await Ee(.5),fe())}catch(U){console.error("handleResend error",{error:U})}},x=async({channels:c,isResendFailedOnly:d})=>{const m=C.map(k=>E[k].receiver);await g(c,m,d),await Ee(.5),he(),a([])},A=async(c,d=[],m=!0)=>{try{await g(["webhook"],[c.receiver],m,d)}catch(k){M.error(k.response?k.response.statusText:k.message)}},L=async(c,d,m,k=[],U=!0)=>{if(c.stopPropagation(),qn(d,m)>=4){M.warning(r("notification.resendLimit"));return}if(!Ve.includes(m)){await A(d,k,U);return}if(c){const G=c.currentTarget,H=G.getBoundingClientRect();z.anchorEl=G,z.position={top:H.top+window.scrollY,left:H.left+window.scrollX}}w({channel:m});try{const G=await pe(m,d.receiver);await Ee(1),w({channel:m,result:G}),(typeof G=="boolean"&&G||Zt(G)&&Object.values(G).every(H=>!!H))&&(await s([m],[d.receiver],U),F.anchorEl||(await Ee(.5),fe()))}catch(G){M.error(G.message)}},W=c=>{R(d=>({...d,dateRange:c,page:1}))},P=(c,d,m,k)=>{c.stopPropagation();const U=m.filter(ne=>ne!==d);R(ne=>({...ne,[k]:U,page:1}))},ie=se(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:c=>{const{receiverUser:d,receiver:m}=E[c];return d?e.jsxs(y,{"data-cy":`member-name-${d.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(vt,{src:`${d.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:m,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(Se,{children:d.fullName})]},m):e.jsx(bn,{size:14,responsive:!1,compact:!0,copyable:!1,did:m})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:f.walletSendStatus??[],customFilterListOptions:{render:c=>e.jsx(Le,{list:c,label:"Wallet",onDelete:(d,m)=>{d.stopPropagation(),P(d,m,ie[1].options.filterList,"walletSendStatus")}}),update:Oe},filterOptions:{names:T,fullWidth:!0,logic:De,display:(c,d,m,k)=>e.jsx(Be,{label:"Wallet",filterList:c,onChange:d,index:m,column:k,filterValues:T})},customBodyRenderLite:c=>{const{walletSendStatus:d,walletSendAt:m,walletSendFailedReason:k}=E[c];return e.jsx(xe,{status:d,updatedAt:m,reason:k,channel:"wallet",onResend:U=>L(U,E[c],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{pushKitSendStatus:d,pushKitSendAt:m,pushKitSendFailedReason:k}=E[c];return e.jsx(xe,{status:d,updatedAt:m,reason:k,channel:"pushkit",onResend:U=>L(U,E[c],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:f.pushKitSendStatus??[],customFilterListOptions:{render:c=>e.jsx(Le,{list:c,label:"Push Kit",onDelete:(d,m)=>{d.stopPropagation(),P(d,m,ie[2].options.filterList,"pushKitSendStatus")}}),update:Oe},filterOptions:{names:T,fullWidth:!0,logic:De,display:(c,d,m,k)=>e.jsx(Be,{label:"Push Kit",filterList:c,onChange:d,index:m,column:k,filterValues:T})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{emailSendStatus:d,emailSendAt:m,emailSendFailedReason:k}=E[c];return e.jsx(xe,{status:d,updatedAt:m,reason:k,channel:"email",onResend:U=>L(U,E[c],"email",[],!1)})},filter:!0,filterType:"custom",filterList:f.emailSendStatus??[],customFilterListOptions:{render:c=>e.jsx(Le,{list:c,label:"Email",onDelete:(d,m)=>{d.stopPropagation(),P(d,m,ie[3].options.filterList,"emailSendStatus")}}),update:Oe},filterOptions:{names:T,fullWidth:!0,logic:De,display:(c,d,m,k)=>e.jsx(Be,{label:"Email",filterList:c,onChange:d,index:m,column:k,filterValues:T})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:c=>{const{webhook:d}=E[c];if(!d)return null;const m=Object.entries(d)[0];if(!m)return null;const[k,U]=m,ne=U[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(Se,{maxLength:30,children:k},k),e.jsx(xe,{status:ne.status,updatedAt:ne.sendAt,reason:ne.failedReason,channel:"webhook",onResend:G=>L(G,E[c],"webhook",[k],!1)})]},k)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:c=>{const{createdAt:d}=E[c];return e.jsx(Nt,{value:d,locale:o,shouldUpdate:!0})}}}],[E,o,f,r]),Re=[e.jsx(Ze,{value:f.dateRange,onChange:W},"date-picker"),e.jsx(ce,{variant:"contained",size:"small",color:"primary",loading:S,startIcon:e.jsx(Kt,{}),onClick:()=>O(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(Hn,{children:e.jsxs(xt,{theme:b,children:[e.jsx(yt,{className:"receivers-table",locale:o,loading:S,columns:ie,data:E,onChange:oe,options:ue,customButtons:Re,components:{TableFilterList:c=>e.jsx(et,{...c,itemComponent:d=>e.jsx(tt,{...d,canDelete:()=>!1})})}}),z.anchorEl&&e.jsx(Ue,{open:!!z.anchorEl,anchorReference:"anchorPosition",anchorPosition:z.position,onClose:fe,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs($n,{children:[e.jsxs(ee,{variant:"body1",component:"div",className:"check-title",children:[B?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(B?.channel).map(c=>{const{type:d,pass:m,fail:k}=c;return!B?.result||B?.result?.[d]?e.jsxs(ee,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:B?.result?.[d]?ke.success.main:"inherit"},children:[B?.result?e.jsx(Mt,{}):e.jsx(ft,{size:12,sx:{color:ke.primary.main}}),e.jsx("span",{children:m})]},d):e.jsxs(ee,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ke.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:k})]},d)})})]})}),F.anchorEl&&e.jsx(Ue,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:he,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Pt,{loading:t,onCancel:he,onConfirm:x})})]})})})}const Un=v.memo(Ft),Hn=ae.div`
|
|
2
|
-
td.MuiTableCell-footer {
|
|
3
|
-
border: none !important;
|
|
4
|
-
}
|
|
5
|
-
.sent-status-cell {
|
|
6
|
-
.resend-btn {
|
|
7
|
-
display: none;
|
|
8
|
-
}
|
|
9
|
-
&:hover {
|
|
10
|
-
.resend-btn {
|
|
11
|
-
display: flex;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`,$n=ae.div`
|
|
16
|
-
padding: 8px 16px;
|
|
17
|
-
.check-title {
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
&::first-letter {
|
|
21
|
-
text-transform: uppercase;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.check-item {
|
|
25
|
-
svg {
|
|
26
|
-
font-size: 16px;
|
|
27
|
-
}
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
}
|
|
30
|
-
`,ve=n=>n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}K`:n;function Vn(n){const{wallet:s,push:t,email:r,webhook:o}=n;return[{name:"Wallet",value:e.jsx(ge,{item:s})},{name:"Push",value:e.jsx(ge,{item:t})},{name:"Email",value:e.jsx(ge,{item:r})},...o.total>0?[{name:"Webhook",value:e.jsx(ge,{item:o,isWebhook:!0})}]:[]]}function Jn(n,s,t){const{wallet:r,push:o,email:l,webhook:b}=n;return[{name:"Wallet",value:e.jsx(be,{loading:t,channel:_.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(be,{loading:t,channel:_.NOTIFICATION_SEND_CHANNEL.PUSH,item:o,onResend:s})},{name:"Email",value:e.jsx(be,{loading:t,channel:_.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...b.total>0?[{name:"Webhook",value:e.jsx(be,{loading:t,channel:_.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:b,isWebhook:!0,onResend:s})}]:[]]}nt.propTypes={statistics:h.object.isRequired,onResend:h.func,mode:h.oneOf(["simple","detail"]),resending:h.bool};ge.propTypes={item:h.object.isRequired,isWebhook:h.bool};function ge({item:n,isWebhook:s=!1}){const{t}=te(),r=s?n.success.length:n.success,o=n.total,l=r===o?"success":"failed";return e.jsx(y,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2},children:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsxs(de,{config:{status:l},enableTooltip:!1,children:[ve(r)," / ",ve(o)," ",t("notification.sendStatus.success")]})})})}be.propTypes={item:h.object.isRequired,isWebhook:h.bool,channel:h.string,onResend:h.func,loading:h.bool};function be({channel:n=_.NOTIFICATION_SEND_CHANNEL.WALLET,item:s,isWebhook:t=!1,onResend:r=()=>{},loading:o=!1}){const{t:l}=te(),{success:b,failed:u,pending:p}=s,i=Kn(n),N=t?b.length:b,I=t?u.length:u,S=t?p.length:p,j=async F=>{F.stopPropagation();const B=t?[...new Set([...b,...u].map(w=>w))]:[];await r([n],[],!0,B)},E=N+I,J=E>0?N/E*100:0,z=E>0?I/E*100:0;return e.jsxs(Gn,{successRatio:J,failedRatio:z,children:[e.jsxs(ee,{variant:"h6",children:[i," (",s.total,")"]}),e.jsxs(ee,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:$e.success,fontWeight:600,fontSize:24},children:ve(N)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(y,{className:"unsent-area",children:[e.jsxs(y,{children:[e.jsxs(de,{config:{status:"failed"},enableTooltip:!1,children:[ve(I)," ",l("notification.sendStatus.failed")]}),e.jsxs(de,{config:{status:"pending"},enableTooltip:!1,children:[ve(S)," ",l("notification.sendStatus.pending")]})]}),I>0&&e.jsx(y,{className:"resend-btn",children:e.jsx(ce,{size:"small",color:"primary",loading:o,variant:"contained",startIcon:e.jsx(Ge,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:j,children:l("notification.resend")})})]})]})}function nt({statistics:n,mode:s="simple",onResend:t=()=>{},resending:r=!1}){const o=se(()=>s==="simple"?Vn(n):Jn(n,t,r),[n,s]);return s==="simple"?e.jsx("div",{children:o.map(l=>e.jsx(Tt,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(st,{container:!0,spacing:2,children:o.map(l=>e.jsx(st,{size:{md:4,sm:6,xs:12},children:l.value},l.name))})}const Gn=ae(y)`
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
align-items: flex-start;
|
|
34
|
-
padding: 16px;
|
|
35
|
-
border-radius: 8px;
|
|
36
|
-
background: ${({successRatio:n,failedRatio:s,theme:t})=>n===0&&s===0?t.palette.grey[300]:`linear-gradient(to right, ${Ht(t.palette.success.light,.4)} ${n}%, ${t.palette.grey[100]} ${n}%)`};
|
|
37
|
-
transition: 'background 0.5s ease';
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
.unsent-area {
|
|
40
|
-
width: 100%;
|
|
41
|
-
position: relative;
|
|
42
|
-
.resend-btn {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;_t.propTypes={notification:h.object.isRequired,onCancel:h.func,blocklet:h.object.isRequired,tab:h.string};function _t({notification:n,onCancel:s=()=>{},blocklet:t,tab:r="info"}){const{t:o,locale:l}=te(),{getComponent:b,resendNotification:u}=Xe(),[p,i]=v.useState(!1),N=se(()=>b(n.componentDid)||t,[t,n.componentDid]),I=ye({tab:r||"info"}),S=v.useCallback(async(f,R,C=!0,a=[])=>{if(!f.length||!n.id)return;const T=R.length>0?R:n?.receivers?.map(D=>D.receiver);if(!T.length)return;let O=[...f];if(O.includes(_.NOTIFICATION_SEND_CHANNEL.PUSH)&&!Dt(t)&&(M.warning(o("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),O=O.filter(D=>D!==_.NOTIFICATION_SEND_CHANNEL.PUSH)),O.includes(_.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!Ot(t)&&(M.warning(o("notification.sendStatus.reason.unavailable",{channel:"Email"})),O=O.filter(D=>D!==_.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!O.length)try{i(!0),await u({notificationId:n.id,receivers:T,channels:O,resendFailedOnly:C,...O.includes("webhook")&&a.length?{webhookUrls:a}:{}}),M.success("Message has been sent!")}catch(D){console.error("handleResend error",{error:D}),M.error(D.response?D.response.statusText:D.message)}finally{i(!1)}},[t,n.id,n?.receivers,u,o]),j=se(()=>hn(n),[n]),E=se(()=>xn(n),[n]),J=se(()=>j?n?.actorInfo:[],[n]),z=se(()=>t?.did||t?.meta?.did||"",[t]);function F(){return[{name:o("notification.from"),value:j&&E?e.jsx(un,{actors:J,teamDid:z,size:32,showName:!0}):e.jsx(mn,{size:32,blocklet:N,showName:!0,hideDot:!0})},{name:o("notification.notificationTitle"),value:e.jsx(Se,{maxLength:50,children:n.title})},{name:o("notification.body"),value:j?e.jsx(pn,{notification:n,blocklet:t}):e.jsx(gn,{notification:n,rows:0})},{name:o("notification.severity"),value:e.jsx(Ce,{severity:n.severity})},{name:o("notification.createdAt"),value:e.jsx(sn,{value:n.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(R=>e.jsx(Tt,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:R.name,children:R.value},R.name))}const B={info:{label:o("common.basicInfo"),value:"info",component:F},receivers:{label:o("notification.receiver"),value:"receivers"},statistics:{label:o("notification.statistics"),value:"statistics"}},w=Object.values(B).map(({label:f,value:R})=>({label:f,value:R})),q=B[I.tab]||B.info,K=f=>{I.tab=f};return e.jsx(St,{title:o("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{I.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(Xn,{children:[e.jsx(y,{className:"tabs",sx:{mx:3},children:e.jsx(bt,{tabs:w,current:I.tab,onChange:K,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[I.tab==="receivers"&&e.jsx(Un,{notificationId:n.id,resending:p,handleResend:S}),I.tab==="statistics"&&e.jsx(nt,{statistics:n.statistics,mode:"detail",resending:p,onResend:S}),I.tab==="info"&&e.jsx(q.component,{})]})]})})}const Yn=v.memo(_t),Xn=ae.div`
|
|
49
|
-
& > .notification-row {
|
|
50
|
-
padding: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.tabs {
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
.body {
|
|
57
|
-
margin-top: 16px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.channel-item {
|
|
61
|
-
display: flex;
|
|
62
|
-
padding: 4px;
|
|
63
|
-
justify-content: flex-start;
|
|
64
|
-
align-items: center;
|
|
65
|
-
gap: 8px;
|
|
66
|
-
> p {
|
|
67
|
-
font-size: 15px;
|
|
68
|
-
}
|
|
69
|
-
.resend-btn {
|
|
70
|
-
svg {
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
}
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
font-size: 12px;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
&.disabled {
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
color: ${ke.text.disabled};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
`;Pe.propTypes={blocklet:h.object,label:h.string};const Qn=ae.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-items: flex-start;
|
|
86
|
-
align-items: center;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
.name {
|
|
89
|
-
display: block;
|
|
90
|
-
max-width: 260px;
|
|
91
|
-
white-space: nowrap;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
text-overflow: ellipsis;
|
|
94
|
-
}
|
|
95
|
-
`;function Pe({blocklet:n=null,label:s=""}){return e.jsx(Qn,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(Et,{size:24,blocklet:n,ancestors:n.ancestors}),e.jsx("span",{className:"name",children:n.title||n.meta?.title})]}):e.jsx("span",{className:"name",children:s})})}zt.propTypes={list:h.array.isRequired,label:h.string.isRequired,onDelete:h.func};function zt({list:n,label:s,onDelete:t=()=>{}}){return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(ee,{children:[s,": "]}),n.map(r=>e.jsx(Je,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(Ce,{severity:r})}),onDelete:o=>t(o,r)},r))]})}function Zn(n){return e.jsx(Qe,{...n,renderLabel:s=>e.jsx(Ce,{severity:s})})}function es({customTableButtons:n}){const{t:s,locale:t}=te(),r=ht(),o=v.useMemo(()=>jt(r,Lt()),[r]),[l,b]=v.useState(!1),{data:u,paging:p,blocklet:i,fetch:N,getComponent:I,componentDids:S,inService:j,teamDid:E}=Xe(),J=v.useRef(null),[z,F]=v.useState(null),[B,w]=v.useState("info"),q=yn(),[K,f]=v.useState(!1),R=`notification-records-${i.meta?.did}`,C=an(R),[a,T]=v.useState({pageSize:C.rowsPerPage||10,page:C.page?C.page+1:1,dids:C.dids||[],dateRange:C.dateRange||[Z().subtract(1,"month").startOf("day").toDate(),Z().endOf("day").toDate()]}),O=se(()=>{if(!i.children||!i.children.length)return[];const g=[];return i.children.forEach(x=>{const A=x.did||x.meta?.did;S.includes(A)&&(x.ancestors=[i],g.push(x))}),g},[S,i]),D=async g=>{try{b(!0),await N(g),b(!1)}finally{b(!1)}};v.useEffect(()=>{D(a)},[a]),v.useEffect(()=>{const g=u.find(x=>x.id===z?.id);z&&g&&F({...g})},[u]);const re=(g,x,A,L)=>{g.stopPropagation();const W=A.filter(P=>P!==x);T(P=>({...P,[L]:W,page:1}))},ue=({page:g,rowsPerPage:x,filterList:A})=>{const[L=[],,,,W=[]]=A;a.pageSize!==x?T(P=>({...P,pageSize:x,page:1})):a.page!==g+1?T(P=>({...P,page:g+1})):je(a.dids,L)?je(a.severities,W)||T(P=>({...P,severities:W,page:1})):T(P=>({...P,dids:L,page:1}))},oe=v.useCallback(()=>{F(null),w("info")},[]),pe=v.useCallback(()=>{N(a)},[N,a]),we=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:g=>g.map((x,A)=>{if(x==="system")return e.jsx("span",{children:s("notification.system")},`system-${A}`);const L=O.find(W=>(W.did||W.meta?.did)===x);return e.jsx(Pe,{blocklet:L,label:L?.title||L?.meta?.title},x)}),update:(g,x,A)=>(g[A].splice(x,1),g)},filterOptions:{names:O,logic:(g,x)=>x.length?!x.includes(g):!1,display:(g,x,A,L)=>e.jsxs(V,{style:{width:"380px"},children:[e.jsx($t,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(Vt,{multiple:!0,value:g[A],renderValue:W=>e.jsx(y,{style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{display:"flex",gap:1,alignItems:"center"},children:W.map(P=>{if(P==="system")return e.jsx("span",{children:s("notification.system")},P);const ie=O.find(Re=>(Re.did||Re.meta?.did)===P);return e.jsx(Pe,{blocklet:ie,label:ie?.title||ie?.meta?.title},P)})}),onChange:W=>{g[A]=W.target.value,x(g[A],A,L)},children:[e.jsx(it,{value:"system",children:s("notification.system")}),O.map(W=>{const P=W.did||W.meta?.did;return e.jsx(it,{value:P,children:e.jsx(Pe,{blocklet:W,label:W.title||W.meta?.title})},P)})]})]})},customBodyRenderLite:g=>{const x=u[g],A=I(x.componentDid);return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[A?e.jsx(Et,{size:32,blocklet:A,ancestors:A.ancestors??[]}):e.jsx(fn,{blocklet:i,size:32}),e.jsx(Se,{maxLength:50,children:A?.meta?.title||i?.meta?.title})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:g=>{const x=u[g],{receivers:A}=x;return e.jsx(Jt,{total:A.length,renderSurplus:L=>L<100?e.jsxs("span",{children:["+",L]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:L=>{L.stopPropagation(),F(x),w("receivers")},children:A.map(L=>{const{receiverUser:W}=L,P=It(W.avatar,E,j);return e.jsx(vt,{alt:W.fullName,src:`${P}?imageFilter=resize&w=48&h=48`,size:32,did:L.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},L.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:g=>{const x=u[g];return e.jsx(y,{onClick:A=>{A.stopPropagation(),F(x),w("statistics")},children:e.jsx(nt,{statistics:x.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:g=>{const x=u[g];return e.jsx(Se,{maxLength:50,children:x.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:g=>{const x=u[g];return e.jsx(Ce,{severity:x.severity})},filter:!0,filterType:"custom",filterList:a.severities??[],customFilterListOptions:{render:g=>e.jsx(zt,{list:g,label:s("notification.severity"),onDelete:(x,A)=>{x.stopPropagation(),re(x,A,we[4].options.filterList,"severities")}}),update:Oe},filterOptions:{names:dt,fullWidth:!0,logic:De,display:(g,x,A,L)=>e.jsx(Zn,{label:s("notification.severity"),filterList:g,onChange:x,index:A,column:L,filterValues:dt})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:g=>{const{createdAt:x}=u[g];return e.jsx(Nt,{value:x,locale:t,shouldUpdate:!0})}}}],fe=g=>{T(x=>({...x,dateRange:g,page:1}))},he=[e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[e.jsx(Gt,{onClick:()=>f(!0),sx:{p:q?0:void 0},children:e.jsx(Yt,{})},"settings"),q?e.jsx(ee,{children:s("common.setting")}):null]}),...n||[]];return e.jsxs(y,{ref:J,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(ts,{children:e.jsx(xt,{theme:o,children:e.jsx(yt,{className:"main-table",verticalKeyWidth:100,loading:l,locale:t,columns:we,data:u,durable:R,onChange:ue,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:p.page-1,rowsPerPage:p.pageSize,count:p.total,...C,onRowClick:(g,{dataIndex:x})=>{F(u[x])}},customPreButtons:[e.jsx(Ze,{value:a.dateRange,onChange:fe})],customButtons:he,components:{TableFilterList:g=>e.jsx(et,{...g,itemComponent:x=>e.jsx(tt,{...x,canDelete:A=>A?.columnNames?.[A?.index||0]?.name==="sender"})})}})})}),z&&e.jsx(Yn,{refresh:pe,onCancel:oe,notification:z,blocklet:i,tab:B}),e.jsx(St,{title:`${s("common.notification")} ${s("common.setting")}`,fullWidth:!0,maxWidth:"md",open:K,onClose:()=>f(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(y,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx(kn,{})})})]})}const ts=ae.div`
|
|
96
|
-
td.MuiTableCell-footer {
|
|
97
|
-
border: none !important;
|
|
98
|
-
}
|
|
99
|
-
.sent-status-cell {
|
|
100
|
-
.resend-btn {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
&:hover {
|
|
104
|
-
.resend-btn {
|
|
105
|
-
display: flex;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.custom-toobar-btns {
|
|
111
|
-
gap: 4px;
|
|
112
|
-
}
|
|
113
|
-
`;ns.propTypes={blocklet:h.object.isRequired,customTableButtons:h.array};function ns({blocklet:n={},customTableButtons:s=[]}){return e.jsx(Dn,{blocklet:n,children:e.jsx(es,{customTableButtons:s})})}export{ns as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as b,a as be}from"./vendor-react-Dvs43sk9.js";import{V as D,H,_ as ye,$ as re,U as V,x as ve,z as Ce}from"./vendor-ux-CE4sOH7O.js";import{j as e,Y as M,bC as K,I as X,aj as G,$ as Q,b1 as q,T as I,ak as c,z as w,F as C,b7 as Te,b5 as le,b6 as ne,a5 as se,a3 as Y,aX as oe,R as ae,Q as z,a6 as Z,W as n,am as we,cb as ce,cc as Se,bb as Ie}from"./vendor-mui-core-BFPsXaTR.js";import{B as Re,o as Ee,l as Ae}from"./index-DeVDiUjo.js";import{u as ke}from"./useAsyncRetry-Dyo5t1bq.js";import{r as We}from"./index-BdHbrnpK.js";import{Z as $,c as k,ab as Ne}from"./index-3yzleS_1.js";import{u as B}from"./team-DmYSbFMF.js";import{u as ue,C as S}from"./index.esm-JPZAjt0x.js";import{o as Pe,b as qe,C as te}from"./vendor-utils-OrZFrHBP.js";import{T as Oe}from"./index-C80JxCSn.js";import{E as Le}from"./empty-spinner-sNq-0DF5.js";import{C as v}from"./click-to-copy-CK42VmRr.js";import{D as _e}from"./delete-confirm-DpKJ9gtf.js";import{r as ze}from"./passport-item-CBB6usyJ.js";import{A as Fe}from"./actions-C4-lIUPY.js";import{T as ie}from"./table-tips-BMq3WO_p.js";import{u as De}from"./use-mobile-DLnLSQQq.js";import"./vendor-hooks-DmThWyyG.js";import"./lottie-web-4koyQiv_.js";import"./useAsync-1_z8P8M4.js";import"./vendor-arcblock-DGOH9a3F.js";import"./session-Dnp_ufkx.js";import"./isURL-DYsELTMk.js";import"./use-app-logo-0uziDh86.js";import"./arrow-down.svg-D3B8bxxx.js";import"./vendor-mui-x-C6iZOJbV.js";import"./AdapterDayjs-DyE9ImrK.js";import"./confirm-CEAKWDZJ.js";import"./index-DBs9Ljax.js";import"./did-address-BQL5Zxlr.js";import"./util-CQfGbjyT.js";import"./base32-Cg02gOuu.js";var de=We();const $e={clientName:"",clientUri:"",redirectUris:"",scope:["profile:read"],contacts:"",tosUri:"",policyUri:""};function pe({onCreated:r,onClose:a}){const[i,h]=b.useState(!1),{t:l,locale:s}=D(),{api:f}=$(),{teamDid:d}=B(),{control:y,handleSubmit:g,formState:{errors:u},watch:W,setValue:m}=ue({defaultValues:$e,mode:"onChange"}),T=W("scope"),R=o=>{o!=="profile:read"&&m("scope",T.includes(o)?T.filter(x=>x!==o):[...T,o])},N=async o=>{h(!0);try{const x={...o,redirectUris:o.redirectUris,contacts:o.contacts?o.contacts.split(",").map(A=>A.trim()):[],scope:o.scope.join(" ")};await f.createOAuthClient({input:{teamDid:d,input:Pe(x,qe)}}),r(x)}catch(x){H.error(x.message||"Failed to create OAuth App")}finally{h(!1)}};return e.jsxs(M,{open:!0,onClose:a,maxWidth:"md",fullWidth:!0,children:[e.jsxs(K,{children:[l("oauth.client.register")," ",e.jsx(X,{onClick:a,sx:{position:"absolute",right:8,top:8},children:e.jsx(G,{})})]}),e.jsx(Q,{children:e.jsxs(q,{spacing:4,sx:{mt:2},children:[e.jsx(I,{variant:"h6",gutterBottom:!0,children:l("oauth.client.requiredInformation")}),e.jsx(c,{children:e.jsx(S,{name:"clientName",control:y,rules:{required:l("oauth.client.validate.clientName"),minLength:{value:3,message:l("oauth.client.validate.clientNameMinLength")}},render:({field:o})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.name"),required:!0,fullWidth:!0,placeholder:l("oauth.client.input.clientNamePlaceholder"),error:!!u.clientName,helperText:u.clientName?.message}),e.jsx(C,{children:l("oauth.client.helperText.clientName")})]})})}),e.jsx(c,{children:e.jsx(S,{name:"clientUri",control:y,rules:{required:l("oauth.client.validate.clientUri"),pattern:{value:/^https?:\/\/.+/,message:l("oauth.client.validate.clientUriInvalid")}},render:({field:o})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.input.clientUri"),required:!0,fullWidth:!0,placeholder:l("oauth.client.input.clientUriPlaceholder"),error:!!u.clientUri,helperText:u.clientUri?.message}),e.jsx(C,{children:l("oauth.client.helperText.clientUri")})]})})}),e.jsx(c,{children:e.jsx(S,{name:"redirectUris",control:y,rules:{required:l("oauth.client.validate.redirectUris"),pattern:{value:/^https?:\/\/.+/,message:l("oauth.client.validate.redirectUrisInvalid")}},render:({field:o})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.input.redirectUris"),required:!0,fullWidth:!0,placeholder:l("oauth.client.input.redirectUrisPlaceholder"),error:!!u.redirectUris,helperText:u.redirectUris?.message}),e.jsxs(c,{sx:{display:"flex",gap:"2px"},children:[e.jsx(C,{children:l("oauth.client.helperText.redirectUris")}),e.jsx(C,{children:l("oauth.client.helperText.read")}),e.jsx(C,{sx:{color:"info.main"},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${s}/oauth-service`,target:"_blank",rel:"noopener noreferrer",children:l("oauth.client.helperText.document")}),e.jsx(C,{children:l("oauth.client.helperText.more")})]})]})})}),e.jsxs(Te,{variant:"outlined",sx:{p:2,display:"none"},children:[e.jsx(I,{variant:"subtitle2",gutterBottom:!0,children:l("oauth.client.input.permissions")}),e.jsx(c,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:2},children:e.jsx(le,{children:Object.entries(k.OAUTH_SCOPES).map(([o,x])=>e.jsx(ne,{control:e.jsx(se,{checked:T.includes(o),onChange:()=>R(o),disabled:o==="profile:read",color:"primary"}),label:e.jsx(c,{children:e.jsx(I,{variant:"body2",sx:{fontWeight:500},children:x})})},o))})})]}),e.jsx(Y,{}),e.jsx(I,{variant:"h6",gutterBottom:!0,children:l("oauth.client.optionalInformation")}),e.jsx(q,{children:e.jsx(S,{name:"contacts",control:y,rules:{pattern:{value:/^$|^[^@\s]+@[^@\s]+\.[^@\s]+(\s*,\s*[^@\s]+@[^@\s]+\.[^@\s]+)*$/,message:l("oauth.client.validate.contacts")}},render:({field:o})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.input.contacts"),fullWidth:!0,placeholder:l("oauth.client.input.contactsPlaceholder"),error:!!u.contacts,helperText:u.contacts?.message}),e.jsx(C,{children:l("oauth.client.helperText.contacts")})]})})}),e.jsxs(q,{direction:{xs:"column",sm:"row"},spacing:2,children:[e.jsx(S,{name:"tosUri",control:y,rules:{pattern:{value:/^$|^https?:\/\/.+/,message:l("oauth.client.validate.tosUriInvalid")}},render:({field:o})=>e.jsxs(c,{sx:{width:"50%"},children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.input.tosUri"),fullWidth:!0,placeholder:l("oauth.client.input.tosUriPlaceholder"),error:!!u.tosUri,helperText:u.tosUri?.message}),e.jsx(C,{children:l("oauth.client.helperText.tosUri")})]})}),e.jsx(S,{name:"policyUri",control:y,rules:{pattern:{value:/^$|^https?:\/\/.+/,message:l("oauth.client.validate.policyUriInvalid")}},render:({field:o})=>e.jsxs(c,{sx:{width:"50%"},children:[e.jsx(w,{size:"small",...o,label:l("oauth.client.input.policyUri"),fullWidth:!0,placeholder:l("oauth.client.input.policyUriPlaceholder"),error:!!u.policyUri,helperText:u.policyUri?.message}),e.jsx(C,{children:l("oauth.client.helperText.policyUri")})]})})]}),u.error&&e.jsx(oe,{severity:"error",children:u.error.message})]})}),e.jsxs(ae,{children:[e.jsx(z,{onClick:a,children:l("common.cancel")}),e.jsxs(z,{onClick:g(N),disabled:i,variant:"contained",color:"primary",children:[i?e.jsx(Z,{size:20,sx:{mr:1}}):null,l("oauth.client.registerButton")]})]})]})}pe.propTypes={onCreated:n.func.isRequired,onClose:n.func.isRequired};function J({scope:r="",...a}){if(!r)return null;const i=r.split(" ").filter(Boolean);return e.jsx(q,{direction:"row",...a,sx:[{flexWrap:"wrap",gap:1},...Array.isArray(a.sx)?a.sx:[a.sx]],children:i.map(h=>e.jsx(be.Fragment,{children:e.jsx(we,{title:k.OAUTH_SCOPES[h],children:e.jsx(v,{children:h})})},h))})}J.propTypes={scope:n.string};const ee=r=>{const{prefix:a}=$(),{blocklet:i}=Ne(),h=te(a,"/api/media/upload",i.appPid),l=b.useCallback(f=>f?f.startsWith("http")?f:`${te(a,"/api/media/upload",i.appPid)}/${f}`:"",[a,i.appPid]);return{clientLogoUrl:b.useMemo(()=>l(r),[r,l]),apiPath:h,getClientLogoUrl:l}},Be=b.lazy(()=>ye(()=>import("./index-D6Y3sCzN.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader})));function he({client:r,onUpdate:a,onClose:i}){const[h,l]=b.useState(!1),{t:s,locale:f}=D(),d=b.useRef(null),{api:y}=$(),{teamDid:g}=B(),{control:u,handleSubmit:W,formState:{errors:m},watch:T,setValue:R,getValues:N}=ue({defaultValues:{clientName:r.clientName||"",clientUri:r.clientUri||"",redirectUris:Array.isArray(r.redirectUris)?r.redirectUris.join(","):"",scope:r.scope?r.scope.split(" "):["profile:read"],contacts:Array.isArray(r.contacts)?r.contacts.join(","):"",tosUri:r.tosUri||"",policyUri:r.policyUri||"",logoUri:r.logoUri||"",clientSecretExpiresAt:r.clientSecretExpiresAt||null},mode:"onChange"}),o=T("scope"),x=T("logoUri"),{clientLogoUrl:A,apiPath:P}=ee(x),E=t=>{t!=="profile:read"&&R("scope",o.includes(t)?o.filter(p=>p!==t):[...o,t])},O=async t=>{const p={clientId:r.clientId,clientName:t.clientName.trim(),clientUri:t.clientUri,redirectUris:t.redirectUris.split(",").map(j=>j.trim()).filter(Boolean),contacts:t.contacts?t.contacts.split(",").map(j=>j.trim()):[],scope:t.scope.join(" "),tosUri:t.tosUri,policyUri:t.policyUri,logoUri:t.logoUri,clientSecretExpiresAt:t.clientSecretExpiresAt?parseInt(t.clientSecretExpiresAt/1e3,10):null};await y.updateOAuthClient({input:{teamDid:g,input:p}})},_=async t=>{l(!0);try{await O(t),a(),i()}catch(p){H.error(p.message||s("oauth.client.updateFailed"))}finally{l(!1)}};return e.jsxs(M,{open:!0,onClose:i,maxWidth:"md",fullWidth:!0,children:[e.jsxs(K,{children:[s("oauth.client.update")," ",e.jsx(X,{onClick:i,sx:{position:"absolute",right:8,top:8},children:e.jsx(G,{})})]}),e.jsx(Q,{children:e.jsxs(q,{spacing:3,sx:{mt:2},children:[e.jsxs(c,{sx:{mb:3},children:[e.jsx(I,{variant:"subtitle1",sx:{fontWeight:500,mb:1},children:s("oauth.client.logo")}),e.jsxs(c,{children:[e.jsx(c,{sx:{width:120,height:120,position:"relative",borderRadius:"4px",overflow:"hidden"},children:A?e.jsx(c,{children:e.jsx("img",{src:A,alt:"client-logo",style:{width:"100%",height:"100%"}})}):e.jsx(c,{onClick:()=>{d.current?.open()},sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"grey.200"},children:e.jsx(ce,{sx:{fontSize:40,color:"common.white"}})})}),e.jsx(z,{sx:{mt:2},variant:"outlined",size:"small",onClick:()=>{d.current?.open()},children:s(A?"common.change":"common.upload")})]}),e.jsx(c,{sx:{display:"flex",alignItems:"center"},children:e.jsx(b.Suspense,{fallback:e.jsx(Le,{}),children:e.jsx(Be,{ref:d,locale:f,popup:!0,onUploadFinish:t=>{R("logoUri",t.data.filename),O(N()).then(()=>{a()}).catch(p=>{H.error(p.message||s("oauth.client.updateFailed"))}).finally(()=>{d.current?.close()})},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:P,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo")})})]}),e.jsx(I,{variant:"subtitle1",sx:{fontWeight:500},children:s("oauth.client.requiredInformation")}),e.jsx(w,{label:"Client Id",fullWidth:!0,value:r.clientId,disabled:!0}),e.jsx(c,{children:e.jsx(S,{name:"clientName",control:u,rules:{required:s("oauth.client.validate.clientName"),minLength:{value:3,message:s("oauth.client.validate.clientNameMinLength")}},render:({field:t})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{...t,label:s("oauth.client.name"),required:!0,fullWidth:!0,error:!!m.clientName,helperText:m.clientName?.message}),e.jsx(C,{children:s("oauth.client.helperText.clientName")})]})})}),e.jsx(c,{children:e.jsx(S,{name:"clientUri",control:u,rules:{required:s("oauth.client.validate.clientUri"),pattern:{value:/^https?:\/\/.+/,message:s("oauth.client.validate.clientUriInvalid")}},render:({field:t})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{...t,label:s("oauth.client.input.clientUri"),required:!0,fullWidth:!0,error:!!m.clientUri,helperText:m.clientUri?.message}),e.jsx(C,{children:s("oauth.client.helperText.clientUri")})]})})}),e.jsx(c,{children:e.jsx(S,{name:"redirectUris",control:u,rules:{required:s("oauth.client.validate.redirectUris"),pattern:{value:/^https?:\/\/.+/,message:s("oauth.client.validate.redirectUrisInvalid")}},render:({field:t})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{...t,label:s("oauth.client.input.redirectUris"),required:!0,fullWidth:!0,multiline:!0,rows:2,error:!!m.redirectUris,helperText:m.redirectUris?.message}),e.jsx(C,{children:s("oauth.client.helperText.redirectUris")})]})})}),e.jsx(S,{name:"clientSecretExpiresAt",control:u,render:({field:t})=>e.jsx(Oe,{placeholder:s("oauth.client.input.expireTime"),value:t.value*1e3,onChange:p=>{t.onChange(p)}})}),e.jsxs(c,{sx:{display:"none"},children:[e.jsx(I,{variant:"subtitle2",sx:{mb:1},children:s("oauth.client.input.permissions")}),e.jsx(c,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:2},children:e.jsx(le,{children:Object.entries(k.OAUTH_SCOPES).map(([t,p])=>e.jsx(ne,{control:e.jsx(se,{checked:o.includes(t),onChange:()=>E(t),disabled:t==="profile:read",color:"primary"}),label:e.jsx(c,{children:e.jsx(I,{variant:"body2",sx:{fontWeight:500},children:p})})},t))})})]}),e.jsx(Y,{}),e.jsx(I,{variant:"subtitle1",sx:{fontWeight:500},children:s("oauth.client.optionalInformation")}),e.jsx(c,{children:e.jsx(S,{name:"contacts",control:u,rules:{pattern:{value:/^$|^[^@\s]+@[^@\s]+\.[^@\s]+(\s*,\s*[^@\s]+@[^@\s]+\.[^@\s]+)*$/,message:s("oauth.client.validate.contacts")}},render:({field:t})=>e.jsxs(e.Fragment,{children:[e.jsx(w,{...t,label:s("oauth.client.input.contacts"),fullWidth:!0,error:!!m.contacts,helperText:m.contacts?.message}),e.jsx(C,{children:s("oauth.client.helperText.contacts")})]})})}),e.jsxs(q,{direction:{xs:"column",sm:"row"},spacing:2,children:[e.jsx(S,{name:"tosUri",control:u,rules:{pattern:{value:/^$|^https?:\/\/.+/,message:s("oauth.client.validate.tosUriInvalid")}},render:({field:t})=>e.jsxs(c,{sx:{width:"50%"},children:[e.jsx(w,{...t,label:s("oauth.client.input.tosUri"),fullWidth:!0,error:!!m.tosUri,helperText:m.tosUri?.message}),e.jsx(C,{children:s("oauth.client.helperText.tosUri")})]})}),e.jsx(S,{name:"policyUri",control:u,rules:{pattern:{value:/^$|^https?:\/\/.+/,message:s("oauth.client.validate.policyUriInvalid")}},render:({field:t})=>e.jsxs(c,{sx:{width:"50%"},children:[e.jsx(w,{...t,label:s("oauth.client.input.policyUri"),fullWidth:!0,error:!!m.policyUri,helperText:m.policyUri?.message}),e.jsx(C,{children:s("oauth.client.helperText.policyUri")})]})})]}),m.error&&e.jsx(oe,{severity:"error",children:m.error.message})]})}),e.jsxs(ae,{children:[e.jsx(z,{onClick:i,children:s("common.cancel")}),e.jsx(z,{onClick:W(_),disabled:h,variant:"contained",color:"primary",children:h?e.jsx(Z,{size:16}):s("common.update")})]})]})}he.propTypes={client:n.shape({clientId:n.string.isRequired,clientName:n.string.isRequired,clientUri:n.string,redirectUris:n.arrayOf(n.string),scope:n.string,contacts:n.arrayOf(n.string),tosUri:n.string,policyUri:n.string,logoUri:n.string,clientSecretExpiresAt:n.number}).isRequired,onUpdate:n.func.isRequired,onClose:n.func.isRequired};function me({client:r,onUpdate:a,onClose:i}){return e.jsx(he,{client:r,onUpdate:h=>a(h),onClose:i})}me.propTypes={client:n.shape({clientId:n.string.isRequired,clientName:n.string.isRequired,clientUri:n.string,redirectUris:n.arrayOf(n.string),scope:n.string,contacts:n.arrayOf(n.string),tosUri:n.string,policyUri:n.string,logoUri:n.string,clientSecretExpiresAt:n.number}).isRequired,onUpdate:n.func.isRequired,onClose:n.func.isRequired};function xe({clientId:r,clientName:a,onDelete:i=()=>{},onClose:h=()=>{}}){const{t:l}=D(),{api:s}=$(),{teamDid:f}=B(),d=()=>{h()},y=async()=>{try{await s.deleteOAuthClient({input:{teamDid:f,clientId:r}}),i()}catch(u){H.error(u?.message)}finally{d()}},g={keyName:a,title:l("oauth.client.delete.title"),description:l("oauth.client.delete.description",{name:`<b>${a}</b>`}),confirmPlaceholder:l("oauth.client.delete.description",{name:a}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:y,onCancel:d};return e.jsx(_e,{keyName:g.keyName,title:g.title,description:g.description,confirmPlaceholder:g.confirmPlaceholder,confirm:g.confirm,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})}xe.propTypes={clientId:n.string.isRequired,clientName:n.string.isRequired,onDelete:n.func,onClose:n.func};function je({title:r,items:a}){return e.jsxs(c,{sx:{mb:3},children:[e.jsx(I,{variant:"h6",sx:{mb:1.5},children:r}),e.jsx(q,{spacing:1.5,children:a.map(({label:i,value:h})=>e.jsxs(c,{sx:{display:"flex",alignItems:"center",gap:2},children:[e.jsx(I,{variant:"subtitle2",color:"textSecondary",sx:{minWidth:200},children:i}),e.jsx(I,{sx:{wordBreak:"break-all"},children:h||"-"})]},i))})]})}je.propTypes={title:n.string.isRequired,items:n.arrayOf(n.shape({label:n.string.isRequired,value:n.any})).isRequired};function ge({client:r,onClose:a}){const{t:i,locale:h}=D(),{teamDid:l}=B(),{clientName:s,clientId:f,clientSecret:d,redirectUris:y,scope:g,clientUri:u,logoUri:W,contacts:m,tosUri:T,policyUri:R,jwksUri:N,jwks:o,softwareId:x,softwareVersion:A,clientIdIssuedAt:P,clientSecretExpiresAt:E,updatedAt:O,createUser:_}=r,{clientLogoUrl:t}=ee(W),p=L=>{try{const F=new URL(window.blocklet.appUrl);return F.pathname=L,F.toString()}catch{return"-"}},j=de.fromAppDid(f,l),U=[{title:i("common.baseInfo"),items:[{label:i("oauth.client.name"),value:s},{label:i("oauth.client.logoUri"),value:e.jsx(re,{variant:"rounded",shape:"square",src:t,did:j.address,size:64})},{label:i("oauth.client.clientUri"),value:u?e.jsx(v,{children:u}):"-"},{label:i("oauth.client.clientId"),value:e.jsx(v,{children:f})},{label:i("oauth.client.clientSecret"),value:e.jsx(v,{children:d})},{label:i("oauth.client.redirectUris"),value:e.jsx(v,{children:(y||[]).join(", ")})},{label:i("oauth.client.scope"),value:e.jsx(J,{scope:g})},{label:i("oauth.client.createUser"),value:_?ze(_,!0):i("oauth.client.openRegistration")}]},{title:i("oauth.client.oauthEndpoints"),items:[{label:i("oauth.client.openidConfiguration"),value:e.jsx(v,{children:p("/.well-known/openid-configuration")})},{label:i("oauth.client.authorizationEndpoint"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/authorize`)})},{label:i("oauth.client.tokenEndpoint"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/token`)})},{label:i("oauth.client.userinfoEndpoint"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/userinfo`)})},{label:i("oauth.client.jwksUri"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/jwks`)})},{label:i("oauth.client.registrationEndpoint"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/register`)})},{label:i("oauth.client.endSessionEndpoint"),value:e.jsx(v,{children:p(`${k.WELLKNOWN_SERVICE_PATH_PREFIX}/oauth/logout`)})}]},{title:i("oauth.client.metaContact"),items:[{label:i("oauth.client.contacts"),value:m.length?e.jsx(v,{children:(m||[]).join(", ")}):"-"},{label:i("oauth.client.tosUri"),value:T?e.jsx(v,{children:T}):"-"},{label:i("oauth.client.policyUri"),value:R?e.jsx(v,{children:R}):"-"},{label:i("oauth.client.jwksUri"),value:N},{label:i("oauth.client.jwks"),value:o},{label:i("oauth.client.softwareId"),value:x},{label:i("oauth.client.softwareVersion"),value:A}]},{title:i("common.timeInfo"),items:[{label:i("oauth.client.clientIdIssuedAt"),value:P?e.jsx(V,{value:P*1e3,type:"all",locale:h}):"-"},{label:i("oauth.client.clientSecretExpiresAt"),value:E?e.jsx(V,{value:E*1e3,type:"all",locale:h}):"-"},{label:i("common.updatedAt"),value:O?e.jsx(V,{value:O,type:"all",locale:h}):"-"}]}].filter(Boolean);return e.jsxs(M,{open:!0,onClose:a,maxWidth:"lg",fullWidth:!0,children:[e.jsxs(K,{children:[i("oauth.client.oauthAppDetails"),e.jsx(X,{onClick:a,sx:{position:"absolute",right:8,top:8},children:e.jsx(G,{})})]}),e.jsx(Q,{children:e.jsx(c,{sx:{mt:1},children:U.map((L,F)=>e.jsxs(c,{children:[e.jsx(je,{title:L.title,items:L.items}),F!==U.length-1&&e.jsx(Y,{sx:{my:2}})]},L.title))})})]})}ge.propTypes={client:n.object.isRequired,onClose:n.func.isRequired};function Ve(r){return e.jsx(V,{value:r*1e3})}function fe({selected:r=null,onClose:a}){return r?e.jsx(ge,{client:r,onClose:a}):null}fe.propTypes={selected:n.object,onClose:n.func.isRequired};function Ue({open:r,onCreated:a,onClose:i}){return r?e.jsx(pe,{onCreated:a,onClose:i}):null}Ue.propTypes={open:n.bool.isRequired,onCreated:n.func.isRequired,onClose:n.func.isRequired};function Tt(){const[r,a]=b.useState({searchText:"",pageSize:10,page:1}),[i,h]=b.useState(null),[l,s]=b.useState(!1),f=b.useRef(null),{t:d,locale:y}=D(),{api:g}=$(),{teamDid:u}=B(),[W,m]=b.useState(null),[T,R]=b.useState(null),N=De(),{getClientLogoUrl:o}=ee(),x=ke(async()=>await g.getOAuthClients({input:{teamDid:u,paging:{page:r.page,pageSize:r.pageSize}}}),[r.page,r.pageSize]),{loading:A}=x,P=b.useMemo(()=>x.value?.list||[],[x.value?.list]),E=b.useMemo(()=>r.searchText?P.filter(t=>t.clientName.toLowerCase().includes(r.searchText.toLowerCase())||t.clientId.toLowerCase().includes(r.searchText.toLowerCase())||t.scope.toLowerCase().includes(r.searchText.toLowerCase())):P,[r.searchText,P]),O=b.useMemo(()=>[{label:d("oauth.client.name"),name:"clientName",options:{customBodyRender:(t,{rowIndex:p})=>{const j=E[p],U=o(j.logoUri),L=de.fromAppDid(j.clientId,u);return e.jsx(c,{sx:{display:"flex",alignItems:"center",gap:2},children:e.jsxs(c,{sx:{display:"flex",alignItems:"center",gap:2,cursor:"pointer"},children:[e.jsx(re,{variant:"rounded",shape:"square",did:L.address,src:U,size:48}),e.jsxs(q,{sx:{gap:.5},children:[e.jsx(c,{sx:{color:"text.primary"},children:j.clientName}),e.jsx(c,{sx:{color:"text.secondary"},children:j.clientUri})]})]})})}}},{label:d("oauth.client.clientId"),name:"clientId"},{label:d("oauth.client.scope"),name:"scope",options:{customBodyRender:t=>e.jsx(J,{scope:t})}},{label:d("common.createdAt"),name:"clientIdIssuedAt",options:{customBodyRender:Ve}},{label:d("common.createdBy"),name:"createdBy",width:100,options:{customBodyRender:t=>t?e.jsx(Re,{showDid:!0,did:t,cardType:Ae.Detailed,infoType:Ee.Minimal,sx:{border:0,padding:0}}):d("oauth.client.openRegistration")}},{label:d("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRender:(t,{rowIndex:p})=>{const j=E[p];return e.jsx(Fe,{actions:[{icon:e.jsx(Se,{}),text:d("common.edit"),onClick:U=>{U.stopPropagation(),m(j)}},{icon:e.jsx(Ie,{}),text:d("common.delete"),onClick:U=>{U.stopPropagation(),R(j)}}]})}}}],[E,d,o,u,m,R]),_=({page:t,rowsPerPage:p,searchText:j})=>{r.pageSize!==p?a(U=>({...U,searchText:"",pageSize:p,page:1})):r.page!==t+1?a(U=>({...U,searchText:"",page:t+1})):r.searchText!==j&&a(U=>({...U,searchText:j,page:1}))};return e.jsxs(c,{ref:f,sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[N?e.jsx(ie,{title:d("oauth.client.listTitle"),tooltipTitle:d("oauth.client.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${y}/oauth-service`}):null,e.jsx(ve,{data:E,columns:O,options:{sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,page:r.page-1,rowsPerPage:r.pageSize,count:E.length,searchDebounceTime:400,onRowClick(t,{dataIndex:p},j){if(f.current?.contains(j.target)){const U=E[p];h(U)}}},onChange:_,title:N?null:e.jsx(ie,{title:d("oauth.client.listTitle"),tooltipTitle:d("oauth.client.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${y}/oauth-service`}),customButtons:[e.jsxs(z,{variant:"contained",size:"small",onClick:()=>s(!0),children:[A?e.jsx(Z,{size:16}):e.jsx(ce,{style:{fontSize:16}}),d("common.create")]},"add")],loading:!1,emptyNode:e.jsx(Ce,{children:d("oauth.client.empty")})}),e.jsx(fe,{selected:i,onClose:()=>h(null)}),e.jsx(Ue,{open:l,onCreated:()=>{s(!1),x.retry()},onClose:()=>s(!1)}),W&&e.jsx(me,{client:W,onUpdate:x.retry,onClose:()=>m(null)}),T&&e.jsx(xe,{...T,onDelete:x.retry,onClose:()=>R(null)})]})}export{Tt as default};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import{r as i}from"./vendor-react-Dvs43sk9.js";import{j as t,b4 as _,W as n,D as F,n as xe,b0 as ye,co as be,cu as ve,cv as je,cw as we,ak as g,T as q,Q as ke,a$ as te,a3 as Ie,s as Me,J as Re,I as Ce,at as Ae}from"./vendor-mui-core-BFPsXaTR.js";import{a as D,b as O,h as Te}from"./vendor-hooks-DmThWyyG.js";import{V as Q,U as Ne,a2 as ne,s as re,Z as $e}from"./vendor-ux-CE4sOH7O.js";import{t as Se}from"./server-logo-notext.svg-CKQB0tIp.js";import{B as Le}from"./bundle-avatar-BFaxogKz.js";import{a as ze,g as se,i as oe,b as ie,c as V,M as ae,d as Ee,m as De,e as Be,f as Pe,h as qe,j as Ve,k as _e,l as Fe,n as Oe,N as Ue}from"./team-DmYSbFMF.js";import{R as He,J as We,C as J,a as U}from"./vendor-utils-OrZFrHBP.js";import{c as Qe,Z as Je}from"./index-3yzleS_1.js";import{B as Ke,o as Xe,l as Ze}from"./index-DeVDiUjo.js";import{p as Ge}from"./util-CQfGbjyT.js";function le({blocklet:e,style:r={},size:s=40,...o}){const l=ze({blocklet:e,square:!0}),{variant:u}=o;return t.jsx(_,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},r),...o,children:t.jsx("img",{src:l,alt:"",style:{width:s}})})}le.propTypes={blocklet:n.object.isRequired,style:n.object,size:n.oneOfType([n.number,n.string])};function Ye(e){return e.includes(" ")?new Date(e.replace(" ","T").replace(" ","")).getTime():new Date(e).getTime()}function K({value:e="",shouldUpdate:r=!1,...s}){const{locale:o}=Q(),[l,u]=i.useState(0);if(i.useEffect(()=>{let d;if(r){const h=new Date(e).getTime(),y=Date.now(),v=Math.abs(Math.floor((h-y)/1e3)),b=()=>{u(k=>{const C=Math.random()*1e3;return parseFloat((k+C).toFixed(4))})};v<60?d=setInterval(b,1e3):v<60*60?d=setInterval(b,6e4):d=setInterval(b,36e5)}return()=>{clearInterval(d)}},[e,l,r]),!e)return"-";const m=Ye(e);return t.jsx(Ne,{value:m,locale:o,...s})}K.propTypes={value:n.any,shouldUpdate:n.bool};const et={error:je,warning:ve,info:be,success:ye};ce.propTypes={severity:n.oneOf(["error","warning","info","success"]).isRequired,size:n.number};function ce({severity:e="info",size:r=32}){const s=F(),l=D(()=>({error:s.palette.error.main,warning:s.palette.warning.main,info:s.palette.info.main,success:s.palette.success.main}))[e],u=et[e],m=xe(l,.1);return t.jsx(_,{sx:{width:r,height:r,bgcolor:m,color:l},children:t.jsx(u,{fontSize:"small"})})}const tt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M5.821 4.91c3.898-2.765 9.469-2.539 13.073.536c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447-7.965 4.583-12.231 2.805l-.232-.101l-4.375.931l-.075.013l-.11.009l-.113-.004l-.044-.005l-.11-.02l-.105-.034l-.1-.044l-.076-.042l-.108-.077l-.081-.074l-.073-.083l-.053-.075l-.065-.115l-.042-.106l-.031-.113l-.013-.075l-.009-.11l.004-.113l.005-.044l.02-.11l.022-.072l1.15-3.451l-.022-.036C.969 12.45 1.97 7.805 5.59 5.079l.23-.168z"/></g>'},nt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 2a5 5 0 1 1-5 5l.005-.217A5 5 0 0 1 12 2zm2 12a5 5 0 0 1 5 5v1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-1a5 5 0 0 1 5-5h4z"/></g>'},rt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34zM12 6a1 1 0 0 0-1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1-.866-.398l-.068-.101a1 1 0 0 0-1.732.998a3 3 0 0 0 2.505 1.5H11a1 1 0 0 0 .883.994L12 18a1 1 0 0 0 1-1l.176-.005A3 3 0 0 0 13 11V9c.358-.012.671.14.866.398l.068.101a1 1 0 0 0 1.732-.998A3 3 0 0 0 13.161 7H13a1 1 0 0 0-1-1zm1 7a1 1 0 0 1 0 2v-2zm-2-4v2a1 1 0 0 1 0-2z"/></g>'},st={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-5.5 8.28"/></g>'},ot={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 10l-4 4l6 6l4-16l-18 7l4 2l2 6l3-4"/>'},Y={comment:{icon:tt,bgColor:"rgba(239, 246, 255, 1)",color:"rgba(43, 127, 255, 1)"},like:{icon:"👍",bgColor:"rgba(244, 244, 245, 1)",color:"yellow",renderType:"emoji"},follow:{icon:nt,bgColor:"rgba(238, 242, 255, 1)",color:"rgba(97, 95, 255, 1)"},tips:{icon:rt,bgColor:"rgba(254, 252, 232, 1)",color:"rgba(240, 177, 0, 1)"},mention:{icon:st,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"},assign:{icon:ot,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"}};de.propTypes={activity:n.oneOf(["comment","like","follow","tips","mention","assign"]).isRequired,size:n.number};function de({activity:e,size:r=32}){const s=Y[e]||Y.comment,o=s.icon;return t.jsx(_,{sx:{bgcolor:s.bgColor,color:s.color,width:r,height:r},children:s.renderType==="emoji"?t.jsx("span",{style:{fontSize:"14px"},children:o}):t.jsx(ne,{icon:o})})}const H={avatar:n.string,fullName:n.string,did:n.string};function W({actor:e,size:r,teamDid:s="",inService:o=!1,showName:l=!1}){const u=D(()=>({...e,avatar:e?.avatar?Ge(e.avatar,s,o):null}),[e,s,o]),m=d=>{e&&(d.stopPropagation(),window.open(We(J(Qe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),"_blank"),d.customPreventRedirect=!0)};return t.jsxs(g,{onClick:m,role:"button",style:{cursor:"pointer"},title:e?.fullName||"",sx:{display:"flex",alignItems:"center",gap:1},children:[u.avatar?t.jsx(Ke,{user:u,showDid:!0,cardType:Ze.AvatarOnly,infoType:Xe.Minimal,avatarSize:r,shape:"circle",sx:{width:r,height:r,borderRadius:"100%",overflow:"hidden",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.1)"}}}):t.jsx(_,{sx:{width:r,height:r}}),l&&t.jsx("span",{children:e?.fullName})]})}W.propTypes={actor:n.shape(H).isRequired,size:n.number.isRequired,teamDid:n.string,inService:n.bool,showName:n.bool};X.propTypes={actors:n.oneOfType([n.shape(H),n.arrayOf(n.shape(H))]).isRequired,size:n.number,maxDisplay:n.number,teamDid:n.string,inService:n.bool,showName:n.bool,avatarFallback:n.node};function X({actors:e,size:r=32,maxDisplay:s=9,teamDid:o="",inService:l=!0,showName:u=!1,avatarFallback:m=null}){const d=D(()=>{const h=Array.isArray(e)?e:[e];return He(h,"did").filter(Boolean)},[e]);return d.length===1||!d.length?t.jsx(W,{actor:d[0],size:r,teamDid:o,inService:l,showName:u}):t.jsx(we,{total:d.length,renderSurplus:h=>h<100?t.jsxs("span",{children:["+",h]}):t.jsx("span",{children:"99+"}),max:s,sx:{justifyContent:"flex-end",height:`${r}px`,".MuiAvatar-root":{width:`${r}px`,height:`${r}px`,fontSize:`${r/2.5}px`,border:0,zIndex:2}},children:d.map((h,y)=>h?.avatar?t.jsx(W,{actor:h,size:r,teamDid:o,inService:l},h?.did||y):m)})}const ee=3;he.propTypes={notification:n.object.isRequired,isMultiple:n.bool,blocklet:n.object,mountPoint:n.string,avatarFallback:n.node};ue.propTypes={notification:n.object.isRequired,mountPoint:n.string};pe.propTypes={items:n.array.isRequired,activity:n.object.isRequired,blocklet:n.object,mountPoint:n.string,viewMoreLink:n.string,avatarFallback:n.node};function ue({notification:e,mountPoint:r=""}){const{activity:s}=e,{type:o,meta:l={}}=s||{},u=ie({activity:s,users:[e?.actorInfo],actors:[e?.activity?.actor],mountPoint:r});return U(s)||!s.type||!s.actor||U(s.target)?null:t.jsxs(g,{children:[t.jsx(q,{variant:"body1",sx:{color:"text.secondary",mb:.5,wordBreak:"break-all"},children:u}),l?t.jsx(ae,{meta:l,type:o}):null]})}function pe({items:e,activity:r,blocklet:s,mountPoint:o="",viewMoreLink:l="",avatarFallback:u=null}){const m=F(),{t:d}=Q(),h=D(()=>s?.did||s?.meta?.did||"",[s]),{locale:y}=i.useContext(re),v=D(()=>!U(r.meta)&&Object.values(r.meta).some(a=>a!=null),[r]),b=ie({activity:r,users:e.map(a=>a?.actorInfo),actors:e.map(a=>a?.activity?.actor),mountPoint:o}),k=O(a=>{if(!a.activity)return null;const x=se(a.activity);return x?.metaLink?oe(x?.metaLink)?x?.metaLink:J(o,x.metaLink):null}),C=O((a,x)=>{if(!x)return;const p=k(x);p&&(window.open(p,"_blank"),a.customPreventRedirect=!0)}),$=e.length>ee,w=e.slice(0,ee);return t.jsxs(g,{sx:{width:"100%"},children:[t.jsx(q,{variant:"body1",sx:{color:"text.secondary",mb:3},children:b}),v?t.jsxs(g,{className:"sub-content",sx:{display:"flex",flexDirection:"column",gap:3},children:[w.map(a=>t.jsxs(g,{onClick:x=>C(x,a),sx:{display:"flex",flexDirection:"column",gap:1},children:[t.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[V(a)?t.jsx(X,{actors:a.actorInfo,size:32,teamDid:h}):u,t.jsx(q,{variant:"subtitle1",sx:{color:"text.primary"},children:V(a)?a?.actorInfo?.fullName:"System"})," ","·",t.jsx(K,{value:a.createdAt,locale:y,shouldUpdate:!0,style:{color:m.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),a.activity.meta?t.jsx(g,{sx:{pl:5},children:t.jsx(ae,{meta:a.activity.meta,type:a.activity.type})}):null]},a.id)),$&&l?t.jsx(g,{sx:{mt:1,display:"flex",justifyContent:"center"},children:t.jsxs(ke,{size:"large",variant:"text",component:te,href:l,target:"_blank",rel:"noopener noreferrer",onClick:a=>{a.customPreventRedirect=!0},children:[d("notification.viewMore")," ",t.jsx(ne,{icon:Ee,style:{marginLeft:4}})]})}):null]}):null]})}function he({notification:e,isMultiple:r=!1,blocklet:s,mountPoint:o="",avatarFallback:l}){const u=D(()=>{if(!e.activity)return null;const m=se(e.activity);return m?.targetLink?oe(m?.targetLink)?m?.targetLink:J(o,m.targetLink):null},[e.activity,o]);return r?t.jsx(pe,{items:e.items,activity:e.activity,blocklet:s,mountPoint:o,viewMoreLink:u,avatarFallback:l}):t.jsx(ue,{notification:e,mountPoint:o})}function me({notification:e}){const r=i.useMemo(()=>{const{actions:s,action:o}=e;let l=s??[];return!l.length&&o&&(l=[{name:"Visit",link:o}]),l},[e]);return r.length?t.jsx(g,{sx:{display:"flex",justifyContent:"start",flexWrap:"wrap",alignItems:"center",gap:1},children:r.map((s,o)=>t.jsxs(i.Fragment,{children:[t.jsx(te,{href:s.link,target:"_blank",className:"link",rel:"noopener noreferrer",sx:{fontSize:"15px"},onClick:l=>{l.customPreventRedirect=!0},children:s.name},s.link),o<r.length-1?t.jsx(Ie,{orientation:"vertical",sx:{height:12,borderWidth:"1px"}}):null]},s.link))}):null}me.propTypes={notification:n.object.isRequired};const it=Me(g)`
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
height: 100%;
|
|
7
|
-
min-height: 500px;
|
|
8
|
-
color: #999;
|
|
9
|
-
.empty-icon {
|
|
10
|
-
margin: 10px 0;
|
|
11
|
-
}
|
|
12
|
-
`;function fe({children:e=null,...r}){const s=Je(),l=F().palette.mode==="dark";return t.jsxs(it,{...r,children:[t.jsx("img",{src:`${s.imgPrefix}/${l?"all-done-dark":"all-done-light"}.svg`,alt:"All Done",width:120,height:120,style:{maxHeight:"100%",maxWidth:"100%"},onError:u=>{u.target.style.display="none"}}),t.jsx(g,{className:"empty-content",children:e})]})}fe.propTypes={color:n.string,children:n.any};at.propTypes={data:n.array,blockletMap:n.object,onReadBatch:n.func,inDialog:n.bool,highlightId:n.string,highlight:n.bool,type:n.oneOf(["server","service"])};ge.propTypes={notification:n.object,blocklet:n.object,onReadBatch:n.func,inDialog:n.bool,highlight:n.bool};P.propTypes={blocklet:n.object,size:n.number,showName:n.bool,hideDot:n.bool};function P({blocklet:e,size:r=40,showName:s=!1,hideDot:o=!1}){const l=e?.did||e?.meta?.did||"",u=(e?.alsoKnownAs||[]).concat(e?.appId||e?.appDid||e?.appPid||"");return t.jsxs(g,{className:"component-avatar",sx:{display:"flex",alignItems:"center",gap:o?"8px":"4px"},children:[!o&&t.jsx("span",{className:"dot"}),e?t.jsx(g,{children:u.includes(l)?t.jsx(le,{blocklet:e,size:r,style:{borderRadius:8}}):t.jsx(Le,{blocklet:e,ancestors:e.ancestors??[],size:r,style:{borderRadius:8}})}):t.jsx(Se,{width:r,height:r}),s&&t.jsx("span",{className:"component-name",children:e?.meta?.title})]})}function ge({notification:e,blocklet:r,onReadBatch:s=()=>{},inDialog:o=!1,highlight:l}){const{locale:u}=i.useContext(re),m=F(),d=Re(p=>p.breakpoints.down("md")),h=i.useRef(null),y=i.useMemo(()=>qe(e),[e]),v=i.useMemo(()=>Ve(e),[e]),b=i.useMemo(()=>V(e),[e]),k=i.useMemo(()=>e.items||[],[e]),C=i.useMemo(()=>k.length>0,[k]),$=i.useMemo(()=>v?C?k.map(p=>V(p)?p.actorInfo:{did:p.activity?.actor}).filter(Boolean):e.actorInfo??[]:[],[k,e.actorInfo,C,v]),w=i.useMemo(()=>r?.did||r?.meta?.did||"",[r]),a=i.useMemo(()=>_e(w,window.blocklet),[w]),x=O((p,S)=>{const A=Fe(p);if(A.length&&s(A.map(R=>R.id)),S&&!S.customPreventRedirect){const R=Oe(p,a);R&&typeof R=="string"&&window.open(R,"_blank","noopener,noreferrer")}});return t.jsxs(lt,{ref:h,className:"notification-row",id:e.id,isRead:y,inDialog:o,highlight:l,isMd:d,onClick:p=>x(e,p),children:[v?t.jsx(de,{activity:e.activity.type,size:d?24:32}):t.jsx(ce,{severity:e.severity,size:d?24:32}),t.jsxs(g,{className:"notification",sx:{display:"flex",flexDirection:"column",alignItems:"start"},children:[t.jsxs(g,{className:"header",sx:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,mb:1.5},children:[v&&b?t.jsx(X,{actors:$,teamDid:w,size:d?24:32,avatarFallback:t.jsx(P,{blocklet:r,hideDot:!0,size:d?24:32})}):t.jsx(P,{blocklet:r,hideDot:!0,size:d?24:32}),t.jsx(K,{value:e.createdAt,locale:u,shouldUpdate:!0,style:{color:m.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),v?t.jsx(he,{notification:e,isMultiple:C,blocklet:r,mountPoint:a,avatarFallback:t.jsx(P,{blocklet:r,hideDot:!0,size:d?24:32})}):t.jsxs(t.Fragment,{children:[t.jsx(q,{variant:"body1",className:"title",sx:{color:"rgba(24, 24, 27, 1)",mt:0,mb:.5},children:e.title}),t.jsx(Ue,{notification:e,rows:o?0:2})]}),t.jsx(me,{notification:e})]}),e?.description&&e.severity==="error"&&t.jsx(g,{className:"copy-button",children:t.jsx(Ce,{size:"small",children:t.jsx($e,{sx:{fontSize:22},content:e?.description||""})})})]})}function at({data:e,blockletMap:r,onReadBatch:s=()=>{},inDialog:o=!1,highlightId:l,highlight:u=!1,type:m="service"}){const{t:d}=Q(),h=i.useRef(null),[y,v]=i.useState(!1),[b,k]=i.useState(!0),[C,$]=i.useState(!1),w=i.useRef(new Set),a=i.useRef(new Set),x=i.useRef(null),p=i.useRef(null),S=i.useRef(!1),A=i.useRef(null),R=i.useMemo(()=>o?e?.slice(0,5):e,[o,e]),L=i.useMemo(()=>De(R),[R]),z=i.useMemo(()=>{const c=new Map;return L&&L.length&&L.forEach(f=>{c.set(f.id,f)}),c},[L]);i.useEffect(()=>{const c=()=>{k(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",c),()=>{document.removeEventListener("visibilitychange",c)}},[]);const B=i.useCallback(()=>{if(!o&&w.current.size>0){const c=[];w.current.forEach(f=>{if(a.current.has(f))return;const I=z.get(f);if(I){const{receivers:T=[],items:N=[]}=I;if(T.length&&!T[0].read&&(c.push(f),a.current.add(f),N.length>0&&N.forEach(j=>{const M=j.id;M&&!a.current.has(M)&&(c.push(M),a.current.add(M))}),p.current)){const j=document.getElementById(f);j&&p.current.unobserve(j)}}}),c.length>0&&(s(c),setTimeout(()=>{v(!1)},300)),w.current.clear()}},[o,z,s]),Z=i.useCallback(()=>{A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{B()},50)},[B]),E=i.useCallback(()=>{if(o||!h.current||!b)return;p.current&&p.current.disconnect();const c={root:null,rootMargin:"0px",threshold:.5},f=new IntersectionObserver(T=>{y&&T.forEach(N=>{const j=N.target.id;if(a.current.has(j))return;const M=z.get(j);if(M){const{receivers:G=[]}=M;G.length&&!G[0].read&&(N.isIntersecting?(w.current.add(j),Z()):w.current.delete(j))}})},c);p.current=f,Array.from(h.current.querySelectorAll(".notification-row")).filter(T=>{const N=T.id;if(a.current.has(N))return!1;const j=z.get(N);if(j){const{receivers:M=[]}=j;return M.length&&!M[0].read}return!1}).forEach(T=>{f.observe(T)}),S.current=!1},[y,o,b,z,Z]);return i.useEffect(()=>{o||(S.current=!0,p.current&&b&&y&&setTimeout(()=>{E()},0))},[R,y,b,E,o]),i.useEffect(()=>{if(o||!h.current||!b)return;let c=window;if(m==="server"&&(c=document.getElementById("arc__dashboard-main")),!c){const I=document.getElementsByClassName("dashboard-main")[0];I&&(c=I)}if(!c)return;const f=I=>{I.isTrusted&&(y||v(!0),$(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{$(!1),B(),S.current&&E()},300))};return c.addEventListener("scroll",f,{passive:!0}),()=>{c.removeEventListener("scroll",f),x.current&&clearTimeout(x.current),A.current&&clearTimeout(A.current)}},[o,y,b,B,E,m]),i.useEffect(()=>(o||E(),()=>{p.current&&p.current.disconnect()}),[E,o]),Te(()=>{setTimeout(()=>{const c=Be(h.current),f=Pe(z,c);s(f.map(I=>I.id))},100)}),L?.length?t.jsx(g,{ref:h,sx:{display:"flex",flexDirection:"column",...o?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:L?.map(c=>{const f=c.source==="system"?r.get(c.entityId||c.sender):r.get(c.componentDid||c.sender);return c?.type?.toLowerCase()==="passthrough"?null:t.jsx(ge,{highlight:u&&l===c.id,inDialog:o,notification:c,blocklet:f,onReadBatch:s},c.id)})}):t.jsx(fe,{children:d("notification.allDone")})}const lt=Ae(g)`
|
|
13
|
-
@keyframes flash-bg {
|
|
14
|
-
0% {
|
|
15
|
-
background-color: ${e=>e.theme.palette.warning.light};
|
|
16
|
-
}
|
|
17
|
-
100% {
|
|
18
|
-
background-color: unset;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
position: relative;
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: flex-start;
|
|
24
|
-
gap: ${e=>e.isMd?e.theme.spacing(1):e.theme.spacing(1.5)};
|
|
25
|
-
padding: ${e=>e.isMd?`${e.theme.spacing(2)} 0`:e.theme.spacing(3)};
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
animation: ${e=>e.highlight?"flash-bg 3s ease-out 0s 1 normal none running":"none"};
|
|
28
|
-
background-color: ${e=>e.isRead?"transparent":e.theme.palette.grey[100]};
|
|
29
|
-
border-bottom: 1px solid;
|
|
30
|
-
border-color: ${({theme:e})=>e.palette.grey[200]};
|
|
31
|
-
&:last-child {
|
|
32
|
-
border-bottom: none;
|
|
33
|
-
}
|
|
34
|
-
&:hover {
|
|
35
|
-
background-color: ${e=>e.theme.palette.action.hover};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.copy-button {
|
|
39
|
-
position: absolute;
|
|
40
|
-
right: ${e=>e.inDialog?e.theme.spacing(2):"0"};
|
|
41
|
-
top: ${e=>e.inDialog?e.theme.spacing(5):e.theme.spacing(4)};
|
|
42
|
-
display: none;
|
|
43
|
-
background: ${e=>e.theme.palette.action.disabledBackground};
|
|
44
|
-
border-radius: 50%;
|
|
45
|
-
svg {
|
|
46
|
-
width: ${e=>e.theme.spacing(2.25)};
|
|
47
|
-
height: ${e=>e.theme.spacing(2.25)};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
&:hover {
|
|
51
|
-
.copy-button {
|
|
52
|
-
display: block;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.component-avatar {
|
|
57
|
-
.dot {
|
|
58
|
-
width: ${e=>e.theme.spacing(1)};
|
|
59
|
-
height: ${e=>e.theme.spacing(1)};
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
62
|
-
visibility: ${e=>e.isRead?"hidden":"visible"};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.notification {
|
|
67
|
-
width: calc(100% - ${e=>e.theme.spacing(6.25)});
|
|
68
|
-
|
|
69
|
-
> .header {
|
|
70
|
-
width: 100%;
|
|
71
|
-
@media (min-width: 900px) {
|
|
72
|
-
.title {
|
|
73
|
-
max-width: calc(100vw - ${e=>e.theme.spacing(50)});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
@media (min-width: 1200px) {
|
|
77
|
-
.title {
|
|
78
|
-
max-width: ${e=>e.theme.spacing(102.5)};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
@media (max-width: 900px) {
|
|
82
|
-
.title {
|
|
83
|
-
max-width: calc(100vw - ${e=>e.theme.spacing(25)});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.title {
|
|
89
|
-
min-width: 0;
|
|
90
|
-
max-width: 100%;
|
|
91
|
-
overflow: hidden;
|
|
92
|
-
text-overflow: ellipsis;
|
|
93
|
-
white-space: nowrap;
|
|
94
|
-
color: ${e=>e.theme.palette.text.primary};
|
|
95
|
-
font-size: ${e=>e.theme.typography.fontSize*1.15}px;
|
|
96
|
-
}
|
|
97
|
-
.link {
|
|
98
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
99
|
-
font-size: ${e=>e.theme.typography.fontSize}px;
|
|
100
|
-
text-decoration: none;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
`;export{X as A,le as B,at as N,K as R,P as S,he as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-core-BFPsXaTR.js";import"./vendor-react-Dvs43sk9.js";import{S as t}from"./studio-Bk9PCaeS.js";import"./vendor-ux-CE4sOH7O.js";import"./vendor-utils-OrZFrHBP.js";import"./vendor-hooks-DmThWyyG.js";import"./lottie-web-4koyQiv_.js";import"./index-B6a6aopU.js";import"./index-3yzleS_1.js";import"./vendor-arcblock-DGOH9a3F.js";function f(){return o.jsx(t,{children:"Coming soon..."})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as e,n as s}from"./vendor-ux-CE4sOH7O.js";const c=e("blocklet-services");s("blocklet-services");export{c as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./create-passport-svg-BsR3hKFq.js";import{C as t}from"./vendor-utils-OrZFrHBP.js";import{c as s}from"./index-3yzleS_1.js";const e=o=>r({...o,issuerAvatarUrl:t(window.location.origin,s.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo")});export{e as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as b,b1 as Ie,b4 as $e,T as we,am as Si,W as h,s as di,U as ci,ak as Me,bO as ge,bP as ve,bQ as Ei,bR as Ai,bS as Oi,bT as We,bU as Ci}from"./vendor-mui-core-BFPsXaTR.js";import{V as Be,U as Ti,W as Ve}from"./vendor-ux-CE4sOH7O.js";import{B as _i,o as Ii,l as Mi}from"./index-DeVDiUjo.js";import{a as je}from"./vendor-react-Dvs43sk9.js";import{a as ji}from"./vendor-hooks-DmThWyyG.js";import{W as Ue}from"./did-address-BQL5Zxlr.js";import{p as Ui}from"./util-CQfGbjyT.js";import{u as Hi}from"./team-DmYSbFMF.js";var Li="2.0.3",He=500,Ge="user-agent",W="",Xe="?",ue="function",z="undefined",V="object",Le="string",k="browser",_="cpu",T="device",O="engine",E="os",F="result",s="name",i="type",o="vendor",n="version",y="architecture",se="major",t="model",re="console",u="mobile",g="tablet",v="smarttv",C="wearable",xe="xr",oe="embedded",K="inapp",Pe="brands",P="formFactors",Ne="fullVersionList",$="platform",qe="platformVersion",fe="bitness",D="sec-ch-ua",zi=D+"-full-version-list",Di=D+"-arch",Bi=D+"-"+fe,Pi=D+"-form-factors",Ni=D+"-"+u,qi=D+"-"+t,wi=D+"-"+$,Fi=wi+"-version",ui=[Pe,Ne,u,t,$,qe,y,P,fe],le="Amazon",N="Apple",Ye="ASUS",Ke="BlackBerry",B="Google",Qe="Huawei",Ze="Lenovo",Je="Honor",de="LG",ke="Microsoft",ye="Motorola",Re="Nvidia",ei="OnePlus",Se="OPPO",Q="Samsung",ii="Sharp",Z="Sony",Ee="Xiaomi",Ae="Zebra",ti="Chrome",ri="Chromium",U="Chromecast",$i="Edge",J="Firefox",ee="Opera",Oe="Facebook",oi="Sogou",q="Mobile ",ie=" Browser",ze="Windows",Wi=typeof window!==z,R=Wi&&window.navigator?window.navigator:void 0,H=R&&R.userAgentData?R.userAgentData:void 0,Vi=function(e,r){var a={},w=r;if(!be(r)){w={};for(var d in r)for(var p in r[d])w[p]=r[d][p].concat(w[p]?w[p]:[])}for(var c in e)a[c]=w[c]&&w[c].length%2===0?w[c].concat(e[c]):e[c];return a},pe=function(e){for(var r={},a=0;a<e.length;a++)r[e[a].toUpperCase()]=e[a];return r},De=function(e,r){if(typeof e===V&&e.length>0){for(var a in e)if(I(e[a])==I(r))return!0;return!1}return X(e)?I(r).indexOf(I(e))!==-1:!1},be=function(e,r){for(var a in e)return/^(browser|cpu|device|engine|os)$/.test(a)||(r?be(e[a]):!1)},X=function(e){return typeof e===Le},Ce=function(e){if(e){for(var r=[],a=G(/\\?\"/g,e).split(","),w=0;w<a.length;w++)if(a[w].indexOf(";")>-1){var d=ne(a[w]).split(";v=");r[w]={brand:d[0],version:d[1]}}else r[w]=ne(a[w]);return r}},I=function(e){return X(e)?e.toLowerCase():e},Te=function(e){return X(e)?G(/[^\d\.]/g,e).split(".")[0]:void 0},M=function(e){for(var r in e){var a=e[r];typeof a==V&&a.length==2?this[a[0]]=a[1]:this[a]=void 0}return this},G=function(e,r){return X(r)?r.replace(e,W):r},te=function(e){return G(/\\?\"/g,e)},ne=function(e,r){if(X(e))return e=G(/^\s\s*/,e),typeof r===z?e:e.substring(0,He)},_e=function(e,r){if(!(!e||!r))for(var a=0,w,d,p,c,m,l;a<r.length&&!m;){var f=r[a],S=r[a+1];for(w=d=0;w<f.length&&!m&&f[w];)if(m=f[w++].exec(e),m)for(p=0;p<S.length;p++)l=m[++d],c=S[p],typeof c===V&&c.length>0?c.length===2?typeof c[1]==ue?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:c.length===3?typeof c[1]===ue&&!(c[1].exec&&c[1].test)?this[c[0]]=l?c[1].call(this,l,c[2]):void 0:this[c[0]]=l?l.replace(c[1],c[2]):void 0:c.length===4&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):void 0):this[c]=l||void 0;a+=2}},L=function(e,r){for(var a in r)if(typeof r[a]===V&&r[a].length>0){for(var w=0;w<r[a].length;w++)if(De(r[a][w],e))return a===Xe?void 0:a}else if(De(r[a],e))return a===Xe?void 0:a;return r.hasOwnProperty("*")?r["*"]:e},si={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ni={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[s,q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,n],[/opios[\/ ]+([\w\.]+)/i],[n,[s,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[s,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[s,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[s,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[s,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[s,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[s,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[s,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[s,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[s,"Smart "+Ze+ie]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure"+ie],n],[/\bfocus\/([\w\.]+)/i],[n,[s,J+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[s,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[s,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[s,"MIUI"+ie]],[/fxios\/([\w\.-]+)/i],[n,[s,q+J]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[s,"360"]],[/\b(qq)\/([\w\.]+)/i],[[s,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1"+ie],n],[/samsungbrowser\/([\w\.]+)/i],[n,[s,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[s,oi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[s,oi+" Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[s,n],[/(lbbrowser|rekonq)/i],[s],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,Oe],n,[i,K]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[s,n,[i,K]],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[s,"GSA"],[i,K]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[s,"TikTok"],[i,K]],[/\[(linkedin)app\]/i],[s,[i,K]],[/(chromium)[\/ ]([-\w\.]+)/i],[s,n],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[s,ti+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,ti+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[s,"Android"+ie]],[/chrome\/([\w\.]+) mobile/i],[n,[s,q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,n],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[n,[s,q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[s,q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[n,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[n,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[s,n],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[s,q+J],n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[s,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[s,J+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[s,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[s,[n,/[^\d\.]+./,W]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,W,I]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,I]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[o,Q],[i,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[t,[o,Q],[i,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[o,N],[i,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[o,N],[i,g]],[/(macintosh);/i],[t,[o,N]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[o,ii],[i,u]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[t,[o,Je],[i,g]],[/honor([-\w ]+)[;\)]/i],[t,[o,Je],[i,u]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[t,[o,Qe],[i,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[o,Qe],[i,u]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[t,/_/g," "],[o,Ee],[i,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[t,/_/g," "],[o,Ee],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[o,Se],[i,u]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[t,[o,L,{OnePlus:["304","403","203"],"*":Se}],[i,g]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[t,[o,"BLU"],[i,u]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[o,"Vivo"],[i,u]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[t,[o,"Realme"],[i,u]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[o,ye],[i,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[o,ye],[i,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[o,de],[i,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[o,de],[i,u]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[t,[o,Ze],[i,g]],[/(nokia) (t[12][01])/i],[o,t,[i,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[t,/_/g," "],[i,u],[o,"Nokia"]],[/(pixel (c|tablet))\b/i],[t,[o,B],[i,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[o,B],[i,u]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[o,Z],[i,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[o,Z],[i,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[o,ei],[i,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[o,le],[i,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[o,le],[i,u]],[/(playbook);[-\w\),; ]+(rim)/i],[t,o,[i,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[o,Ke],[i,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[o,Ye],[i,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[o,Ye],[i,u]],[/(nexus 9)/i],[t,[o,"HTC"],[i,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[t,/_/g," "],[i,u]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,g]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,I],t,[i,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[o,"Acer"],[i,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[o,"Meizu"],[i,u]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[t,[o,"Ulefone"],[i,u]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[t,[o,"Energizer"],[i,u]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[t,[o,"Cat"],[i,u]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[t,[o,"Smartfren"],[i,u]],[/droid.+; (a(?:015|06[35]|142p?))/i],[t,[o,"Nothing"],[i,u]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[t,[o,"Archos"],[i,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[t,[o,"Archos"],[i,u]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[o,t,[i,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[o,t,[i,u]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[o,t,[i,g]],[/(surface duo)/i],[t,[o,ke],[i,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[o,"Fairphone"],[i,u]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[t,[o,Re],[i,g]],[/(sprint) (\w+)/i],[o,t,[i,u]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[o,ke],[i,u]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[o,Ae],[i,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[o,Ae],[i,u]],[/smart-tv.+(samsung)/i],[o,[i,v]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[o,Q],[i,v]],[/tcast.+(lg)e?. ([-\w]+)/i],[o,t,[i,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,de],[i,v]],[/(apple) ?tv/i],[o,[t,N+" TV"],[i,v]],[/crkey.*devicetype\/chromecast/i],[[t,U+" Third Generation"],[o,B],[i,v]],[/crkey.*devicetype\/([^/]*)/i],[[t,/^/,"Chromecast "],[o,B],[i,v]],[/fuchsia.*crkey/i],[[t,U+" Nest Hub"],[o,B],[i,v]],[/crkey/i],[[t,U],[o,B],[i,v]],[/(portaltv)/i],[t,[o,Oe],[i,v]],[/droid.+aft(\w+)( bui|\))/i],[t,[o,le],[i,v]],[/(shield \w+ tv)/i],[t,[o,Re],[i,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[o,ii],[i,v]],[/(bravia[\w ]+)( bui|\))/i],[t,[o,Z],[i,v]],[/(mi(tv|box)-?\w+) bui/i],[t,[o,Ee],[i,v]],[/Hbbtv.*(technisat) (.*);/i],[o,t,[i,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ne],[t,ne],[i,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[t,[i,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,v]],[/(ouya)/i,/(nintendo) (\w+)/i],[o,t,[i,re]],[/droid.+; (shield)( bui|\))/i],[t,[o,Re],[i,re]],[/(playstation \w+)/i],[t,[o,Z],[i,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[o,ke],[i,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[t,[o,Q],[i,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[o,t,[i,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[t,[o,Se],[i,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[o,N],[i,C]],[/(opwwe\d{3})/i],[t,[o,ei],[i,C]],[/(moto 360)/i],[t,[o,ye],[i,C]],[/(smartwatch 3)/i],[t,[o,Z],[i,C]],[/(g watch r)/i],[t,[o,de],[i,C]],[/droid.+; (wt63?0{2,3})\)/i],[t,[o,Ae],[i,C]],[/droid.+; (glass) \d/i],[t,[o,B],[i,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,t,[i,xe]],[/(quest( \d| pro)?s?).+vr/i],[t,[o,Oe],[i,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,oe]],[/(aeobc)\b/i],[t,[o,le],[i,oe]],[/(homepod).+mac os/i],[t,[o,N],[i,oe]],[/windows iot/i],[[i,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[t,[i,L,{mobile:"Mobile",xr:"VR","*":g}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,u]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[t,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[s,$i+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[s,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,n],[/ladybird\//i],[[s,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,n],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[s,[n,L,si]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,L,si],[s,ze]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"macOS"],[n,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[n,[s,U+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[n,[s,U+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[n,[s,U+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[n,[s,U+" Linux"]],[/crkey\/([\d\.]+)/i],[n,[s,U]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,s],[/(ubuntu) ([\w\.]+) like android/i],[[s,/(.+)/,"$1 Touch"],n],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[s,n],[/\(bb(10);/i],[n,[s,Ke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[n,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[s,J+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[s,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chrome OS"],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,n],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,n]]},ce=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return M.call(e.init,[[k,[s,n,se,i]],[_,[y]],[T,[i,t,o]],[O,[s,n]],[E,[s,n]]]),M.call(e.isIgnore,[[k,[n,se]],[O,[n]],[E,[n]]]),M.call(e.isIgnoreRgx,[[k,/ ?browser$/i],[E,/ ?os$/i]]),M.call(e.toString,[[k,[s,n]],[_,[y]],[T,[o,t]],[O,[s,n]],[E,[s,n]]]),e}(),Gi=function(e,r){var a=ce.init[r],w=ce.isIgnore[r]||0,d=ce.isIgnoreRgx[r]||0,p=ce.toString[r]||0;function c(){M.call(this,a)}return c.prototype.getItem=function(){return e},c.prototype.withClientHints=function(){return H?H.getHighEntropyValues(ui).then(function(m){return e.setCH(new bi(m,!1)).parseCH().get()}):e.parseCH().get()},c.prototype.withFeatureCheck=function(){return e.detectFeature().get()},r!=F&&(c.prototype.is=function(m){var l=!1;for(var f in this)if(this.hasOwnProperty(f)&&!De(w,f)&&I(d?G(d,this[f]):this[f])==I(d?G(d,m):m)){if(l=!0,m!=z)break}else if(m==z&&l){l=!l;break}return l},c.prototype.toString=function(){var m=W;for(var l in p)typeof this[p[l]]!==z&&(m+=(m?" ":W)+this[p[l]]);return m||z}),H||(c.prototype.then=function(m){var l=this,f=function(){for(var A in l)l.hasOwnProperty(A)&&(this[A]=l[A])};f.prototype={is:c.prototype.is,toString:c.prototype.toString};var S=new f;return m(S),S}),new c};function bi(e,r){if(e=e||{},M.call(this,ui),r)M.call(this,[[Pe,Ce(e[D])],[Ne,Ce(e[zi])],[u,/\?1/.test(e[Ni])],[t,te(e[qi])],[$,te(e[wi])],[qe,te(e[Fi])],[y,te(e[Di])],[P,Ce(e[Pi])],[fe,te(e[Bi])]]);else for(var a in e)this.hasOwnProperty(a)&&typeof e[a]!==z&&(this[a]=e[a])}function li(e,r,a,w){return this.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:void 0:this.data},this.set=function(d,p){return this.data[d]=p,this},this.setCH=function(d){return this.uaCH=d,this},this.detectFeature=function(){if(R&&R.userAgent==this.ua)switch(this.itemType){case k:R.brave&&typeof R.brave.isBrave==ue&&this.set(s,"Brave");break;case T:!this.get(i)&&H&&H[u]&&this.set(i,u),this.get(t)=="Macintosh"&&R&&typeof R.standalone!==z&&R.maxTouchPoints&&R.maxTouchPoints>2&&this.set(t,"iPad").set(i,g);break;case E:!this.get(s)&&H&&H[$]&&this.set(s,H[$]);break;case F:var d=this.data,p=function(c){return d[c].getItem().detectFeature().get()};this.set(k,p(k)).set(_,p(_)).set(T,p(T)).set(O,p(O)).set(E,p(E))}return this},this.parseUA=function(){return this.itemType!=F&&_e.call(this.data,this.ua,this.rgxMap),this.itemType==k&&this.set(se,Te(this.get(n))),this},this.parseCH=function(){var d=this.uaCH,p=this.rgxMap;switch(this.itemType){case k:case O:var c=d[Ne]||d[Pe],m;if(c)for(var l in c){var f=c[l].brand||c[l],S=c[l].version;this.itemType==k&&!/not.a.brand/i.test(f)&&(!m||/chrom/i.test(m)&&f!=ri)&&(f=L(f,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(s,f).set(n,S).set(se,Te(S)),m=f),this.itemType==O&&f==ri&&this.set(n,S)}break;case _:var A=d[y];A&&(A&&d[fe]=="64"&&(A+="64"),_e.call(this.data,A+";",p));break;case T:if(d[u]&&this.set(i,u),d[t]&&(this.set(t,d[t]),!this.get(i)||!this.get(o))){var x={};_e.call(x,"droid 9; "+d[t]+")",p),!this.get(i)&&x.type&&this.set(i,x.type),!this.get(o)&&x.vendor&&this.set(o,x.vendor)}if(d[P]){var ae;if(typeof d[P]!="string")for(var Fe=0;!ae&&Fe<d[P].length;)ae=L(d[P][Fe++],ni);else ae=L(d[P],ni);this.set(i,ae)}break;case E:var me=d[$];if(me){var he=d[qe];me==ze&&(he=parseInt(Te(he),10)>=13?"11":"10"),this.set(s,me).set(n,he)}this.get(s)==ze&&d[t]=="Xbox"&&this.set(s,"Xbox").set(n,void 0);break;case F:var yi=this.data,Y=function(Ri){return yi[Ri].getItem().setCH(d).parseCH().get()};this.set(k,Y(k)).set(_,Y(_)).set(T,Y(T)).set(O,Y(O)).set(E,Y(E))}return this},M.call(this,[["itemType",e],["ua",r],["uaCH",w],["rgxMap",a],["data",Gi(this,e)]]),this}function j(e,r,a){if(typeof e===V?(be(e,!0)?(typeof r===V&&(a=r),r=e):(a=e,r=void 0),e=void 0):typeof e===Le&&!be(r,!0)&&(a=r,r=void 0),a&&typeof a.append===ue){var w={};a.forEach(function(l,f){w[f]=l}),a=w}if(!(this instanceof j))return new j(e,r,a).getResult();var d=typeof e===Le?e:a&&a[Ge]?a[Ge]:R&&R.userAgent?R.userAgent:W,p=new bi(a,!0),c=r?Vi(ai,r):ai,m=function(l){return l==F?function(){return new li(l,d,c,p).set("ua",d).set(k,this.getBrowser()).set(_,this.getCPU()).set(T,this.getDevice()).set(O,this.getEngine()).set(E,this.getOS()).get()}:function(){return new li(l,d,c[l],p).parseUA().get()}};return M.call(this,[["getBrowser",m(k)],["getCPU",m(_)],["getDevice",m(T)],["getEngine",m(O)],["getOS",m(E)],["getResult",m(F)],["getUA",function(){return d}],["setUA",function(l){return X(l)&&(d=l.length>He?ne(l,He):l),this}]]).setUA(d),this}j.VERSION=Li;j.BROWSER=pe([s,n,se,i]);j.CPU=pe([y]);j.DEVICE=pe([t,o,i,re,u,v,g,C,oe]);j.ENGINE=j.OS=pe([s,n]);function Xi(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function fi({logo:e="",name:r="",description:a="",size:w=40,variant:d="rounded",sx:p={},className:c="",logoName:m="",tooltip:l=null}){const f={width:w,height:w,...p},S=typeof r=="string"?r:e,A=b.jsxs(Ie,{direction:"row",spacing:1,className:`info-card-wrapper ${c}`,sx:{alignItems:"center",cursor:l?"pointer":"default"},children:[e?b.jsx($e,{src:e,alt:m??S,variant:d,sx:f}):b.jsx($e,{variant:d,sx:f,children:S?.slice(0,1)}),b.jsxs(Ie,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Xi(r),minWidth:{xs:100,sm:140}},children:[b.jsx(we,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),a&&b.jsx(we,{variant:"subtitle1",sx:{color:"text.secondary"},children:a})]})]});return l?b.jsx(Si,{title:l,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff",color:x=>x.palette.mode==="dark"?"#ffffff":x.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:A}):A}fi.propTypes={logo:h.string,name:h.oneOfType([h.string,h.node]).isRequired,description:h.oneOfType([h.string,h.node]),size:h.oneOfType([h.number,h.string]),variant:h.oneOf(["square","rounded","circular"]),sx:h.object,className:h.string,logoName:h.string,tooltip:h.oneOfType([h.string,h.node])};function Yi(e){try{if(!e.trim())return{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}};const a=new j(e).getResult();let w="";const d=e.split(/\s+/).find(l=>l.startsWith("arcwallet"));if(d){const l=d.split("/");l.length>1&&Ve.coerce(l[1])&&(w=Ve.coerce(l[1]).version)}const p=(()=>{const{type:l="",model:f=""}=a.device;return l==="mobile"?{icon:b.jsx(Ei,{fontSize:"small"}),text:f||"Mobile Device"}:l==="tablet"?{icon:b.jsx(Ai,{fontSize:"small"}),text:f||"Tablet"}:{icon:b.jsx(Oi,{fontSize:"small"}),text:f||"Desktop"}})(),c=(()=>{const{name:l="",version:f=""}=a.os;return l.toLowerCase().includes("mac")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("ios")?{icon:b.jsx(We,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("android")?{icon:b.jsx(Ci,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("windows")?{icon:b.jsx(ve,{fontSize:"small"}),text:`${l} ${f}`}:{icon:null,text:l?`${l} ${f}`:"Unknown OS"}})(),m=(()=>{const{name:l="",version:f=""}=a.browser;return{icon:b.jsx(ge,{fontSize:"small"}),text:l?`${l} ${f}`:"Unknown Browser"}})();return{device:p,os:c,browser:m,...w?{walletVersion:{icon:null,text:w}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}}}}function pi({ua:e}){const r=Yi(e);return b.jsx(Ie,{spacing:1,children:Object.entries(r).map(([a,{icon:w,text:d}])=>b.jsxs(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[b.jsx(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:w}),b.jsx(we,{variant:"body2",sx:{display:"flex"},children:d})]},a))})}pi.propTypes={ua:h.string.isRequired};const Ki=()=>{const{t:e}=Be(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:w=>{const d=(w||"").toLowerCase();return d.startsWith("$")?r[d]||d.slice(1):r[d]||d}}},Qi=(e,r=!1)=>{const a=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${a})`;case"admin":return`rgba(227, 242, 253, ${a})`;case"member":return`rgba(232, 245, 233, ${a})`;case"guest":return`rgba(245, 245, 245, ${a})`;default:return`rgba(245, 245, 245, ${a})`}},Zi=di(ci)(({role:e})=>({backgroundColor:Qi(e.toLowerCase()),color:"#000000"})),Ji=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},et=di(ci)(({theme:e,status:r})=>({backgroundColor:Ji(r)(e),color:"#FFFFFF"}));function mi({did:e}){return b.jsx(Ue,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}mi.propTypes={did:h.string.isRequired};function hi({timestamp:e,locale:r}){return b.jsx(Me,{sx:{minWidth:"100px"},children:b.jsx(Ti,{value:e,locale:r})})}hi.propTypes={timestamp:h.number.isRequired,locale:h.string.isRequired};function gi({name:e="",role:r}){const{formatRoleName:a}=Ki();return b.jsx(Zi,{label:a(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}gi.propTypes={role:h.string.isRequired,name:h.string};function vi({status:e}){const{t:r}=Be();return b.jsx(et,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}vi.propTypes={status:h.string.isRequired};function xi({source:e}){const{t:r}=Be();return e?r(`team.passport.sourceMaps.${e}`):"-"}xi.propTypes={source:h.string.isRequired};function ki({user:e,size:r="default",tooltip:a=!1,inService:w=!1}){const{teamDid:d}=Hi(),p=je.useMemo(()=>Ui(e.avatar,d,w),[e.avatar,d,w]),c=je.useMemo(()=>b.jsx(Ue,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),m=ji(()=>({...e,avatar:p}),[e,p]);return r==="small"?b.jsx(fi,{variant:"circular",logo:p,name:b.jsx(we,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:a?b.jsx(Ue,{did:e?.did}):!1,size:24}:{description:c,size:36}}):b.jsx(_i,{user:m,avatarSize:r==="small"?24:36,cardType:Mi.Detailed,infoType:Ii.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ki.propTypes={user:h.object.isRequired,size:h.string,tooltip:h.bool,inService:h.bool};const it=je.memo(ki),ct=e=>b.jsx(mi,{did:e}),wt=(e,r)=>b.jsx(gi,{name:e,role:r}),ut=e=>b.jsx(vi,{status:e}),bt=(e,r)=>b.jsx(hi,{timestamp:e,locale:r}),ft=e=>b.jsx(xi,{source:e}),pt=(e,r=!1)=>b.jsx(it,{user:e,inService:r}),mt=e=>b.jsx(pi,{ua:e});export{wt as a,ut as b,bt as c,ft as d,mt as e,ct as f,pt as r,Ki as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-core-BFPsXaTR.js";import{C as t}from"./vendor-utils-OrZFrHBP.js";import{I as s}from"./iframe-DAoobOBi.js";import{c as e}from"./index-3yzleS_1.js";import{S as m}from"./studio-Bk9PCaeS.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-ux-CE4sOH7O.js";import"./vendor-hooks-DmThWyyG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DGOH9a3F.js";import"./index-B6a6aopU.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./vendor-mui-core-BFPsXaTR.js";import{O as o}from"./user-center-u6FpYGow.js";import{H as i}from"./index-3yzleS_1.js";import{V as e}from"./vendor-ux-CE4sOH7O.js";import"./vendor-react-Dvs43sk9.js";import"./vendor-hooks-DmThWyyG.js";import"./vendor-utils-OrZFrHBP.js";import"./index-iOD1kOar.js";import"./arrow-down.svg-D3B8bxxx.js";import"./user-sessions-4qrRIOb8.js";import"./index-ve-p7nSZ.js";import"./index-DlRa8Zeh.js";import"./vendor-arcblock-DGOH9a3F.js";import"./index-Bgt2qHLn.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-Cd_Gml9C.js";import"./lottie-web-4koyQiv_.js";function O(){const{t}=e();return r.jsxs(r.Fragment,{children:[r.jsx(i,{children:r.jsx("title",{children:t("pageTitle.userCenter")})}),r.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as n,j as i,ak as l}from"./vendor-mui-core-BFPsXaTR.js";import{j as d,r as c}from"./vendor-react-Dvs43sk9.js";import{V as u,q as h}from"./vendor-ux-CE4sOH7O.js";import g from"./index-DNGdj2R4.js";import"./vendor-utils-OrZFrHBP.js";import"./vendor-hooks-DmThWyyG.js";import"./lottie-web-4koyQiv_.js";import"./index-3yzleS_1.js";import"./vendor-arcblock-DGOH9a3F.js";import"./confirm-CEAKWDZJ.js";import"./index-DBs9Ljax.js";import"./session-Dnp_ufkx.js";import"./did-address-BQL5Zxlr.js";import"./empty-spinner-sNq-0DF5.js";import"./bundle-avatar-BFaxogKz.js";import"./shorten-label-C-X_7vr2.js";import"./list-header-CjohGZ9B.js";import"./click-to-copy-CK42VmRr.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./useSetState-DFuQZPPV.js";import"./engine-B1U2TY7M.js";import"./api-txzyyizM.js";import"./vendor-mui-x-C6iZOJbV.js";import"./react-beautiful-dnd.esm-CIwtis6a.js";import"./raf-schd.esm-CHNehTG3.js";import"./wait-connect-Rle27g9O.js";import"./get-safe-url-3Xj-tgXY.js";import"./item-B1UaStjk.js";import"./delete-confirm-DpKJ9gtf.js";import"./index-DlRa8Zeh.js";import"./index-DX3L95vz.js";import"./index-VySXxf4w.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function T(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as o}from"./index-3yzleS_1.js";const e=o();export{e as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,y as w,x as I,bc as S,M as c,aP as W,T as x,ak as h,U as O,bw as z,F as C,W as r}from"./vendor-mui-core-BFPsXaTR.js";function F({fullWidth:m=!1,multiple:n=!1,required:i=!1,label:d="",placeholer:j="",options:t=[],helperText:b="",error:y=!1,margin:u="",textDirection:g="row",size:p,...f}){const v=t.find(l=>l.value===f.value)?.title;return e.jsxs(w,{margin:u,fullWidth:m,error:y,children:[e.jsx(I,{size:p,children:`${d}${i?"*":""}`}),e.jsxs(S,{multiple:n,input:e.jsx(z,{defaultValue:v,sx:{flex:1},required:i,label:d,inputProps:{margin:u},size:p}),renderValue:l=>{if(n)return e.jsx(h,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:l.map(a=>{const o=t.find(T=>T.value===a);return o&&o.title&&e.jsx(O,{size:"small",label:o.title},a)})});const s=t.find(a=>a.value===l);return s&&s.title&&e.jsxs(h,{children:[e.jsx(x,{component:"span",children:s.title}),e.jsx(x,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:s.description})]})},...f,children:[e.jsx(c,{disabled:!0,children:e.jsx("em",{children:j})}),!i&&!n&&e.jsx(c,{value:"",children:"None"}),t.map(l=>l&&l.value&&e.jsxs(c,{sx:[{justifyContent:"center"},g==="column"?{flexDirection:"column",alignItems:"flex-start"}:{}],value:l.value,children:[e.jsx(W,{children:l.title}),l.description&&e.jsx(x,{variant:"body2",sx:{color:"text.secondary",maxWidth:"100%",whiteSpace:"normal"},children:l.description})]},l.value))]}),e.jsx(C,{children:b})]})}F.propTypes={error:r.bool,required:r.bool,multiple:r.bool,fullWidth:r.bool,label:r.string,placeholer:r.string,options:r.array,helperText:r.string,margin:r.string,size:r.string,textDirection:r.oneOf("row","column")};export{F as S};
|