@abtnode/blocklet-services 1.16.42-beta-20250412-084444-20b0cf19 → 1.16.42-beta-20250413-121549-22e9a196
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/index.js +32 -2
- package/api/libs/push-kit/index.js +16 -11
- package/api/routes/user-session.js +49 -40
- package/api/routes/user.js +16 -4
- package/api/services/auth/session.js +37 -10
- package/api/util/attach-shared-utils.js +12 -5
- package/dist/assets/{ArrowDropDown-C_E3qkPd.js → ArrowDropDown-a-C4j7Lx.js} +1 -1
- package/dist/assets/{CheckCircle-D7Ntmb2o.js → CheckCircle-CuYzdCtm.js} +1 -1
- package/dist/assets/{ChevronLeft-BIgT65EY.js → ChevronLeft-CnflXey6.js} +1 -1
- package/dist/assets/{ChevronRight-foZmiP4J.js → ChevronRight-DE7hYCb3.js} +1 -1
- package/dist/assets/{Community-Ds1NG5Zj.js → Community-C8NtUXNH.js} +1 -1
- package/dist/assets/{DeleteOutline-CKVA3PXs.js → DeleteOutline-PGhagisl.js} +1 -1
- package/dist/assets/{Done-BDrYSkZM.js → Done-BVaQae1-.js} +1 -1
- package/dist/assets/{Download-BQiSNQBP.js → Download-DNNh4N1T.js} +1 -1
- package/dist/assets/{EditIcon-Bt91o1l6.js → EditIcon-Y1U-3M09.js} +1 -1
- package/dist/assets/{Email-C7SKOpM8.js → Email-BYzCrU9G.js} +1 -1
- package/dist/assets/{Error-CK4gTMoT.js → Error-C4dVUMw4.js} +1 -1
- package/dist/assets/{ExpandLess-1B6PdCYC.js → ExpandLess-Blh1x-4z.js} +1 -1
- package/dist/assets/{Google-DimUFzIe.js → Google-CAujGJ1A.js} +1 -1
- package/dist/assets/{Holiday-Dfj3kBBI.js → Holiday-DxDxhx5X.js} +1 -1
- package/dist/assets/{InfoOutlined-CEHciuDy.js → InfoOutlined-DF9JwavD.js} +1 -1
- package/dist/assets/{Launch-DX76v5dw.js → Launch-gOz_lwLg.js} +1 -1
- package/dist/assets/{LaunchOutlined-CnOQGhu-.js → LaunchOutlined-MbSPR9qn.js} +1 -1
- package/dist/assets/{Location--4ueDivQ.js → Location-CEwgGcA5.js} +1 -1
- package/dist/assets/{LockIcon-B84lMZao.js → LockIcon-D7BH0t_p.js} +1 -1
- package/dist/assets/{Meeting-CVVnP-bH.js → Meeting-BJz5QiFc.js} +1 -1
- package/dist/assets/{MoreHoriz-THEF6D0C.js → MoreHoriz-CGWVyYh4.js} +1 -1
- package/dist/assets/{OffSick-C_2x7yDI.js → OffSick--msvqLGm.js} +1 -1
- package/dist/assets/{Phone-CaKOX2Yu.js → Phone-CDl3oDYG.js} +1 -1
- package/dist/assets/{PlayArrow-DpcMtsY5.js → PlayArrow-CxWt6459.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-5K6WR8Pc.js → QuestionMarkCircle-CPHZnM6u.js} +1 -1
- package/dist/assets/{ServerLogo-C4P-qXGV.js → ServerLogo-vX_nf8Sc.js} +1 -1
- package/dist/assets/{Timezone-Bgwxnj29.js → Timezone-uXi4_8BX.js} +1 -1
- package/dist/assets/{TuneOutlined-DHqZ7jGz.js → TuneOutlined-DcqnBMqE.js} +1 -1
- package/dist/assets/{ViewList-DOu7Co_L.js → ViewList-B6eveRY-.js} +1 -1
- package/dist/assets/{WorkingRemotely-Dm2BOs5c.js → WorkingRemotely-CK4z1-Sd.js} +1 -1
- package/dist/assets/{access-control-wqGz9JCo.js → access-control-Dxyg5dpc.js} +1 -1
- package/dist/assets/{actions-CAL1KFv7.js → actions-BAjt7G_t.js} +1 -1
- package/dist/assets/{add-component-core-DqvSoT6a.js → add-component-core-BXowXTJz.js} +1 -1
- package/dist/assets/{add-resource-DmN1IY_o.js → add-resource-BetUBTvt.js} +1 -1
- package/dist/assets/{addon-D1_etOjl.js → addon-B1aBsfOX.js} +1 -1
- package/dist/assets/{advanced-CzJgEcda.js → advanced-C8t1232G.js} +1 -1
- package/dist/assets/{appearance-Bn0kYJHu.js → appearance-BIOmTg1q.js} +1 -1
- package/dist/assets/{audit-logs-DU66CSpw.js → audit-logs-SSAqJt40.js} +1 -1
- package/dist/assets/{base32-CLGITfm-.js → base32-iVyUiizz.js} +1 -1
- package/dist/assets/{branding-C5rNAfwW.js → branding-BDuOcSfH.js} +1 -1
- package/dist/assets/{branding-CiE421Dn.js → branding-NmIAi0kv.js} +2 -2
- package/dist/assets/{bundle-avatar-vSofRY4G.js → bundle-avatar-DfAWUEqX.js} +1 -1
- package/dist/assets/button-Kk1bqv_H.js +1 -0
- package/dist/assets/{click-to-copy-C9iEVQIO.js → click-to-copy-DCUroWft.js} +1 -1
- package/dist/assets/{complete-BeWyfTmK.js → complete-R99mlHBI.js} +1 -1
- package/dist/assets/{component-CZ948vh4.js → component-By64LaLD.js} +1 -1
- package/dist/assets/{config-DzZULB-q.js → config-BHBxeyYh.js} +1 -1
- package/dist/assets/{config-CFbM7U_5.js → config-BvNNOdw8.js} +1 -1
- package/dist/assets/config-navigation-CPd_4svD.js +26 -0
- package/dist/assets/{config-space-Drp9NI7a.js → config-space-BgWEAM0m.js} +1 -1
- package/dist/assets/{confirm-B9OqaJpT.js → confirm-92J4n1RP.js} +1 -1
- package/dist/assets/{connect-CpUC5BAX.js → connect-Bq-p3hnS.js} +1 -1
- package/dist/assets/connect-D20f2K4u.js +5 -0
- package/dist/assets/{connect-to-BasQxweP.js → connect-to-bQVCrkhh.js} +1 -1
- package/dist/assets/{content-layout-Bs-vdQ_U.js → content-layout-CFHoSupA.js} +1 -1
- package/dist/assets/{dashboard-BYUKOMAe.js → dashboard-BgQFc2Pc.js} +11 -11
- package/dist/assets/{delete-confirm-CM4f-ajO.js → delete-confirm-AkwIQ5yF.js} +1 -1
- package/dist/assets/{did-address-B_VfxEC5.js → did-address-D4v6iN2l.js} +1 -1
- package/dist/assets/domain-CBdLs2D9.js +9 -0
- package/dist/assets/{domain-action-card-pHkmKFE3.js → domain-action-card-DN3KjFwP.js} +2 -2
- package/dist/assets/domains-CMJbalsn.js +1 -0
- package/dist/assets/{email-C5iUsSjP.js → email-JviRloBo.js} +1 -1
- package/dist/assets/{empty-spinner-Cia24BVr.js → empty-spinner-DlzuJxRt.js} +1 -1
- package/dist/assets/{exchange-passport-CyGvLDal.js → exchange-passport-3aXbJr-q.js} +1 -1
- package/dist/assets/{fuel-C5H_z1Ay.js → fuel-DOs3bqYm.js} +1 -1
- package/dist/assets/{get-safe-url-BOY9UAaI.js → get-safe-url-CWgEUVPT.js} +1 -1
- package/dist/assets/{get-safe-url-D_Puq_oh.js → get-safe-url-eATw6wn7.js} +1 -1
- package/dist/assets/{home-CjHQSa_8.js → home-a0RwGUp7.js} +1 -1
- package/dist/assets/{iframe-BhRKCdFb.js → iframe-DVBEjxC1.js} +1 -1
- package/dist/assets/{index-Kaq7tC6c.js → index-3q6oLa2e.js} +1 -1
- package/dist/assets/{index-C5lvlGzp.js → index-BBl5mftj.js} +3 -3
- package/dist/assets/{index-d34Q6nXR.js → index-BGeUo-5w.js} +1 -1
- package/dist/assets/{index-Cp_gD4ZQ.js → index-BJYrBMyS.js} +1 -1
- package/dist/assets/{index-B8FtPEFx.js → index-BVOsgGKh.js} +1 -1
- package/dist/assets/{index-DUU3hQpo.js → index-BxTrfRkG.js} +1 -1
- package/dist/assets/index-C3-7zmeY.js +346 -0
- package/dist/assets/{index-BTOIZL6e.js → index-CCwUSMuP.js} +1 -1
- package/dist/assets/{index-CjmXl7jW.js → index-CwdXL2a0.js} +1 -1
- package/dist/assets/{index-Ctl8J5Z5.js → index-DBLdE2lQ.js} +1 -1
- package/dist/assets/{index-CVIeQOoE.js → index-DQIxR9j5.js} +1 -1
- package/dist/assets/index-DWuuU3ta.js +113 -0
- package/dist/assets/{index-Cuoxr9xB.js → index-DjIOxw8x.js} +1 -1
- package/dist/assets/{index-CYAgDp3G.js → index-DrUxhMM5.js} +1 -1
- package/dist/assets/index-K5iSHoYm.js +224 -0
- package/dist/assets/{index-DR9nQ2tJ.js → index-KLUHbsxg.js} +1 -1
- package/dist/assets/{index-BYsXlcQC.js → index-MqiIu4kd.js} +1 -1
- package/dist/assets/{index-BjYech25.js → index-Th4BUzmb.js} +23 -23
- package/dist/assets/{index-Du2DtxVt.js → index-VvWvVQT8.js} +1 -1
- package/dist/assets/{index-DkZfhapD.js → index-sv3a1ZUw.js} +1 -1
- package/dist/assets/{invitation-C9hFp_wD.js → invitation-CwtXOXZc.js} +4 -4
- package/dist/assets/{invite-CzfqL5Tx.js → invite-CMj5995Z.js} +1 -1
- package/dist/assets/{issue-passport-D3F63x7z.js → issue-passport-DtEbcgX6.js} +1 -1
- package/dist/assets/{item-C_TigVeC.js → item-zVdGBfMR.js} +1 -1
- package/dist/assets/{landing-page-B5nKEn_3.js → landing-page-BM1TmagN.js} +1 -1
- package/dist/assets/{launch-result-message-C0Ao1hE-.js → launch-result-message-DOa3SWMR.js} +1 -1
- package/dist/assets/{layout-D5ALyxXA.js → layout-DCzN0ui5.js} +1 -1
- package/dist/assets/{list-DuzdV0Wa.js → list-BuXPrN1N.js} +8 -8
- package/dist/assets/{list-header-BibBP5t1.js → list-header-BLGbkNad.js} +1 -1
- package/dist/assets/localization-qd6O0FX9.js +1 -0
- package/dist/assets/{log-Dg8IZoeo.js → log-C0ajhie8.js} +1 -1
- package/dist/assets/{logger-Bd77RetM.js → logger-D6n4nbwy.js} +1 -1
- package/dist/assets/{login-B9XiO8eS.js → login-f1AXbIm0.js} +1 -1
- package/dist/assets/{login-oauth-callback-5AlLzjZ2.js → login-oauth-callback-C5CFUlUR.js} +1 -1
- package/dist/assets/{logo-uploader-ChABQ_cS.js → logo-uploader-DbAVW3BS.js} +3 -3
- package/dist/assets/{lost-passport-gGzRW--h.js → lost-passport-Dlmv8D-L.js} +2 -2
- package/dist/assets/{open-window-CX_mRFPs.js → open-window-DskgWqba.js} +1 -1
- package/dist/assets/{overview-ClfPLbRa.js → overview-DY9-9zrL.js} +1 -1
- package/dist/assets/{page-header-DWf5vODI.js → page-header-XbzfRkA7.js} +1 -1
- package/dist/assets/{permission-CmHMB8NK.js → permission-Bi46fqEy.js} +1 -1
- package/dist/assets/{preferences-COMN8FgJ.js → preferences-DPpwnIAs.js} +1 -1
- package/dist/assets/{profile-embed-Crj1xM6Z.js → profile-embed-DV5vno0C.js} +1 -1
- package/dist/assets/publish-resource-z2_THSz6.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-B3HYEQUw.js → react-beautiful-dnd.esm-B68lWn23.js} +1 -1
- package/dist/assets/{relative-time-CE47D6s7.js → relative-time-BeR_4mfM.js} +1 -1
- package/dist/assets/{runtime-CdKbOwQM.js → runtime-D6tESY33.js} +1 -1
- package/dist/assets/sdk-DNr-nKBq.js +1 -0
- package/dist/assets/{security-DmjkCoJ_.js → security-DmR541pi.js} +1 -1
- package/dist/assets/{session-0rF5SuCk.js → session-CJFbMNLl.js} +1 -1
- package/dist/assets/setup-BSsqBrsc.js +19 -0
- package/dist/assets/{shorten-label-DDBwv81M.js → shorten-label-BuH-7PI8.js} +1 -1
- package/dist/assets/{simple-select-vCKkiHhG.js → simple-select-DHvjqsw4.js} +1 -1
- package/dist/assets/{slicedToArray-Da5X2Yv5.js → slicedToArray-C0MW3KIe.js} +1 -1
- package/dist/assets/{spaces-CyFGYf34.js → spaces-gLUqr6Uq.js} +1 -1
- package/dist/assets/{start-CwSXw9Xs.js → start-XbVMHGiE.js} +1 -1
- package/dist/assets/{status-CgfGREVl.js → status-DmyvEkKL.js} +1 -1
- package/dist/assets/{step-actions-BNW8I1sI.js → step-actions-brdohYRv.js} +1 -1
- package/dist/assets/{studio-cLKWVbyy.js → studio-DJeZlIfF.js} +1 -1
- package/dist/assets/{switch-control-DpvMHPLC.js → switch-control-Br1YNOSB.js} +1 -1
- package/dist/assets/{traffic-ChJb5Oyl.js → traffic-LuIcK-L1.js} +1 -1
- package/dist/assets/{transfer-BHifjdxl.js → transfer-DboKwiA_.js} +1 -1
- package/dist/assets/{unsubscribe-CcyOqX8E.js → unsubscribe-C9k_L3g5.js} +1 -1
- package/dist/assets/{use-mobile-DjnNmGRG.js → use-mobile-C98e2dYy.js} +1 -1
- package/dist/assets/{use-mobile-DpXDDjat.js → use-mobile-CqLLcWbr.js} +1 -1
- package/dist/assets/useAsync-BxB2TpDl.js +1 -0
- package/dist/assets/useAsync-L7_fHBH5.js +1 -0
- package/dist/assets/useAsyncRetry-CEouAsle.js +7 -0
- package/dist/assets/{useLocalStorage-Cq9THoCr.js → useLocalStorage-0mjZfnua.js} +1 -1
- package/dist/assets/user-center-BaKv3X4J.js +77 -0
- package/dist/assets/{util-1n1Ulk5w.js → util-DLK92HF8.js} +1 -1
- package/dist/assets/{util-BmbbisPE.js → util-YnaMqM3B.js} +1 -1
- package/dist/assets/{vendor-arcblock-V3HYELzG.js → vendor-arcblock-DPMnO1AO.js} +83 -83
- package/dist/assets/{vendor-mui-core-1jJmAutq.js → vendor-mui-core-x3zpe_j_.js} +1 -1
- package/dist/assets/{vendor-mui-x-CPwlD3uT.js → vendor-mui-x-CPOc4sOK.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-DEbq97Xz.js → vendor-ux-did-connect-B1u6nvmg.js} +7 -7
- package/dist/assets/{wrap-locale-5LSB6OAr.js → wrap-locale-m_NRjq-h.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +30 -30
- package/dist/assets/button-BSJ2z68-.js +0 -1
- package/dist/assets/config-navigation-hrdLDyFZ.js +0 -26
- package/dist/assets/connect-0zFqdTRm.js +0 -5
- package/dist/assets/domain-D0xqhxvZ.js +0 -9
- package/dist/assets/domains-BrNRyjCn.js +0 -1
- package/dist/assets/index-Bee_YcJC.js +0 -113
- package/dist/assets/index-D3YZfNxX.js +0 -5
- package/dist/assets/index-DFoYVoMG.js +0 -346
- package/dist/assets/index-Dzvf3kMf.js +0 -220
- package/dist/assets/localization-WUgLuLwU.js +0 -1
- package/dist/assets/publish-resource-C6TOyrHC.js +0 -1
- package/dist/assets/sdk-j4w1A_X4.js +0 -1
- package/dist/assets/setup-DLCw2h80.js +0 -19
- package/dist/assets/useAsync-BENTIUEf.js +0 -1
- package/dist/assets/useAsyncRetry-DSYkC9r5.js +0 -7
- package/dist/assets/user-center-DfDG_giT.js +0 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,T as w,ai as b,t as k,a4 as t,E as i}from"./vendor-mui-core-
|
|
1
|
+
import{j as e,T as w,ai as b,t as k,a4 as t,E as i}from"./vendor-mui-core-x3zpe_j_.js";import{l as z,b9 as A,ba as C,X as y,bb as E,o as j}from"./vendor-ux-did-connect-B1u6nvmg.js";import{f as L}from"./vendor-hooks-DN4nZ7TU.js";function R({linkProps:r,showExtra:o,...a}){return e.jsxs(w,{...a,children:["Powered by"," ",e.jsx(b,{href:"https://www.arcblock.io",target:"_blank",...r,children:"ArcBlock"}),"'s"," ",e.jsx(b,{href:"https://www.blocklet.io",target:"_blank",...r,children:"Blocklet Technology"}),o?", the decentralized web engine.":null]})}function v({did:r,children:o,title:a,description:d,actions:u,logo:s,logoSize:c,poweredBy:f,termsOfUse:g,standalone:I}){const n=(globalThis==null?void 0:globalThis.blocklet)||(globalThis==null?void 0:globalThis.env)||{},x=k(l=>l.breakpoints.down("lg")),T=L(()=>{const l=n.appPid,m=z.isEthereumDid(l),P=m?void 0:A(l);return m?C(l):P.color},[n==null?void 0:n.appPid]);if(!r)return o;a===void 0&&(a=n.appName),d===void 0&&(d=n.appDescription),s===void 0&&(s=(n==null?void 0:n.appLogoRect)||(n==null?void 0:n.appLogo)||""),typeof s=="string"&&(s?s=e.jsx(t,{sx:{height:c,maxHeight:c,objectFit:"contain"},component:"img",src:s,alt:`${n.appName}'s logo`}):s=e.jsx(y,{size:c,did:r,src:s,variant:"rounded"})),f===void 0&&(f=e.jsx(R,{linkProps:{color:j.textSubtitle,sx:{"&:hover":{textDecoration:"underline"}}},showExtra:!x,sx:{zIndex:10,position:"absolute",bottom:10,left:10,right:10,textAlign:"center",fontSize:"12px",color:j.textSubtitle}}));let p=o;!o&&!x&&(p=e.jsx(t,{sx:{filter:"blur(180px)",display:"flex"},children:e.jsx(y,{size:210,did:r,variant:"rounded"})}));const B=!!o;let h=!I;return x&&(h=!B),e.jsxs(t,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",px:8,py:6,background:`radial-gradient(circle at bottom right, ${E(T,.3)} 10%, #ffffff 50%)`,position:"relative"},children:[e.jsxs(t,{sx:{maxWidth:1200,display:"flex",alignItems:"center",justifyContent:[h,p].filter(Boolean).length>1?"space-between":"space-around",width:"100%",margin:"auto"},children:[h?e.jsxs(t,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[e.jsx(t,{sx:{display:"flex",alignItems:"center"},children:s}),e.jsx(w,{variant:"h2",sx:{fontWeight:"bold",fontSize:{sm:"2.25rem",md:"2.75rem",xl:"3.5rem"}},children:a}),d?e.jsx(t,{variant:"h5",sx:{mb:2,color:"text.secondary"},children:d}):null,u?e.jsx(t,{sx:{mt:8},children:u}):null,g?e.jsx(t,{sx:{mt:-1,color:"grey"},children:g}):null]}):null,p]}),e.jsx(t,{sx:{position:"absolute",bottom:10,left:0,right:0,textAlign:"center"},children:f})]})}v.propTypes={did:i.string.isRequired,children:i.any.isRequired,title:i.any,description:i.any,logo:i.any,logoSize:i.number,actions:i.any,poweredBy:i.any,termsOfUse:i.any,standalone:i.bool};v.defaultProps={title:void 0,description:void 0,logo:void 0,logoSize:50,standalone:!1};export{v as L};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,E as i,aa as c,a8 as d,a3 as h,bX as m,bY as p}from"./vendor-mui-core-
|
|
1
|
+
import{j as t,E as i,aa as c,a8 as d,a3 as h,bX as m,bY as p}from"./vendor-mui-core-x3zpe_j_.js";function l({variant:e,title:o,subTitle:s,footer:a,...n}){let r;switch(e){case"error":r=p;break;case"info":r=m;break;case"loading":r=h;break;default:r=d}return t.jsx(u,{variant:e,...n,children:t.jsxs("div",{className:"result-body",children:[t.jsx("span",{className:`result-icon color-${e}`,children:t.jsx(r,{})}),t.jsx("div",{className:`result-title color-${e} ${o?"":"ele-hide"}`,children:o}),t.jsx("div",{className:`result-sub-title ${s?"":"ele-hide"}`,children:s}),a&&t.jsx("div",{className:"result-footer",children:a})]})})}l.propTypes={variant:i.oneOf(["success","error","info","loading"]),title:i.string,subTitle:i.any,footer:i.any};l.defaultProps={variant:"success",title:"",subTitle:"",footer:null};const u=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,aa as m}from"./vendor-mui-core-
|
|
1
|
+
import{j as r,aa as m}from"./vendor-mui-core-x3zpe_j_.js";import{C as c}from"./content-layout-CFHoSupA.js";import{u,Y as s}from"./vendor-ux-did-connect-B1u6nvmg.js";import{c as i}from"./vendor-arcblock-DPMnO1AO.js";import{H as p}from"./index-Th4BUzmb.js";const d=m(c)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 as p,aa as _,T,t as E,al as ee,bG as je,a5 as Fe,bH as Ve,am as Ge,ab as Qe,a2 as be,e as te,m as Ke,bk as U,bU as Xe,x as Ye,s as Je,I as Ze}from"./vendor-mui-core-
|
|
1
|
+
import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 as p,aa as _,T,t as E,al as ee,bG as je,a5 as Fe,bH as Ve,am as Ge,ab as Qe,a2 as be,e as te,m as Ke,bk as U,bU as Xe,x as Ye,s as Je,I as Ze}from"./vendor-mui-core-x3zpe_j_.js";import{f as L,u as Y}from"./vendor-hooks-DN4nZ7TU.js";import{W as re,K as et,a$ as ne,o as H,u as we,r as ke,h as Re,p as tt,bc as rt}from"./vendor-ux-did-connect-B1u6nvmg.js";import{S as nt}from"./index-DjIOxw8x.js";import{B as st}from"./bundle-avatar-DfAWUEqX.js";import{c as W,s as O,g as se,H as it,u as Ce,M as $e,d as ot,m as at,a as ge,i as lt,B as ct}from"./index-BJYrBMyS.js";import{R as Se}from"./relative-time-BeR_4mfM.js";import{y as G,ab as dt,z as A,_ as ut,x as pt}from"./vendor-utils-C3FZIS9A.js";import{u as Me,p as ht,h as F,f as Te,q as mt}from"./vendor-arcblock-DPMnO1AO.js";import{d as ft}from"./InfoOutlined-DF9JwavD.js";import{b as xt}from"./sdk-DNr-nKBq.js";import{d as gt}from"./CheckCircle-CuYzdCtm.js";import{p as yt}from"./util-DLK92HF8.js";import{z as vt}from"./index-Th4BUzmb.js";function Ie({attachment:e}){const{data:r}=e;let n="";try{n=new URL(r.url).host}catch{n=r.url}return t.jsxs(Z,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!n&&t.jsx("span",{className:"url",children:n}),!!r.title&&t.jsx(p,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&t.jsx(p,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&t.jsx("img",{src:Me.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ie.propTypes={attachment:i.object.isRequired};function Pe({attachment:e}){const{data:r}=e;return t.jsx("img",{src:Me.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Pe.propTypes={attachment:i.object.isRequired};function ie({attachment:e,...r}){var c;const{data:n}=e,s=((c=n.color)==null?void 0:c.toLowerCase())||r.color,o=n.size||r.size,l=n.fontWeight||r.fontWeight||400;let a="14px";return o==="small"?a="12px":o==="normal"?a="14px":o==="big"?a="16px":o==="large"&&(a="18px"),t.jsx(jt,{className:"title",style:{fontSize:a,color:s,whiteSpace:"unset",fontWeight:l},children:n.text})}ie.propTypes={attachment:i.object.isRequired};const jt=_.span`
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: -webkit-box;
|
|
4
4
|
-webkit-box-orient: vertical;
|
|
@@ -7,7 +7,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
7
7
|
text-overflow: ellipsis;
|
|
8
8
|
white-space: normal;
|
|
9
9
|
word-break: break-word;
|
|
10
|
-
`;oe.propTypes={locale:i.string,data:i.object.isRequired};oe.defaultProps={locale:"en"};function oe({locale:e="en",data:r}){const
|
|
10
|
+
`;oe.propTypes={locale:i.string,data:i.object.isRequired};oe.defaultProps={locale:"en"};function oe({locale:e="en",data:r}){const n={zh:"来自",en:"from"}[e]||"from",s={zh:"接收",en:"Received"}[e]||"Received",l=`https://${W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let a=r.amount;r.decimal&&(a=r.amount/10**r.decimal);const c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx("a",{href:l,target:"_blank",rel:"noreferrer",onClick:v=>{v.customPreventRedirect=!0},children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),t.jsxs(T,{component:"div",align:"right",style:O.summaryStyle,flex:1,children:["+",a," ",r.symbol]})]}),t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:n}),t.jsx(p,{maxWidth:260,fontSize:14,children:t.jsx(re,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ae.propTypes={locale:i.string,data:i.object.isRequired};ae.defaultProps={locale:"en"};function ae({locale:e,data:r}){var v,j;const n={zh:"接收",en:"Received"}[e]||"Received",s={zh:"来自",en:"from"}[e]||"from",o=W.getUrlHost(r.chainHost)||W.getChainHost(r.chainId),l=r.did||((j=(v=r==null?void 0:r.credential)==null?void 0:v.issuer)==null?void 0:j.id)||"",a=`https://${o}/explorer/assets/${l}`,c=L(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return t.jsx(p,{sx:{pr:1},children:t.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:t.jsxs(p,{display:"flex",flexDirection:"column",children:[t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),t.jsx(T,{component:"div",align:"right",style:O.summaryStyle,children:"+1 Asset"})]}),l?t.jsxs(p,{sx:c,children:[t.jsx(T,{component:"div",style:{...O.remarkStyle,fontSize:14},children:s}),t.jsx(p,{maxWidth:260,fontSize:14,children:t.jsx(re,{did:l,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}ze.propTypes={data:i.object.isRequired,locale:i.string};function ze({data:e,locale:r="en"}){return t.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:n=>{n.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),t.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[t.jsx("div",{style:{marginBottom:"6px"},children:e.title}),t.jsx(p,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:t.jsx(re,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}le.propTypes={locale:i.string,data:i.object.isRequired};le.defaultProps={locale:"en"};function le({locale:e,data:r}){const n=W.getChainHost(r.chainId),s=`https://${n}/explorer/txs/${r.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",l={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return t.jsxs("a",{href:s,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[t.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),t.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),t.jsxs("div",{style:{wordBreak:"break-all"},children:[l,": ",r.hash]})]})}function Ne({data:e,isMd:r=!1}){return t.jsx(p,{display:"flex",flexDirection:r?"row":"column",justifyContent:"space-between",sx:{width:"100%",flexWrap:"nowrap",gap:1,overflow:"hidden"},children:e.items.map((n,s)=>t.jsx(ie,{attachment:n,color:s===0?"rgba(156, 163, 175, 1)":"",size:s===0?"normal":"big",fontWeight:s===0?400:600,sx:et(s===0?{flexShrink:0}:{flex:1})},s))})}Ne.propTypes={data:i.array.isRequired,isMd:i.bool};function Ae({attachment:e,...r}){const{local:n}=u.useContext(ne),s=E(o=>o.breakpoints.down("md"));return t.jsxs(bt,{...r,isMd:s,children:[e.type==="link"&&t.jsx(Ie,{attachment:e,...r,isMd:s}),e.type==="image"&&t.jsx(Pe,{attachment:e,isMd:s}),e.type==="text"&&t.jsx(ie,{attachment:e,isMd:s}),e.type==="token"&&t.jsx(oe,{data:e.data,local:n,isMd:s}),e.type==="asset"||e.type==="vc"?t.jsx(ae,{data:e.data,local:n,isMd:s}):null,e.type==="dapp"&&t.jsx(ze,{data:e.data,local:n,isMd:s}),e.type==="transaction"&&t.jsx(le,{data:e.data,local:n,...r,isMd:s}),e.type==="divider"&&t.jsx(ee,{sx:{mb:1,mt:1},style:{color:H.dividerColor}}),e.type==="combined"&&t.jsx(Ne,{data:e,isMd:s})]})}const bt=_.div`
|
|
11
11
|
display: ${({sx:e={}})=>e.display||"flex"};
|
|
12
12
|
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
13
13
|
gap: ${({sx:e={}})=>e.gap||1};
|
|
@@ -15,7 +15,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
15
15
|
&:last-child {
|
|
16
16
|
margin-bottom: 0;
|
|
17
17
|
}
|
|
18
|
-
`;Ae.propTypes={attachment:i.object.isRequired};function Le({data:e,...r}){const{items:
|
|
18
|
+
`;Ae.propTypes={attachment:i.object.isRequired};function Le({data:e,...r}){const{items:n}=e;return t.jsx(wt,{...r,children:n.map(s=>t.jsxs(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[s.icon?t.jsx("img",{src:s.icon,alt:s.title,style:{width:16,height:16}}):null,t.jsxs(p,{className:"metric-name",display:"flex",alignItems:"center",children:[s.title,s.subtitle?t.jsx(Fe,{title:s.subtitle,arrow:!0,placement:"top",children:t.jsx(ft,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),t.jsxs(p,{className:"metric-number",sx:{color:s.content_color||"rgba(3, 7, 18, 1)"},children:[s.content,s.sub_content?t.jsxs("span",{className:"sub-content",style:{color:s.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",s.sub_content,")"]}):null]})]},s.title))})}const wt=_(p)`
|
|
19
19
|
display: flex;
|
|
20
20
|
justify-content: flex-start;
|
|
21
21
|
flex-wrap: wrap;
|
|
@@ -33,7 +33,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
33
33
|
font-size: 14px;
|
|
34
34
|
color: rgba(156, 163, 175, 1);
|
|
35
35
|
}
|
|
36
|
-
`;Le.propTypes={data:i.object.isRequired};function _e({data:e}){const{items:r}=e,
|
|
36
|
+
`;Le.propTypes={data:i.object.isRequired};function _e({data:e}){const{items:r}=e,n=E(a=>a.breakpoints.down("sm")),s=E(a=>a.breakpoints.down("md")),o=E(a=>a.breakpoints.down("lg")),l=()=>n?1:s?3:o?4:6;return t.jsx(Ve,{variant:"quilted",cols:l(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(a=>{const c=a.cover||a.display;return c?t.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:t.jsx(Ge,{children:t.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}_e.propTypes={data:i.object.isRequired};function ce({data:e,feedType:r,...n}){return t.jsxs(kt,{...n,children:[r==="data-tracker"&&e.type==="table"&&t.jsx(Le,{data:e}),(r==="graphic"||r==="gallery")&&t.jsx(_e,{data:e})]})}const kt=_.div`
|
|
37
37
|
display: flex;
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
width: 100%;
|
|
@@ -41,7 +41,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
41
41
|
&:last-child {
|
|
42
42
|
margin-bottom: 0;
|
|
43
43
|
}
|
|
44
|
-
`;ce.propTypes={data:i.object.isRequired,feedType:i.string};ce.defaultProps={feedType:"data-tracker"};const Rt=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},Ct=e=>e.every(r=>r.type==="text"),$t=e=>e.every(r=>r.type==="image"),St=e=>
|
|
44
|
+
`;ce.propTypes={data:i.object.isRequired,feedType:i.string};ce.defaultProps={feedType:"data-tracker"};const Rt=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},Ct=e=>e.every(r=>r.type==="text"),$t=e=>e.every(r=>r.type==="image"),St=e=>dt(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(n=>{var s,o,l;return(l=(o=(s=n==null?void 0:n.data)==null?void 0:s.text)==null?void 0:o.trim)==null?void 0:l.call(o)})),Mt=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(n=>n.type===r)},Tt=async(e,r)=>{const n=xt.user;if(n)try{return await n.getUserPublicInfo({did:e})?await n.getProfileUrl({did:e,locale:r}):void 0}catch(s){console.error(s);return}},It=(e,r)=>{var s;const n=(s=r==null?void 0:r.componentMountPoints)==null?void 0:s.find(o=>o.did===e);return n==null?void 0:n.mountPoint},Pt=(e,r)=>{var o,l,a;if(!e)return null;if(((o=e.actions)==null?void 0:o.length)===1)return e.actions[0].link||null;const n=se(e.activity),s=(n==null?void 0:n.metaLink)||(n==null?void 0:n.targetLink);if(s)return G(r,s);if(((l=e.attachments)==null?void 0:l.length)===1){const c=e.attachments[0];if(c.type==="link")return((a=c.data)==null?void 0:a.url)||null}return null},zt=e=>{const{receivers:r=[]}=e;return r.length?r.every(n=>n.read):!0};function de({notification:e,severity:r,showSke:n=!0}){const{attachments:s,data:o,...l}=e,a=E(f=>f.breakpoints.down("md"));if((!s||!s.length)&&A(o))return null;const c=Rt(r),v=(f,R=!1)=>{if(!f&&!Array.isArray(f))return null;let y=f,S={},d="horizontal";R&&Ct(f)&&(y=St(f),d="vertical",S={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||y.length===1?"100%":"28%"});const x=Mt(y);return t.jsx(p,{sx:{width:"100%",display:"flex",gap:1,flexDirection:R?"row":"column",justifyContent:"flex-start",alignItems:R?"center":"unset",flexWrap:"wrap"},children:y.map((h,b)=>h.type==="section"?t.jsx(u.Fragment,{children:v(h.fields,!0)},b):t.jsxs(u.Fragment,{children:[t.jsx(Ae,{attachment:h,style:S,...l}),!(a&&d==="vertical")&&x&&y.length>1&&b%3!==2?t.jsx(ee,{orientation:d,style:{color:H.dividerColor},sx:d==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},b))})},j=$t(s);return t.jsx(Nt,{children:t.jsxs("div",{className:"message-in-list",children:[s.length>0&&t.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:j?v(s):t.jsx(je,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:v(s)})}),!A(o)&&t.jsx("div",{className:"message-container",children:t.jsx("div",{className:"data-container",children:t.jsx(ce,{data:o,feedType:e.feedType})})}),s.length===0&&A(o)&&n&&t.jsx(Qe,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Nt=_.div`
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
.message-in-list {
|
|
@@ -93,7 +93,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
93
93
|
margin-right: 8px;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
`;de.propTypes={severity:i.string.isRequired,notification:i.object.isRequired,showSke:i.bool};de.defaultProps={showSke:!0};const X=e=>
|
|
96
|
+
`;de.propTypes={severity:i.string.isRequired,notification:i.object.isRequired,showSke:i.bool};de.defaultProps={showSke:!0};const X=e=>ht.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),At=async(e,r)=>{const{type:n,did:s}=e;return Te.isSameAddr(n,"did")?await Tt(s,r)||F.getLink(e):F.getLink(e)},Lt=async(e,r,n=!0)=>{const s=F.toTextList(e);return await Promise.all(s.map(async l=>{if(l instanceof F.Link){if(n){const a=await At(l,r),{type:c,chainId:v,did:j}=l;return Te.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${l.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${l.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${v}" data-did="${j}">${l.text}</em>`}return l.text}return l})).then(l=>l.join(""))};De.propTypes={notification:i.object,rows:i.number,minimal:i.bool};function De({notification:e,rows:r=2,minimal:n=!1}){const[s,o]=u.useState(!1),[l,a]=u.useState(""),{t:c,locale:v}=we(),j=u.useMemo(()=>{const{attachments:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),f=u.useMemo(()=>{const{blocks:h}=e||{};if(!h)return!1;try{return h.length>0}catch{return!1}},[e]),R=u.useMemo(()=>{const{description:h}=e||{};return!!h},[e]),y=u.useMemo(()=>{const{data:h}=e||{};return!A(h)},[e]),S=u.useMemo(()=>j||f||R||y,[j,f,R,y]);if(u.useEffect(()=>{Lt((e==null?void 0:e.description)??"",v).then(h=>{a(h)})},[e==null?void 0:e.description,v]),!S)return null;const d=()=>r===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,x=h=>{const{target:b}=h;b.getAttribute("data-name")==="toggle-expanded"&&(o(!s),h.customPreventRedirect=!0)};return t.jsxs(_t,{color:n?"#fff":"",children:[t.jsx(p,{className:"text-container",component:"div",onClick:x,children:l&&(!s&&r>0?t.jsx(it,{basedOn:"letters",unsafeHTML:X(l),maxLine:r,ellipsisHTML:X(d())}):t.jsx(T,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:X(`${l}${d()}`)}}))}),!n&&(j||y)?t.jsx(de,{severity:e.severity,notification:e}):null]})}const _t=_(p)`
|
|
97
97
|
width: 100%;
|
|
98
98
|
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
99
99
|
.text-container {
|
|
@@ -117,7 +117,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
117
117
|
-webkit-line-clamp: 2;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
`,Dt=u.memo(De);var ue={},Et=be;Object.defineProperty(ue,"__esModule",{value:!0});var Ee=ue.default=void 0,Ht=Et(ke()),qt=t;Ee=ue.default=(0,Ht.default)((0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var pe={},Wt=be;Object.defineProperty(pe,"__esModule",{value:!0});var He=pe.default=void 0,Bt=Wt(ke()),Ut=t;He=pe.default=(0,Bt.default)((0,Ut.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");const Ot={error:Ee,warning:He,info:mt,success:gt};he.propTypes={severity:i.oneOf(["error","warning","info","success"]).isRequired,size:i.number};he.defaultProps={size:32};function he({severity:e="info",size:r=32}){const
|
|
120
|
+
`,Dt=u.memo(De);var ue={},Et=be;Object.defineProperty(ue,"__esModule",{value:!0});var Ee=ue.default=void 0,Ht=Et(ke()),qt=t;Ee=ue.default=(0,Ht.default)((0,qt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var pe={},Wt=be;Object.defineProperty(pe,"__esModule",{value:!0});var He=pe.default=void 0,Bt=Wt(ke()),Ut=t;He=pe.default=(0,Bt.default)((0,Ut.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");const Ot={error:Ee,warning:He,info:mt,success:gt};he.propTypes={severity:i.oneOf(["error","warning","info","success"]).isRequired,size:i.number};he.defaultProps={size:32};function he({severity:e="info",size:r=32}){const n=te(),o=L(()=>({error:n.palette.error.main,warning:n.palette.warning.main,info:n.palette.info.main,success:n.palette.success.main}))[e],l=Ot[e],a=Ke(o,.1);return t.jsx(U,{sx:{width:r,height:r,bgcolor:a,color:o},children:t.jsx(l,{fontSize:"small"})})}const Ft={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M5.821 4.91c3.898-2.765 9.469-2.539 13.073.536c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447-7.965 4.583-12.231 2.805l-.232-.101l-4.375.931l-.075.013l-.11.009l-.113-.004l-.044-.005l-.11-.02l-.105-.034l-.1-.044l-.076-.042l-.108-.077l-.081-.074l-.073-.083l-.053-.075l-.065-.115l-.042-.106l-.031-.113l-.013-.075l-.009-.11l.004-.113l.005-.044l.02-.11l.022-.072l1.15-3.451l-.022-.036C.969 12.45 1.97 7.805 5.59 5.079l.23-.168z"/></g>'},Vt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 2a5 5 0 1 1-5 5l.005-.217A5 5 0 0 1 12 2zm2 12a5 5 0 0 1 5 5v1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-1a5 5 0 0 1 5-5h4z"/></g>'},Gt={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34zM12 6a1 1 0 0 0-1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1-.866-.398l-.068-.101a1 1 0 0 0-1.732.998a3 3 0 0 0 2.505 1.5H11a1 1 0 0 0 .883.994L12 18a1 1 0 0 0 1-1l.176-.005A3 3 0 0 0 13 11V9c.358-.012.671.14.866.398l.068.101a1 1 0 0 0 1.732-.998A3 3 0 0 0 13.161 7H13a1 1 0 0 0-1-1zm1 7a1 1 0 0 1 0 2v-2zm-2-4v2a1 1 0 0 1 0-2z"/></g>'},Qt={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-5.5 8.28"/></g>'},Kt={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 10l-4 4l6 6l4-16l-18 7l4 2l2 6l3-4"/>'},ye={comment:{icon:Ft,bgColor:"rgba(239, 246, 255, 1)",color:"rgba(43, 127, 255, 1)"},like:{icon:"👍",bgColor:"rgba(244, 244, 245, 1)",color:"yellow",renderType:"emoji"},follow:{icon:Vt,bgColor:"rgba(238, 242, 255, 1)",color:"rgba(97, 95, 255, 1)"},tips:{icon:Gt,bgColor:"rgba(254, 252, 232, 1)",color:"rgba(240, 177, 0, 1)"},mention:{icon:Qt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"},assign:{icon:Kt,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"}};me.propTypes={activity:i.oneOf(["comment","like","follow","tips","mention","assign"]).isRequired,size:i.number};me.defaultProps={size:32};function me({activity:e,size:r=32}){const n=ye[e]||ye.comment,s=n.icon;return t.jsx(U,{sx:{bgcolor:n.bgColor,color:n.color,width:r,height:r},children:n.renderType==="emoji"?t.jsx("span",{style:{fontSize:"14px"},children:s}):t.jsx(Re,{icon:s})})}const J={avatar:i.string,fullName:i.string,did:i.string};function V({actor:e,size:r,teamDid:n,inService:s,showName:o}){const l=e!=null&&e.avatar?yt(e.avatar,n,s):null,a=c=>{e&&(c.stopPropagation(),window.open(pt(G(tt.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),"_blank"),c.customPreventRedirect=!0)};return t.jsxs(p,{display:"flex",alignItems:"center",gap:1,onClick:a,role:"button",style:{cursor:"pointer"},title:(e==null?void 0:e.fullName)||"",children:[l?t.jsx(U,{alt:(e==null?void 0:e.fullName)||"",src:`${l}?imageFilter=resize&w=${r*1.5}&h=${r*1.5}`,size:r,did:e==null?void 0:e.did,shape:"circle",sx:{width:r,height:r,borderRadius:"100%",overflow:"hidden",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.1)"}}}):t.jsx(U,{sx:{width:r,height:r}}),o&&t.jsx("span",{children:e==null?void 0:e.fullName})]})}V.propTypes={actor:i.shape(J).isRequired,size:i.number.isRequired,teamDid:i.string,inService:i.bool,showName:i.bool};V.defaultProps={teamDid:"",inService:!1,showName:!1};Q.propTypes={actors:i.oneOfType([i.shape(J),i.arrayOf(i.shape(J))]).isRequired,size:i.number,maxDisplay:i.number,teamDid:i.string,inService:i.bool,showName:i.bool};Q.defaultProps={size:32,maxDisplay:9,teamDid:"",inService:!0,showName:!1};function Q({actors:e,size:r=32,maxDisplay:n=9,teamDid:s="",inService:o=!0,showName:l=!1}){const a=L(()=>{const c=Array.isArray(e)?e:[e];return ut(c,"did").filter(Boolean)},[e]);return a.length===1||!a.length?t.jsx(V,{actor:a[0],size:r,teamDid:s,inService:o,showName:l}):t.jsx(Xe,{total:a.length,renderSurplus:c=>c<100?t.jsxs("span",{children:["+",c]}):t.jsx("span",{children:"99+"}),max:n,sx:{justifyContent:"flex-end",height:`${r}px`,".MuiAvatar-root":{width:`${r}px`,height:`${r}px`,fontSize:`${r/2.5}px`,border:0,zIndex:2}},children:a.map((c,v)=>t.jsx(V,{actor:c,size:r,teamDid:s,inService:o},(c==null?void 0:c.did)||v))})}const ve=3;Be.propTypes={notification:i.object.isRequired,isMultiple:i.bool,blocklet:i.object,mountPoint:i.string};qe.propTypes={notification:i.object.isRequired,mountPoint:i.string};We.propTypes={items:i.array.isRequired,activity:i.object.isRequired,blocklet:i.object,mountPoint:i.string,viewMoreLink:i.string};function qe({notification:e,mountPoint:r=""}){var a;const{activity:n}=e,{type:s,meta:o={}}=n||{},l=Ce({activity:n,users:[e==null?void 0:e.actorInfo],actors:[(a=e==null?void 0:e.activity)==null?void 0:a.actor],mountPoint:r});return A(n)||!n.type||!n.actor||A(n.target)?null:t.jsxs(p,{children:[t.jsx(T,{variant:"body1",color:H.textBase,sx:{mb:.5},children:l}),t.jsx($e,{meta:o,type:s})]})}function We({items:e,activity:r,blocklet:n,mountPoint:s="",viewMoreLink:o=""}){const l=te(),a=L(()=>{var d;return(n==null?void 0:n.did)||((d=n==null?void 0:n.meta)==null?void 0:d.did)||""},[n]),{locale:c}=u.useContext(ne),v=L(()=>!A(r.meta)&&Object.values(r.meta).some(d=>d!=null),[r]),j=Ce({activity:r,users:e.map(d=>d==null?void 0:d.actorInfo),actors:e.map(d=>{var x;return(x=d==null?void 0:d.activity)==null?void 0:x.actor}),mountPoint:s}),f=Y(d=>{if(!d.activity)return null;const x=se(d.activity);return x!=null&&x.metaLink?G(s,x.metaLink):null}),R=Y((d,x)=>{if(d.stopPropagation(),!x)return;const h=f(x);h&&(window.open(h,"_blank"),d.customPreventRedirect=!0)}),y=e.length>ve,S=e.slice(0,ve);return t.jsxs(p,{sx:{width:"100%"},children:[t.jsx(T,{variant:"body1",color:H.textBase,sx:{mb:3},children:j}),v?t.jsxs(p,{className:"sub-content",display:"flex",flexDirection:"column",gap:3,children:[S.map(d=>{var x;return t.jsxs(p,{display:"flex",flexDirection:"column",gap:1,onClick:h=>R(h,d),children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(Q,{actors:d.actorInfo,size:32,teamDid:a}),t.jsx(T,{variant:"subtitle1",color:H.textBase,children:(x=d==null?void 0:d.actorInfo)==null?void 0:x.fullName})," ","·",t.jsx(Se,{value:d.createdAt,locale:c,shouldUpdate:!0,style:{color:l.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),t.jsx(p,{pl:5,children:t.jsx($e,{meta:d.activity.meta,type:d.activity.type})})]},d.id)}),y&&o?t.jsx(p,{mt:1,display:"flex",justifyContent:"center",children:t.jsxs(Ye,{size:"large",variant:"text",component:Z,href:o,target:"_blank",rel:"noopener noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:["View More ",t.jsx(Re,{icon:ot,style:{marginLeft:4}})]})}):null]}):null]})}function Be({notification:e,isMultiple:r=!1,blocklet:n,mountPoint:s=""}){const o=L(()=>{if(!e.activity)return null;const l=se(e.activity);return l!=null&&l.targetLink?G(s,l.targetLink):null},[e.activity,s]);return r?t.jsx(We,{items:e.items,activity:e.activity,blocklet:n,mountPoint:s,viewMoreLink:o}):t.jsx(qe,{notification:e,mountPoint:s})}const Xt=Je(p)`
|
|
121
121
|
display: flex;
|
|
122
122
|
justify-content: center;
|
|
123
123
|
align-items: center;
|
|
@@ -128,7 +128,7 @@ import{r as u}from"./vendor-react-DEoibe3W.js";import{E as i,j as t,ai as Z,a4 a
|
|
|
128
128
|
.empty-icon {
|
|
129
129
|
margin: 10px 0;
|
|
130
130
|
}
|
|
131
|
-
`;function
|
|
131
|
+
`;function fe({color:e,children:r,...n}){const s=vt();return t.jsxs(Xt,{...n,children:[t.jsx("img",{src:`${s.imgPrefix}/all-done.png`,alt:"All Done",width:200,height:200,style:{maxHeight:"100%",maxWidth:"100%"},onError:o=>{o.target.style.display="none"}}),t.jsx(p,{className:"empty-content",children:r})]})}fe.propTypes={color:i.string,children:i.any};fe.defaultProps={color:"inherit",children:null};Yt.propTypes={data:i.array,blockletMap:i.object,onReadNotification:i.func,onReadBatch:i.func,inDialog:i.bool,highlightId:i.string,highlight:i.bool,type:i.oneOf(["server","service"])};Oe.propTypes={notification:i.object,blocklet:i.object,onReadNotification:i.func,inDialog:i.bool,highlight:i.bool};Ue.propTypes={blocklet:i.object,size:i.number,showName:i.bool,hideDot:i.bool};function Ue({blocklet:e,size:r=40,showName:n=!1,hideDot:s=!1}){var a,c;const o=(e==null?void 0:e.did)||((a=e==null?void 0:e.meta)==null?void 0:a.did)||"",l=((e==null?void 0:e.alsoKnownAs)||[]).concat((e==null?void 0:e.appId)||(e==null?void 0:e.appDid)||(e==null?void 0:e.appPid)||"");return t.jsxs(p,{className:"component-avatar",display:"flex",alignItems:"center",sx:{gap:s?"8px":"4px"},children:[!s&&t.jsx("span",{className:"dot"}),e?t.jsx(p,{children:l.includes(o)?t.jsx(ct,{blocklet:e,size:r,style:{borderRadius:8}}):t.jsx(st,{blocklet:e,ancestors:e.ancestors??[],size:r,style:{borderRadius:8}})}):t.jsx(nt,{width:r,height:r}),n&&t.jsx("span",{className:"component-name",children:(c=e==null?void 0:e.meta)==null?void 0:c.title})]})}function Oe({notification:e,blocklet:r,onReadNotification:n=()=>{},inDialog:s=!1,highlight:o}){const{locale:l}=u.useContext(ne),a=te(),c=E(g=>g.breakpoints.down("md")),v=u.useRef(null),j=u.useMemo(()=>zt(e),[e]),f=u.useMemo(()=>lt(e),[e]),R=u.useMemo(()=>{const{actions:g,action:w}=e;let C=g??[];return!C.length&&w&&(C=[{name:"Visit",link:w}]),C},[e]),y=u.useMemo(()=>e.items||[],[e]),S=u.useMemo(()=>y.length>0,[y]),d=u.useMemo(()=>f?S?y.map(g=>g.actorInfo).filter(Boolean):e.actorInfo??[]:[],[y,e.actorInfo,S,f]),x=u.useMemo(()=>{var g;return(r==null?void 0:r.did)||((g=r==null?void 0:r.meta)==null?void 0:g.did)||""},[r]),h=u.useMemo(()=>It(x,window.blocklet),[x]),b=Y((g,w)=>{if(j||n(g),w&&!w.customPreventRedirect){const C=Pt(g,h);C&&typeof C=="string"&&window.open(C,"_blank","noopener,noreferrer")}});return t.jsxs(Jt,{ref:v,className:"notification-row",id:e.id,isRead:j,inDialog:s,highlight:o,isMd:c,onClick:g=>b(e,g),children:[f?t.jsx(me,{activity:e.activity.type,size:c?24:32}):t.jsx(he,{severity:e.severity,size:c?24:32}),t.jsxs(p,{className:"notification",display:"flex",flexDirection:"column",alignItems:"start",children:[t.jsxs(p,{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,className:"header",mb:1.5,children:[f?t.jsx(Q,{actors:d,teamDid:x,size:c?24:32}):t.jsx(Ue,{blocklet:r,hideDot:!0,size:c?24:32}),t.jsx(Se,{value:e.createdAt,locale:l,shouldUpdate:!0,style:{color:a.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),f?t.jsx(Be,{notification:e,isMultiple:S,blocklet:r,mountPoint:h}):t.jsxs(t.Fragment,{children:[t.jsx(T,{variant:"body1",className:"title",color:"rgba(24, 24, 27, 1)",sx:{mb:.5},children:e.title}),t.jsx(Dt,{notification:e,rows:s?0:2})]}),R.length>0?t.jsx(p,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,mt:1.5,children:R.map((g,w)=>t.jsxs(u.Fragment,{children:[t.jsx(Z,{href:g.link,target:"_blank",className:"link",rel:"noopener noreferrer",sx:{fontSize:"15px"},onClick:C=>{C.customPreventRedirect=!0},children:g.name},g.link),w<R.length-1?t.jsx(ee,{orientation:"vertical",sx:{ml:1,mr:1,height:12,borderWidth:"1px"}}):null]},g.link))}):null]}),(e==null?void 0:e.description)&&e.severity==="error"&&t.jsx(p,{className:"copy-button",children:t.jsx(Ze,{size:"small",children:t.jsx(rt,{sx:{fontSize:22},content:(e==null?void 0:e.description)||""})})})]})}function Yt({data:e,blockletMap:r,onReadNotification:n=()=>{},onReadBatch:s=()=>{},inDialog:o=!1,highlightId:l,highlight:a=!1,type:c="service"}){const{t:v}=we(),j=u.useRef(null),[f,R]=u.useState(!1),[y,S]=u.useState(!0),[d,x]=u.useState(!1),h=u.useRef(new Set),b=u.useRef(new Set),g=u.useRef(null),w=u.useRef(null),C=u.useRef(!1),K=u.useMemo(()=>o?e==null?void 0:e.slice(0,5):e,[o,e]),I=u.useMemo(()=>at(K),[K]),q=u.useMemo(()=>{const m=new Map;return I&&I.length&&I.forEach(k=>{m.set(k.id,k)}),m},[I]);u.useEffect(()=>{const m=()=>{S(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}},[]);const B=u.useCallback(()=>{if(!o&&h.current.size>0){const m=[];h.current.forEach(k=>{if(b.current.has(k))return;const M=q.get(k);if(M){const{receivers:z=[],items:N=[]}=M;if(z.length&&!z[0].read&&(ge(M)&&(m.push(k),b.current.add(k)),N.length>0&&N.forEach($=>{const P=$.id;P&&ge($)&&!b.current.has(P)&&(m.push(P),b.current.add(P))}),w.current)){const $=document.getElementById(k);$&&w.current.unobserve($)}}}),m.length>0&&(s(m),setTimeout(()=>{R(!1)},300)),h.current.clear()}},[o,q,s]),D=u.useCallback(()=>{if(o||!j.current||!y)return;w.current&&w.current.disconnect();const m={root:null,rootMargin:"0px",threshold:.5},k=new IntersectionObserver(z=>{f&&z.forEach(N=>{const $=N.target.id;if(b.current.has($))return;const P=q.get($);if(P){const{receivers:xe=[]}=P;xe.length&&!xe[0].read&&(N.isIntersecting?(h.current.add($),d||B()):h.current.delete($))}})},m);w.current=k,Array.from(j.current.querySelectorAll(".notification-row")).filter(z=>{const N=z.id;if(b.current.has(N))return!1;const $=q.get(N);if($){const{receivers:P=[]}=$;return P.length&&!P[0].read}return!1}).forEach(z=>{k.observe(z)}),C.current=!1},[f,o,d,y,q,B]);return u.useEffect(()=>{o||(C.current=!0,w.current&&y&&f&&setTimeout(()=>{D()},0))},[K,f,y,D,o]),u.useEffect(()=>{if(o||!j.current||!y)return;let m=window;if(c==="server"&&(m=document.getElementById("arc__dashboard-main")),!m){const M=document.getElementsByClassName("dashboard-main")[0];M&&(m=M)}if(!m)return;const k=M=>{M.isTrusted&&(f||R(!0),x(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{x(!1),B(),C.current&&D()},300))};return m.addEventListener("scroll",k,{passive:!0}),()=>{m.removeEventListener("scroll",k),g.current&&clearTimeout(g.current)}},[o,f,y,B,D,c]),u.useEffect(()=>(o||D(),()=>{w.current&&w.current.disconnect()}),[D,o]),I!=null&&I.length?t.jsx(p,{ref:j,display:"flex",flexDirection:"column",sx:{...o?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:I==null?void 0:I.map(m=>{var M;const k=m.source==="system"?r.get(m.entityId||m.sender):r.get(m.componentDid||m.sender);return((M=m==null?void 0:m.type)==null?void 0:M.toLowerCase())==="passthrough"?null:t.jsx(Oe,{highlight:a&&l===m.id,inDialog:o,notification:m,blocklet:k,onReadNotification:()=>n(m)},m.id)})}):t.jsx(fe,{children:v("notification.allDone")})}const Jt=_("div")`
|
|
132
132
|
@keyframes flash-bg {
|
|
133
133
|
0% {
|
|
134
134
|
background-color: ${e=>e.theme.palette.warning.light};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-react-DEoibe3W.js";import{s as d,v as h,j as e,a4 as a,ae as t,E as o}from"./vendor-mui-core-
|
|
1
|
+
import"./vendor-react-DEoibe3W.js";import{s as d,v as h,j as e,a4 as a,ae as t,E as o}from"./vendor-mui-core-x3zpe_j_.js";const l=d(h)(({theme:r})=>({"& .header-row":{display:"flex",justifyContent:"space-between",alignItems:"center",gap:r.spacing(1)},"& .right":{display:"flex",alignItems:"center",gap:r.spacing(1.5)},"& .tabs":{marginTop:r.spacing(2),"& .MuiButton-root":{border:"none",color:"#999","&.active":{color:"#222"}}},"@media (max-width: 900px)":{"& .header-row":{flexDirection:"column",alignItems:"flex-start"},"& .right":{flexDirection:"column",width:"100%",".search-always-open, .toolbar-btn-show, a, button, .MuiButtonGroup-root":{width:"100% !important"}}}}));function c({left:r,tabs:s,actions:n,...i}){return!r&&!s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left"}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):r&&!s||!r&&s?e.jsx(l,{elevation:0,...i,children:e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r||s}),e.jsx(t,{direction:"row",className:"right",children:n})]})}):e.jsxs(l,{elevation:0,...i,children:[e.jsxs(a,{className:"header-row",children:[e.jsx(a,{className:"left",children:r}),e.jsx(t,{direction:"row",className:"right",children:n})]}),s&&e.jsx(a,{mt:2,children:s})]})}c.propTypes={left:o.node,tabs:o.node,actions:o.node};c.defaultProps={left:null,tabs:null,actions:null};export{c as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./vendor-mui-core-x3zpe_j_.js";import"./vendor-react-DEoibe3W.js";import{S as t}from"./studio-DJeZlIfF.js";import"./vendor-ux-did-connect-B1u6nvmg.js";import"./vendor-utils-C3FZIS9A.js";import"./vendor-hooks-DN4nZ7TU.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-DPMnO1AO.js";import"./TuneOutlined-DcqnBMqE.js";function d(){return o.jsx(t,{children:"Coming soon..."})}export{d as default};
|