@abtnode/blocklet-services 1.16.44-beta-20250520-004606-6cd8a0d3 → 1.16.44-beta-20250520-104453-912ed737
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/dist/assets/{AdapterDayjs-D2uo6EnV.js → AdapterDayjs-Bck9Dv3l.js} +1 -1
- package/dist/assets/{ArrowDropDown-PfUV1pZb.js → ArrowDropDown-BleCy3ti.js} +1 -1
- package/dist/assets/{CheckCircle-zHdz-yvJ.js → CheckCircle-XrJDG94y.js} +1 -1
- package/dist/assets/{ChevronLeft-3zBX65MM.js → ChevronLeft-BlDLI-Qo.js} +1 -1
- package/dist/assets/{ChevronRight-BXgoqDfE.js → ChevronRight-DkPaON7R.js} +1 -1
- package/dist/assets/{DeleteOutline-BFB4Yy3c.js → DeleteOutline-Cj7UhBbF.js} +1 -1
- package/dist/assets/{Done-DboXobnH.js → Done-UEZFWnHj.js} +1 -1
- package/dist/assets/{Download-X3XR698Z.js → Download-CsoZ8yOi.js} +1 -1
- package/dist/assets/{Edit-Cl3SK-FJ.js → Edit-Bj4m2hpD.js} +1 -1
- package/dist/assets/{Error-CPi5ht0i.js → Error-BwUoSWOt.js} +1 -1
- package/dist/assets/{ExpandLess-D7OENe4H.js → ExpandLess-CjIzahHO.js} +1 -1
- package/dist/assets/{Google-Bl_7h7C7.js → Google-BON6upKi.js} +1 -1
- package/dist/assets/{InfoOutlined-BGorl_CI.js → InfoOutlined-uoMMChNE.js} +1 -1
- package/dist/assets/{Launch-5hxRq_We.js → Launch-rj4Kr2rA.js} +1 -1
- package/dist/assets/{LaunchOutlined-DCxTlWgy.js → LaunchOutlined-0gUfY-5D.js} +1 -1
- package/dist/assets/{MoreHoriz-Bncapj_R.js → MoreHoriz-3SNxR36h.js} +1 -1
- package/dist/assets/{PlayArrow-B19IPFeo.js → PlayArrow-BHO_DqT2.js} +1 -1
- package/dist/assets/{TuneOutlined-OuRuIP5i.js → TuneOutlined-BvtfOd23.js} +1 -1
- package/dist/assets/{ViewList-Bj0HBob4.js → ViewList-BvucdDXZ.js} +1 -1
- package/dist/assets/{access-control-BVDJgnnG.js → access-control-C9ZsDLlM.js} +1 -1
- package/dist/assets/{actions-B2RmHKJh.js → actions-BWSNMC_c.js} +1 -1
- package/dist/assets/{add-component-core-BLsjc3lE.js → add-component-core-Dd9KPcvp.js} +1 -1
- package/dist/assets/{add-resource-B0dZoJA8.js → add-resource-BHmsfuUO.js} +1 -1
- package/dist/assets/{addon-y9ZXCN0H.js → addon-CaGk2PdY.js} +1 -1
- package/dist/assets/{advanced-5oQIoiUN.js → advanced-DlILcrRl.js} +1 -1
- package/dist/assets/{appearance-58f9Dbcn.js → appearance-D1sGjeMk.js} +1 -1
- package/dist/assets/{audit-logs-fYqimPuZ.js → audit-logs-DfXh1JQZ.js} +1 -1
- package/dist/assets/{authorize-DC-SAlai.js → authorize-mEHpiCQH.js} +1 -1
- package/dist/assets/{base32-B42OVABo.js → base32-BnPQ4q4v.js} +1 -1
- package/dist/assets/{branding-DwHt5TFQ.js → branding-BHziMdwk.js} +2 -2
- package/dist/assets/{branding-eOJeN-jW.js → branding-CbgACClH.js} +2 -2
- package/dist/assets/{bundle-avatar-BoczFLNt.js → bundle-avatar-D7QQIJpo.js} +1 -1
- package/dist/assets/{button-C6SqoOU8.js → button-DXOAf3Np.js} +1 -1
- package/dist/assets/{click-to-copy-ClNoTzk4.js → click-to-copy-DtGgy9Ua.js} +1 -1
- package/dist/assets/{collapse-Dz_izL9k.js → collapse-iOiHn4dy.js} +1 -1
- package/dist/assets/{complete-B4rMuRkI.js → complete-CKdswLjZ.js} +1 -1
- package/dist/assets/{component-BzBSZbVF.js → component-amc-22MQ.js} +1 -1
- package/dist/assets/{config-tQft4lvg.js → config-B_jIm01w.js} +1 -1
- package/dist/assets/{config-CPFIXwk-.js → config-D3UduD_R.js} +1 -1
- package/dist/assets/{config-navigation-DdXZFw0Z.js → config-navigation-PoVJgHNU.js} +3 -3
- package/dist/assets/{config-space-CSZvQTns.js → config-space-D-DWHYER.js} +1 -1
- package/dist/assets/{confirm-hm6dpNbC.js → confirm-DaR0Yx39.js} +1 -1
- package/dist/assets/{connect-wIDYWNYf.js → connect-CVfkW49h.js} +1 -1
- package/dist/assets/connect-CvEHPjqh.js +5 -0
- package/dist/assets/{connect-to-Dwm_wvvo.js → connect-to-DrhAN5Nn.js} +1 -1
- package/dist/assets/{dashboard-BwU59vns.js → dashboard-B_QqB4aw.js} +3 -3
- package/dist/assets/{delete-confirm-BRkmB2tO.js → delete-confirm-DHB0S_Co.js} +1 -1
- package/dist/assets/{did-address-Ddg6Is1P.js → did-address-mv0Qw7hC.js} +1 -1
- package/dist/assets/domain-BR9srj-p.js +9 -0
- package/dist/assets/{domain-action-card-BnxgZfnv.js → domain-action-card-DtwNOaxH.js} +1 -1
- package/dist/assets/domains-Bg_t1pz-.js +1 -0
- package/dist/assets/dot-D3X4DSlo.js +7 -0
- package/dist/assets/{email-DhpxVPpg.js → email-DiuMAA8U.js} +1 -1
- package/dist/assets/{exchange-passport-3R6TCPya.js → exchange-passport-Bcw--2wm.js} +1 -1
- package/dist/assets/{fuel-C3Ao9T8_.js → fuel-BitXgq2D.js} +1 -1
- package/dist/assets/{gen-access-key-B5etX4Ba.js → gen-access-key-CrHniwdW.js} +1 -1
- package/dist/assets/{get-safe-url-DP-rZc23.js → get-safe-url-BRocR2aJ.js} +1 -1
- package/dist/assets/{get-safe-url-XcLmS0yc.js → get-safe-url-DYtntqqo.js} +1 -1
- package/dist/assets/{home-DtuKHXKD.js → home-jh95SgT7.js} +1 -1
- package/dist/assets/{iframe-BHwYGTAS.js → iframe-BlPuY8Pu.js} +1 -1
- package/dist/assets/{index-CmOE3ceE.js → index-BDcuaL48.js} +1 -1
- package/dist/assets/{index-DaoLXOw4.js → index-BO7CJLK3.js} +1 -1
- package/dist/assets/{index-CVDucF7E.js → index-BWshat_T.js} +1 -1
- package/dist/assets/{index-B6jePIag.js → index-BXkKeWVW.js} +1 -1
- package/dist/assets/{index-ToeWiBUL.js → index-B_y3Xcdb.js} +1 -1
- package/dist/assets/{index-DBsI6F1Z.js → index-Bi-YrbEk.js} +3 -3
- package/dist/assets/{index-Cb7iBSvd.js → index-Bv8sds6g.js} +1 -1
- package/dist/assets/{index-BKdJfp9x.js → index-CZOVduSH.js} +1 -1
- package/dist/assets/{index-Cd3oZl-N.js → index-Cgdb1aGn.js} +4 -4
- package/dist/assets/{index-C61DBznM.js → index-CleFkLt8.js} +1 -1
- package/dist/assets/{index-CFtGBtAw.js → index-CqRVUIz0.js} +1 -1
- package/dist/assets/{index-Dm4t4XH1.js → index-D0TzEmpA.js} +1 -1
- package/dist/assets/{index-DAEEDx1o.js → index-D3Od1Ju7.js} +1 -1
- package/dist/assets/{index-ND58NXzr.js → index-DO4zGWKz.js} +1 -1
- package/dist/assets/{index-C5_3pYA_.js → index-DYlN9Brg.js} +1 -1
- package/dist/assets/{index-kszsTfNH.js → index-RDZtjGNC.js} +1 -1
- package/dist/assets/{index-BzItMezw.js → index-YuW8IExe.js} +4 -4
- package/dist/assets/{index-sAnn-Wqb.js → index-c0hdujdn.js} +1 -1
- package/dist/assets/{index-BULZWXKq.js → index-hjv3dFXZ.js} +1 -1
- package/dist/assets/{invitation-qFWETxSc.js → invitation-BtuI3wbb.js} +1 -1
- package/dist/assets/{invite-Bg2Azggi.js → invite-CelTXbxx.js} +1 -1
- package/dist/assets/{issue-passport-DtnZs7_A.js → issue-passport-DGinrMdr.js} +1 -1
- package/dist/assets/{item-BYt6Ny1o.js → item-BhN-qZd_.js} +1 -1
- package/dist/assets/{landing-page-BiznyWTw.js → landing-page-D_TLvQ3s.js} +1 -1
- package/dist/assets/{layout-DE99yYfx.js → layout-0pbi4f6l.js} +1 -1
- package/dist/assets/{list-BkVwpX1t.js → list-C_1TcitB.js} +1 -1
- package/dist/assets/{list-UaF9rEdO.js → list-DKIkIMue.js} +2 -2
- package/dist/assets/localization-CpjVJ6VE.js +1 -0
- package/dist/assets/{log-D-KC9F0b.js → log-DnUF9orj.js} +1 -1
- package/dist/assets/{logger-GX3OECJW.js → logger-jMgD3u5g.js} +1 -1
- package/dist/assets/{login-D5-7Lt94.js → login-Boq_S2S7.js} +1 -1
- package/dist/assets/{login-oauth-callback-PDI2Klq3.js → login-oauth-callback-CuSXnq1m.js} +1 -1
- package/dist/assets/{logo-uploader-BNZB1sug.js → logo-uploader-DtAT8iaJ.js} +4 -4
- package/dist/assets/{lost-passport-kNOXw46l.js → lost-passport-DuJeKcGu.js} +1 -1
- package/dist/assets/{open-window-BEzzIgKH.js → open-window-DXP1LoPD.js} +1 -1
- package/dist/assets/{overview-qlJHwq1E.js → overview-DHcHPq6g.js} +1 -1
- package/dist/assets/{page-header-D9UEVC59.js → page-header-PO_g4wSK.js} +1 -1
- package/dist/assets/{passport-item-C7W2OqHa.js → passport-item-NMGbWwTG.js} +1 -1
- package/dist/assets/{permission-KYy-A4oZ.js → permission-BfddnDBs.js} +1 -1
- package/dist/assets/{preferences-DXEo6kgA.js → preferences-Nt4L8Zgv.js} +1 -1
- package/dist/assets/{profile-embed-faK_BKhI.js → profile-embed-C9nHKFrf.js} +1 -1
- package/dist/assets/{publish-resource-D8YEMAlU.js → publish-resource-BL83FldI.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-vpuu2z51.js → react-beautiful-dnd.esm-0e7VDGmi.js} +1 -1
- package/dist/assets/{runtime-CKW1HKn_.js → runtime-FDEoUn52.js} +1 -1
- package/dist/assets/sdk-CytUSheP.js +1 -0
- package/dist/assets/{security-Dt3PKq-c.js → security-BuN2nUoZ.js} +1 -1
- package/dist/assets/{session-CSqVp1zS.js → session-DUt5rVEy.js} +1 -1
- package/dist/assets/{setup-BlQH2Z6r.js → setup-BB0XLqW9.js} +3 -3
- package/dist/assets/{spaces-rexKSkSX.js → spaces-MprwX1Iq.js} +1 -1
- package/dist/assets/{start-_8paEixr.js → start-C7CIzLBY.js} +1 -1
- package/dist/assets/{starting-progress-CvmzmBMV.js → starting-progress-BJCVRFkE.js} +1 -1
- package/dist/assets/{status-BDhcfo0L.js → status-Bo92foK0.js} +1 -1
- package/dist/assets/{step-actions-iPiCkXbU.js → step-actions-D__rjlW_.js} +1 -1
- package/dist/assets/{studio-A7rMh4Xk.js → studio-kVKG7W3n.js} +1 -1
- package/dist/assets/{switch-control-BmaFq4ZK.js → switch-control-BgwZFVCJ.js} +1 -1
- package/dist/assets/{table-tips-DnNYXRDB.js → table-tips-nPiIcvAy.js} +1 -1
- package/dist/assets/{traffic-BMZEqBnG.js → traffic-Cd92p-Xb.js} +1 -1
- package/dist/assets/{transfer-2aML1rIB.js → transfer-U9z5JNMl.js} +1 -1
- package/dist/assets/{unsubscribe-BuBJl9gX.js → unsubscribe-BmAshFCd.js} +1 -1
- package/dist/assets/{use-blocklet-logo-2Y2A06qi.js → use-blocklet-logo-3VH4RBTr.js} +1 -1
- package/dist/assets/useAsync-CDjYBiwf.js +1 -0
- package/dist/assets/useAsync-dC0jHVWO.js +1 -0
- package/dist/assets/{useLocalStorage-BFO9aBYY.js → useLocalStorage-DotMjDUB.js} +1 -1
- package/dist/assets/{user-center-gbex4PJG.js → user-center-8aoMSkJ_.js} +1 -1
- package/dist/assets/{util-DMDaTiE0.js → util-CiTimo-i.js} +1 -1
- package/dist/assets/{util-xFBxHmZK.js → util-CuK9uaNS.js} +1 -1
- package/dist/assets/{vendor-arcblock-C99E80cF.js → vendor-arcblock-Ca95GLVH.js} +8 -22
- package/dist/assets/{vendor-ux-did-connect-Qap4yrMu.js → vendor-ux-did-connect-D0L9YnHn.js} +5 -5
- package/dist/assets/{wrap-locale-C4cvZ4CE.js → wrap-locale-QBHz1ECC.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/service-worker.js +1 -1
- package/package.json +31 -31
- package/dist/assets/connect-BeFPxq9a.js +0 -5
- package/dist/assets/domain-hqA29r7o.js +0 -9
- package/dist/assets/domains-BkjwRhdu.js +0 -1
- package/dist/assets/dot-CdVWOAIG.js +0 -7
- package/dist/assets/localization-CTcPOuKl.js +0 -1
- package/dist/assets/sdk-B_abqbXe.js +0 -1
- package/dist/assets/useAsync-JBeeXlrl.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-Bh-qMRq3.js";import{a as A,j as b,B as R,am as D}from"./vendor-ux-did-connect-
|
|
1
|
+
import{j as e,ab as k,aa as f,T,ah as m}from"./vendor-mui-core-Bh-qMRq3.js";import{a as A,j as b,B as R,am as D}from"./vendor-ux-did-connect-D0L9YnHn.js";import{H as P}from"./addon-CaGk2PdY.js";import{L as E}from"./landing-page-D_TLvQ3s.js";import{R as I,b as L}from"./vendor-arcblock-Ca95GLVH.js";import{d as B}from"./CheckCircle-XrJDG94y.js";import{l as F}from"./vendor-hooks-DpwFseeF.js";import{r as o}from"./vendor-react-DEoibe3W.js";import{u as H,d as W,s as _,a as z,S as N}from"./index-YuW8IExe.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-DTf-Tya5.js";function se(){var i,c,l,p;const{t:s,locale:u}=A(),{api:h,session:x}=H(),{searchParams:g}=new URL(window.location.href),[j,S]=o.useState(!1),r=g.get("transferId"),v=(i=window==null?void 0:window.env)==null?void 0:i.appId,w=o.useCallback(async()=>{const{data:t}=await W.get("/blocklet/transfer",{params:{transferId:r}});return t},[r]),a=F(w),C=o.useCallback(async(t,d)=>{t&&(_(d(t.sessionToken)),z(d(t.refreshToken))),await x.refresh(),S(!0)},[]);if(a.loading)return e.jsx(k,{});if(a.error)return e.jsx(K,{children:e.jsx(I,{status:"404",title:(l=(c=a.error)==null?void 0:c.response)==null?void 0:l.data,description:""})});const y=a.data.status==="success";let n;return y||j?n=e.jsxs(e.Fragment,{children:[e.jsx(q,{children:e.jsx(P,{SessionContext:N})}),e.jsx(f,{pt:1,color:"success.main",children:e.jsx(B,{style:{fontSize:80}})}),e.jsx(T,{my:4,variant:"h5",children:s("team.transferApp.successTitle")}),e.jsx("a",{href:`${b.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,children:e.jsx(R,{variant:"contained",children:s("team.transferApp.visitDashboard")})})]}):n=e.jsx(D,{popup:!0,open:!0,action:"receive-transfer-app-owner",checkFn:h.get,forceConnected:!1,autoConnect:!1,checkTimeout:10*60*1e3,onSuccess:C,onClose:()=>{},locale:u,messages:{title:s("team.transferApp.receiveDialog.title"),scan:s("team.transferApp.receiveDialog.scan"),confirm:s("team.transferApp.receiveDialog.confirm"),success:s("team.transferApp.receiveDialog.success")},extraParams:{transferId:r,appDid:v},hideCloseButton:!0}),e.jsx(E,{did:(p=window.blocklet)==null?void 0:p.appPid,children:e.jsx(f,{sx:{maxWidth:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:n})})}const q=m(L)`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 16px;
|
|
4
4
|
right: 16px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,aa as t,bK as C,bV as w,bW as k,bX as L,T as E}from"./vendor-mui-core-Bh-qMRq3.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{a as F,B as u,Y as a,aL as P,j as d}from"./vendor-ux-did-connect-
|
|
1
|
+
import{j as i,aa as t,bK as C,bV as w,bW as k,bX as L,T as E}from"./vendor-mui-core-Bh-qMRq3.js";import{u as R,L as v}from"./vendor-react-DEoibe3W.js";import{a as F,B as u,Y as a,aL as P,j as d}from"./vendor-ux-did-connect-D0L9YnHn.js";import{a as T,u as f,m as S}from"./vendor-hooks-DpwFseeF.js";import{A as m}from"./vendor-utils-rHXShPKm.js";import{u as I}from"./index-YuW8IExe.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-Ca95GLVH.js";function K(){var c,l;const{api:b}=I(),h=R(),{t:n}=F(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=P(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(v,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{K as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as X,r as W,b as ce}from"./vendor-react-DEoibe3W.js";import{H as j,j as l,be as J,s as k,w as ue,aa as G,T as B,y as pe}from"./vendor-mui-core-Bh-qMRq3.js";import{f as M,u as Y}from"./vendor-hooks-DpwFseeF.js";import{j as Z,I as de}from"./vendor-ux-did-connect-
|
|
1
|
+
import{g as X,r as W,b as ce}from"./vendor-react-DEoibe3W.js";import{H as j,j as l,be as J,s as k,w as ue,aa as G,T as B,y as pe}from"./vendor-mui-core-Bh-qMRq3.js";import{f as M,u as Y}from"./vendor-hooks-DpwFseeF.js";import{j as Z,I as de}from"./vendor-ux-did-connect-D0L9YnHn.js";import{b as z,z as ee,A as C}from"./vendor-utils-rHXShPKm.js";import{l as fe,m as he,n as me,o as ge,q as ye,c as U,s as ve}from"./vendor-arcblock-Ca95GLVH.js";import{u as Le}from"./session-DUt5rVEy.js";import{A as xe,W as _e,U as Ee}from"./index-YuW8IExe.js";var b={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var r=p(fe),s=p(he),n=p(me),a=p(ge),u=p(ye);function p(o){return o&&o.__esModule?o:{default:o}}function h(o,i){return m(o)||w(o,i)||d(o,i)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(o,i){if(o){if(typeof o=="string")return O(o,i);var c={}.toString.call(o).slice(8,-1);return c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set"?Array.from(o):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?O(o,i):void 0}}function O(o,i){(i==null||i>o.length)&&(i=o.length);for(var c=0,v=Array(i);c<i;c++)v[c]=o[c];return v}function w(o,i){var c=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(c!=null){var v,g,_,E,x=[],f=!0,S=!1;try{if(_=(c=c.call(o)).next,i!==0)for(;!(f=(v=_.call(c)).done)&&(x.push(v.value),x.length!==i);f=!0);}catch(P){S=!0,g=P}finally{try{if(!f&&c.return!=null&&(E=c.return(),Object(E)!==E))return}finally{if(S)throw g}}return x}}function m(o){if(Array.isArray(o))return o}var T={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},A=/^\[([^\]]+)\](?::([0-9]+))?$/;function N(o,i){if((0,r.default)(o),!o||/[\s<>]/.test(o)||o.indexOf("mailto:")===0||(i=(0,u.default)(i,T),i.validate_length&&o.length>i.max_allowed_length)||!i.allow_fragments&&o.includes("#")||!i.allow_query_components&&(o.includes("?")||o.includes("&")))return!1;var c,v,g,_,E,x,f,S;if(f=o.split("#"),o=f.shift(),f=o.split("?"),o=f.shift(),f=o.split("://"),f.length>1){if(c=f.shift().toLowerCase(),i.require_valid_protocol&&i.protocols.indexOf(c)===-1)return!1}else{if(i.require_protocol)return!1;if(o.slice(0,2)==="//"){if(!i.allow_protocol_relative_urls)return!1;f[0]=o.slice(2)}}if(o=f.join("://"),o==="")return!1;if(f=o.split("/"),o=f.shift(),o===""&&!i.require_host)return!0;if(f=o.split("@"),f.length>1){if(i.disallow_auth||f[0]===""||(v=f.shift(),v.indexOf(":")>=0&&v.split(":").length>2))return!1;var P=v.split(":"),y=h(P,2),oe=y[0],le=y[1];if(oe===""&&le==="")return!1}_=f.join("@"),x=null,S=null;var H=_.match(A);if(H?(g="",S=H[1],x=H[2]||null):(f=_.split(":"),g=f.shift(),f.length&&(x=f.join(":"))),x!==null&&x.length>0){if(E=parseInt(x,10),!/^[0-9]+$/.test(x)||E<=0||E>65535)return!1}else if(i.require_port)return!1;return i.host_whitelist?(0,s.default)(g,i.host_whitelist):g===""&&!i.require_host?!0:!(!(0,a.default)(g)&&!(0,n.default)(g,i)&&(!S||!(0,a.default)(S,6))||(g=g||S,i.host_blacklist&&(0,s.default)(g,i.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(b,b.exports);var Te=b.exports;const Se=X(Te),tt=e=>{if(!e||!e.length)return[];const t=[];let r=null,s=[];if(e.forEach(n=>{var m,T,A,N;if(!n.activity||!n.activity.type||!r){r&&(s.length===1?t.push(s[0]):(r.items=s,t.push(r))),n.activity&&n.activity.type?(r=n,s=[n]):(t.push(n),r=null,s=[]);return}const a=s[0].activity,u=a.type,p=(m=a.target)==null?void 0:m.type,h=(T=a.target)==null?void 0:T.id,L=n.activity.type,d=(A=n.activity.target)==null?void 0:A.type,O=(N=n.activity.target)==null?void 0:N.id;if(u&&L&&u===L&&(!a.target&&!n.activity.target||a.target&&n.activity.target&&p===d&&h===O))s.push(n);else{if(s.length===1)t.push(s[0]);else{const o=Object.assign({},r,{items:s});t.push(o)}r=n,s=[n]}}),r)if(s.length===1)t.push(s[0]);else{const n=Object.assign({},r,{items:s});t.push(n)}return t},Ce=e=>!z(e.activity)&&!!e.activity.type&&!!e.activity.actor,nt=e=>Ce(e)&&!!e.actorInfo&&!!e.actorInfo.did,Oe=e=>{if(!e)return null;const{meta:t,target:r,actor:s}=e||{};let n=r==null?void 0:r.id;return(r==null?void 0:r.type)==="user"&&(n=ee(C(Z.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:s})),{metaLink:t==null?void 0:t.id,targetLink:n}},we=e=>Se(e),R={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},Ae={[R.COMMENT]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have left ",t," comments on ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["has commented on ",r?"your":"the"," ",e,":"]}),[R.LIKE]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["have liked ",r?"your":"the"," ",e,":"]}),[R.FOLLOW]:(e,t)=>t>1?l.jsx(l.Fragment,{children:"have followed you"}):l.jsx(l.Fragment,{children:"has followed you"}),[R.TIPS]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["left tips for ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["left a tip for ",r?"your":"the"," ",e,":"]}),[R.MENTION]:(e,t,r)=>t>1?l.jsxs(l.Fragment,{children:["have mentioned you in ",r?"your":"the"," ",e,":"]}):l.jsxs(l.Fragment,{children:["mentioned you in ",r?"your":"the"," ",e,":"]}),[R.ASSIGN]:()=>l.jsx(l.Fragment,{children:"has assigned you a task: "}),[R.UN_ASSIGN]:()=>l.jsx(l.Fragment,{children:"has revoked your task assignment: "})},F=W.memo(function({user:t,color:r="text.secondary"}){const s=ee(C(Z.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return l.jsx(J,{href:s,color:r,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});F.propTypes={user:j.shape({did:j.string.isRequired,fullName:j.string.isRequired}).isRequired,color:j.string};F.displayName="UserLink";function rt({activity:e,users:t,actors:r,extra:s={},mountPoint:n=""}){const{session:a}=Le()||{},{type:u,target:p}=e||{},{type:h,author:L}=p||{},{linkColor:d="text.secondary"}=s||{},O=M(()=>{var c;return L?(((c=a==null?void 0:a.user)==null?void 0:c.did)||(s==null?void 0:s.userDid))===L:!0},[a,L]),w=M(()=>{if(!Array.isArray(t))return new Map;const i=new Map;return t.forEach(c=>{c!=null&&c.did&&!i.has(c.did)&&i.set(c.did,c)}),i},[t]),m=M(()=>Array.isArray(r)?[...new Set(r)].map(c=>c?w.get(c)||{did:c,fullName:"System"}:null):[],[r,w]),T=Y(()=>{if(!Array.isArray(m)||m.length===0)return null;if(m.length===1)return l.jsx(F,{user:m[0],color:d});const i=m.slice(0,-1),c=m[m.length-1];if(m.length===2)return l.jsxs(l.Fragment,{children:[l.jsx(F,{user:i[0],color:d})," and ",l.jsx(F,{user:c,color:d})]});const v=m.length>3,g=v?m.slice(0,2):i;return l.jsxs(l.Fragment,{children:[g.map((_,E)=>l.jsxs(ce.Fragment,{children:[l.jsx(F,{user:_,color:d}),E<g.length-1?", ":""]},_.did)),v?`, and ${m.length-2} others`:l.jsxs(l.Fragment,{children:[", and ",l.jsx(F,{user:c,color:d})]})]})}),A=Y(()=>{const i=Ae[u];return i?i(h==="doc"?"document":h,t.length,O):null}),N=M(()=>{const i=T(),c=A();return!i||!c?null:l.jsxs(l.Fragment,{children:[i," ",c]})},[u,h,m,T,A]),o=M(()=>{if(!e)return null;const i=Oe(e);return i!=null&&i.targetLink?we(i==null?void 0:i.targetLink)?i==null?void 0:i.targetLink:C(n,i.targetLink):null},[e,n]);return!u||z(p)?null:l.jsxs(l.Fragment,{children:[N," ",l.jsx(J,{href:o,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:i=>{i.customPreventRedirect=!0},children:p.name||p.desc})]})}const je={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};te.propTypes={meta:j.object.isRequired};const Ne=k(ue)(({theme:e})=>({maxWidth:320,display:"flex",flexDirection:"column",gap:e.spacing(1.5),padding:e.spacing(2),marginTop:e.spacing(1),borderRadius:e.spacing(1),border:`1px solid ${e.palette.divider}`,boxShadow:"none"})),Ue=k(G)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),Ie=k(G)({display:"flex",justifyContent:"space-between",alignItems:"center"});function te({meta:e}){const{amount:t,symbol:r,chainId:s}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${s}`,"_blank")};return l.jsxs(Ne,{children:[l.jsxs(Ue,{children:[l.jsx("img",{alt:"ArcBlock Beta",src:"https://bbqat7g5cg33cyr4pdrd6foycgzfb5xxeh2se7gcqkq.did.abtnet.io/payment-kit/methods/arcblock.png",width:32,height:32,style:{borderRadius:16}}),l.jsx(B,{variant:"h5",color:"text.primary",children:"ArcBlock"})]}),l.jsxs(Ie,{children:[l.jsxs(G,{display:"flex",alignItems:"baseline",gap:1,children:[l.jsxs(B,{component:"span",variant:"h5",color:"text.primary",fontWeight:"bold",children:["+ ",t]}),l.jsx(B,{component:"span",variant:"subtitle2",color:"text.secondary",children:r})]}),l.jsx(pe,{variant:"outlined",size:"small",color:"secondary",endIcon:l.jsx(de,{icon:je}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}ne.propTypes={meta:j.object.isRequired,type:j.string.isRequired,hideTips:j.bool,sx:j.object};ne.defaultProps={hideTips:!1,sx:{}};function ne({meta:e,type:t,hideTips:r=!1,sx:s}){return z(e)?null:t==="tips"&&!r?l.jsx(te,{meta:e}):l.jsx(B,{variant:"subtitle2",fontSize:16,component:"p",sx:s,color:"text.secondary",children:e.content})}var Re=W;function Fe(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var $=Fe(Re);function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},K.apply(this,arguments)}function Pe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,n){return s.__proto__=n,s},q(e,t)}function Me(e,t){if(e==null)return{};var r={},s=Object.keys(e),n,a;for(a=0;a<s.length;a++)n=s[a],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var V={position:"absolute",bottom:0,left:0,height:0,overflow:"hidden","padding-top":0,"padding-bottom":0,border:"none"},Be=["box-sizing","width","font-size","font-weight","font-family","font-style","letter-spacing","text-indent","white-space","word-break","overflow-wrap","padding-left","padding-right"];function He(e,t){if(!e||typeof e!="object")return e;var r={};return Object.keys(e).forEach(function(s){t.indexOf(s)>-1||(r[s]=e[s])}),r}var $e=["component","className","unsafeHTML"];function re(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var r=document.createDocumentFragment(),s;switch(t){case"words":s=e.textContent.split(/\b|(?=\W)/);break;case"letters":s=Array.from(e.textContent);break}s.forEach(function(p){r.appendChild(De(p))}),e.parentNode.replaceChild(r,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),a=n.length,u=0;u<a;u++)re(n[u],t)}function De(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function Q(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function se(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);se(e.parentNode,t)}}function be(e){for(var t=e;t=t.parentNode;)if(/p|div|main|section|h\d|ul|ol|li/.test(t.tagName.toLowerCase()))return t}function D(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var ie={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},Ke=Object.keys(ie),ae=function(e){Pe(t,e);function t(s){var n;return n=e.call(this,s)||this,n.state={html:s.unsafeHTML,clamped:!1},n.canvas=null,n.maxLine=0,n.nlUnits=[],n}var r=t.prototype;return r.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},r.componentDidUpdate=function(n){n.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==n&&this.reflow(this.props)},r.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},r.setState=function(n,a){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,a)},r.initCanvas=function(){if(!this.canvas){var n=this.canvas=document.createElement("div");n.className="LinesEllipsis-canvas "+this.props.className,n.setAttribute("aria-hidden","true"),this.copyStyleToCanvas(),Object.keys(V).forEach(function(a){n.style[a]=V[a]}),document.body.appendChild(n)}},r.copyStyleToCanvas=function(){var n=this,a=window.getComputedStyle(this.target);Be.forEach(function(u){n.canvas.style[u]=a[u]})},r.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var a=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");re(this.canvas,a);var u=this.putEllipsis(this.calcIndexes()),p={clamped:u,html:this.canvas.innerHTML};this.setState(p,n.onReflow.bind(this,p))},r.calcIndexes=function(){var n=[0],a=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),u=a.length;if(!a.length)return n;var p=a.find(D);if(!p)return n;for(var h=1,L=p.offsetTop,d=1;d<u&&!(D(a[d])&&a[d].offsetTop-L>1&&(h++,n.push(d),L=a[d].offsetTop,h>this.maxLine));d++);return n},r.putEllipsis=function(n){if(n.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,n[this.maxLine]);var a=this.nlUnits.pop(),u=this.makeEllipsisSpan();do se(a,this.canvas),be(a).appendChild(u),a=this.nlUnits.pop();while(a&&(!D(a)||u.offsetHeight>a.offsetHeight||u.offsetTop>a.offsetTop));return a&&Q(a),this.nlUnits.forEach(Q),!0},r.makeEllipsisSpan=function(){var n=this.props,a=n.ellipsisHTML,u=n.ellipsis,p=document.createElement("span");p.appendChild(document.createElement("wbr"));var h=document.createElement("span");return h.className="LinesEllipsis-ellipsis",a?h.innerHTML=a:h.textContent=u,p.appendChild(h),p},r.isClamped=function(){return this.clamped},r.render=function(){var n=this,a=this.state,u=a.html,p=a.clamped,h=this.props,L=h.component,d=h.className,O=h.unsafeHTML,w=Me(h,$e);return $.default.createElement(L,K({className:"LinesEllipsis "+(p?"LinesEllipsis--clamped":"")+" "+d,ref:function(T){return n.target=T}},He(w,Ke)),$.default.createElement("div",{dangerouslySetInnerHTML:{__html:p?u:O}}))},t}($.default.Component);ae.defaultProps=ie;var qe=ae;const st=X(qe),We=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},ke=e=>{try{return new URL(e).host}catch{return e}};var it={getChainHost:We,getUrlHost:ke},at={linkStyle:{color:"#2754C5",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"14px",textDecoration:"underline"},actionsStyle:{margin:"20px -8px 0px"},actionStyle:{color:"#4598fa",fontSize:14,border:"1px solid #4598fa",display:"inline-block",borderRadius:"4px",margin:"8px",marginTop:"8px",marginBottom:"8px",marginLeft:"8px",marginRight:"8px"},assetStyle:{backgroundColor:"#f6f6f6",borderRadius:"8px",padding:"8px"},remarkStyle:{color:"#9397a1",fontSize:"12px",margin:0,whiteSpace:"pre-line!important"},summaryStyle:{color:"#49c3ad",fontWeight:700},titleStyle:{marginBottom:"6px"},severityColorMap:{normal:"#C4C5CA",success:"#25C99B",error:"#F16E6E",warning:"#DE9E37"},attachmentsStyle:{borderLeft:"2px solid transparent",paddingLeft:"20px"},h1Style:{color:"#333",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"24px",fontWeight:"bold",margin:"40px 0",padding:"0"},footerStyle:{color:"#898989",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",fontSize:"12px",lineHeight:"22px",margin:0}};const I=(e,t)=>{var s;let r="?v=";return t?r+=_e(t):r+=`${(s=e==null?void 0:e.meta)==null?void 0:s.version}${Ee(e==null?void 0:e.status)?"~":""}`,r};function Ge({blocklet:e}){var c,v,g,_,E,x,f,S,P;const{inService:t}=xe(),r=(c=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:c.value,s=(v=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE_DARK))==null?void 0:v.value,n=(g=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:g.value,a=(_=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT_DARK))==null?void 0:_.value,u=(E=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:E.value,p=(x=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))==null?void 0:x.value,h=(f=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))==null?void 0:f.value,L=(S=((e==null?void 0:e.environments)||[]).find(y=>y.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_OG_IMAGE))==null?void 0:S.value,d=((P=window.env)==null?void 0:P.apiPrefix)||"/",O=`${C(d,`/blocklet/logo/${t?"":e.meta.did}`)}${I(e,r)}`,w=`${C(d,`/blocklet/logo-dark/${t?"":e.meta.did}`)}${I(e,s)}`,m=`${C(d,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${I(e,n??r)}`,T=`${C(d,`/blocklet/logo-rect-dark/${t?"":e.meta.did}`)}${I(e,a??s)}`,A=`${C(d,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${I(e,u??r)}`,N=`${C(d,`/blocklet/splash/portrait/${t?"":e.meta.did}`)}${I(e,p)}`,o=`${C(d,`/blocklet/splash/landscape/${t?"":e.meta.did}`)}${I(e,h)}`,i=`${C(d,`/blocklet/og-image/${t?"":e.meta.did}`)}${I(e,L)}`;return{logoUrl:O,logoDarkUrl:w,rectLogoUrl:m,rectLogoDarkUrl:T,faviconUrl:A,splashPortraitUrl:N,splashLandscapeUrl:o,ogImageUrl:i}}function ot({blocklet:e,square:t}={}){const{logoUrl:r,logoDarkUrl:s,rectLogoUrl:n,rectLogoDarkUrl:a}=Ge({blocklet:e}),u=W.useMemo(()=>({appLogo:r,appLogoDark:s,appLogoRect:n,appLogoRectDark:a}),[r,s,n,a]);return ve({meta:u,square:t})}export{st as H,ne as M,ot as a,we as b,it as c,nt as d,je as e,Se as f,Oe as g,Ge as h,Ce as i,tt as m,at as s,rt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as R}from"./vendor-hooks-DpwFseeF.js";import{r as g}from"./vendor-react-DEoibe3W.js";var i={},l={},v={},M;function h(){if(M)return v;M=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g;function r(){var t=e.useRef(!1),s=e.useCallback(function(){return t.current},[]);return e.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),s}return v.default=r,v}var p;function F(){if(p)return l;p=1,Object.defineProperty(l,"__esModule",{value:!0});var e=R,r=g,t=e.__importDefault(h());function s(d,u,a){u===void 0&&(u=[]),a===void 0&&(a={loading:!1});var f=r.useRef(0),o=t.default(),y=r.useState(a),b=y[0],_=y[1],U=r.useCallback(function(){for(var m=[],c=0;c<arguments.length;c++)m[c]=arguments[c];var A=++f.current;return b.loading||_(function(n){return e.__assign(e.__assign({},n),{loading:!0})}),d.apply(void 0,m).then(function(n){return o()&&A===f.current&&_({value:n,loading:!1}),n},function(n){return o()&&A===f.current&&_({error:n,loading:!1}),n})},u);return[b,U]}return l.default=s,l}var q;function S(){if(q)return i;q=1,Object.defineProperty(i,"__esModule",{value:!0});var e=R,r=g,t=e.__importDefault(F());function s(d,u){u===void 0&&(u=[]);var a=t.default(d,u,{loading:!0}),f=a[0],o=a[1];return r.useEffect(function(){o()},[o]),f}return i.default=s,i}export{S as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./vendor-react-DEoibe3W.js";import{r as s}from"./useAsync-CDjYBiwf.js";var o=s();const a=r(o);export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as S}from"./vendor-react-DEoibe3W.js";import{ba as y}from"./vendor-ux-did-connect-
|
|
1
|
+
import{r as S}from"./vendor-react-DEoibe3W.js";import{ba as y}from"./vendor-ux-did-connect-D0L9YnHn.js";var d={};Object.defineProperty(d,"__esModule",{value:!0});var c=S,o=y,z=function(f,i,r){if(!o.isBrowser)return[i,o.noop,o.noop];if(!f)throw new Error("useLocalStorage key may not be falsy");var u=r?r.raw?function(t){return t}:r.deserializer:JSON.parse,n=c.useRef(function(t){try{var a=r?r.raw?String:r.serializer:JSON.stringify,e=localStorage.getItem(t);return e!==null?u(e):(i&&localStorage.setItem(t,a(i)),i)}catch{return i}}),l=c.useState(function(){return n.current(f)}),g=l[0],s=l[1];c.useLayoutEffect(function(){return s(n.current(f))},[f]);var m=c.useCallback(function(t){try{var a=typeof t=="function"?t(g):t;if(typeof a>"u")return;var e=void 0;r?r.raw?typeof a=="string"?e=a:e=JSON.stringify(a):r.serializer?e=r.serializer(a):e=JSON.stringify(a):e=JSON.stringify(a),localStorage.setItem(f,e),s(u(e))}catch{}},[f,s]),v=c.useCallback(function(){try{localStorage.removeItem(f),s(void 0)}catch{}},[f,s]);return[g,m,v]},N=d.default=z;export{N as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as g,j as t,bo as Ce,bn as we,q as je,aa as v,y as W,v as he,bP as ke,I as Me,b3 as Se,T as J,bQ as ne,w as oe,bs as re,bR as ae,O as Pe,N as Ie,E as ie,ah as xe,bS as Te,bT as Re,m as se,ab as le}from"./vendor-mui-core-Bh-qMRq3.js";import{A as Ee,j as Be,k as Fe,H as Ne,U as Oe}from"./vendor-arcblock-C99E80cF.js";import{t as me,D as ze,A as $e}from"./vendor-utils-rHXShPKm.js";import{b1 as Z,I as ce,d as Ae,a as We,j as Le}from"./vendor-ux-did-connect-Qap4yrMu.js";import{r as s,b as De,h as He,l as _e}from"./vendor-react-DEoibe3W.js";import{f as N,m as qe}from"./vendor-hooks-DpwFseeF.js";import{N as Ue,c as de}from"./list-BkVwpX1t.js";import{d as Ve}from"./ExpandLess-D7OENe4H.js";import{B as ue}from"./bundle-avatar-BoczFLNt.js";import{V as Ye}from"./index-BzItMezw.js";import"./lottie-web-jYmAQWuC.js";import"./index-C849wD9b.js";import"./use-blocklet-logo-2Y2A06qi.js";import"./session-CSqVp1zS.js";import"./InfoOutlined-BGorl_CI.js";import"./CheckCircle-zHdz-yvJ.js";import"./index-sAnn-Wqb.js";import"./Phone--BSu-btI.js";import"./Location-By12Z3Te.js";import"./Email-CdSNK0eA.js";import"./Timezone-YZ0dMUEr.js";import"./util-DMDaTiE0.js";import"./base32-B42OVABo.js";function Ke(){let o=new Map;function c({root:p,rootMargin:u,threshold:f}){let x=o.get(p);x||(x=new Map,o.set(p,x));let b=JSON.stringify({rootMargin:u,threshold:f}),l=x.get(b);if(!l){let r=new Map;l={observer:new IntersectionObserver(d=>{d.forEach(h=>{var a;(a=r.get(h.target))==null||a(h)})},{root:p,rootMargin:u,threshold:f}),entryCallbacks:r},x.set(b,l)}return{observe:(r,d)=>{l.entryCallbacks.set(r,d),l.observer.observe(r)},unobserve:r=>{l.entryCallbacks.delete(r),l.observer.unobserve(r)}}}return{getObserver:c}}var Ge="0px",Qe=[0],Je=Ke();function Xe(o){let c=(o==null?void 0:o.rootMargin)??Ge,p=(o==null?void 0:o.threshold)??Qe,u=s.useRef(null),f=s.useRef(null),x=s.useRef(null),[b,l]=s.useState(),r=s.useCallback(()=>{let w=u.current;if(!w){l(void 0);return}let j=Je.getObserver({root:f.current,rootMargin:c,threshold:p});j.observe(w,I=>{l(I)}),x.current=j},[c,p]),d=s.useCallback(()=>{let w=x.current,j=u.current;j&&(w==null||w.unobserve(j)),x.current=null},[]),h=s.useCallback(w=>{d(),u.current=w,r()},[r,d]),a=s.useCallback(w=>{d(),f.current=w,r()},[r,d]);return[h,{entry:b,rootRef:a}]}var Ze=Xe;function et(o){var b;let[c,p]=Ze(o),u=!!((b=p.entry)!=null&&b.isIntersecting),[f,x]=s.useState(u);return u&&!f&&x(!0),[c,{...p,isVisible:u,wasEverVisible:f}]}var tt=et,nt=100;function ot({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=nt}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=tt({rootMargin:u});s.useEffect(()=>{b.current=p},[p]);let h=!f&&!o&&d&&c;return s.useEffect(()=>{if(h){let a=setTimeout(()=>{b.current()},x);return()=>{clearTimeout(a)}}},[h,x]),[l,{rootRef:r}]}var rt=ot;const X={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};L.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};L.defaultProps={size:8};function L({severity:o,size:c}){return X[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:X[o]||X.info}}):null}be.propTypes={theme:g.string,type:g.oneOf(["button","line","select"]),onSelectType:g.func,extra:g.node,loading:g.bool,currentTab:g.oneOf(["info","success","warning","error",""])};function be({theme:o="dark",type:c="button",onSelectType:p,extra:u=void 0,currentTab:f="",loading:x=!1,...b}){const{t:l}=s.useContext(Z),r=[{label:l("notification.allSeverity"),value:""},{label:l("notification.severityType.info"),value:"info"},{label:l("notification.severityType.success"),value:"success"},{label:l("notification.severityType.warning"),value:"warning"},{label:l("notification.severityType.error"),value:"error"}],d=i=>{(i!==f||!x)&&p(i)},h=s.useMemo(()=>{const i={width:"100%",bgcolor:o==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:c==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return c==="line"?Object.assign(i,{}):i},[c,o]),a=(i,y,C)=>t.jsx(W,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(W,{variant:"text",disabled:x,onClick:()=>d(i.value),className:`profile-line-button ${y?"active":""}`,...b,children:i.label},i.value||C),j=()=>r==null?void 0:r.map((i,y)=>{const C=f===(i==null?void 0:i.value);return c==="line"?t.jsx(s.Fragment,{children:w(i,C,y)},i.value||y):t.jsx(s.Fragment,{children:a(i,C,y)},i.value||y)}),I=i=>{const{value:y}=i.target;d(y==="all"?"":y)};return c==="select"?t.jsx(Ce,{sx:{maxWidth:300},children:t.jsx(we,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ee,{...i,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:r.map((i,y)=>t.jsx(je,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(L,{severity:i.value}),i.label]})},i.value||y))})}):t.jsxs(v,{className:"severity-tabs",sx:h,children:[t.jsx(v,{sx:{...c==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{display:"flex",gap:"24px"}},children:j()}),u]})}ve.propTypes={paging:g.objectOf(g.any).isRequired,loading:g.bool.isRequired,onChange:g.func.isRequired};function ve({loading:o,paging:c,onChange:p}){const{t:u}=s.useContext(Z),f=he(r=>r.breakpoints.down("md"));if(c.pageCount<=0||f)return null;const x=(r,d)=>{p({page:d+1})},b=r=>{const d=Number(r.target.value);p({page:1,pageSize:d})},l=c.page-1<=0?0:c.page-1;return t.jsx(v,{mt:2,display:"flex",justifyContent:"flex-end",className:"notification-pagination",children:t.jsx(ke,{component:"div",disabled:o,count:c.total,page:l,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:u("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:d,count:h})=>`${r}–${d} / ${h!==-1?h:`${u()}more than ${d}`}`,rowsPerPage:c.pageSize,onPageChange:x,onRowsPerPageChange:b})})}const at=s.memo(ve),it={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"/>'},st={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/>'},pe=6,fe={"& .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}},lt={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},ge=()=>({...lt,width:"calc(50% - 8px)"});ee.propTypes={loading:g.bool,type:g.oneOf(["server","service"]),onFilterChange:g.func,blockletMap:g.object,filterType:g.oneOf(["component","entity"]),selectedId:g.array,severity:g.array,enableMarkAllAsRead:g.bool,unReadCount:g.number,onReadFilterChange:g.func,currentReadFilter:g.string};ee.defaultProps={loading:!1,onFilterChange:()=>{},type:"service",blockletMap:{},filterType:"component",selectedId:[],severity:[],enableMarkAllAsRead:!0,unReadCount:0,onReadFilterChange:()=>{},currentReadFilter:"all"};function ee({onFilterChange:o,loading:c,type:p,blockletMap:u,filterType:f="component",selectedId:x=[],severity:b=[],enableMarkAllAsRead:l=!0,unReadCount:r=0,onReadFilterChange:d,currentReadFilter:h="all"}){const{t:a}=s.useContext(Z),[w,j]=s.useState(null),I=!!w,[i,y]=s.useState(x),[C,T]=s.useState(b),[S,O]=s.useState(!1),[P,D]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),T(b)},[x,b]);const z=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],H=e=>{(e!==h||!c)&&d(e)},$=[{label:a("notification.severityType.info"),value:"info"},{label:a("notification.severityType.success"),value:"success"},{label:a("notification.severityType.warning"),value:"warning"},{label:a("notification.severityType.error"),value:"error"}],_=e=>{j(e.currentTarget),D(""),O(!1)},Y=()=>{j(null)},q=e=>{const n=i.includes(e)?i.filter(m=>m!==e):[...i,e];y(n),o({id:n,severity:C})},U=e=>{const n=C.includes(e)?C.filter(m=>m!==e):[...C,e];T(n),o({severity:n,id:i})},K=e=>{D(e.target.value)},G=()=>{O(!S)},F=De.useMemo(()=>{if(!u.size)return[];const e=[];return f==="component"&&e.push({label:a("notification.system"),id:"system"}),Array.from(u).forEach(([,n])=>{var A,k;const m=n.did||((A=n.meta)==null?void 0:A.did),M=n.title||((k=n.meta)==null?void 0:k.title)||"",R=n.appPid||n.appDid;(f==="component"&&R!==m||f==="entity"&&R===m)&&e.push({label:M,id:m,blocklet:n,ancestors:n.ancestors})}),e},[u,f,a]);s.useEffect(()=>{if(P.trim()==="")B(F);else{const e=P.toLowerCase(),n=F.filter(m=>m.label.toLowerCase().includes(e));B(n)}},[P,F]);const Q=P.trim()!==""||S?E:E.slice(0,pe);return t.jsxs(v,{children:[t.jsxs(v,{sx:{display:"flex",justifyContent:l?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[l&&t.jsx(v,{display:"flex",gap:1.5,children:z.map(e=>t.jsxs(W,{disabled:c,onClick:()=>H(e.value),className:`profile-button ${h===e.value?"active":""}`,sx:{...p==="service"&&h===e.value?{color:"secondary.main"}:{},color:"red",fontWeight:h===e.value?"bold":"normal"},children:[e.label,e.value==="unread"&&r>0&&` (${r})`]},e.value))}),t.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Me,{size:"small",onClick:_,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ce,{icon:it,hFlip:!0})}),t.jsx(Se,{open:I,anchorEl:w,onClose:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{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:t.jsxs(v,{children:[t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px",children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",children:a("notification.severity")}),t.jsx(v,{minWidth:"60px",display:"flex",justifyContent:"flex-end",children:(i.length>0||C.length>0)&&t.jsx(W,{size:"small",onClick:()=>{y([]),T([]),o({severity:[],id:[]})},startIcon:t.jsx(Ae,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:a("notification.clear")})})]}),t.jsx(v,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:$.map(e=>t.jsx(oe,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ae,{checked:C.includes(e.value),onChange:()=>U(e.value),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,children:[t.jsx(L,{severity:e.value}),e.label]})})},e.value))})}),t.jsxs(v,{mb:2,children:[t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5,children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",width:"calc(100% - 36px)",children:a("notification.from")}),t.jsx(v,{display:"flex",alignItems:"center",width:"calc(100% - 36px)",children:t.jsx(Pe,{size:"small",placeholder:"search",value:P,onChange:K,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},InputProps:{size:"small",startAdornment:t.jsx(Ie,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ce,{icon:st})})}})})]}),t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(oe,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ae,{checked:i.includes(e.id),onChange:()=>q(e.id),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,sx:{minWidth:0,width:"100%"},children:[e.blocklet&&t.jsx(ue,{size:20,blocklet:e.blocklet,ancestors:e.ancestors,style:{borderRadius:4,flexShrink:0}}),t.jsx(J,{noWrap:!0,variant:"body2",component:"span",title:e.label,flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:e.label})]})})},e.id))}),E.length>pe&&P.trim()===""&&t.jsx(W,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ve,{}):t.jsx(Be,{})})]})]})})]})]}),i.length>0||C.length>0?t.jsxs(v,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(e=>{const n=$.find(m=>m.value===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(L,{severity:e}),n?n.label:e]}),onDelete:()=>U(e),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${e}`)}),i.map(e=>{const n=F.find(m=>m.id===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[(n==null?void 0:n.blocklet)&&t.jsx(ue,{size:16,blocklet:n.blocklet,ancestors:n.ancestors,style:{borderRadius:4,flexShrink:0}}),n?n.label:e]}),variant:"outlined",onDelete:()=>q(e),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${e}`)})]}):null]})}const ct=xe(Te)`
|
|
1
|
+
import{H as g,j as t,bo as Ce,bn as we,q as je,aa as v,y as W,v as he,bP as ke,I as Me,b3 as Se,T as J,bQ as ne,w as oe,bs as re,bR as ae,O as Pe,N as Ie,E as ie,ah as xe,bS as Te,bT as Re,m as se,ab as le}from"./vendor-mui-core-Bh-qMRq3.js";import{A as Ee,j as Be,k as Fe,H as Ne,U as Oe}from"./vendor-arcblock-Ca95GLVH.js";import{t as me,D as ze,A as $e}from"./vendor-utils-rHXShPKm.js";import{b1 as Z,I as ce,d as Ae,a as We,j as Le}from"./vendor-ux-did-connect-D0L9YnHn.js";import{r as s,b as De,h as He,l as _e}from"./vendor-react-DEoibe3W.js";import{f as N,m as qe}from"./vendor-hooks-DpwFseeF.js";import{N as Ue,c as de}from"./list-C_1TcitB.js";import{d as Ve}from"./ExpandLess-CjIzahHO.js";import{B as ue}from"./bundle-avatar-D7QQIJpo.js";import{V as Ye}from"./index-YuW8IExe.js";import"./lottie-web-jYmAQWuC.js";import"./index-C849wD9b.js";import"./use-blocklet-logo-3VH4RBTr.js";import"./session-DUt5rVEy.js";import"./InfoOutlined-uoMMChNE.js";import"./CheckCircle-XrJDG94y.js";import"./index-c0hdujdn.js";import"./Phone--BSu-btI.js";import"./Location-By12Z3Te.js";import"./Email-CdSNK0eA.js";import"./Timezone-YZ0dMUEr.js";import"./util-CiTimo-i.js";import"./base32-BnPQ4q4v.js";function Ke(){let o=new Map;function c({root:p,rootMargin:u,threshold:f}){let x=o.get(p);x||(x=new Map,o.set(p,x));let b=JSON.stringify({rootMargin:u,threshold:f}),l=x.get(b);if(!l){let r=new Map;l={observer:new IntersectionObserver(d=>{d.forEach(h=>{var a;(a=r.get(h.target))==null||a(h)})},{root:p,rootMargin:u,threshold:f}),entryCallbacks:r},x.set(b,l)}return{observe:(r,d)=>{l.entryCallbacks.set(r,d),l.observer.observe(r)},unobserve:r=>{l.entryCallbacks.delete(r),l.observer.unobserve(r)}}}return{getObserver:c}}var Ge="0px",Qe=[0],Je=Ke();function Xe(o){let c=(o==null?void 0:o.rootMargin)??Ge,p=(o==null?void 0:o.threshold)??Qe,u=s.useRef(null),f=s.useRef(null),x=s.useRef(null),[b,l]=s.useState(),r=s.useCallback(()=>{let w=u.current;if(!w){l(void 0);return}let j=Je.getObserver({root:f.current,rootMargin:c,threshold:p});j.observe(w,I=>{l(I)}),x.current=j},[c,p]),d=s.useCallback(()=>{let w=x.current,j=u.current;j&&(w==null||w.unobserve(j)),x.current=null},[]),h=s.useCallback(w=>{d(),u.current=w,r()},[r,d]),a=s.useCallback(w=>{d(),f.current=w,r()},[r,d]);return[h,{entry:b,rootRef:a}]}var Ze=Xe;function et(o){var b;let[c,p]=Ze(o),u=!!((b=p.entry)!=null&&b.isIntersecting),[f,x]=s.useState(u);return u&&!f&&x(!0),[c,{...p,isVisible:u,wasEverVisible:f}]}var tt=et,nt=100;function ot({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=nt}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=tt({rootMargin:u});s.useEffect(()=>{b.current=p},[p]);let h=!f&&!o&&d&&c;return s.useEffect(()=>{if(h){let a=setTimeout(()=>{b.current()},x);return()=>{clearTimeout(a)}}},[h,x]),[l,{rootRef:r}]}var rt=ot;const X={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};L.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};L.defaultProps={size:8};function L({severity:o,size:c}){return X[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:X[o]||X.info}}):null}be.propTypes={theme:g.string,type:g.oneOf(["button","line","select"]),onSelectType:g.func,extra:g.node,loading:g.bool,currentTab:g.oneOf(["info","success","warning","error",""])};function be({theme:o="dark",type:c="button",onSelectType:p,extra:u=void 0,currentTab:f="",loading:x=!1,...b}){const{t:l}=s.useContext(Z),r=[{label:l("notification.allSeverity"),value:""},{label:l("notification.severityType.info"),value:"info"},{label:l("notification.severityType.success"),value:"success"},{label:l("notification.severityType.warning"),value:"warning"},{label:l("notification.severityType.error"),value:"error"}],d=i=>{(i!==f||!x)&&p(i)},h=s.useMemo(()=>{const i={width:"100%",bgcolor:o==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:c==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return c==="line"?Object.assign(i,{}):i},[c,o]),a=(i,y,C)=>t.jsx(W,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(W,{variant:"text",disabled:x,onClick:()=>d(i.value),className:`profile-line-button ${y?"active":""}`,...b,children:i.label},i.value||C),j=()=>r==null?void 0:r.map((i,y)=>{const C=f===(i==null?void 0:i.value);return c==="line"?t.jsx(s.Fragment,{children:w(i,C,y)},i.value||y):t.jsx(s.Fragment,{children:a(i,C,y)},i.value||y)}),I=i=>{const{value:y}=i.target;d(y==="all"?"":y)};return c==="select"?t.jsx(Ce,{sx:{maxWidth:300},children:t.jsx(we,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ee,{...i,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:r.map((i,y)=>t.jsx(je,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(L,{severity:i.value}),i.label]})},i.value||y))})}):t.jsxs(v,{className:"severity-tabs",sx:h,children:[t.jsx(v,{sx:{...c==="line"?{flex:1,borderBottom:"1px solid rgba(209, 213, 219, 1)"}:{display:"flex",gap:"24px"}},children:j()}),u]})}ve.propTypes={paging:g.objectOf(g.any).isRequired,loading:g.bool.isRequired,onChange:g.func.isRequired};function ve({loading:o,paging:c,onChange:p}){const{t:u}=s.useContext(Z),f=he(r=>r.breakpoints.down("md"));if(c.pageCount<=0||f)return null;const x=(r,d)=>{p({page:d+1})},b=r=>{const d=Number(r.target.value);p({page:1,pageSize:d})},l=c.page-1<=0?0:c.page-1;return t.jsx(v,{mt:2,display:"flex",justifyContent:"flex-end",className:"notification-pagination",children:t.jsx(ke,{component:"div",disabled:o,count:c.total,page:l,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:u("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:d,count:h})=>`${r}–${d} / ${h!==-1?h:`${u()}more than ${d}`}`,rowsPerPage:c.pageSize,onPageChange:x,onRowsPerPageChange:b})})}const at=s.memo(ve),it={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"/>'},st={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/>'},pe=6,fe={"& .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}},lt={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},ge=()=>({...lt,width:"calc(50% - 8px)"});ee.propTypes={loading:g.bool,type:g.oneOf(["server","service"]),onFilterChange:g.func,blockletMap:g.object,filterType:g.oneOf(["component","entity"]),selectedId:g.array,severity:g.array,enableMarkAllAsRead:g.bool,unReadCount:g.number,onReadFilterChange:g.func,currentReadFilter:g.string};ee.defaultProps={loading:!1,onFilterChange:()=>{},type:"service",blockletMap:{},filterType:"component",selectedId:[],severity:[],enableMarkAllAsRead:!0,unReadCount:0,onReadFilterChange:()=>{},currentReadFilter:"all"};function ee({onFilterChange:o,loading:c,type:p,blockletMap:u,filterType:f="component",selectedId:x=[],severity:b=[],enableMarkAllAsRead:l=!0,unReadCount:r=0,onReadFilterChange:d,currentReadFilter:h="all"}){const{t:a}=s.useContext(Z),[w,j]=s.useState(null),I=!!w,[i,y]=s.useState(x),[C,T]=s.useState(b),[S,O]=s.useState(!1),[P,D]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),T(b)},[x,b]);const z=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],H=e=>{(e!==h||!c)&&d(e)},$=[{label:a("notification.severityType.info"),value:"info"},{label:a("notification.severityType.success"),value:"success"},{label:a("notification.severityType.warning"),value:"warning"},{label:a("notification.severityType.error"),value:"error"}],_=e=>{j(e.currentTarget),D(""),O(!1)},Y=()=>{j(null)},q=e=>{const n=i.includes(e)?i.filter(m=>m!==e):[...i,e];y(n),o({id:n,severity:C})},U=e=>{const n=C.includes(e)?C.filter(m=>m!==e):[...C,e];T(n),o({severity:n,id:i})},K=e=>{D(e.target.value)},G=()=>{O(!S)},F=De.useMemo(()=>{if(!u.size)return[];const e=[];return f==="component"&&e.push({label:a("notification.system"),id:"system"}),Array.from(u).forEach(([,n])=>{var A,k;const m=n.did||((A=n.meta)==null?void 0:A.did),M=n.title||((k=n.meta)==null?void 0:k.title)||"",R=n.appPid||n.appDid;(f==="component"&&R!==m||f==="entity"&&R===m)&&e.push({label:M,id:m,blocklet:n,ancestors:n.ancestors})}),e},[u,f,a]);s.useEffect(()=>{if(P.trim()==="")B(F);else{const e=P.toLowerCase(),n=F.filter(m=>m.label.toLowerCase().includes(e));B(n)}},[P,F]);const Q=P.trim()!==""||S?E:E.slice(0,pe);return t.jsxs(v,{children:[t.jsxs(v,{sx:{display:"flex",justifyContent:l?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[l&&t.jsx(v,{display:"flex",gap:1.5,children:z.map(e=>t.jsxs(W,{disabled:c,onClick:()=>H(e.value),className:`profile-button ${h===e.value?"active":""}`,sx:{...p==="service"&&h===e.value?{color:"secondary.main"}:{},color:"red",fontWeight:h===e.value?"bold":"normal"},children:[e.label,e.value==="unread"&&r>0&&` (${r})`]},e.value))}),t.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Me,{size:"small",onClick:_,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ce,{icon:it,hFlip:!0})}),t.jsx(Se,{open:I,anchorEl:w,onClose:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{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:t.jsxs(v,{children:[t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px",children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",children:a("notification.severity")}),t.jsx(v,{minWidth:"60px",display:"flex",justifyContent:"flex-end",children:(i.length>0||C.length>0)&&t.jsx(W,{size:"small",onClick:()=>{y([]),T([]),o({severity:[],id:[]})},startIcon:t.jsx(Ae,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:a("notification.clear")})})]}),t.jsx(v,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:$.map(e=>t.jsx(oe,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ae,{checked:C.includes(e.value),onChange:()=>U(e.value),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,children:[t.jsx(L,{severity:e.value}),e.label]})})},e.value))})}),t.jsxs(v,{mb:2,children:[t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5,children:[t.jsx(J,{variant:"subtitle1",fontWeight:"bold",width:"calc(100% - 36px)",children:a("notification.from")}),t.jsx(v,{display:"flex",alignItems:"center",width:"calc(100% - 36px)",children:t.jsx(Pe,{size:"small",placeholder:"search",value:P,onChange:K,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},InputProps:{size:"small",startAdornment:t.jsx(Ie,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ce,{icon:st})})}})})]}),t.jsx(ne,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(oe,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(re,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ae,{checked:i.includes(e.id),onChange:()=>q(e.id),disabled:c,size:"small"}),label:t.jsxs(v,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,sx:{minWidth:0,width:"100%"},children:[e.blocklet&&t.jsx(ue,{size:20,blocklet:e.blocklet,ancestors:e.ancestors,style:{borderRadius:4,flexShrink:0}}),t.jsx(J,{noWrap:!0,variant:"body2",component:"span",title:e.label,flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:e.label})]})})},e.id))}),E.length>pe&&P.trim()===""&&t.jsx(W,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ve,{}):t.jsx(Be,{})})]})]})})]})]}),i.length>0||C.length>0?t.jsxs(v,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[C.map(e=>{const n=$.find(m=>m.value===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(L,{severity:e}),n?n.label:e]}),onDelete:()=>U(e),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${e}`)}),i.map(e=>{const n=F.find(m=>m.id===e);return t.jsx(ie,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[(n==null?void 0:n.blocklet)&&t.jsx(ue,{size:16,blocklet:n.blocklet,ancestors:n.ancestors,style:{borderRadius:4,flexShrink:0}}),n?n.label:e]}),variant:"outlined",onDelete:()=>q(e),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${e}`)})]}):null]})}const ct=xe(Te)`
|
|
2
2
|
position: fixed;
|
|
3
3
|
bottom: 20px;
|
|
4
4
|
right: 20px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A}from"./vendor-utils-rHXShPKm.js";import{b as E}from"./base32-
|
|
1
|
+
import{A}from"./vendor-utils-rHXShPKm.js";import{b as E}from"./base32-BnPQ4q4v.js";import{j as r}from"./vendor-ux-did-connect-D0L9YnHn.js";function l(e,i,o,s=!1){var R,_;if(e&&e.startsWith(r.USER_AVATAR_URL_PREFIX)){const n=window.env.apiPrefix||"/";if(o){if(s&&((R=window.blocklet)!=null&&R.serverDid)){const t=`https://${E.encode((_=window.blocklet)==null?void 0:_.serverDid)}.${r.DEFAULT_DID_DOMAIN}`;return`${A(t,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(n,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return e}const w=(e,i)=>e.nodeOwner&&e.nodeOwner.did===i,U=(e,i)=>e&&e.did===i;export{U as a,w as i,l as p};
|