@abtnode/blocklet-services 1.17.7-beta-20251229-223813-e1e6c5e3 → 1.17.7-beta-20251230-120126-2836fe04
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/libs/auth/adapters/apple.js +1 -1
- package/api/libs/auth/adapters/auth0.js +1 -1
- package/api/libs/auth/adapters/github.js +1 -1
- package/api/libs/auth/adapters/google.js +1 -1
- package/api/routes/csp-proxy.js +1 -1
- package/api/routes/oauth/client.js +13 -4
- package/api/routes/user.js +2 -2
- package/dist/assets/{access-control-Zb1P0A-c.js → access-control-CUu6-zRM.js} +1 -1
- package/dist/assets/{add-component-core-rrD3IVuo.js → add-component-core-DFUcBIM5.js} +1 -1
- package/dist/assets/{add-resource-HYp41Mey.js → add-resource-IrQoFkek.js} +1 -1
- package/dist/assets/{addon-RL_2cpli.js → addon-BE1WaOfp.js} +1 -1
- package/dist/assets/{advanced-DnipDVXM.js → advanced-DZo8iS0g.js} +1 -1
- package/dist/assets/{aigne-B-BPMYqb.js → aigne-m7Za8uoN.js} +1 -1
- package/dist/assets/{appearance-DkPwHUmp.js → appearance-DGdzbEUY.js} +1 -1
- package/dist/assets/{audit-logs-Qew52P05.js → audit-logs-Bqpc98vL.js} +1 -1
- package/dist/assets/{authorize-BlsrYBvj.js → authorize-Bjc5A7mE.js} +1 -1
- package/dist/assets/{bind-account-Dhqzfttk.js → bind-account-YrYj0shB.js} +1 -1
- package/dist/assets/{branding-BuYkrJWP.js → branding-C6MxoZlS.js} +1 -1
- package/dist/assets/{branding-BNZPiOIW.js → branding-D4t4jOvo.js} +1 -1
- package/dist/assets/{branding-0WzFBgOW.js → branding-uGHM--4G.js} +1 -1
- package/dist/assets/{bundle-avatar-0OtNVOJk.js → bundle-avatar-MwXjHSGV.js} +1 -1
- package/dist/assets/{complete-CJbh7iao.js → complete-CJuHsAiS.js} +1 -1
- package/dist/assets/{component-BXc-kqPT.js → component-C_Im1DOP.js} +2 -2
- package/dist/assets/{config-CH0_ZbU7.js → config-B_-nicf1.js} +1 -1
- package/dist/assets/{config-BGjhG44Z.js → config-BaUPvXgr.js} +1 -1
- package/dist/assets/{config-D2U-Xwer.js → config-CiyFLDmf.js} +1 -1
- package/dist/assets/{config-navigation-zHWUBjBW.js → config-navigation-B6fkilf7.js} +2 -2
- package/dist/assets/{config-space-BR-bgToj.js → config-space-Cj3K-KMe.js} +1 -1
- package/dist/assets/{confirm-CQcou-U0.js → confirm-Dwk8QEtL.js} +1 -1
- package/dist/assets/{connect-DvKksfqN.js → connect-BWWNLaGp.js} +1 -1
- package/dist/assets/{connect-DGgUqebM.js → connect-CdpbtEAA.js} +1 -1
- package/dist/assets/{connect-to-BkcNrFMt.js → connect-to-DZ8FWX57.js} +1 -1
- package/dist/assets/{dashboard-ChfWklE6.js → dashboard-lDmpt-_3.js} +2 -2
- package/dist/assets/{delete-confirm-ZZFKP_G2.js → delete-confirm-DP8106B2.js} +1 -1
- package/dist/assets/{domain-C7ik5Hza.js → domain-CEjwqMuf.js} +1 -1
- package/dist/assets/{domain-action-card-CPXf_2n9.js → domain-action-card-B8B6H9hh.js} +1 -1
- package/dist/assets/{domains-D1AXd2xb.js → domains-BKPVrdxp.js} +1 -1
- package/dist/assets/{email-C0H5jkk_.js → email-CLJ9Oh9g.js} +1 -1
- package/dist/assets/engine-sJAhuypG.js +1 -0
- package/dist/assets/{exchange-passport-Bxf933u4.js → exchange-passport-B3v8AOgj.js} +1 -1
- package/dist/assets/{form-BCT1goOE.js → form-YGfyOF3u.js} +1 -1
- package/dist/assets/{fuel-DW2SqoXv.js → fuel-B_1L7fXu.js} +1 -1
- package/dist/assets/{gen-access-key-hcXr_3v-.js → gen-access-key-v0v3wFkW.js} +1 -1
- package/dist/assets/{gen-simple-access-key-D_UWgD88.js → gen-simple-access-key-CiXr_y-H.js} +1 -1
- package/dist/assets/{get-safe-url-DxpqHRQ1.js → get-safe-url-Bco2TPFW.js} +1 -1
- package/dist/assets/{home-ZleX7-XZ.js → home-DwjPSvjP.js} +1 -1
- package/dist/assets/{iframe-CFsgaleC.js → iframe-BkiP4bTi.js} +1 -1
- package/dist/assets/{index-CFII0zqE.js → index-2h18bhBY.js} +1 -1
- package/dist/assets/{index-CgwRpRMk.js → index-AnS2fFHl.js} +1 -1
- package/dist/assets/{index-FreeXNkk.js → index-B-MpZQKm.js} +3 -3
- package/dist/assets/{index-BZaW_ZpY.js → index-B9LxMeBj.js} +1 -1
- package/dist/assets/{index-CwAZTFm0.js → index-BBMhJfkP.js} +1 -1
- package/dist/assets/{index-C5S7RLo3.js → index-BBQq8c13.js} +1 -1
- package/dist/assets/{index-CjS1scdg.js → index-BUg9FOTN.js} +1 -1
- package/dist/assets/{index-B8zAb7Hc.js → index-BeMepvos.js} +1 -1
- package/dist/assets/{index-BuuPPt_7.js → index-BhyOyl4s.js} +1 -1
- package/dist/assets/{index-C8x3s3XH.js → index-Bs1KlEje.js} +3 -3
- package/dist/assets/{index-C9jYw-PP.js → index-C2fMZiXk.js} +1 -1
- package/dist/assets/{index-DMZ5Sj4Z.js → index-C7rfvc9y.js} +1 -1
- package/dist/assets/{index-Crz9MitX.js → index-CDaq45HC.js} +2 -2
- package/dist/assets/{index-BukC8OVR.js → index-CPi7w--z.js} +1 -1
- package/dist/assets/{index-Cy2nGhzX.js → index-CpkQ_Cuo.js} +1 -1
- package/dist/assets/{index-Co_qmPsj.js → index-DVwGORvZ.js} +1 -1
- package/dist/assets/{index-CvxwAvNV.js → index-DWaXyfC0.js} +1 -1
- package/dist/assets/{index-LlFgIuCt.js → index-De_yIkHx.js} +1 -1
- package/dist/assets/{index-ByoNLuaN.js → index-Dhdz9lk6.js} +1 -1
- package/dist/assets/{index-DCKXgmNi.js → index-DmY9feUT.js} +1 -1
- package/dist/assets/{index-CGG37rzL.js → index-Dwsd4IGH.js} +1 -1
- package/dist/assets/{index-DEKD1iEz.js → index-FMUSsnLv.js} +1 -1
- package/dist/assets/{index-DQDt6ixh.js → index-GiNuPyT9.js} +1 -1
- package/dist/assets/{index-34B-_i4U.js → index-Gm0RE9Dr.js} +1 -1
- package/dist/assets/{index-BXRMGGxp.js → index-ZKGUIO-r.js} +1 -1
- package/dist/assets/{index-JzYmPAqa.js → index-_80Z1ZpG.js} +1 -1
- package/dist/assets/{invitation-BHrproSe.js → invitation-BQirBsFI.js} +1 -1
- package/dist/assets/{invitations-4w_OzLxr.js → invitations-XjQQCuZw.js} +1 -1
- package/dist/assets/{invite-B-0DaSfe.js → invite-D2_NU-8H.js} +1 -1
- package/dist/assets/{isURL-Dsl0-5oi.js → isURL-CIce9auJ.js} +1 -1
- package/dist/assets/{issue-passport-DRq-MGR0.js → issue-passport-CDnnfN1Q.js} +1 -1
- package/dist/assets/{item-B-fZE8cJ.js → item-CvLTrzgJ.js} +1 -1
- package/dist/assets/{landing-page-ol2He6wT.js → landing-page-CpGoTDlB.js} +1 -1
- package/dist/assets/{layout-DP35nSHr.js → layout-vuoHTTUk.js} +1 -1
- package/dist/assets/{list-CXg6onZy.js → list-CiYFt3pl.js} +1 -1
- package/dist/assets/{list-CRS8_Mwn.js → list-UiDvviK4.js} +1 -1
- package/dist/assets/{localization-Bzyury17.js → localization-COdKVuTK.js} +1 -1
- package/dist/assets/{log-Bdmpld3D.js → log-CgSeuCwx.js} +1 -1
- package/dist/assets/{login-4E4VdNcY.js → login-KpyRmg5X.js} +1 -1
- package/dist/assets/{login-oauth-callback-B31rNy6b.js → login-oauth-callback-CJ4tr8SE.js} +1 -1
- package/dist/assets/{logo-uploader-B4RelqSZ.js → logo-uploader-BSnNhLLm.js} +1 -1
- package/dist/assets/{lost-passport-CehEmPuN.js → lost-passport-Cm4wBrmS.js} +1 -1
- package/dist/assets/{open-window-CxHokgoD.js → open-window-DnyNouV2.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-DB7bedIv.js → over-due-invoice-payment-Du_WMBUF.js} +1 -1
- package/dist/assets/overview-fYkqcG2P.js +116 -0
- package/dist/assets/{passport-CgVIIIF1.js → passport-MtVabWNV.js} +1 -1
- package/dist/assets/{passport-item-CvEGWX-Y.js → passport-item-CtZmczAl.js} +1 -1
- package/dist/assets/{permission-BdJe7FC0.js → permission-2Q-NKCMS.js} +1 -1
- package/dist/assets/{preferences-Uxu-Ou4V.js → preferences-CWqTqkeD.js} +1 -1
- package/dist/assets/{profile-embed-BF_OFULi.js → profile-embed-Be6Tc2Yd.js} +1 -1
- package/dist/assets/{publish-resource-BmcTO-ir.js → publish-resource-BGk3n_Wr.js} +1 -1
- package/dist/assets/{runtime-Bsl5i2jc.js → runtime-Ci7sffRR.js} +1 -1
- package/dist/assets/sdk-Bes03kcb.js +1 -0
- package/dist/assets/security-B283K9t5.js +22 -0
- package/dist/assets/{session-8btKYxMi.js → session-CKEyJJp6.js} +1 -1
- package/dist/assets/{setup-DhTuP-SU.js → setup-C-CyeYo3.js} +1 -1
- package/dist/assets/{spaces-C8s0ejS4.js → spaces-DZfD-jxX.js} +1 -1
- package/dist/assets/{start-D0YkmM3s.js → start-CxEl9xTQ.js} +1 -1
- package/dist/assets/{starting-progress-rr3ULMDk.js → starting-progress-a6mLuIzL.js} +1 -1
- package/dist/assets/{status-CVE6RA_S.js → status-BpPoDS0b.js} +1 -1
- package/dist/assets/{step-actions-imyD5TuN.js → step-actions-Cd9frxi3.js} +1 -1
- package/dist/assets/{studio-Bwc5fhKe.js → studio-Bn_6WQLs.js} +1 -1
- package/dist/assets/{team-DB9e4nhx.js → team-BDHl2zCb.js} +1 -1
- package/dist/assets/{traffic-2gK2nM6D.js → traffic-DWDQGBu7.js} +1 -1
- package/dist/assets/{transfer-DLAlz7iv.js → transfer-wR5VWleN.js} +1 -1
- package/dist/assets/{unsubscribe-BLr8bhvE.js → unsubscribe-BwwEY91Q.js} +1 -1
- package/dist/assets/{use-app-logo-BYRQxVgh.js → use-app-logo-C52bRzuf.js} +1 -1
- package/dist/assets/{user-center-GNfNdqal.js → user-center-CP1OknZL.js} +1 -1
- package/dist/assets/{user-follower-D5UmIVaZ.js → user-follower-CobHkt-I.js} +1 -1
- package/dist/assets/{util-BbwZ5cox.js → util-DMqfvzdX.js} +1 -1
- package/dist/assets/{util-D8-xR3Bv.js → util-E_z7v0HU.js} +1 -1
- package/dist/assets/{wait-connect-Bw-B6lbR.js → wait-connect-DYJDyyTr.js} +1 -1
- package/dist/assets/{wizard-BrdF6Gnl.js → wizard-Daquugqz.js} +1 -1
- package/dist/assets/{wizard-components-CsJ6IStV.js → wizard-components-Bce-34em.js} +1 -1
- package/dist/assets/{wrap-locale-C87TTgDu.js → wrap-locale-B6zyAepP.js} +1 -1
- package/dist/assets/{zh-DuMFx3Ce.js → zh-D_qi3l-8.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +24 -24
- package/dist/assets/engine-CTCpNUzB.js +0 -1
- package/dist/assets/overview-C7rRlFBy.js +0 -116
- package/dist/assets/sdk-CHfXvAIT.js +0 -1
- package/dist/assets/security-Clz2lIto.js +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as B,ak as z,T as pe,z as gt,y as ht,bZ as dt,M as Ct,Q as Me,at as ce,ar as lt,cu as xt,ee as Et,ef as Rt,I as yt,eg as mt,D as bt,b4 as le,aj as wt,a6 as vt}from"./vendor-mui-core-DnR6WYuU.js";import{r as oe,p as Ve,g as It}from"./vendor-react-CTtPmzVP.js";import{L as St,g as Ze,u as Lt,l as Bt,e as _t,q as Tt}from"./vendor-hooks-qxhUUbW5.js";import{k as Ht,bc as Ot,_ as he,bn as ct}from"./vendor-ux-B2x-0VyJ.js";import{aI as Nt}from"./vendor-utils-CxWN1dT3.js";import{mediaKitApi as Qt}from"./index-Crz9MitX.js";import{r as De}from"./index-_tncRnTu.js";import"./lottie-web-4koyQiv_.js";import"./index-FreeXNkk.js";import"./vendor-arcblock-hbumvS-z.js";import"./index-DRYJ0xIl.js";const ft=oe.createContext({}),pt=()=>oe.useContext(ft);function qt({children:h,restrictions:f,i18n:w,theme:R}){const[x,b]=St({loading:!1}),n=t=>b(a=>({...a,loading:t})),e=oe.useMemo(()=>({...x,onLoading:n,restrictions:f,i18n:w}),[x]);return B.jsx(Ht,{theme:R,children:B.jsx(ft.Provider,{value:e,children:h})})}const Wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAskSURBVHgB7d3RcdTIGoZhcSJYMoAMIAIgAiACIALIwBCBIQIgA4jAkAEZQAYmAx+6iqnjM+vxjD3qX/qk56niYm92wYve6W790ty5+GMACPCfASCEYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYghWsG/fvg137twp+/X8+fOhh9+/f5f9GdrPjFyCFezz589DpXaxt7iM7Z9//hkeP348VPj69etALsEK9uXLl6FSi1WvSL5+/Xqo8OnTpy7RpYZghZrqwusVybbCaiut3trPzCorl2CFqt4ObrRt4Y8fP4axtVi9fPlyqNBiTybBCvTr169JD497rVCePn06VOh1Fkd/ghVo6i3N+/fvhx7atvDBgwdDhQ8fPgzkEaxAvYJxqLY66bXCe/bs2VDBtjCTYIVpoWhbwqn1WqFU3S2celvN7QhWmKkO27eZyWIKghWmevZqFzNZTEGwgsztAjOTRTXBCjKX7eCGmSyqCVaIuR4Sm8mikmCFmOvWpedM1r1794YKZrJyCFaIqWevduk5k2VbyDbBCjCX2atdz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SZYV6h879VaXt5WeXBtJmu5BOsKVZ9u7S//GraDG5WjG0uYyeLfBGtL+2Qze9VH5cH1EmaybAv/TbC2VH6yLXW6/TqVj+qYyVoewbqkcvaqPTe4xvcfVT6qYyZreQTrksol+NLezHCoykd1zGQtj2BdUnV3sB20r3E7uFEVLDNZyyNYf1XOXq39e+gqZ8/MZC2LYP1VOXu1truD2yof1TGTtSyC9VfVp9jS38xwKDNZhzOT9T+CNdTOXlWdfcxd5aM6ZrKWQ7CG2k+wtd4d3Fb9qI6ZrGVYfbCq33u1pkdx9qncFprJWobVB6tyqb32w/ZtlfNMZrKWYfXB8maGaVWd6ZnJWgZfVQ/EcOgOxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWECM/wKc/Y0zpWLfuAAAAABJRU5ErkJggg==",Mt=""+window.__toCdnUrl("assets/bedrock-yFRPpe__.png"),Zt=""+window.__toCdnUrl("assets/deepseek-C3x42pq3.png"),Dt=""+window.__toCdnUrl("assets/doubao-yPqHSkLx.png"),Gt=""+window.__toCdnUrl("assets/gemini-DffKpc81.png"),jt=""+window.__toCdnUrl("assets/google-DT1VSJ0m.png"),Vt=""+window.__toCdnUrl("assets/ideogram-REIjy0Er.png"),Ft=""+window.__toCdnUrl("assets/ollama-C7MZn2d_.png"),kt=""+window.__toCdnUrl("assets/openai-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LSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0hAsIA3BAtIQLCANwQLSECwgDcEC0vgXkv5P8wQTb/sAAAAASUVORK5CYII=",Pt=""+window.__toCdnUrl("assets/poe-B588TgZu.png"),Ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1dSURBVHgB7d3tbRXXFgbg8dX9T1wBoQPSQejAVBBTgXEFSSogqQBcgdMBdAAdkA6gg3O9kCwhX3POfO5Za+Z5JCdSZBIfO+f1Xnve2XN2uNMBFPCfDqAIgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoAyBBZQhsIAyBBZQhsACyhBYQBkCCyhDYAFlCCygDIEFlCGwgDIEFlCGwALKEFhAGQILKENgAWUILKAMgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoAyBBZQhsIAyBBZQhsACyhBYQBkCCyhDYAFlCCygDIEFlCGwgDIEFlCGwALKEFhAGQILKENgAWUILKAMgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoAyBBZQhsIAyBBZQhsACyhBYQBkCCyhDYAFlCCygDIEFlCGw2J1///23e/bsWXd2drb6x6tXrzr6Ozvc6WBHXrx40X348KFb288//9y9f//+29/pxwqLXfnzzz9ThFV48+aNsBrICovduB8FM7i6uur++uuvjmEEFrsRYRWhtbZYVX3+/LljOCMhuxCjYIawCrFvxTgCi82LPas//vijy+D333+3bzWBkZB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3jCKwZxRsn0yi49JsiUws+vu9z7xnaeM9HYM0k0xOMozPVKjiztODvR0Mt+G0TWDPJMgq2bqVnasH3OVGV2gTWDDK12aON3nrFowVPKwJrokz3ts3RZh9riy14e1j5CKyJ4s2R5cbmtQudmVrwc/wSWfK1eFDrOAJrgnhTZBk/1hgFH8rUgo/RMM4gy8rqbRyBNVKmNvvV1VWq5nmWryXL6pf5CKyRMrXZs5xkei/LaKgFvz0Ca4S9tNnHylR1mNKC10bPR2ANtLc2+1jZWvBGw20QWAPstc0+VqYWfJxNRn0Ca4C9ttnHynSDdLTgs5z+GlwlHOfscKcDKMAKCyhDYAFlCCygDIEFlCGwgDIEFlCGwALKEFhAGQILKENgAWUILKAMgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoAyBBZQhsIAyBBZQhsACyhBYQBkCCyhDYAFlCCygDIEFlCGwgDIEFlCGwALKEFhAGQILKENgAWUILKAMgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoAyBBZQhsIAyBBZQhsACyhBYQBkCCyhDYAFlCCygDIEFlCGwgDIEFlCGwALKEFhAGQILKENgAWUILKAMgQWUIbCAMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoIz/AWP7oZ6cDDZCAAAAAElFTkSuQmCC",ge={anthropic:Wt,bedrock:Mt,deepseek:Zt,doubao:Dt,gemini:Gt,google:jt,ideogram:Vt,ollama:Ft,openai:kt,openrouter:Yt,poe:Pt,xai:Ut},Fe={width:16,height:16,borderRadius:"2px",objectFit:"contain",backgroundColor:"transparent"};function Kt({onSubmit:h,models:f}){const{loading:w,i18n:R}=pt(),x=Ze({model:"",prompt:"",number:1}),b=()=>{const t=JSON.parse(JSON.stringify(x));Object.values(x).every(E=>!!E)&&h(t)},{run:n}=Lt(b,{wait:500}),e=oe.useMemo(()=>{const t=JSON.parse(JSON.stringify(x));return Object.values(t).some(a=>!a)},[JSON.stringify(x)]);return B.jsxs(zt,{onSubmit:t=>t.preventDefault(),children:[B.jsxs(z,{sx:{flex:1,height:"100%",overflow:"hidden",flexDirection:"column",display:"flex",mt:2,gap:2},children:[B.jsxs(z,{sx:{mx:2,display:"flex",flexDirection:"column",gap:1},children:[B.jsx(pe,{gutterBottom:!0,className:"title label",sx:{color:"text.primary"},children:R("aiImagePrompt")}),B.jsx(gt,{sx:{width:1},size:"small",type:"text",required:!0,placeholder:R("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:x.prompt??"",onChange:t=>{t.stopPropagation(),x.prompt=t.target.value},slotProps:{htmlInput:{maxLength:1e3}}})]}),B.jsxs(z,{sx:{px:2,display:"flex",flexDirection:"column",gap:1},children:[B.jsx(pe,{gutterBottom:!0,className:"title label",sx:{color:"text.primary"},children:`${R("aiImageModel")}`}),B.jsx(ht,{fullWidth:!0,size:"small",children:B.jsx(dt,{sx:{width:1},value:x.model,onChange:t=>{x.number=1,x.model=t.target.value},MenuProps:{disablePortal:!0},renderValue:t=>{const a=f.find(i=>`${i.provider}/${i.model}`===t);return a?B.jsxs(z,{sx:{display:"flex",alignItems:"center",gap:1},children:[ge[a.provider]&&B.jsx(z,{component:"img",src:ge[a.provider],alt:a.provider,style:Fe}),B.jsx(pe,{variant:"body2",children:a.model})]}):t},children:f.map(t=>B.jsx(Ct,{value:`${t.provider}/${t.model}`,children:B.jsxs(z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[ge[t.provider]&&B.jsx(z,{component:"img",src:ge[t.provider],alt:t.provider,style:Fe}),B.jsx(pe,{variant:"body2",sx:{flex:1},children:t.model})]})},`${t.provider}/${t.model}`))})})]})]}),B.jsx(Me,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:n,disabled:w||e,children:R(w?"aiImageGenerating":"aiImageGenerate")},w?"loading-submit":"submit")]})}const zt=ce(z)`
|
|
1
|
+
import{j as B,ak as z,T as pe,z as gt,y as ht,bZ as dt,M as Ct,Q as Me,at as ce,ar as lt,cu as xt,ee as Et,ef as Rt,I as yt,eg as mt,D as bt,b4 as le,aj as wt,a6 as vt}from"./vendor-mui-core-DnR6WYuU.js";import{r as oe,p as Ve,g as It}from"./vendor-react-CTtPmzVP.js";import{L as St,g as Ze,u as Lt,l as Bt,e as _t,q as Tt}from"./vendor-hooks-qxhUUbW5.js";import{k as Ht,bc as Ot,_ as he,bn as ct}from"./vendor-ux-B2x-0VyJ.js";import{aI as Nt}from"./vendor-utils-CxWN1dT3.js";import{mediaKitApi as Qt}from"./index-CDaq45HC.js";import{r as De}from"./index-_tncRnTu.js";import"./lottie-web-4koyQiv_.js";import"./index-B-MpZQKm.js";import"./vendor-arcblock-hbumvS-z.js";import"./index-DRYJ0xIl.js";const ft=oe.createContext({}),pt=()=>oe.useContext(ft);function qt({children:h,restrictions:f,i18n:w,theme:R}){const[x,b]=St({loading:!1}),n=t=>b(a=>({...a,loading:t})),e=oe.useMemo(()=>({...x,onLoading:n,restrictions:f,i18n:w}),[x]);return B.jsx(Ht,{theme:R,children:B.jsx(ft.Provider,{value:e,children:h})})}const Wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAskSURBVHgB7d3RcdTIGoZhcSJYMoAMIAIgAiACIALIwBCBIQIgA4jAkAEZQAYmAx+6iqnjM+vxjD3qX/qk56niYm92wYve6W790ty5+GMACPCfASCEYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEO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xBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWEAMwQJiCBYQQ7CAGIIFxBAsIIZgATEEC4ghWECM/wKc/Y0zpWLfuAAAAABJRU5ErkJggg==",Mt=""+window.__toCdnUrl("assets/bedrock-yFRPpe__.png"),Zt=""+window.__toCdnUrl("assets/deepseek-C3x42pq3.png"),Dt=""+window.__toCdnUrl("assets/doubao-yPqHSkLx.png"),Gt=""+window.__toCdnUrl("assets/gemini-DffKpc81.png"),jt=""+window.__toCdnUrl("assets/google-DT1VSJ0m.png"),Vt=""+window.__toCdnUrl("assets/ideogram-REIjy0Er.png"),Ft=""+window.__toCdnUrl("assets/ollama-C7MZn2d_.png"),kt=""+window.__toCdnUrl("assets/openai-DlpqJdrb.png"),Yt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0dSURBVHgB7d1Nb1XXucDxlahAogQUUi6VSG+iQCT7CmJyS0FB5WYQRreT209wP1w7yqhpB3QSKrUgEYWQFkIlLCW4aTASxrGRbRryIqX7OXBSILzY2Od4P2v9ftIRBKkDv5x/13r23us89V2nACTwdAFIQrCANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hDsIA0BAtIQ7CANAQLSEOwgDQEC0hD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AMgQWUIbAAsoQWEAZAgsoQ2ABZQgsoIz/AWP7oZ6cDDZCAAAAAElFTkSuQmCC",ge={anthropic:Wt,bedrock:Mt,deepseek:Zt,doubao:Dt,gemini:Gt,google:jt,ideogram:Vt,ollama:Ft,openai:kt,openrouter:Yt,poe:Pt,xai:Ut},Fe={width:16,height:16,borderRadius:"2px",objectFit:"contain",backgroundColor:"transparent"};function Kt({onSubmit:h,models:f}){const{loading:w,i18n:R}=pt(),x=Ze({model:"",prompt:"",number:1}),b=()=>{const t=JSON.parse(JSON.stringify(x));Object.values(x).every(E=>!!E)&&h(t)},{run:n}=Lt(b,{wait:500}),e=oe.useMemo(()=>{const t=JSON.parse(JSON.stringify(x));return Object.values(t).some(a=>!a)},[JSON.stringify(x)]);return B.jsxs(zt,{onSubmit:t=>t.preventDefault(),children:[B.jsxs(z,{sx:{flex:1,height:"100%",overflow:"hidden",flexDirection:"column",display:"flex",mt:2,gap:2},children:[B.jsxs(z,{sx:{mx:2,display:"flex",flexDirection:"column",gap:1},children:[B.jsx(pe,{gutterBottom:!0,className:"title label",sx:{color:"text.primary"},children:R("aiImagePrompt")}),B.jsx(gt,{sx:{width:1},size:"small",type:"text",required:!0,placeholder:R("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:x.prompt??"",onChange:t=>{t.stopPropagation(),x.prompt=t.target.value},slotProps:{htmlInput:{maxLength:1e3}}})]}),B.jsxs(z,{sx:{px:2,display:"flex",flexDirection:"column",gap:1},children:[B.jsx(pe,{gutterBottom:!0,className:"title label",sx:{color:"text.primary"},children:`${R("aiImageModel")}`}),B.jsx(ht,{fullWidth:!0,size:"small",children:B.jsx(dt,{sx:{width:1},value:x.model,onChange:t=>{x.number=1,x.model=t.target.value},MenuProps:{disablePortal:!0},renderValue:t=>{const a=f.find(i=>`${i.provider}/${i.model}`===t);return a?B.jsxs(z,{sx:{display:"flex",alignItems:"center",gap:1},children:[ge[a.provider]&&B.jsx(z,{component:"img",src:ge[a.provider],alt:a.provider,style:Fe}),B.jsx(pe,{variant:"body2",children:a.model})]}):t},children:f.map(t=>B.jsx(Ct,{value:`${t.provider}/${t.model}`,children:B.jsxs(z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[ge[t.provider]&&B.jsx(z,{component:"img",src:ge[t.provider],alt:t.provider,style:Fe}),B.jsx(pe,{variant:"body2",sx:{flex:1},children:t.model})]})},`${t.provider}/${t.model}`))})})]})]}),B.jsx(Me,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:n,disabled:w||e,children:R(w?"aiImageGenerating":"aiImageGenerate")},w?"loading-submit":"submit")]})}const zt=ce(z)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./vendor-react-CTtPmzVP.js";import{j as a,y as b,W as t,z as y,M as E,ak as I}from"./vendor-mui-core-DnR6WYuU.js";import{a as j}from"./vendor-hooks-qxhUUbW5.js";import{Q as r}from"./index-
|
|
1
|
+
import{r as p}from"./vendor-react-CTtPmzVP.js";import{j as a,y as b,W as t,z as y,M as E,ak as I}from"./vendor-mui-core-DnR6WYuU.js";import{a as j}from"./vendor-hooks-qxhUUbW5.js";import{Q as r}from"./index-B-MpZQKm.js";import{V as A}from"./vendor-ux-B2x-0VyJ.js";import{l as C}from"./arrow-down.svg-C4FUKwt4.js";import{L as O,D as H}from"./vendor-mui-x-CQc01l4r.js";import{A as R}from"./AdapterDayjs-C98qzmYr.js";function v({value:s=null,onChange:i,error:l=!1,helperText:c="",label:h="",timezone:e="",minDateTime:f=null}){const d=j(()=>{let n=r();return s&&(n=e?r(s).tz(e):r(s)),n},[s,e]),m=n=>{const T=e?r(n).tz(e):r(n);i(new Date(T.format("YYYY-MM-DD HH:mm:00")))};return a.jsx(O,{dateAdapter:R,children:a.jsx(b,{fullWidth:!0,error:l,children:a.jsx(H,{label:h,minDateTime:f,value:d,onChange:m,slotProps:{textField:{error:l,helperText:l?c:""}},format:"YYYY-MM-DD HH:mm"})})})}v.propTypes={value:t.oneOfType([t.string,t.instanceOf(Date)]),onChange:t.func.isRequired,error:t.bool,helperText:t.string,label:t.string,timezone:t.string,minDateTime:t.instanceOf(Date)};function U(s){return a.jsx(C,{...s,width:20,height:20})}const u={MINUTES_30:30*60*1e3,HOUR_1:60*60*1e3,HOURS_3:3*60*60*1e3,DAY_1:24*60*60*1e3,DAYS_7:7*24*60*60*1e3,DAYS_30:30*24*60*60*1e3};function $({placeholder:s="",value:i="",onChange:l,timezone:c="",showError:h=!0}){const{t:e}=A(),[f,d]=p.useState(i||""),[m,n]=p.useState(null),[T,Y]=p.useState(null),x=p.useMemo(()=>[{value:u.MINUTES_30,label:`30 ${e("common.minutes")}`},{value:u.HOUR_1,label:`1 ${e("common.hour")}`},{value:u.HOURS_3,label:`3 ${e("common.hours")}`},{value:u.DAY_1,label:`1 ${e("common.day")}`},{value:u.DAYS_7,label:`7 ${e("common.days")}`},{value:u.DAYS_30,label:`30 ${e("common.days")}`},{value:"custom",label:e("common.custom")}],[e]),M=o=>{if(d(o),o==="custom"){const D=c?r().tz(c):r(),S=D.add(1,"day").toDate();Y(D),n(S),l(S)}else l(new Date(Date.now()+o))},_=o=>{n(o),l(o)};p.useEffect(()=>{i&&(x.find(D=>r(D.value).isSame(i))||(d("custom"),n(i)))},[]);const g=j(()=>h?!!(!m||r(m).isBefore(r())):!1,[m,e]);return a.jsxs(a.Fragment,{children:[a.jsx(b,{fullWidth:!0,children:a.jsx(y,{select:!0,value:f,label:s||e("team.passport.passportExpireTime"),onChange:o=>M(o.target.value),variant:"outlined",slotProps:{select:{IconComponent:U}},sx:{"& .MuiInputLabel-root":{width:"calc(100% - 46px)"}},children:x.map(o=>a.jsx(E,{value:o.value,children:o.label},o.value))})}),f==="custom"&&a.jsx(I,{children:a.jsx(v,{value:m,onChange:_,label:e("team.passport.customExpireTime"),timezone:c,error:!!g,helperText:g?e("team.passport.customExpireTimeIsInvalid"):void 0,minDateTime:T})})]})}$.propTypes={value:t.oneOfType([t.string,t.instanceOf(Date)]),onChange:t.func.isRequired,timezone:t.string,placeholder:t.string,showError:t.bool};export{$ as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,y as yr,bZ as ye,M as ne,ak as m,Q as G,W as u,J as ve,b_ as vr,I as W,aN as wr,T as A,aj as jr,b$ as Pe,P as Ie,bX as Te,a5 as Re,z as Ue,A as Fe,c0 as Cr,b0 as kr,U as Me,b3 as Sr,c1 as Pr,at as V,c2 as Ir,a6 as Y,n as oe,D as Tr,c3 as Rr,ar as Ae,b6 as we,c4 as Mr,aZ as Ar,bb as Er,bj as zr}from"./vendor-mui-core-DnR6WYuU.js";import{r as y,a as Wr,j as Lr,m as Dr}from"./vendor-react-CTtPmzVP.js";import{t as _e,I as $r,O as Br,a3 as Ee,D as Or,C as se,n as H,A as Nr}from"./vendor-utils-CxWN1dT3.js";import{u as Ur,az as Fr,aA as _r,c as je,aB as qr,h as Hr,am as qe,aC as Gr,aD as He,a3 as le,aE as Kr,aF as Yr,af as Zr,aG as Vr}from"./index-FreeXNkk.js";import{a as R,h as Qr,q as ce,g as Q,b as M,l as Jr}from"./vendor-hooks-qxhUUbW5.js";import{l as Ge}from"./arrow-down.svg-C4FUKwt4.js";import{aU as Ce,z as E,V as L,aZ as Xr,au as Ke,a_ as et,H as O,aa as rt,ax as tt,a$ as ze,J as nt,w as Ye,ab as ke,W as ot,ak as T,P as st,Q as it,$ as at,b0 as lt,b1 as ct,K as Ze}from"./vendor-ux-B2x-0VyJ.js";import{N as dt}from"./list-CXg6onZy.js";import{d as ut}from"./search-4YYphs0l.js";import{B as We}from"./bundle-avatar-0OtNVOJk.js";import{c as Le,T as pt}from"./team-DB9e4nhx.js";import{b as ft,d as ht,a as Ve,c as Qe,e as xt,f as mt,h as gt,$ as bt}from"./user-center-GNfNdqal.js";import{T as ge,O as yt}from"./index-CFII0zqE.js";import{c as vt}from"./passport-CgVIIIF1.js";import{N as Je,U as Xe}from"./index-CgwRpRMk.js";import{u as de}from"./use-mobile-D5clNlrm.js";import wt from"./index-B8zAb7Hc.js";import{U as jt,a as Ct}from"./user-follower-D5UmIVaZ.js";import{f as Z}from"./index-DBs9Ljax.js";import{S as er}from"./switch-BK-cb99t.js";import{u as De}from"./index-D9VLhdHJ.js";import kt from"./index-DEKD1iEz.js";import{o as St}from"./vendor-arcblock-hbumvS-z.js";import{D as Pt,a as ie,b as It,S as Tt}from"./index-CjS1scdg.js";import"./index-0SUQD3K4.js";import"./index-BojVbZw0.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-xZ-i1SpD.js";import"./util-BbwZ5cox.js";import"./base32-DYZff-KX.js";import"./session-8btKYxMi.js";import"./isURL-Dsl0-5oi.js";import"./use-app-logo-BYRQxVgh.js";import"./index-DMZ5Sj4Z.js";import"./revoke.svg-CNl4LAbv.js";import"./use-mobile-BINJTzMb.js";import"./actions-Dfiiwkit.js";import"./index-Bnog6DRk.js";import"./form-text-input-DLbggucC.js";import"./required-BQln5OcV.js";import"./form-wrapper-PT5ZzMQy.js";import"./edit.svg-RRSklUg-.js";import"./lock.svg-BgybwZNe.js";import"./index-BXRMGGxp.js";import"./permission-BdJe7FC0.js";import"./confirm-CQcou-U0.js";import"./click-to-copy-CoAdDvF3.js";import"./invitations-4w_OzLxr.js";import"./create-passport-svg-H8kuyoHI.js";import"./api-FQQlzPOP.js";import"./table-tips-DLm4KjPB.js";import"./ua-parser-DP5omx3I.js";import"./sdk-CHfXvAIT.js";import"./passport-item-CvEGWX-Y.js";import"./did-address-Di02Kgvg.js";import"./index-CwAZTFm0.js";import"./vendor-mui-x-CQc01l4r.js";import"./AdapterDayjs-C98qzmYr.js";import"./delete-confirm-ZZFKP_G2.js";import"./index-DRYJ0xIl.js";function Rt(){let r=new Map;function i({root:s,rootMargin:t,threshold:n}){let f=r.get(s);f||(f=new Map,r.set(s,f));let a=JSON.stringify({rootMargin:t,threshold:n}),p=f.get(a);if(!p){let l=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(o=>{l.get(o.target)?.(o)})},{root:s,rootMargin:t,threshold:n}),entryCallbacks:l},f.set(a,p)}return{observe:(l,x)=>{p.entryCallbacks.set(l,x),p.observer.observe(l)},unobserve:l=>{p.entryCallbacks.delete(l),p.observer.unobserve(l)}}}return{getObserver:i}}var Mt="0px",At=[0],Et=Rt();function zt(r){let i=r?.rootMargin??Mt,s=r?.threshold??At,t=y.useRef(null),n=y.useRef(null),f=y.useRef(null),[a,p]=y.useState(),l=y.useCallback(()=>{let k=t.current;if(!k){p(void 0);return}let v=Et.getObserver({root:n.current,rootMargin:i,threshold:s});v.observe(k,d=>{p(d)}),f.current=v},[i,s]),x=y.useCallback(()=>{let k=f.current,v=t.current;v&&k?.unobserve(v),f.current=null},[]),o=y.useCallback(k=>{x(),t.current=k,l()},[l,x]),h=y.useCallback(k=>{x(),n.current=k,l()},[l,x]);return[o,{entry:a,rootRef:h}]}var Wt=zt;function Lt(r){let[i,s]=Wt(r),t=!!s.entry?.isIntersecting,[n,f]=y.useState(t);return t&&!n&&f(!0),[i,{...s,isVisible:t,wasEverVisible:n}]}var Dt=Lt,$t=100;function Bt({loading:r,hasNextPage:i,onLoadMore:s,rootMargin:t,disabled:n,delayInMs:f=$t}){let a=y.useRef(s),[p,{rootRef:l,isVisible:x}]=Dt({rootMargin:t});y.useEffect(()=>{a.current=s},[s]);let o=!n&&!r&&x&&i;return y.useEffect(()=>{if(o){let h=setTimeout(()=>{a.current()},f);return()=>{clearTimeout(h)}}},[o,f]),[p,{rootRef:l}]}var Ot=Bt;const me={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};ae.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function ae({severity:r,size:i=8}){return me[r]?e.jsx(m,{component:"span",sx:{display:"inline-block",width:i,height:i,borderRadius:"50%",backgroundColor:me[r]||me.info}}):null}rr.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function rr({theme:r="dark",type:i="button",onSelectType:s,extra:t=void 0,currentTab:n="",loading:f=!1,...a}){const{t:p}=y.useContext(Ce),l=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==n||!f)&&s(g)},o=y.useMemo(()=>{const g={width:"100%",bgcolor:r==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:i==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return i==="line"?Object.assign(g,{}):g},[i,r]),h=(g,j,C)=>e.jsx(G,{disabled:f,onClick:()=>x(g.value),className:`profile-button ${j?"active":""}`,...a,children:g.label},g.value||C),k=(g,j,C)=>e.jsx(G,{variant:"text",disabled:f,onClick:()=>x(g.value),className:`profile-line-button ${j?"active":""}`,...a,children:g.label},g.value||C),v=()=>l?.map((g,j)=>{const C=n===g?.value;return i==="line"?e.jsx(y.Fragment,{children:k(g,C,j)},g.value||j):e.jsx(y.Fragment,{children:h(g,C,j)},g.value||j)}),d=g=>{const{value:j}=g.target;x(j==="all"?"":j)};return i==="select"?e.jsx(yr,{sx:{maxWidth:300},children:e.jsx(ye,{value:n||"all",onChange:d,size:"small",label:"Severity",IconComponent:g=>e.jsx(Ge,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:l.map((g,j)=>e.jsx(ne,{value:g.value||"all",children:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ae,{severity:g.value}),g.label]})},g.value||j))})}):e.jsxs(m,{className:"severity-tabs",sx:o,children:[e.jsx(m,{sx:{...i==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),t]})}tr.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function tr({loading:r,paging:i,onChange:s}){const{t}=y.useContext(Ce),n=ve(l=>l.breakpoints.down("md"));if(i.pageCount<=0||n)return null;const f=(l,x)=>{s({page:x+1})},a=l=>{const x=Number(l.target.value);s({page:1,pageSize:x})},p=i.page-1<=0?0:i.page-1;return e.jsx(m,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(vr,{component:"div",disabled:r,count:i.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:t("pagination.rowsPerPage"),labelDisplayedRows:({from:l,to:x,count:o})=>`${l}–${x} / ${o!==-1?o:`${t()}more than ${x}`}`,rowsPerPage:i.pageSize,onPageChange:f,onRowsPerPageChange:a})})}const Nt=y.memo(tr),Ut={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},$e=6,Be={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Ft={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},Oe=()=>({...Ft,width:"calc(50% - 8px)"});nr.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function nr({onFilterChange:r=()=>{},loading:i=!1,type:s="service",blockletMap:t={},filterType:n="component",selectedId:f=[],severity:a=[],enableMarkAllAsRead:p=!0,unReadCount:l=0,onReadFilterChange:x=()=>{},currentReadFilter:o="all"}){const{t:h}=y.useContext(Ce),[k,v]=y.useState(null),d=!!k,[g,j]=y.useState(f),[C,D]=y.useState(a),[b,S]=y.useState(!1),[P,_]=y.useState(""),[$,N]=y.useState([]);y.useEffect(()=>{j(f),D(a)},[f,a]);const U=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],J=c=>{(c!==o||!i)&&x(c)},K=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],X=c=>{v(c.currentTarget),_(""),S(!1)},pe=()=>{v(null)},ee=c=>{const w=g.includes(c)?g.filter(I=>I!==c):[...g,c];j(w),r({id:w,severity:C})},re=c=>{const w=C.includes(c)?C.filter(I=>I!==c):[...C,c];D(w),r({severity:w,id:g})},fe=c=>{_(c.target.value)},he=()=>{S(!b)},q=Wr.useMemo(()=>{if(!t.size)return[];const c=[];return n==="component"&&c.push({label:h("notification.system"),id:"system"}),Array.from(t).forEach(([,w])=>{const I=w.did||w.meta?.did,z=w.title||w.meta?.title||"",B=w.appPid||w.appDid;(n==="component"&&B!==I||n==="entity"&&B===I)&&c.push({label:z,id:I,blocklet:w,ancestors:w.ancestors})}),c},[t,n,h]);y.useEffect(()=>{if(P.trim()==="")N(q);else{const c=P.toLowerCase(),w=q.filter(I=>I.label.toLowerCase().includes(c));N(w)}},[P,q]);const xe=P.trim()!==""||b?$:$.slice(0,$e);return e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(m,{sx:{display:"flex",gap:1.5},children:U.map(c=>e.jsxs(G,{disabled:i,onClick:()=>J(c.value),className:`profile-button ${o===c.value?"active":""}`,sx:{...s==="service"&&o===c.value?{color:"secondary.main"}:{},color:"red",fontWeight:o===c.value?"bold":"normal"},children:[c.label,c.value==="unread"&&l>0&&` (${l})`]},c.value))}),e.jsxs(m,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(W,{size:"small",onClick:X,disabled:i,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(E,{icon:Ut,hFlip:!0})}),e.jsx(wr,{open:d,anchorEl:k,onClose:pe,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(m,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||C.length>0)&&e.jsx(G,{size:"small",onClick:()=>{j([]),D([]),r({severity:[],id:[]})},startIcon:e.jsx(jr,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:K.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(C.includes(c.value)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...Be},control:e.jsx(Re,{checked:C.includes(c.value),onChange:()=>re(c.value),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(ae,{severity:c.value}),c.label]})})},c.value))})}),e.jsxs(m,{sx:{mb:2},children:[e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(m,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ue,{size:"small",placeholder:"search",value:P,onChange:fe,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Fe,{position:"start",sx:{marginRight:"2px"},children:e.jsx(E,{icon:ut})})}}})})]}),e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:xe.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(g.includes(c.id)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...Be},control:e.jsx(Re,{checked:g.includes(c.id),onChange:()=>ee(c.id),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[c.blocklet&&e.jsx(We,{size:20,blocklet:c.blocklet,ancestors:c.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(A,{noWrap:!0,variant:"body2",component:"span",title:c.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:c.label})]})})},c.id))}),$.length>$e&&P.trim()===""&&e.jsx(G,{fullWidth:!0,size:"small",onClick:he,sx:{mt:1},endIcon:b?e.jsx(Cr,{}):e.jsx(kr,{})})]})]})})]})]}),g.length>0||C.length>0?e.jsxs(m,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(c=>{const w=K.find(I=>I.value===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(ae,{severity:c}),w?w.label:c]}),onDelete:()=>re(c),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${c}`)}),g.map(c=>{const w=q.find(I=>I.id===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(We,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:c]}),variant:"outlined",onDelete:()=>ee(c),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${c}`)})]}):null]})}const _t=V(Ir)`
|
|
1
|
+
import{j as e,y as yr,bZ as ye,M as ne,ak as m,Q as G,W as u,J as ve,b_ as vr,I as W,aN as wr,T as A,aj as jr,b$ as Pe,P as Ie,bX as Te,a5 as Re,z as Ue,A as Fe,c0 as Cr,b0 as kr,U as Me,b3 as Sr,c1 as Pr,at as V,c2 as Ir,a6 as Y,n as oe,D as Tr,c3 as Rr,ar as Ae,b6 as we,c4 as Mr,aZ as Ar,bb as Er,bj as zr}from"./vendor-mui-core-DnR6WYuU.js";import{r as y,a as Wr,j as Lr,m as Dr}from"./vendor-react-CTtPmzVP.js";import{t as _e,I as $r,O as Br,a3 as Ee,D as Or,C as se,n as H,A as Nr}from"./vendor-utils-CxWN1dT3.js";import{u as Ur,az as Fr,aA as _r,c as je,aB as qr,h as Hr,am as qe,aC as Gr,aD as He,a3 as le,aE as Kr,aF as Yr,af as Zr,aG as Vr}from"./index-B-MpZQKm.js";import{a as R,h as Qr,q as ce,g as Q,b as M,l as Jr}from"./vendor-hooks-qxhUUbW5.js";import{l as Ge}from"./arrow-down.svg-C4FUKwt4.js";import{aU as Ce,z as E,V as L,aZ as Xr,au as Ke,a_ as et,H as O,aa as rt,ax as tt,a$ as ze,J as nt,w as Ye,ab as ke,W as ot,ak as T,P as st,Q as it,$ as at,b0 as lt,b1 as ct,K as Ze}from"./vendor-ux-B2x-0VyJ.js";import{N as dt}from"./list-CiYFt3pl.js";import{d as ut}from"./search-4YYphs0l.js";import{B as We}from"./bundle-avatar-MwXjHSGV.js";import{c as Le,T as pt}from"./team-BDHl2zCb.js";import{b as ft,d as ht,a as Ve,c as Qe,e as xt,f as mt,h as gt,$ as bt}from"./user-center-CP1OknZL.js";import{T as ge,O as yt}from"./index-2h18bhBY.js";import{c as vt}from"./passport-MtVabWNV.js";import{N as Je,U as Xe}from"./index-AnS2fFHl.js";import{u as de}from"./use-mobile-D5clNlrm.js";import wt from"./index-BeMepvos.js";import{U as jt,a as Ct}from"./user-follower-CobHkt-I.js";import{f as Z}from"./index-DBs9Ljax.js";import{S as er}from"./switch-BK-cb99t.js";import{u as De}from"./index-D9VLhdHJ.js";import kt from"./index-FMUSsnLv.js";import{o as St}from"./vendor-arcblock-hbumvS-z.js";import{D as Pt,a as ie,b as It,S as Tt}from"./index-BUg9FOTN.js";import"./index-0SUQD3K4.js";import"./index-BojVbZw0.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-xZ-i1SpD.js";import"./util-DMqfvzdX.js";import"./base32-DYZff-KX.js";import"./session-CKEyJJp6.js";import"./isURL-CIce9auJ.js";import"./use-app-logo-C52bRzuf.js";import"./index-C7rfvc9y.js";import"./revoke.svg-CNl4LAbv.js";import"./use-mobile-BINJTzMb.js";import"./actions-Dfiiwkit.js";import"./index-Bnog6DRk.js";import"./form-text-input-DLbggucC.js";import"./required-BQln5OcV.js";import"./form-wrapper-PT5ZzMQy.js";import"./edit.svg-RRSklUg-.js";import"./lock.svg-BgybwZNe.js";import"./index-ZKGUIO-r.js";import"./permission-2Q-NKCMS.js";import"./confirm-Dwk8QEtL.js";import"./click-to-copy-CoAdDvF3.js";import"./invitations-XjQQCuZw.js";import"./create-passport-svg-H8kuyoHI.js";import"./api-FQQlzPOP.js";import"./table-tips-DLm4KjPB.js";import"./ua-parser-DP5omx3I.js";import"./sdk-Bes03kcb.js";import"./passport-item-CtZmczAl.js";import"./did-address-Di02Kgvg.js";import"./index-BBMhJfkP.js";import"./vendor-mui-x-CQc01l4r.js";import"./AdapterDayjs-C98qzmYr.js";import"./delete-confirm-DP8106B2.js";import"./index-DRYJ0xIl.js";function Rt(){let r=new Map;function i({root:s,rootMargin:t,threshold:n}){let f=r.get(s);f||(f=new Map,r.set(s,f));let a=JSON.stringify({rootMargin:t,threshold:n}),p=f.get(a);if(!p){let l=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(o=>{l.get(o.target)?.(o)})},{root:s,rootMargin:t,threshold:n}),entryCallbacks:l},f.set(a,p)}return{observe:(l,x)=>{p.entryCallbacks.set(l,x),p.observer.observe(l)},unobserve:l=>{p.entryCallbacks.delete(l),p.observer.unobserve(l)}}}return{getObserver:i}}var Mt="0px",At=[0],Et=Rt();function zt(r){let i=r?.rootMargin??Mt,s=r?.threshold??At,t=y.useRef(null),n=y.useRef(null),f=y.useRef(null),[a,p]=y.useState(),l=y.useCallback(()=>{let k=t.current;if(!k){p(void 0);return}let v=Et.getObserver({root:n.current,rootMargin:i,threshold:s});v.observe(k,d=>{p(d)}),f.current=v},[i,s]),x=y.useCallback(()=>{let k=f.current,v=t.current;v&&k?.unobserve(v),f.current=null},[]),o=y.useCallback(k=>{x(),t.current=k,l()},[l,x]),h=y.useCallback(k=>{x(),n.current=k,l()},[l,x]);return[o,{entry:a,rootRef:h}]}var Wt=zt;function Lt(r){let[i,s]=Wt(r),t=!!s.entry?.isIntersecting,[n,f]=y.useState(t);return t&&!n&&f(!0),[i,{...s,isVisible:t,wasEverVisible:n}]}var Dt=Lt,$t=100;function Bt({loading:r,hasNextPage:i,onLoadMore:s,rootMargin:t,disabled:n,delayInMs:f=$t}){let a=y.useRef(s),[p,{rootRef:l,isVisible:x}]=Dt({rootMargin:t});y.useEffect(()=>{a.current=s},[s]);let o=!n&&!r&&x&&i;return y.useEffect(()=>{if(o){let h=setTimeout(()=>{a.current()},f);return()=>{clearTimeout(h)}}},[o,f]),[p,{rootRef:l}]}var Ot=Bt;const me={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};ae.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function ae({severity:r,size:i=8}){return me[r]?e.jsx(m,{component:"span",sx:{display:"inline-block",width:i,height:i,borderRadius:"50%",backgroundColor:me[r]||me.info}}):null}rr.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function rr({theme:r="dark",type:i="button",onSelectType:s,extra:t=void 0,currentTab:n="",loading:f=!1,...a}){const{t:p}=y.useContext(Ce),l=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==n||!f)&&s(g)},o=y.useMemo(()=>{const g={width:"100%",bgcolor:r==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:i==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return i==="line"?Object.assign(g,{}):g},[i,r]),h=(g,j,C)=>e.jsx(G,{disabled:f,onClick:()=>x(g.value),className:`profile-button ${j?"active":""}`,...a,children:g.label},g.value||C),k=(g,j,C)=>e.jsx(G,{variant:"text",disabled:f,onClick:()=>x(g.value),className:`profile-line-button ${j?"active":""}`,...a,children:g.label},g.value||C),v=()=>l?.map((g,j)=>{const C=n===g?.value;return i==="line"?e.jsx(y.Fragment,{children:k(g,C,j)},g.value||j):e.jsx(y.Fragment,{children:h(g,C,j)},g.value||j)}),d=g=>{const{value:j}=g.target;x(j==="all"?"":j)};return i==="select"?e.jsx(yr,{sx:{maxWidth:300},children:e.jsx(ye,{value:n||"all",onChange:d,size:"small",label:"Severity",IconComponent:g=>e.jsx(Ge,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:l.map((g,j)=>e.jsx(ne,{value:g.value||"all",children:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ae,{severity:g.value}),g.label]})},g.value||j))})}):e.jsxs(m,{className:"severity-tabs",sx:o,children:[e.jsx(m,{sx:{...i==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),t]})}tr.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function tr({loading:r,paging:i,onChange:s}){const{t}=y.useContext(Ce),n=ve(l=>l.breakpoints.down("md"));if(i.pageCount<=0||n)return null;const f=(l,x)=>{s({page:x+1})},a=l=>{const x=Number(l.target.value);s({page:1,pageSize:x})},p=i.page-1<=0?0:i.page-1;return e.jsx(m,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(vr,{component:"div",disabled:r,count:i.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:t("pagination.rowsPerPage"),labelDisplayedRows:({from:l,to:x,count:o})=>`${l}–${x} / ${o!==-1?o:`${t()}more than ${x}`}`,rowsPerPage:i.pageSize,onPageChange:f,onRowsPerPageChange:a})})}const Nt=y.memo(tr),Ut={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},$e=6,Be={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Ft={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},Oe=()=>({...Ft,width:"calc(50% - 8px)"});nr.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function nr({onFilterChange:r=()=>{},loading:i=!1,type:s="service",blockletMap:t={},filterType:n="component",selectedId:f=[],severity:a=[],enableMarkAllAsRead:p=!0,unReadCount:l=0,onReadFilterChange:x=()=>{},currentReadFilter:o="all"}){const{t:h}=y.useContext(Ce),[k,v]=y.useState(null),d=!!k,[g,j]=y.useState(f),[C,D]=y.useState(a),[b,S]=y.useState(!1),[P,_]=y.useState(""),[$,N]=y.useState([]);y.useEffect(()=>{j(f),D(a)},[f,a]);const U=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],J=c=>{(c!==o||!i)&&x(c)},K=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],X=c=>{v(c.currentTarget),_(""),S(!1)},pe=()=>{v(null)},ee=c=>{const w=g.includes(c)?g.filter(I=>I!==c):[...g,c];j(w),r({id:w,severity:C})},re=c=>{const w=C.includes(c)?C.filter(I=>I!==c):[...C,c];D(w),r({severity:w,id:g})},fe=c=>{_(c.target.value)},he=()=>{S(!b)},q=Wr.useMemo(()=>{if(!t.size)return[];const c=[];return n==="component"&&c.push({label:h("notification.system"),id:"system"}),Array.from(t).forEach(([,w])=>{const I=w.did||w.meta?.did,z=w.title||w.meta?.title||"",B=w.appPid||w.appDid;(n==="component"&&B!==I||n==="entity"&&B===I)&&c.push({label:z,id:I,blocklet:w,ancestors:w.ancestors})}),c},[t,n,h]);y.useEffect(()=>{if(P.trim()==="")N(q);else{const c=P.toLowerCase(),w=q.filter(I=>I.label.toLowerCase().includes(c));N(w)}},[P,q]);const xe=P.trim()!==""||b?$:$.slice(0,$e);return e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(m,{sx:{display:"flex",gap:1.5},children:U.map(c=>e.jsxs(G,{disabled:i,onClick:()=>J(c.value),className:`profile-button ${o===c.value?"active":""}`,sx:{...s==="service"&&o===c.value?{color:"secondary.main"}:{},color:"red",fontWeight:o===c.value?"bold":"normal"},children:[c.label,c.value==="unread"&&l>0&&` (${l})`]},c.value))}),e.jsxs(m,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(W,{size:"small",onClick:X,disabled:i,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(E,{icon:Ut,hFlip:!0})}),e.jsx(wr,{open:d,anchorEl:k,onClose:pe,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(m,{children:[e.jsxs(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(m,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||C.length>0)&&e.jsx(G,{size:"small",onClick:()=>{j([]),D([]),r({severity:[],id:[]})},startIcon:e.jsx(jr,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(m,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:K.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(C.includes(c.value)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...Be},control:e.jsx(Re,{checked:C.includes(c.value),onChange:()=>re(c.value),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(ae,{severity:c.value}),c.label]})})},c.value))})}),e.jsxs(m,{sx:{mb:2},children:[e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(A,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(m,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ue,{size:"small",placeholder:"search",value:P,onChange:fe,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Fe,{position:"start",sx:{marginRight:"2px"},children:e.jsx(E,{icon:ut})})}}})})]}),e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:xe.map(c=>e.jsx(Ie,{elevation:0,sx:Oe(g.includes(c.id)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...Be},control:e.jsx(Re,{checked:g.includes(c.id),onChange:()=>ee(c.id),disabled:i,size:"small"}),label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[c.blocklet&&e.jsx(We,{size:20,blocklet:c.blocklet,ancestors:c.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(A,{noWrap:!0,variant:"body2",component:"span",title:c.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:c.label})]})})},c.id))}),$.length>$e&&P.trim()===""&&e.jsx(G,{fullWidth:!0,size:"small",onClick:he,sx:{mt:1},endIcon:b?e.jsx(Cr,{}):e.jsx(kr,{})})]})]})})]})]}),g.length>0||C.length>0?e.jsxs(m,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(c=>{const w=K.find(I=>I.value===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(ae,{severity:c}),w?w.label:c]}),onDelete:()=>re(c),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${c}`)}),g.map(c=>{const w=q.find(I=>I.id===c);return e.jsx(Me,{label:e.jsxs(m,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(We,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:c]}),variant:"outlined",onDelete:()=>ee(c),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${c}`)})]}):null]})}const _t=V(Ir)`
|
|
2
2
|
position: fixed;
|
|
3
3
|
bottom: 20px;
|
|
4
4
|
right: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as w1,J as K1,j as r,Y as Y1,$ as W1,I as q1,cE as _1,ar as y1,ak as U,bb as R,bj as I1,b6 as $1,am as B1,T,bf as e6,z as t6,cF as n6,a6,Q as r6}from"./vendor-mui-core-DnR6WYuU.js";import{C as x,a as i6,ae as S1,J as M,c as s6,Q as o6,F as c6}from"./vendor-utils-CxWN1dT3.js";import{V as l6,x as F1,J as u6,aA as H,l as C6,q as p6,aL as d6,w as t1,bd as n1}from"./vendor-ux-B2x-0VyJ.js";import{r as t}from"./vendor-react-CTtPmzVP.js";import{q as L1,b as v1,a as Z}from"./vendor-hooks-qxhUUbW5.js";import{bw as Y,h as W,bx as U1,by as h6,j as m6,bz as E6,aA as g6}from"./index-
|
|
1
|
+
import{D as w1,J as K1,j as r,Y as Y1,$ as W1,I as q1,cE as _1,ar as y1,ak as U,bb as R,bj as I1,b6 as $1,am as B1,T,bf as e6,z as t6,cF as n6,a6,Q as r6}from"./vendor-mui-core-DnR6WYuU.js";import{C as x,a as i6,ae as S1,J as M,c as s6,Q as o6,F as c6}from"./vendor-utils-CxWN1dT3.js";import{V as l6,x as F1,J as u6,aA as H,l as C6,q as p6,aL as d6,w as t1,bd as n1}from"./vendor-ux-B2x-0VyJ.js";import{r as t}from"./vendor-react-CTtPmzVP.js";import{q as L1,b as v1,a as Z}from"./vendor-hooks-qxhUUbW5.js";import{bw as Y,h as W,bx as U1,by as h6,j as m6,bz as E6,aA as g6}from"./index-B-MpZQKm.js";import{x as f6}from"./index-DRYJ0xIl.js";import{f as A6}from"./index-BojVbZw0.js";import{v as a1}from"./index-0SUQD3K4.js";const j=Y({});function D6({key:e}={key:"md"}){const n=w1();return K1(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),O1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(O1||{}),F=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(F||{});function x6({endpoint:e,deps:n=[]}){return L1(async()=>{if(!W(e))return;const{headers:a}=await j.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[i,s,c,u,l,C,d,p,m,g]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],h=i?decodeURIComponent(i):"";if(p===void 0||m===void 0){const f=c&&u&&l;return{version:C,name:h,subscriptionId:s,ownerDid:d||"",isAvailable:f,errorCode:f?0:A.UNAUTHORIZED,isSiteAdmin:g==="true"}}return{version:C,name:h,subscriptionId:s,ownerDid:d,isAvailable:p==="true",errorCode:parseInt(m,10),isSiteAdmin:g==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const w6=U1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
|
|
2
2
|
1. Please contact the DID Space administrator to verify the relevant configuration.
|
|
3
3
|
2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
|
|
4
4
|
If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),y6=U1.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l}from"./vendor-react-CTtPmzVP.js";import{V as C,$ as E,aX as M,bb as P}from"./vendor-ux-B2x-0VyJ.js";import{q as y}from"./vendor-hooks-qxhUUbW5.js";import{j as e,ak as s,a6 as S,aZ as w,b6 as W,y as L,x as _,bZ as B,M as D,T as z,bb as A,I as K,cC as N,Q as F,W as q}from"./vendor-mui-core-DnR6WYuU.js";import{c as T,Z as k}from"./index-
|
|
1
|
+
import{r as l}from"./vendor-react-CTtPmzVP.js";import{V as C,$ as E,aX as M,bb as P}from"./vendor-ux-B2x-0VyJ.js";import{q as y}from"./vendor-hooks-qxhUUbW5.js";import{j as e,ak as s,a6 as S,aZ as w,b6 as W,y as L,x as _,bZ as B,M as D,T as z,bb as A,I as K,cC as N,Q as F,W as q}from"./vendor-mui-core-DnR6WYuU.js";import{c as T,Z as k}from"./index-B-MpZQKm.js";import{a as U}from"./api-FQQlzPOP.js";import{T as V}from"./table-tips-DLm4KjPB.js";import{b as Z}from"./team-BDHl2zCb.js";import{u as G}from"./session-CKEyJJp6.js";import"./vendor-utils-CxWN1dT3.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-hbumvS-z.js";import"./use-mobile-BINJTzMb.js";import"./isURL-CIce9auJ.js";import"./use-app-logo-C52bRzuf.js";function $({endpoint:i}){const[t,a]=l.useState("mcp-link"),x=k(),{api:h}=k(),{teamDid:m}=Z(),{t:c,locale:p}=C(),{session:r}=G(),{data:u,run:o,loading:b}=y(()=>{const f={owner:T.SERVER_ROLES.ADMIN}[r?.user?.role]||r?.user?.role;return h.createAccessKey({input:{teamDid:m,passport:f,authType:"simple",remark:"Generated by MCP Servers"}})},{manual:!0}),{imgPrefix:n}=x,j=l.useMemo(()=>[{icon:e.jsx(s,{sx:{width:20,height:20},children:"🔗"}),value:"mcp-link",label:"MCP Link"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/claude.webp`,alt:"Claude",sx:{width:20,height:20}}),value:"claude",label:"Claude"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/cursor.png`,alt:"Cursor",sx:{width:20,height:20}}),value:"cursor",label:"Cursor"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/cline.png`,alt:"Cline",sx:{width:20,height:20}}),value:"cline",label:"Cline"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/roocline.png`,alt:"Roo Cline",sx:{width:20,height:20}}),value:"roo-cline",label:"Roo Cline"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/windsurf.png`,alt:"Windsurf",sx:{width:20,height:20}}),value:"windsurf",label:"Windsurf"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/witsy.png`,alt:"Witsy",sx:{width:20,height:20}}),value:"witsy",label:"Witsy"}],[n]),v=j.find(d=>d.value===t),g=l.useMemo(()=>u?.data?.accessKeySecret,[u]),R=l.useMemo(()=>!g&&t!=="mcp-link",[g,t]),I=d=>{const f=`npx @blocklet/install-mcp@latest i ${i} --client ${d} --streamableHTTP --oauth2Bearer ${g}`;switch(d){case"cursor":case"claude":case"cline":case"roo-cline":case"windsurf":case"witsy":return f;case"mcp-link":default:return i}};return e.jsxs(s,{className:"mcp-servers-container",children:[e.jsx(M,{tabs:j,current:t,onChange:a,scrollButtons:"auto",iconPosition:"start"}),e.jsxs(s,{children:[e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(z,{component:"span",variant:"h6",sx:{fontWeight:"bold",my:2},children:t==="mcp-link"?v?.label:`${v?.label} ${c("installCommand")}`}),t!=="mcp-link"&&e.jsx(A,{href:`https://www.arcblock.io/docs/blocklet-developer/${p}/mcp-${t}`,target:"_blank",rel:"noopener noreferrer",children:e.jsx(K,{size:"small",children:e.jsx(N,{fontSize:"small"})})})]}),e.jsxs(s,{className:"mcp-servers-codeblock",sx:{position:"relative","& pre":{borderRadius:1},"& .codeblock__inner":{overflow:"auto !important",borderRadius:1}},children:[e.jsx(P,{code:I(t),language:"shell",style:{margin:0},showDefaultText:!1}),R&&e.jsx(s,{sx:{position:"absolute",top:0,right:0,left:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"action.active",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",zIndex:1},children:b?e.jsx(S,{}):e.jsx(F,{variant:"contained",color:"primary",onClick:o,size:"small",children:`${c("common.generate")} ${c("command")}`})})]})]})]})}$.propTypes={endpoint:q.string.isRequired};function ce(){const[i,t]=l.useState(null),{t:a,locale:x}=C(),h=`${window?.blocklet?.appUrl}${T.WELLKNOWN_SERVICE_PATH_PREFIX}/mcp/servers`,{data:m,loading:c,error:p}=y(()=>Promise.all([U.get(h)])),r=l.useMemo(()=>m?.[0]?.data?.servers||[],[m]);l.useEffect(()=>{r?.length&&t(r.find(o=>o.did===window?.blocklet?.did)||r[0])},[r]);const u=o=>{const b=o.target.value;t(r.find(n=>n.did===b))};return c?e.jsx(s,{children:e.jsx(S,{})}):p?e.jsx(w,{color:"error",children:p?.message}):r?.length?e.jsxs(W,{sx:{gap:2,maxWidth:1200},children:[e.jsx(V,{title:a("mcp.listTitle"),tooltipTitle:a("mcp.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${x}/mcp-server`}),e.jsxs(L,{fullWidth:!0,children:[e.jsx(_,{id:"server-select-label",children:a("mcp.available")}),e.jsx(B,{labelId:"server-select-label",value:i?.did||"",label:a("mcp.available"),onChange:u,children:r.map(o=>e.jsx(D,{value:o.did,children:e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(E,{variant:"rounded",shape:"square",did:o.did,src:o.logo,size:20}),e.jsx(s,{sx:{fontSize:14},children:o.name})]})},o.did))})]}),i&&e.jsx($,{endpoint:i.endpoint})]}):e.jsx(w,{color:"warning",children:a("mcp.noServer")})}export{ce as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{V as M,H as P,z as te,ba as me,cC as nt,cD as it,aU as Q,ak as E,aL as pe,w as W,W as $,cE as ot,cF as rt,aW as Se,cG as at,aP as st,aX as De}from"./vendor-ux-B2x-0VyJ.js";import{b as h,a as ne,f as lt,g as ae,c as ct}from"./vendor-hooks-qxhUUbW5.js";import{r as D,L as dt}from"./vendor-react-CTtPmzVP.js";import{j as e,ak as a,y as U,z as B,W as k,bX as K,Q as Z,T as oe,I as ue,a3 as de,D as xe,b6 as H,cu as Pe,bi as Ae,d_ as ut,at as Be,ah as Re,d$ as We,a6 as Le,am as mt,e0 as ht,bb as pt}from"./vendor-mui-core-DnR6WYuU.js";import{Z as _,Y as z,c as J,cn as Ie,aD as Ue,am as X,bC as xt,J as ft,h as gt}from"./index-FreeXNkk.js";import{A as Y,n as q,C as ie,I as ze,b as re,_ as _e,az as bt,a as jt}from"./vendor-utils-CxWN1dT3.js";import{u as G,C as I,a as Fe}from"./index.esm-Co8ZxFyk.js";import{S as w}from"./section-jXB9AxBb.js";import{S as vt}from"./switch-control-CrDv-a96.js";import{d as kt,a as yt}from"./edit-rounded-CnMn6J-D.js";import{S as wt}from"./simple-select-l9hMw78x.js";import{u as Ne}from"./index-D9VLhdHJ.js";import{v as St}from"./index-Bnog6DRk.js";import{r as Lt}from"./base32-DYZff-KX.js";import{C as It}from"./click-to-copy-CoAdDvF3.js";import{u as Tt}from"./use-mobile-BINJTzMb.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-hbumvS-z.js";import"./required-BQln5OcV.js";import"./arrow-down.svg-C4FUKwt4.js";const fe={domain:"",clientId:"",clientSecret:""};function He({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...fe},i?.settings?.authentication?.auth0||{}),l=(i.environments||[]).find(r=>r.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(fe))}),b=h(async r=>{try{const{blocklet:n}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,auth0:{...r,order:c.auth0?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),L=Object.assign({...fe},n?.settings?.authentication?.auth0||{});y(L),P.success(t("common.saveSuccess")),d()}catch(n){P.error(n.message||t("common.saveFailed"))}}),T=h(r=>r?.trim()?!0:t("authentication.auth0.domainDescription")),S=h(r=>r?.trim()?!0:t("authentication.auth0.clientIdDescription")),C=h(r=>r?.trim()?!0:t("authentication.auth0.clientSecretDescription")),x=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[f]),p=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:x,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[x,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[p,e.jsx(me,{locale:f,content:p,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.auth0.domain"),children:e.jsx(I,{name:"domain",control:v,rules:{validate:T},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",label:t("authentication.auth0.domain"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.auth0.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:S},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",label:t("authentication.auth0.clientId"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.auth0.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:C},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",type:"password",label:t("authentication.auth0.clientSecret"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})})]})})}He.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ge={clientId:"",clientSecret:""};function Ve({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ge},i?.settings?.authentication?.github||{}),l=(i.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ge))}),b=h(async p=>{try{const{blocklet:r}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,github:{...p,order:c.github?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),n=Object.assign({...ge},r?.settings?.authentication?.github||{});y(n),P.success(t("common.saveSuccess")),d()}catch(r){P.error(r.message||t("common.saveFailed"))}}),T=h(p=>p?.trim()?!0:t("authentication.github.clientIdDescription")),S=h(p=>p?.trim()?!0:t("authentication.github.clientSecretDescription")),C=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[f]),x=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:C,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[C,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[x,e.jsx(me,{locale:f,content:x,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.github.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",label:t("authentication.github.clientId"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.github.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",type:"password",label:t("authentication.github.clientSecret"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})})]})})}Ve.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const be={showQrcode:!0};function Me({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=Object.assign({...be},i?.settings?.authentication?.wallet||{}),{handleSubmit:j,control:l,reset:g}=G({defaultValues:Y(s,Object.keys(be))}),v=h(async m=>{try{const{blocklet:y}=await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,wallet:{...m,order:c.wallet?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),b=Object.assign({...be},y?.settings?.authentication?.wallet||{});g(b),P.success(t("common.saveSuccess")),d()}catch(y){P.error(y.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:j(v)}),[j,v]),e.jsx(a,{children:e.jsx("form",{children:e.jsx(w,{title:t("authentication.wallet.showQrcode"),children:e.jsx(I,{name:"showQrcode",control:l,render:({field:m})=>e.jsx(K,{control:e.jsx(vt,{sx:{ml:1},checked:m.value,...m})})})})})})}Me.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};function $e({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=h(async()=>{try{await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,email:{order:c.email?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),P.success(t("common.saveSuccess")),d()}catch(j){P.error(j.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:s}),[s]),e.jsxs(a,{children:[t("authentication.emailLoginDescription"),e.jsx("br",{}),t("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(a,{component:dt,to:ie(J.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(Z,{size:"small",variant:"outlined",children:t("authentication.gotoEmailNotification")})})]})}$e.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};function Ke({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=h(async()=>{try{await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,passkey:{order:c.passkey?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),P.success(t("common.saveSuccess")),d()}catch(j){P.error(j.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:s}),[s]),null}Ke.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const je={clientId:"",clientSecret:""};function Je({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...je},i?.settings?.authentication?.google||{}),l=(i.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(je))}),b=h(async p=>{try{const{blocklet:r}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,google:{...p,order:c.google?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),n=Object.assign({...je},r?.settings?.authentication?.google||{});y(n),P.success(t("common.saveSuccess")),d()}catch(r){P.error(r.message||t("common.saveFailed"))}}),T=h(p=>p?.trim()?!0:t("authentication.google.clientIdDescription")),S=h(p=>p?.trim()?!0:t("authentication.google.clientSecretDescription")),C=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[f]),x=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:C,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[C,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[x,e.jsx(me,{locale:f,content:x,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.google.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",label:t("authentication.google.clientId"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.google.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",type:"password",label:t("authentication.google.clientSecret"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})})]})})}Je.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ve={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Ge({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ve},i?.settings?.authentication?.apple||{}),l=(i.environments||[]).find(n=>n.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ve))}),b=h(async n=>{try{const{blocklet:L}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,apple:{...n,order:c.apple?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),R=Object.assign({...ve},L?.settings?.authentication?.apple||{});y(R),P.success(t("common.saveSuccess")),d()}catch(L){P.error(L.message||t("common.saveFailed"))}}),T=h(n=>n?.trim()?!0:t("authentication.apple.teamIdDescription")),S=h(n=>n?.trim()?!0:t("authentication.apple.serviceIdDescription")),C=h(n=>n?.trim()?!0:t("authentication.apple.keyIdDescription")),x=h(n=>n?.trim()?!0:t("authentication.apple.authKeyDescription")),p=h(n=>n?.trim()?!0:t("authentication.apple.bundleIdDescription")),r=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{children:[e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[r,e.jsx(me,{locale:f,content:r,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.apple.teamId"),children:e.jsx(I,{name:"teamId",control:v,rules:{validate:T},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.teamId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.bundleId"),children:e.jsx(I,{name:"bundleId",control:v,rules:{validate:p},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.bundleId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.serviceId"),children:e.jsx(I,{name:"serviceId",control:v,rules:{validate:S},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.serviceId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.keyId"),children:e.jsx(I,{name:"keyId",control:v,rules:{validate:C},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.keyId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.authKey"),children:e.jsx(I,{name:"authKey",control:v,rules:{validate:x},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",type:"password",label:t("authentication.apple.authKey"),multiline:!0,rows:4,error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Ge.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ke={clientId:"",clientSecret:""};function Xe({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ke},i?.settings?.authentication?.twitter||{}),l=(i.environments||[]).find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ke))}),b=h(async x=>{try{const{blocklet:p}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,twitter:{...x,order:c.twitter?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),r=Object.assign({...ke},p?.settings?.authentication?.twitter||{});y(r),P.success(t("common.saveSuccess")),d()}catch(p){P.error(p.message||t("common.saveFailed"))}}),T=h(x=>x?.trim()?!0:t("authentication.twitter.clientIdDescription")),S=h(x=>x?.trim()?!0:t("authentication.twitter.clientSecretDescription")),C=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[C,e.jsx(me,{locale:f,content:C,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.twitter.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:x})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...x,size:"small",label:t("authentication.twitter.clientId"),error:!!m.errors[x.name],helperText:m.errors[x.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.twitter.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:x})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...x,size:"small",type:"password",label:t("authentication.twitter.clientSecret"),error:!!m.errors[x.name],helperText:m.errors[x.name]?.message||" "})})})})]})})}Xe.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const Ct={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function Ze({id:u,title:d,index:c,onBegin:o=q,onMove:i,onEnd:t,onEditItem:f=q,onDeleteItem:s=q,disableDelete:j=!1,icon:l=null}){const g=D.useRef(null),v=D.useRef(null),[{handlerId:m},y]=nt({accept:"dragItem",collect(C){return{handlerId:C.getHandlerId()}},hover(C,x){if(!g.current)return;const p=C.index,r=c;if(p===r)return;const n=g.current?.getBoundingClientRect(),L=v.current?.getBoundingClientRect(),R=(L.bottom-L.top)/2,he=x.getClientOffset().y-n.top;p<r&&he<R||p>r&&he>R||(i(p,r),C.index=r)}}),[{isDragging:b},T]=it({item:{index:c,type:"dragItem"},collect:C=>({isDragging:C.isDragging()}),begin:o,end:t});T(v),y(g);const S=b?.3:1;return e.jsx(a,{ref:g,children:e.jsxs(a,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:v,"data-handler-id":m,children:[e.jsxs(a,{sx:{py:2,px:1,opacity:S,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(a,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(te,{fontSize:20,icon:Ct})}),e.jsx(a,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:l}),e.jsx(oe,{sx:{flex:1},children:d}),e.jsx(ue,{size:"small",color:"primary",onClick:()=>{f(u)},children:e.jsx(te,{icon:kt})}),e.jsx(ue,{size:"small",color:"error",onClick:()=>{s(u)},disabled:j,children:e.jsx(te,{icon:yt})})]}),e.jsx(de,{})]})})}Ze.propTypes={title:k.string.isRequired,id:k.string.isRequired,index:k.number.isRequired,onBegin:k.func,onMove:k.func.isRequired,onEnd:k.func.isRequired,onEditItem:k.func,onDeleteItem:k.func,disableDelete:k.bool,icon:k.any};function Ye({ref:u=null,providers:d=[],sortMaps:c={}}){const o=D.useRef(null),{t:i}=D.useContext(Q),t=xe(),{control:f,watch:s,setValue:j,reset:l}=G({mode:"onChange",defaultValues:{provider:""}}),g=s("provider"),v=d.find(r=>r.name===g),m=lt(v),y=t?.transitions?.duration?.leavingScreen||300,b=ae({initMode:"add",mode:"add",show:!1,callback:q,get dialogTitle(){return this.mode==="edit"?i("authentication.updateLoginProvider",{provider:m.current?.title}):i("authentication.addLoginProvider")}}),T=h(()=>{l(),b.mode="add",b.initMode="add"}),S=h(()=>{b.show=!1,setTimeout(()=>{T()},y)}),C=h((r,n=null)=>{if(b.show=!0,n)b.initMode="edit",b.mode="edit",j("provider",n.provider);else{const L=d.find(R=>R.enabled===!1)?.name||d[0]?.name||E.WALLET;j("provider",L)}r?b.callback=r:b.callback=q});D.useImperativeHandle(u,()=>({open:C,close:S}),[C,S]);const x=h(()=>{o.current.submit()}),p=d.map(r=>({value:r.name,title:r.title,description:r.enabled?i("common.enabled"):""}));return D.useEffect(()=>{v?.enabled?b.mode="edit":b.mode="add"},[v?.enabled]),e.jsxs(pe,{open:b.show,title:b.dialogTitle,onClose:S,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(W,{color:"primary",autoFocus:!0,variant:"contained",onClick:x,disabled:!g,children:b.mode==="add"?i("common.confirm"):i("common.update")}),children:[b.initMode==="edit"?null:e.jsx(I,{name:"provider",control:f,render:({field:r})=>e.jsx(wt,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:i("authentication.chooseProvider"),placeholder:i("authentication.chooseProviderPlaceholder"),options:p,...ze(r,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(a,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:v?.component&&e.jsx(v.component,{ref:o,onSuccess:S,sortMaps:c})})]})}Ye.propTypes={ref:k.any,providers:k.array,sortMaps:k.object};function Dt(){const{confirmApi:u,confirmHolder:d}=Ue(),c=D.useRef(),{t:o}=M(),{api:i}=_(),{blocklet:t}=z(),f=t?.meta?.did,s=t?.settings?.authentication||{},j=[{name:E.WALLET,title:$[E.WALLET],icon:e.jsx(X,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Me},{name:E.EMAIL,title:$[E.EMAIL],icon:e.jsx(X,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:$e},{name:E.PASSKEY,title:$[E.PASSKEY],icon:e.jsx(X,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:Ke},{name:E.GOOGLE,title:$[E.GOOGLE],icon:e.jsx(X,{provider:"google",sx:{width:20,height:20}}),component:Je},{name:E.APPLE,title:$[E.APPLE],icon:e.jsx(X,{provider:"apple",sx:{width:20,height:20}}),component:Ge},{name:E.GITHUB,title:$[E.GITHUB],icon:e.jsx(X,{provider:"github",sx:{width:20,height:20}}),component:Ve},{name:E.TWITTER,title:$[E.TWITTER],icon:e.jsx(X,{provider:"twitter",sx:{width:20,height:20}}),component:Xe},{name:E.AUTH0,title:$[E.AUTH0],icon:e.jsx(X,{provider:"auth0",sx:{width:20,height:20}}),component:He,hidden:!0}].map(r=>({...r,enabled:s[r.name]?.enabled??!1,order:s[r.name]?.order??null})),l=j.filter(r=>r.enabled),g=l.sort((r,n)=>!re(r?.order)&&!re(n?.order)?r.order-n.order:re(r?.order)?1:-1),v=g.reduce((r,n,L)=>Object.assign(r,{[n.name]:{order:L}}),{}),m=ae(g.reduce((r,n,L)=>Object.assign(r,{[n.name]:L}),{})),y=[...l].sort((r,n)=>m[r.name]-m[n.name]),b={};typeof window<"u"&&(b.context=window);const T=h((r,n)=>{const L=y[r],R=y[n];m[L.name]=n,m[R.name]=r}),S=h(async()=>{const r=Object.keys(m).reduce((n,L)=>(n[L]={order:m[L]},n),{});await i.configAuthentication({input:{did:f,authentication:JSON.stringify(r)}})}),C=()=>{c.current.open(()=>{c.current.close()})},x=h(r=>{c.current.open(q,{provider:r})}),p=h(r=>{u.open({title:o("authentication.deleteLoginProvider",{provider:$[r]}),content:o("authentication.deleteLoginProviderDescription",{provider:$[r]}),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),async onConfirm(n){try{await i.configAuthentication({input:{did:f,authentication:JSON.stringify({[r]:{enabled:!1,order:null}})}}),delete m[r],P.success(o("common.deleteSuccess")),n()}catch(L){P.error(L.message||o("common.deleteFailed"))}}})});return e.jsxs(a,{children:[e.jsx(W,{variant:"contained",onClick:C,sx:{mb:1},children:o("authentication.addLoginProvider")}),e.jsx(ot,{backend:rt,...b,children:y.map((r,n)=>e.jsx(Ze,{index:n,id:r.name,title:r.title,icon:r.icon,onMove:T,onEnd:S,onEditItem:x,onDeleteItem:p,disableDelete:g.length<=1,children:r.component},r.name))}),e.jsx(Ye,{ref:c,providers:j,sortMaps:v}),d]})}const ee={ttl:J.SESSION_TTL,cacheTtl:J.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function V(u){return e.jsx(Ne,{...u,sx:{transform:"scale(0.75)"}})}function ye(u,d=!1){const c=d?u.ttl*86400:u.ttl/86400;return{...u,ttl:c}}function Pt(){const{api:u}=_(),{blocklet:d}=z(),c=d?.meta?.did,o=_e({},ee,d?.settings?.session||{});re(o.ttl)&&(o.ttl=ee.ttl),re(o.cacheTtl)&&(o.cacheTtl=ee.cacheTtl),o.phone||(o.phone=ee.phone),o.email||(o.email=ee.email),re(o.enableBlacklist)&&(o.enableBlacklist=ee.enableBlacklist);const{handleSubmit:i,control:t,formState:f,reset:s,watch:j}=G({defaultValues:Y(ye(o),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:l}=M(),g=j("email.enabled"),v=j("phone.enabled"),m=j("email.enableDomainBlackList"),y=j("email.enableDomainWhiteList"),{fields:b,append:T,remove:S}=Fe({control:t,name:"email.domainBlackList"}),{fields:C,append:x,remove:p}=Fe({control:t,name:"email.domainWhiteList"}),r=h(async n=>{try{const{blocklet:L}=await u.updateAppSessionConfig({input:{did:c,config:ze(ye(n,!0),["phone"])}}),R=Object.assign({},ee,Y(L?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));s(ye(R)),P.success(l("common.configSuccess"))}catch(L){P.error(L.message)}});return e.jsx(At,{onSubmit:i(r),children:e.jsxs(H,{direction:"column",sx:{gap:6},children:[e.jsxs(a,{children:[e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.profile")}),e.jsx(a,{component:de,sx:{my:3}})]}),e.jsxs(H,{sx:{gap:2},children:[e.jsx(w,{title:l("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(V,{disabled:!0,checked:!0})})}),e.jsx(w,{title:l("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(V,{disabled:!0,checked:!0})})}),e.jsx(w,{title:l("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enabled",control:t,render:({field:n})=>e.jsx(V,{...n,checked:n.value})})})}),g&&e.jsxs(H,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(w,{title:l("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.requireVerified",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.requireUnique",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.trustOauthProviders",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enableDomainBlackList",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),m&&e.jsxs(a,{children:[b.map((n,L)=>e.jsxs(H,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(I,{name:`email.domainBlackList.${L}`,control:t,render:R=>e.jsx(B,{...R.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>S(L),children:e.jsx(Pe,{})})]},n.id)),e.jsx(Z,{startIcon:e.jsx(Ae,{}),onClick:()=>T(""),children:l("blocklet.config.session.addDomain")})]}),e.jsx(w,{title:l("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enableDomainWhiteList",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),y&&e.jsxs(a,{children:[C.map((n,L)=>e.jsxs(H,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(I,{name:`email.domainWhiteList.${L}`,control:t,render:R=>e.jsx(B,{...R.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>p(L),children:e.jsx(Pe,{})})]},n.id)),e.jsx(Z,{startIcon:e.jsx(Ae,{}),onClick:()=>x(""),children:l("blocklet.config.session.addDomain")})]})]}),e.jsxs(a,{sx:{display:"none"},children:[e.jsx(w,{title:l("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.enabled",control:t,disabled:!0,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),v&&e.jsxs(H,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(w,{title:l("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.requireVerified",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.requireUnique",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})})]})]})]})]}),e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.period")}),e.jsx(a,{component:de,sx:{my:3}}),e.jsx(H,{direction:"column",spacing:2,children:e.jsx(I,{name:"ttl",control:t,rules:{min:1,max:30},render:({field:n})=>e.jsx(U,{fullWidth:!0,sx:{mb:2},children:e.jsx(w,{title:l("blocklet.config.session.ttl",{day:n.value}),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(ut,{...n,defaultValue:7,step:1,marks:[{value:1,label:l("blocklet.config.session.day",{day:1})},{value:7,label:l("blocklet.config.session.days",{day:7})},{value:14,label:l("blocklet.config.session.days",{day:14})},{value:21,label:l("blocklet.config.session.days",{day:21})},{value:30,label:l("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.experimentalSettings")}),e.jsx(a,{component:de,sx:{my:3}}),e.jsx(H,{direction:"column",spacing:2,children:e.jsx(w,{title:l("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"enableBlacklist",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})})})]}),e.jsx(a,{children:e.jsx(Z,{type:"submit",variant:"contained",disabled:!f.isDirty,children:l("common.save")})})]})})}const At=Be.form`
|
|
1
|
+
import{V as M,H as P,z as te,ba as me,cC as nt,cD as it,aU as Q,ak as E,aL as pe,w as W,W as $,cE as ot,cF as rt,aW as Se,cG as at,aP as st,aX as De}from"./vendor-ux-B2x-0VyJ.js";import{b as h,a as ne,f as lt,g as ae,c as ct}from"./vendor-hooks-qxhUUbW5.js";import{r as D,L as dt}from"./vendor-react-CTtPmzVP.js";import{j as e,ak as a,y as U,z as B,W as k,bX as K,Q as Z,T as oe,I as ue,a3 as de,D as xe,b6 as H,cu as Pe,bi as Ae,d_ as ut,at as Be,ah as Re,d$ as We,a6 as Le,am as mt,e0 as ht,bb as pt}from"./vendor-mui-core-DnR6WYuU.js";import{Z as _,Y as z,c as J,cn as Ie,aD as Ue,am as X,bC as xt,J as ft,h as gt}from"./index-B-MpZQKm.js";import{A as Y,n as q,C as ie,I as ze,b as re,_ as _e,az as bt,a as jt}from"./vendor-utils-CxWN1dT3.js";import{u as G,C as I,a as Fe}from"./index.esm-Co8ZxFyk.js";import{S as w}from"./section-jXB9AxBb.js";import{S as vt}from"./switch-control-CrDv-a96.js";import{d as kt,a as yt}from"./edit-rounded-CnMn6J-D.js";import{S as wt}from"./simple-select-l9hMw78x.js";import{u as Ne}from"./index-D9VLhdHJ.js";import{v as St}from"./index-Bnog6DRk.js";import{r as Lt}from"./base32-DYZff-KX.js";import{C as It}from"./click-to-copy-CoAdDvF3.js";import{u as Tt}from"./use-mobile-BINJTzMb.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-hbumvS-z.js";import"./required-BQln5OcV.js";import"./arrow-down.svg-C4FUKwt4.js";const fe={domain:"",clientId:"",clientSecret:""};function He({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...fe},i?.settings?.authentication?.auth0||{}),l=(i.environments||[]).find(r=>r.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(fe))}),b=h(async r=>{try{const{blocklet:n}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,auth0:{...r,order:c.auth0?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),L=Object.assign({...fe},n?.settings?.authentication?.auth0||{});y(L),P.success(t("common.saveSuccess")),d()}catch(n){P.error(n.message||t("common.saveFailed"))}}),T=h(r=>r?.trim()?!0:t("authentication.auth0.domainDescription")),S=h(r=>r?.trim()?!0:t("authentication.auth0.clientIdDescription")),C=h(r=>r?.trim()?!0:t("authentication.auth0.clientSecretDescription")),x=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[f]),p=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:x,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[x,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[p,e.jsx(me,{locale:f,content:p,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.auth0.domain"),children:e.jsx(I,{name:"domain",control:v,rules:{validate:T},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",label:t("authentication.auth0.domain"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.auth0.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:S},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",label:t("authentication.auth0.clientId"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.auth0.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:C},render:({field:r})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...r,size:"small",type:"password",label:t("authentication.auth0.clientSecret"),error:!!m.errors[r.name],helperText:m.errors[r.name]?.message||" "})})})})]})})}He.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ge={clientId:"",clientSecret:""};function Ve({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ge},i?.settings?.authentication?.github||{}),l=(i.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ge))}),b=h(async p=>{try{const{blocklet:r}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,github:{...p,order:c.github?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),n=Object.assign({...ge},r?.settings?.authentication?.github||{});y(n),P.success(t("common.saveSuccess")),d()}catch(r){P.error(r.message||t("common.saveFailed"))}}),T=h(p=>p?.trim()?!0:t("authentication.github.clientIdDescription")),S=h(p=>p?.trim()?!0:t("authentication.github.clientSecretDescription")),C=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[f]),x=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:C,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[C,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[x,e.jsx(me,{locale:f,content:x,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.github.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",label:t("authentication.github.clientId"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.github.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",type:"password",label:t("authentication.github.clientSecret"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})})]})})}Ve.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const be={showQrcode:!0};function Me({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=Object.assign({...be},i?.settings?.authentication?.wallet||{}),{handleSubmit:j,control:l,reset:g}=G({defaultValues:Y(s,Object.keys(be))}),v=h(async m=>{try{const{blocklet:y}=await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,wallet:{...m,order:c.wallet?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),b=Object.assign({...be},y?.settings?.authentication?.wallet||{});g(b),P.success(t("common.saveSuccess")),d()}catch(y){P.error(y.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:j(v)}),[j,v]),e.jsx(a,{children:e.jsx("form",{children:e.jsx(w,{title:t("authentication.wallet.showQrcode"),children:e.jsx(I,{name:"showQrcode",control:l,render:({field:m})=>e.jsx(K,{control:e.jsx(vt,{sx:{ml:1},checked:m.value,...m})})})})})})}Me.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};function $e({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=h(async()=>{try{await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,email:{order:c.email?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),P.success(t("common.saveSuccess")),d()}catch(j){P.error(j.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:s}),[s]),e.jsxs(a,{children:[t("authentication.emailLoginDescription"),e.jsx("br",{}),t("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(a,{component:dt,to:ie(J.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(Z,{size:"small",variant:"outlined",children:t("authentication.gotoEmailNotification")})})]})}$e.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};function Ke({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t}=M(),f=i?.meta?.did,s=h(async()=>{try{await o.configAuthentication({input:{did:f,authentication:JSON.stringify({...c,passkey:{order:c.passkey?.order??Object.keys(c).length,enabled:!0,type:"builtin"}})}}),P.success(t("common.saveSuccess")),d()}catch(j){P.error(j.message||t("common.saveFailed"))}});return D.useImperativeHandle(u,()=>({submit:s}),[s]),null}Ke.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const je={clientId:"",clientSecret:""};function Je({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...je},i?.settings?.authentication?.google||{}),l=(i.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(je))}),b=h(async p=>{try{const{blocklet:r}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,google:{...p,order:c.google?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),n=Object.assign({...je},r?.settings?.authentication?.google||{});y(n),P.success(t("common.saveSuccess")),d()}catch(r){P.error(r.message||t("common.saveFailed"))}}),T=h(p=>p?.trim()?!0:t("authentication.google.clientIdDescription")),S=h(p=>p?.trim()?!0:t("authentication.google.clientSecretDescription")),C=ne(()=>f==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[f]),x=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.viewDocument"),children:e.jsxs(a,{component:"a",href:C,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[C,e.jsx(a,{component:te,icon:Ie,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[x,e.jsx(me,{locale:f,content:x,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.google.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",label:t("authentication.google.clientId"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.google.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...p,size:"small",type:"password",label:t("authentication.google.clientSecret"),error:!!m.errors[p.name],helperText:m.errors[p.name]?.message||" "})})})})]})})}Je.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ve={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Ge({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ve},i?.settings?.authentication?.apple||{}),l=(i.environments||[]).find(n=>n.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ve))}),b=h(async n=>{try{const{blocklet:L}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,apple:{...n,order:c.apple?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),R=Object.assign({...ve},L?.settings?.authentication?.apple||{});y(R),P.success(t("common.saveSuccess")),d()}catch(L){P.error(L.message||t("common.saveFailed"))}}),T=h(n=>n?.trim()?!0:t("authentication.apple.teamIdDescription")),S=h(n=>n?.trim()?!0:t("authentication.apple.serviceIdDescription")),C=h(n=>n?.trim()?!0:t("authentication.apple.keyIdDescription")),x=h(n=>n?.trim()?!0:t("authentication.apple.authKeyDescription")),p=h(n=>n?.trim()?!0:t("authentication.apple.bundleIdDescription")),r=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{children:[e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[r,e.jsx(me,{locale:f,content:r,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.apple.teamId"),children:e.jsx(I,{name:"teamId",control:v,rules:{validate:T},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.teamId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.bundleId"),children:e.jsx(I,{name:"bundleId",control:v,rules:{validate:p},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.bundleId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.serviceId"),children:e.jsx(I,{name:"serviceId",control:v,rules:{validate:S},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.serviceId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.keyId"),children:e.jsx(I,{name:"keyId",control:v,rules:{validate:C},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",label:t("authentication.apple.keyId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.apple.authKey"),children:e.jsx(I,{name:"authKey",control:v,rules:{validate:x},render:({field:n})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...n,size:"small",type:"password",label:t("authentication.apple.authKey"),multiline:!0,rows:4,error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Ge.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const ke={clientId:"",clientSecret:""};function Xe({ref:u=null,onSuccess:d=q,sortMaps:c={}}){const{api:o}=_(),{blocklet:i}=z(),{t,locale:f}=M(),s=i?.meta?.did,j=Object.assign({...ke},i?.settings?.authentication?.twitter||{}),l=(i.environments||[]).find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:g,control:v,formState:m,reset:y}=G({defaultValues:Y(j,Object.keys(ke))}),b=h(async x=>{try{const{blocklet:p}=await o.configAuthentication({input:{did:s,authentication:JSON.stringify({...c,twitter:{...x,order:c.twitter?.order??Object.keys(c).length,enabled:!0,type:"oauth"}})}}),r=Object.assign({...ke},p?.settings?.authentication?.twitter||{});y(r),P.success(t("common.saveSuccess")),d()}catch(p){P.error(p.message||t("common.saveFailed"))}}),T=h(x=>x?.trim()?!0:t("authentication.twitter.clientIdDescription")),S=h(x=>x?.trim()?!0:t("authentication.twitter.clientSecretDescription")),C=ie(l,J.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return D.useImperativeHandle(u,()=>({submit:g(b)}),[g,b]),e.jsx(a,{children:e.jsxs("form",{onSubmit:g(b),disabled:!0,children:[e.jsx(w,{title:t("authentication.oauthCallbackUrl"),children:e.jsxs(a,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[C,e.jsx(me,{locale:f,content:C,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(w,{title:t("authentication.twitter.clientId"),children:e.jsx(I,{name:"clientId",control:v,rules:{validate:T},render:({field:x})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...x,size:"small",label:t("authentication.twitter.clientId"),error:!!m.errors[x.name],helperText:m.errors[x.name]?.message||" "})})})}),e.jsx(w,{title:t("authentication.twitter.clientSecret"),children:e.jsx(I,{name:"clientSecret",control:v,rules:{validate:S},render:({field:x})=>e.jsx(U,{fullWidth:!0,children:e.jsx(B,{...x,size:"small",type:"password",label:t("authentication.twitter.clientSecret"),error:!!m.errors[x.name],helperText:m.errors[x.name]?.message||" "})})})})]})})}Xe.propTypes={ref:k.any,onSuccess:k.func,sortMaps:k.object};const Ct={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function Ze({id:u,title:d,index:c,onBegin:o=q,onMove:i,onEnd:t,onEditItem:f=q,onDeleteItem:s=q,disableDelete:j=!1,icon:l=null}){const g=D.useRef(null),v=D.useRef(null),[{handlerId:m},y]=nt({accept:"dragItem",collect(C){return{handlerId:C.getHandlerId()}},hover(C,x){if(!g.current)return;const p=C.index,r=c;if(p===r)return;const n=g.current?.getBoundingClientRect(),L=v.current?.getBoundingClientRect(),R=(L.bottom-L.top)/2,he=x.getClientOffset().y-n.top;p<r&&he<R||p>r&&he>R||(i(p,r),C.index=r)}}),[{isDragging:b},T]=it({item:{index:c,type:"dragItem"},collect:C=>({isDragging:C.isDragging()}),begin:o,end:t});T(v),y(g);const S=b?.3:1;return e.jsx(a,{ref:g,children:e.jsxs(a,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:v,"data-handler-id":m,children:[e.jsxs(a,{sx:{py:2,px:1,opacity:S,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(a,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(te,{fontSize:20,icon:Ct})}),e.jsx(a,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:l}),e.jsx(oe,{sx:{flex:1},children:d}),e.jsx(ue,{size:"small",color:"primary",onClick:()=>{f(u)},children:e.jsx(te,{icon:kt})}),e.jsx(ue,{size:"small",color:"error",onClick:()=>{s(u)},disabled:j,children:e.jsx(te,{icon:yt})})]}),e.jsx(de,{})]})})}Ze.propTypes={title:k.string.isRequired,id:k.string.isRequired,index:k.number.isRequired,onBegin:k.func,onMove:k.func.isRequired,onEnd:k.func.isRequired,onEditItem:k.func,onDeleteItem:k.func,disableDelete:k.bool,icon:k.any};function Ye({ref:u=null,providers:d=[],sortMaps:c={}}){const o=D.useRef(null),{t:i}=D.useContext(Q),t=xe(),{control:f,watch:s,setValue:j,reset:l}=G({mode:"onChange",defaultValues:{provider:""}}),g=s("provider"),v=d.find(r=>r.name===g),m=lt(v),y=t?.transitions?.duration?.leavingScreen||300,b=ae({initMode:"add",mode:"add",show:!1,callback:q,get dialogTitle(){return this.mode==="edit"?i("authentication.updateLoginProvider",{provider:m.current?.title}):i("authentication.addLoginProvider")}}),T=h(()=>{l(),b.mode="add",b.initMode="add"}),S=h(()=>{b.show=!1,setTimeout(()=>{T()},y)}),C=h((r,n=null)=>{if(b.show=!0,n)b.initMode="edit",b.mode="edit",j("provider",n.provider);else{const L=d.find(R=>R.enabled===!1)?.name||d[0]?.name||E.WALLET;j("provider",L)}r?b.callback=r:b.callback=q});D.useImperativeHandle(u,()=>({open:C,close:S}),[C,S]);const x=h(()=>{o.current.submit()}),p=d.map(r=>({value:r.name,title:r.title,description:r.enabled?i("common.enabled"):""}));return D.useEffect(()=>{v?.enabled?b.mode="edit":b.mode="add"},[v?.enabled]),e.jsxs(pe,{open:b.show,title:b.dialogTitle,onClose:S,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(W,{color:"primary",autoFocus:!0,variant:"contained",onClick:x,disabled:!g,children:b.mode==="add"?i("common.confirm"):i("common.update")}),children:[b.initMode==="edit"?null:e.jsx(I,{name:"provider",control:f,render:({field:r})=>e.jsx(wt,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:i("authentication.chooseProvider"),placeholder:i("authentication.chooseProviderPlaceholder"),options:p,...ze(r,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(a,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:v?.component&&e.jsx(v.component,{ref:o,onSuccess:S,sortMaps:c})})]})}Ye.propTypes={ref:k.any,providers:k.array,sortMaps:k.object};function Dt(){const{confirmApi:u,confirmHolder:d}=Ue(),c=D.useRef(),{t:o}=M(),{api:i}=_(),{blocklet:t}=z(),f=t?.meta?.did,s=t?.settings?.authentication||{},j=[{name:E.WALLET,title:$[E.WALLET],icon:e.jsx(X,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Me},{name:E.EMAIL,title:$[E.EMAIL],icon:e.jsx(X,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:$e},{name:E.PASSKEY,title:$[E.PASSKEY],icon:e.jsx(X,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:Ke},{name:E.GOOGLE,title:$[E.GOOGLE],icon:e.jsx(X,{provider:"google",sx:{width:20,height:20}}),component:Je},{name:E.APPLE,title:$[E.APPLE],icon:e.jsx(X,{provider:"apple",sx:{width:20,height:20}}),component:Ge},{name:E.GITHUB,title:$[E.GITHUB],icon:e.jsx(X,{provider:"github",sx:{width:20,height:20}}),component:Ve},{name:E.TWITTER,title:$[E.TWITTER],icon:e.jsx(X,{provider:"twitter",sx:{width:20,height:20}}),component:Xe},{name:E.AUTH0,title:$[E.AUTH0],icon:e.jsx(X,{provider:"auth0",sx:{width:20,height:20}}),component:He,hidden:!0}].map(r=>({...r,enabled:s[r.name]?.enabled??!1,order:s[r.name]?.order??null})),l=j.filter(r=>r.enabled),g=l.sort((r,n)=>!re(r?.order)&&!re(n?.order)?r.order-n.order:re(r?.order)?1:-1),v=g.reduce((r,n,L)=>Object.assign(r,{[n.name]:{order:L}}),{}),m=ae(g.reduce((r,n,L)=>Object.assign(r,{[n.name]:L}),{})),y=[...l].sort((r,n)=>m[r.name]-m[n.name]),b={};typeof window<"u"&&(b.context=window);const T=h((r,n)=>{const L=y[r],R=y[n];m[L.name]=n,m[R.name]=r}),S=h(async()=>{const r=Object.keys(m).reduce((n,L)=>(n[L]={order:m[L]},n),{});await i.configAuthentication({input:{did:f,authentication:JSON.stringify(r)}})}),C=()=>{c.current.open(()=>{c.current.close()})},x=h(r=>{c.current.open(q,{provider:r})}),p=h(r=>{u.open({title:o("authentication.deleteLoginProvider",{provider:$[r]}),content:o("authentication.deleteLoginProviderDescription",{provider:$[r]}),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),async onConfirm(n){try{await i.configAuthentication({input:{did:f,authentication:JSON.stringify({[r]:{enabled:!1,order:null}})}}),delete m[r],P.success(o("common.deleteSuccess")),n()}catch(L){P.error(L.message||o("common.deleteFailed"))}}})});return e.jsxs(a,{children:[e.jsx(W,{variant:"contained",onClick:C,sx:{mb:1},children:o("authentication.addLoginProvider")}),e.jsx(ot,{backend:rt,...b,children:y.map((r,n)=>e.jsx(Ze,{index:n,id:r.name,title:r.title,icon:r.icon,onMove:T,onEnd:S,onEditItem:x,onDeleteItem:p,disableDelete:g.length<=1,children:r.component},r.name))}),e.jsx(Ye,{ref:c,providers:j,sortMaps:v}),d]})}const ee={ttl:J.SESSION_TTL,cacheTtl:J.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function V(u){return e.jsx(Ne,{...u,sx:{transform:"scale(0.75)"}})}function ye(u,d=!1){const c=d?u.ttl*86400:u.ttl/86400;return{...u,ttl:c}}function Pt(){const{api:u}=_(),{blocklet:d}=z(),c=d?.meta?.did,o=_e({},ee,d?.settings?.session||{});re(o.ttl)&&(o.ttl=ee.ttl),re(o.cacheTtl)&&(o.cacheTtl=ee.cacheTtl),o.phone||(o.phone=ee.phone),o.email||(o.email=ee.email),re(o.enableBlacklist)&&(o.enableBlacklist=ee.enableBlacklist);const{handleSubmit:i,control:t,formState:f,reset:s,watch:j}=G({defaultValues:Y(ye(o),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:l}=M(),g=j("email.enabled"),v=j("phone.enabled"),m=j("email.enableDomainBlackList"),y=j("email.enableDomainWhiteList"),{fields:b,append:T,remove:S}=Fe({control:t,name:"email.domainBlackList"}),{fields:C,append:x,remove:p}=Fe({control:t,name:"email.domainWhiteList"}),r=h(async n=>{try{const{blocklet:L}=await u.updateAppSessionConfig({input:{did:c,config:ze(ye(n,!0),["phone"])}}),R=Object.assign({},ee,Y(L?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));s(ye(R)),P.success(l("common.configSuccess"))}catch(L){P.error(L.message)}});return e.jsx(At,{onSubmit:i(r),children:e.jsxs(H,{direction:"column",sx:{gap:6},children:[e.jsxs(a,{children:[e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.profile")}),e.jsx(a,{component:de,sx:{my:3}})]}),e.jsxs(H,{sx:{gap:2},children:[e.jsx(w,{title:l("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(V,{disabled:!0,checked:!0})})}),e.jsx(w,{title:l("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(V,{disabled:!0,checked:!0})})}),e.jsx(w,{title:l("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enabled",control:t,render:({field:n})=>e.jsx(V,{...n,checked:n.value})})})}),g&&e.jsxs(H,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(w,{title:l("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.requireVerified",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.requireUnique",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.trustOauthProviders",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enableDomainBlackList",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),m&&e.jsxs(a,{children:[b.map((n,L)=>e.jsxs(H,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(I,{name:`email.domainBlackList.${L}`,control:t,render:R=>e.jsx(B,{...R.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>S(L),children:e.jsx(Pe,{})})]},n.id)),e.jsx(Z,{startIcon:e.jsx(Ae,{}),onClick:()=>T(""),children:l("blocklet.config.session.addDomain")})]}),e.jsx(w,{title:l("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"email.enableDomainWhiteList",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),y&&e.jsxs(a,{children:[C.map((n,L)=>e.jsxs(H,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(I,{name:`email.domainWhiteList.${L}`,control:t,render:R=>e.jsx(B,{...R.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>p(L),children:e.jsx(Pe,{})})]},n.id)),e.jsx(Z,{startIcon:e.jsx(Ae,{}),onClick:()=>x(""),children:l("blocklet.config.session.addDomain")})]})]}),e.jsxs(a,{sx:{display:"none"},children:[e.jsx(w,{title:l("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.enabled",control:t,disabled:!0,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),v&&e.jsxs(H,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(w,{title:l("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.requireVerified",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})}),e.jsx(w,{title:l("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"phone.requireUnique",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})})]})]})]})]}),e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.period")}),e.jsx(a,{component:de,sx:{my:3}}),e.jsx(H,{direction:"column",spacing:2,children:e.jsx(I,{name:"ttl",control:t,rules:{min:1,max:30},render:({field:n})=>e.jsx(U,{fullWidth:!0,sx:{mb:2},children:e.jsx(w,{title:l("blocklet.config.session.ttl",{day:n.value}),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(ut,{...n,defaultValue:7,step:1,marks:[{value:1,label:l("blocklet.config.session.day",{day:1})},{value:7,label:l("blocklet.config.session.days",{day:7})},{value:14,label:l("blocklet.config.session.days",{day:14})},{value:21,label:l("blocklet.config.session.days",{day:21})},{value:30,label:l("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(a,{children:[e.jsx(oe,{variant:"h6",sx:{fontWeight:600},children:l("blocklet.config.session.experimentalSettings")}),e.jsx(a,{component:de,sx:{my:3}}),e.jsx(H,{direction:"column",spacing:2,children:e.jsx(w,{title:l("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(I,{name:"enableBlacklist",control:t,render:({field:n})=>e.jsx(K,{sx:{ml:0},control:e.jsx(V,{...n,checked:n.value})})})})})})]}),e.jsx(a,{children:e.jsx(Z,{type:"submit",variant:"contained",disabled:!f.isDirty,children:l("common.save")})})]})})}const At=Be.form`
|
|
2
2
|
max-width: 1536px;
|
|
3
3
|
|
|
4
4
|
.advanced-config {
|