@abtnode/blocklet-services 1.16.45 → 1.16.46-beta-20250703-050038-4ba2582f
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/routes/user-session.js +2 -1
- package/api/state/index.js +1 -1
- package/dist/assets/{AdapterDayjs-BRnJ9bMs.js → AdapterDayjs-BIQsjtiT.js} +1 -1
- package/dist/assets/{ArrowDropDown-DBJPIOl4.js → ArrowDropDown-C8mwBtnq.js} +1 -1
- package/dist/assets/{CheckCircle-DUJmWceY.js → CheckCircle-BMMes-V7.js} +1 -1
- package/dist/assets/{ChevronLeft-BBJJJhVi.js → ChevronLeft-B8rsCJhy.js} +1 -1
- package/dist/assets/{ChevronRight-BU9I7WD4.js → ChevronRight-CXhRlHKa.js} +1 -1
- package/dist/assets/{DeleteOutline-BKSMNwfT.js → DeleteOutline-DtbgduIM.js} +1 -1
- package/dist/assets/{Done-ASNftAOL.js → Done-CfxTFgBR.js} +1 -1
- package/dist/assets/{Download-D4X39_9V.js → Download-Cz4FAob1.js} +1 -1
- package/dist/assets/{Edit-CiTb-w5P.js → Edit-Dh2oBqBB.js} +1 -1
- package/dist/assets/{Error-BAEKW7-e.js → Error-BsnYcwiq.js} +1 -1
- package/dist/assets/{ExpandLess-CcLTbsdW.js → ExpandLess-B7eaaZaz.js} +1 -1
- package/dist/assets/{Google-C28yeMZW.js → Google-BAVYemz7.js} +1 -1
- package/dist/assets/{Home-Dujcj083.js → Home-SYcuMunC.js} +1 -1
- package/dist/assets/{InfoOutlined-BVWbftGI.js → InfoOutlined-GEKFkezP.js} +1 -1
- package/dist/assets/{Launch-DFS3fgjy.js → Launch-BB2NS6gw.js} +1 -1
- package/dist/assets/{LaunchOutlined-C1x4Og4u.js → LaunchOutlined-BEsYq9kI.js} +1 -1
- package/dist/assets/{MoreHoriz-ChJ3K52h.js → MoreHoriz-BDLlOCqj.js} +1 -1
- package/dist/assets/{PlayArrow-BqVYRyLK.js → PlayArrow-hnXK75qN.js} +1 -1
- package/dist/assets/{TuneOutlined-CKzi_VZZ.js → TuneOutlined-CjVMXY_7.js} +1 -1
- package/dist/assets/{ViewList-BOGcbymi.js → ViewList-CYMKafss.js} +1 -1
- package/dist/assets/{access-control-5WGT2JfR.js → access-control-BFze8gPg.js} +1 -1
- package/dist/assets/{actions-DnTVXQ_Z.js → actions-D_aAU5uf.js} +1 -1
- package/dist/assets/{add-component-core-DehB4lvu.js → add-component-core-CwbGrQav.js} +1 -1
- package/dist/assets/{add-resource-DfqBSLDk.js → add-resource-EZWL5Kfm.js} +1 -1
- package/dist/assets/{addon-DdjBFoHI.js → addon-CuKQNO-0.js} +1 -1
- package/dist/assets/advanced-BR1PWvXD.js +14 -0
- package/dist/assets/api-ZzsS0diA.js +1 -0
- package/dist/assets/{appearance-DsoglxbB.js → appearance-CHLvy771.js} +1 -1
- package/dist/assets/{audit-logs-DKiQkfse.js → audit-logs-HRbs-zR8.js} +1 -1
- package/dist/assets/{authorize-IzqEi1HK.js → authorize-BLL3c3nQ.js} +1 -1
- package/dist/assets/{base-chart-CoApVzod.js → base-chart-B81_ogPb.js} +1 -1
- package/dist/assets/{base32-DUSifB4M.js → base32-BTgHqgXA.js} +1 -1
- package/dist/assets/{branding-CwYIeBi1.js → branding-BYCDBHLo.js} +1 -1
- package/dist/assets/{branding-B1o_K1XB.js → branding-WyyEnk9U.js} +2 -2
- package/dist/assets/{bundle-avatar-UIbxwQif.js → bundle-avatar-DxpUnWc9.js} +1 -1
- package/dist/assets/{button-D_ZVjN82.js → button-BxXFhZV_.js} +1 -1
- package/dist/assets/{click-to-copy-By4fgGR7.js → click-to-copy-nMjIOe47.js} +1 -1
- package/dist/assets/{cloneDeep-CDl5kZTY.js → cloneDeep-Cm_V5yFW.js} +1 -1
- package/dist/assets/{collapse-DAaiuAEY.js → collapse-2Uzc-qtU.js} +1 -1
- package/dist/assets/{complete-Bi_BaBBl.js → complete-DCJ7Rl4p.js} +1 -1
- package/dist/assets/{component-CiFJ1vhL.js → component-BqNp0WH9.js} +3 -3
- package/dist/assets/{config-BZuiK8BP.js → config-COcQW2xB.js} +1 -1
- package/dist/assets/{config-JUGJKWP_.js → config-DaC-Wq7r.js} +1 -1
- package/dist/assets/{config-navigation-DZ54_nVv.js → config-navigation-DOALMOAS.js} +3 -3
- package/dist/assets/{config-space-D6ScnWdA.js → config-space-CyCq4fxg.js} +1 -1
- package/dist/assets/{confirm-RvA9mFot.js → confirm-CDWcSF88.js} +1 -1
- package/dist/assets/connect-Br7I-KPU.js +5 -0
- package/dist/assets/{connect-DhuiCF4g.js → connect-CKhBRnXh.js} +1 -1
- package/dist/assets/{connect-to-CxoBjkcK.js → connect-to-D_-7CELt.js} +1 -1
- package/dist/assets/{dashboard-t9EszOna.js → dashboard-3f3Wapmv.js} +3 -3
- package/dist/assets/{delete-confirm-wTMDQFnr.js → delete-confirm-CEtsVP5o.js} +1 -1
- package/dist/assets/{did-address-NnOD1W_A.js → did-address-BYc4cym-.js} +1 -1
- package/dist/assets/domain-DrB0Xtiq.js +9 -0
- package/dist/assets/{domain-action-card-BlPWBOAu.js → domain-action-card-BmFA6T_2.js} +1 -1
- package/dist/assets/domains-aM7-R16w.js +1 -0
- package/dist/assets/dot-BSvIHcuy.js +7 -0
- package/dist/assets/{email-0b_MYxBQ.js → email-NDtfDo4w.js} +1 -1
- package/dist/assets/{exchange-passport-BnmyuwIs.js → exchange-passport-dw7T8AUh.js} +1 -1
- package/dist/assets/{fuel-DEqW116b.js → fuel-CQnVBL1G.js} +1 -1
- package/dist/assets/{gen-access-key-CVpZSjIw.js → gen-access-key-CKRsRWaQ.js} +1 -1
- package/dist/assets/{get-safe-url-B0-S5PGZ.js → get-safe-url-D3ggKpT1.js} +1 -1
- package/dist/assets/{get-safe-url-D5KSEAKZ.js → get-safe-url-DAFhlwkH.js} +1 -1
- package/dist/assets/{home-DfSu-4-a.js → home-A-VRaS1G.js} +1 -1
- package/dist/assets/{iframe-DFg8oeD0.js → iframe-GZPTHXNz.js} +1 -1
- package/dist/assets/{index-CkwXRCmN.js → index-75Nc_luV.js} +4 -4
- package/dist/assets/{index-I1i2Mc1k.js → index-B1I0U81c.js} +1 -1
- package/dist/assets/{index-DrTNV3tX.js → index-BEpPMiyb.js} +1 -1
- package/dist/assets/{index-Dq1Rmjwf.js → index-BXVUmQnX.js} +1 -1
- package/dist/assets/{index-CD07vq9d.js → index-BrMH3hes.js} +1 -1
- package/dist/assets/{index-6I6juqjg.js → index-BsIM7oBN.js} +1 -1
- package/dist/assets/{index-B70kYOfj.js → index-C0LoLjcL.js} +1 -1
- package/dist/assets/{index-YaLWfp9D.js → index-CAHja9to.js} +1 -1
- package/dist/assets/{index-BxJZWVOT.js → index-CRPd6bu_.js} +1 -1
- package/dist/assets/{index-Cwq0Io0K.js → index-C_iJfkbw.js} +1 -1
- package/dist/assets/{index-CwUT0vPy.js → index-Cti-S8sI.js} +4 -4
- package/dist/assets/{index-BLfUtUpB.js → index-D1V1OV_1.js} +1 -1
- package/dist/assets/{index-DPIWnhb5.js → index-D3Qm_7QJ.js} +1 -1
- package/dist/assets/{index-B874LN5A.js → index-D6Kz_Kj2.js} +1 -1
- package/dist/assets/{index-2mYUqHxe.js → index-DBnbtCJw.js} +3 -3
- package/dist/assets/{index-C0btiQfG.js → index-DDpPyFll.js} +1 -1
- package/dist/assets/{index-IeoAQOW8.js → index-DJghIcZg.js} +1 -1
- package/dist/assets/{index-w4f-mlFt.js → index-opVatFs5.js} +1 -1
- package/dist/assets/{index-ZcD1N43m.js → index-rz1HClDn.js} +1 -1
- package/dist/assets/{index-B4fH-l5R.js → index-xEAUvM9N.js} +1 -1
- package/dist/assets/{index-aAlnaECr.js → index-zvQQ3C85.js} +1 -1
- package/dist/assets/{invitation-B3B-J4fG.js → invitation-lVBY7BRV.js} +1 -1
- package/dist/assets/{invite-jaOwIvW9.js → invite-vGAxuB6S.js} +1 -1
- package/dist/assets/{issue-passport-DpSBB2L8.js → issue-passport-BJj9S3VH.js} +1 -1
- package/dist/assets/{item-D-39k2FC.js → item-Ck1X0EKi.js} +1 -1
- package/dist/assets/{layout-DEiEwPzB.js → layout-Iy3Ltu2J.js} +1 -1
- package/dist/assets/{list-ZFC0mCy0.js → list-CA-gEd-1.js} +2 -2
- package/dist/assets/{list-DDNORnll.js → list-DWx_rlsJ.js} +1 -1
- package/dist/assets/localization-BmadHeXm.js +1 -0
- package/dist/assets/{log-BBUgs8Rd.js → log-BFUsU5ZV.js} +1 -1
- package/dist/assets/{logger-Dqm1UQym.js → logger-9nL4ASn6.js} +1 -1
- package/dist/assets/{login-DbSs2lO2.js → login-D_thJ6QB.js} +1 -1
- package/dist/assets/{login-oauth-callback-Cpai1yC1.js → login-oauth-callback-D3WJu6Qx.js} +1 -1
- package/dist/assets/{logo-uploader-BPSmPaZd.js → logo-uploader-CMlpg5uV.js} +3 -3
- package/dist/assets/{lost-passport-Ce_WXcnR.js → lost-passport-C23LgPGO.js} +1 -1
- package/dist/assets/{omit-Cao4GLS7.js → omit-rJ-mc6U5.js} +1 -1
- package/dist/assets/{open-window-hpzKFxn5.js → open-window-CTBzFUUv.js} +1 -1
- package/dist/assets/{overview-C3aIT8Ro.js → overview-Bmi7dmR0.js} +1 -1
- package/dist/assets/{page-header-DNvUdNpI.js → page-header-DqtuZOzT.js} +1 -1
- package/dist/assets/{passport-item-B3XIp0U4.js → passport-item-BGYRFCwE.js} +1 -1
- package/dist/assets/{permission-DQvXGutX.js → permission-BEqDHKfL.js} +1 -1
- package/dist/assets/{preferences-C3zaKjfI.js → preferences-D1eIimRF.js} +1 -1
- package/dist/assets/{profile-embed-BFjGm3Vt.js → profile-embed-DdACJ_zu.js} +1 -1
- package/dist/assets/publish-resource-BnpouxdO.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-02tdagHZ.js → react-beautiful-dnd.esm-CNuzAjru.js} +1 -1
- package/dist/assets/{runtime-Drmh1-cb.js → runtime-6wVftvUx.js} +1 -1
- package/dist/assets/{sanitize-e0A8A-yt.js → sanitize-BKnEhEg8.js} +1 -1
- package/dist/assets/sdk-Btq1iUPd.js +1 -0
- package/dist/assets/{security-BPd4v9z4.js → security-DJRv4_Fx.js} +1 -1
- package/dist/assets/{session-BGdAM8zS.js → session-kQ1tvY5U.js} +1 -1
- package/dist/assets/setup-CV_F3UHP.js +30 -0
- package/dist/assets/{spaces-DUkzPTBd.js → spaces-BTlTdKAI.js} +1 -1
- package/dist/assets/{start-C9Hvgbcz.js → start-7Wq6LiTT.js} +1 -1
- package/dist/assets/{starting-progress-CYgfPTsE.js → starting-progress-CAkASj-X.js} +1 -1
- package/dist/assets/{status-f3Y-NXRP.js → status-CYSvSIaN.js} +1 -1
- package/dist/assets/{step-actions-BNbc1l8F.js → step-actions-C4SB9_F2.js} +1 -1
- package/dist/assets/{studio-I9lo0Itp.js → studio-BWs_EnV3.js} +1 -1
- package/dist/assets/{switch-control-Brwb8ptk.js → switch-control-eCwDP-ME.js} +1 -1
- package/dist/assets/{table-tips-BzPqsKYQ.js → table-tips-CCj0tXz1.js} +1 -1
- package/dist/assets/{traffic-FNLLya21.js → traffic-Pt9FvcDk.js} +1 -1
- package/dist/assets/{transfer-m6229uxg.js → transfer-Cj_zgOWb.js} +1 -1
- package/dist/assets/{unsubscribe-BXKQU2c1.js → unsubscribe-CICtmk2r.js} +1 -1
- package/dist/assets/{use-blocklet-logo-4UB-MFD3.js → use-blocklet-logo-Bjt6-_x3.js} +1 -1
- package/dist/assets/useAsync-CZkpdKtR.js +1 -0
- package/dist/assets/useAsync-DmrzeQhI.js +1 -0
- package/dist/assets/{useLocalStorage-CaPDqrQ7.js → useLocalStorage-BoYGn-bQ.js} +1 -1
- package/dist/assets/{user-center-CNdVbQx6.js → user-center-BVfQDQ91.js} +3 -3
- package/dist/assets/{util-BRPRFc9p.js → util-BQvjy4j5.js} +1 -1
- package/dist/assets/{util-BQAJqeb4.js → util-TW4lcckB.js} +1 -1
- package/dist/assets/{vendor-arcblock-CwufDgLV.js → vendor-arcblock-DzylOsX3.js} +3 -3
- package/dist/assets/{vendor-hooks-DqdmWCmo.js → vendor-hooks-B2N8eE_a.js} +1 -1
- package/dist/assets/vendor-utils-uPLZO5mM.js +208 -0
- package/dist/assets/vendor-ux-did-connect-CQtodyZB.js +2304 -0
- package/dist/assets/{wrap-locale-ClbCNOs0.js → wrap-locale-CpZgZaeK.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/service-worker.js +1 -1
- package/package.json +23 -23
- package/dist/assets/advanced-CJz1c7Eh.js +0 -14
- package/dist/assets/api-C1S8LUld.js +0 -1
- package/dist/assets/connect-DGMfp8-Y.js +0 -5
- package/dist/assets/domain-BaMcm6r6.js +0 -9
- package/dist/assets/domains-CxJF-JF_.js +0 -1
- package/dist/assets/dot-4jhL56kz.js +0 -7
- package/dist/assets/localization-tyC-vHO5.js +0 -1
- package/dist/assets/publish-resource-CAZrBTdz.js +0 -1
- package/dist/assets/sdk-BmeKtHic.js +0 -1
- package/dist/assets/setup-Bo10IVJ4.js +0 -30
- package/dist/assets/useAsync-C62uE2pS.js +0 -1
- package/dist/assets/vendor-utils-BfZ4tlod.js +0 -208
- package/dist/assets/vendor-ux-did-connect-pzpsrvqx.js +0 -2304
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as Z,r as k,b as de}from"./vendor-react-DEoibe3W.js";import{H as j,j as l,ap as ee,s as G,w as pe,aa as z,T as B,y as fe}from"./vendor-mui-core-Bq8gXTan.js";import{b as M,u as Q}from"./vendor-hooks-
|
|
1
|
+
import{g as Z,r as k,b as de}from"./vendor-react-DEoibe3W.js";import{H as j,j as l,ap as ee,s as G,w as pe,aa as z,T as B,y as fe}from"./vendor-mui-core-Bq8gXTan.js";import{b as M,u as Q}from"./vendor-hooks-B2N8eE_a.js";import{y as he,bi as me,bj as ge,bk as ye,bl as ve,k as te,I as xe,x as Le}from"./vendor-ux-did-connect-CQtodyZB.js";import{b as Y,z as ne,A as S}from"./vendor-utils-uPLZO5mM.js";import{u as _e}from"./session-kQ1tvY5U.js";import{c as U}from"./vendor-arcblock-DzylOsX3.js";import{D as Ee,Y as Te,W as Se}from"./index-Cti-S8sI.js";var D={exports:{}},K={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(n,i){return n.indexOf(i)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})(K,K.exports);var Ce=K.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=R;var r=u(he),a=u(me),n=u(Ce),i=u(ge),c=u(ye),h=u(ve);function u(s){return s&&s.__esModule?s:{default:s}}function x(s,o){return _(s)||m(s,o)||w(s,o)||d()}function d(){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 w(s,o){if(s){if(typeof s=="string")return C(s,o);var p={}.toString.call(s).slice(8,-1);return p==="Object"&&s.constructor&&(p=s.constructor.name),p==="Map"||p==="Set"?Array.from(s):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?C(s,o):void 0}}function C(s,o){(o==null||o>s.length)&&(o=s.length);for(var p=0,v=Array(o);p<o;p++)v[p]=s[p];return v}function m(s,o){var p=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(p!=null){var v,y,E,O,L=[],f=!0,T=!1;try{if(E=(p=p.call(s)).next,o!==0)for(;!(f=(v=E.call(p)).done)&&(L.push(v.value),L.length!==o);f=!0);}catch(g){T=!0,y=g}finally{try{if(!f&&p.return!=null&&(O=p.return(),Object(O)!==O))return}finally{if(T)throw y}}return L}}function _(s){if(Array.isArray(s))return s}var A={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},N=/^\[([^\]]+)\](?::([0-9]+))?$/;function R(s,o){if((0,r.default)(s),!s||/[\s<>]/.test(s)||s.indexOf("mailto:")===0||(o=(0,h.default)(o,A),o.validate_length&&s.length>o.max_allowed_length)||!o.allow_fragments&&(0,n.default)(s,"#")||!o.allow_query_components&&((0,n.default)(s,"?")||(0,n.default)(s,"&")))return!1;var p,v,y,E,O,L,f,T;if(f=s.split("#"),s=f.shift(),f=s.split("?"),s=f.shift(),f=s.split("://"),f.length>1){if(p=f.shift().toLowerCase(),o.require_valid_protocol&&o.protocols.indexOf(p)===-1)return!1}else{if(o.require_protocol)return!1;if(s.slice(0,2)==="//"){if(!o.allow_protocol_relative_urls)return!1;f[0]=s.slice(2)}}if(s=f.join("://"),s==="")return!1;if(f=s.split("/"),s=f.shift(),s===""&&!o.require_host)return!0;if(f=s.split("@"),f.length>1){if(o.disallow_auth||f[0]===""||(v=f.shift(),v.indexOf(":")>=0&&v.split(":").length>2))return!1;var g=v.split(":"),V=x(g,2),ce=V[0],ue=V[1];if(ce===""&&ue==="")return!1}E=f.join("@"),L=null,T=null;var H=E.match(N);if(H?(y="",T=H[1],L=H[2]||null):(f=E.split(":"),y=f.shift(),f.length&&(L=f.join(":"))),L!==null&&L.length>0){if(O=parseInt(L,10),!/^[0-9]+$/.test(L)||O<=0||O>65535)return!1}else if(o.require_port)return!1;return o.host_whitelist?(0,a.default)(y,o.host_whitelist):y===""&&!o.require_host?!0:!(!(0,c.default)(y)&&!(0,i.default)(y,o)&&(!T||!(0,c.default)(T,6))||(y=y||T,o.host_blacklist&&(0,a.default)(y,o.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(D,D.exports);var Oe=D.exports;const we=Z(Oe),st=e=>{if(!e||!e.length)return[];const t=[];let r=null,a=[];if(e.forEach(n=>{var m,_,A,N;if(!n.activity||!n.activity.type||!r){r&&(a.length===1?t.push(a[0]):(r.items=a,t.push(r))),n.activity&&n.activity.type?(r=n,a=[n]):(t.push(n),r=null,a=[]);return}const i=a[0].activity,c=i.type,h=(m=i.target)==null?void 0:m.type,u=(_=i.target)==null?void 0:_.id,x=n.activity.type,d=(A=n.activity.target)==null?void 0:A.type,w=(N=n.activity.target)==null?void 0:N.id;if(c&&x&&c===x&&(!i.target&&!n.activity.target||i.target&&n.activity.target&&h===d&&u===w))a.push(n);else{if(a.length===1)t.push(a[0]);else{const R=Object.assign({},r,{items:a});t.push(R)}r=n,a=[n]}}),r)if(a.length===1)t.push(a[0]);else{const n=Object.assign({},r,{items:a});t.push(n)}return t},Ae=e=>!Y(e.activity)&&!!e.activity.type&&!!e.activity.actor,at=e=>Ae(e)&&!!e.actorInfo&&!!e.actorInfo.did,je=e=>{if(!e)return null;const{meta:t,target:r,actor:a}=e||{};let n=r==null?void 0:r.id;return(r==null?void 0:r.type)==="user"&&(n=ne(S(te.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:a})),{metaLink:t==null?void 0:t.id,targetLink:n}},Ne=e=>we(e),F={COMMENT:"comment",LIKE:"like",FOLLOW:"follow",TIPS:"tips",MENTION:"mention",ASSIGN:"assign",UN_ASSIGN:"un_assign"},Ue={[F.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,":"]}),[F.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,":"]}),[F.FOLLOW]:(e,t)=>t>1?l.jsx(l.Fragment,{children:"have followed you"}):l.jsx(l.Fragment,{children:"has followed you"}),[F.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,":"]}),[F.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,":"]}),[F.ASSIGN]:()=>l.jsx(l.Fragment,{children:"has assigned you a task: "}),[F.UN_ASSIGN]:()=>l.jsx(l.Fragment,{children:"has revoked your task assignment: "})},P=k.memo(function({user:t,color:r="text.secondary"}){const a=ne(S(te.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:t.did});return l.jsx(ee,{href:a,color:r,fontWeight:600,target:"_blank",sx:{textDecoration:"none"},onClick:n=>{n.customPreventRedirect=!0},children:t.fullName||"System"})});P.propTypes={user:j.shape({did:j.string.isRequired,fullName:j.string.isRequired}).isRequired,color:j.string};P.displayName="UserLink";function it({activity:e,users:t,actors:r,extra:a={},mountPoint:n=""}){const{session:i}=_e()||{},{type:c,target:h}=e||{},{type:u,author:x}=h||{},{linkColor:d="text.secondary"}=a||{},w=M(()=>{var o;return x?(((o=i==null?void 0:i.user)==null?void 0:o.did)||(a==null?void 0:a.userDid))===x:!0},[i,x]),C=M(()=>{if(!Array.isArray(t))return new Map;const s=new Map;return t.forEach(o=>{o!=null&&o.did&&!s.has(o.did)&&s.set(o.did,o)}),s},[t]),m=M(()=>Array.isArray(r)?[...new Set(r)].map(o=>o?C.get(o)||{did:o,fullName:"System"}:null):[],[r,C]),_=Q(()=>{if(!Array.isArray(m)||m.length===0)return null;if(m.length===1)return l.jsx(P,{user:m[0],color:d});const s=m.slice(0,-1),o=m[m.length-1];if(m.length===2)return l.jsxs(l.Fragment,{children:[l.jsx(P,{user:s[0],color:d})," and ",l.jsx(P,{user:o,color:d})]});const p=m.length>3,v=p?m.slice(0,2):s;return l.jsxs(l.Fragment,{children:[v.map((y,E)=>l.jsxs(de.Fragment,{children:[l.jsx(P,{user:y,color:d}),E<v.length-1?", ":""]},y.did)),p?`, and ${m.length-2} others`:l.jsxs(l.Fragment,{children:[", and ",l.jsx(P,{user:o,color:d})]})]})}),A=Q(()=>{const s=Ue[c];return s?s(u==="doc"?"document":u,t.length,w):null}),N=M(()=>{const s=_(),o=A();return!s||!o?null:l.jsxs(l.Fragment,{children:[s," ",o]})},[c,u,m,_,A]),R=M(()=>{if(!e)return null;const s=je(e);return s!=null&&s.targetLink?Ne(s==null?void 0:s.targetLink)?s==null?void 0:s.targetLink:S(n,s.targetLink):null},[e,n]);return!c||Y(h)?null:l.jsxs(l.Fragment,{children:[N," ",l.jsx(ee,{href:R,color:"primary",target:"_blank",sx:{textDecoration:"none"},onClick:s=>{s.customPreventRedirect=!0},children:h.name||h.desc})]})}const Ie={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 7L7 17M8 7h9v9"/>'};re.propTypes={meta:j.object.isRequired};const Re=G(pe)(({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"})),Fe=G(z)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)})),Pe=G(z)({display:"flex",justifyContent:"space-between",alignItems:"center"});function re({meta:e}){const{amount:t,symbol:r,chainId:a}=e,n=()=>{window.open(`https://explorer.arcblock.io/chain/${a}`,"_blank")};return l.jsxs(Re,{children:[l.jsxs(Fe,{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(Pe,{children:[l.jsxs(z,{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(fe,{variant:"outlined",size:"small",color:"secondary",endIcon:l.jsx(xe,{icon:Ie}),onClick:n,sx:{borderRadius:4},children:"View on Chain"})]})]})}se.propTypes={meta:j.object.isRequired,type:j.string.isRequired,hideTips:j.bool,sx:j.object};se.defaultProps={hideTips:!1,sx:{}};function se({meta:e,type:t,hideTips:r=!1,sx:a}){return Y(e)?null:t==="tips"&&!r?l.jsx(re,{meta:e}):l.jsx(B,{variant:"subtitle2",fontSize:16,component:"p",sx:a,color:"text.secondary",children:e.content})}var Me=k;function Be(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var $=Be(Me);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},q.apply(this,arguments)}function He(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},W(e,t)}function $e(e,t){if(e==null)return{};var r={},a=Object.keys(e),n,i;for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var X={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 De(e,t){if(!e||typeof e!="object")return e;var r={};return Object.keys(e).forEach(function(a){t.indexOf(a)>-1||(r[a]=e[a])}),r}var Ke=["component","className","unsafeHTML"];function ae(e,t){if(t!=="letters"&&t!=="words")throw new Error("Unsupported options basedOn: "+t);if(e.nodeType===Node.TEXT_NODE){var r=document.createDocumentFragment(),a;switch(t){case"words":a=e.textContent.split(/\b|(?=\W)/);break;case"letters":a=Array.from(e.textContent);break}a.forEach(function(h){r.appendChild(qe(h))}),e.parentNode.replaceChild(r,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var n=[].slice.call(e.childNodes),i=n.length,c=0;c<i;c++)ae(n[c],t)}function qe(e){var t=document.createElement("span");return t.className="LinesEllipsis-unit",t.textContent=e,t}function J(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function ie(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);ie(e.parentNode,t)}}function We(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 b(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var oe={component:"div",unsafeHTML:"",maxLine:1,ellipsis:"…",ellipsisHTML:void 0,className:"",basedOn:void 0,onReflow:function(){},winWidth:void 0},ke=Object.keys(oe),le=function(e){He(t,e);function t(a){var n;return n=e.call(this,a)||this,n.state={html:a.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,i){return typeof n.clamped<"u"&&(this.clamped=n.clamped),e.prototype.setState.call(this,n,i)},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(X).forEach(function(i){n.style[i]=X[i]}),document.body.appendChild(n)}},r.copyStyleToCanvas=function(){var n=this,i=window.getComputedStyle(this.target);be.forEach(function(c){n.canvas.style[c]=i[c]})},r.reflow=function(n){this.maxLine=+n.maxLine||1,this.canvas.innerHTML=n.unsafeHTML;var i=n.basedOn||(/^[\x00-\x7F]+$/.test(n.unsafeHTML)?"words":"letters");ae(this.canvas,i);var c=this.putEllipsis(this.calcIndexes()),h={clamped:c,html:this.canvas.innerHTML};this.setState(h,n.onReflow.bind(this,h))},r.calcIndexes=function(){var n=[0],i=this.nlUnits=Array.from(this.canvas.querySelectorAll(".LinesEllipsis-unit")),c=i.length;if(!i.length)return n;var h=i.find(b);if(!h)return n;for(var u=1,x=h.offsetTop,d=1;d<c&&!(b(i[d])&&i[d].offsetTop-x>1&&(u++,n.push(d),x=i[d].offsetTop,u>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 i=this.nlUnits.pop(),c=this.makeEllipsisSpan();do ie(i,this.canvas),We(i).appendChild(c),i=this.nlUnits.pop();while(i&&(!b(i)||c.offsetHeight>i.offsetHeight||c.offsetTop>i.offsetTop));return i&&J(i),this.nlUnits.forEach(J),!0},r.makeEllipsisSpan=function(){var n=this.props,i=n.ellipsisHTML,c=n.ellipsis,h=document.createElement("span");h.appendChild(document.createElement("wbr"));var u=document.createElement("span");return u.className="LinesEllipsis-ellipsis",i?u.innerHTML=i:u.textContent=c,h.appendChild(u),h},r.isClamped=function(){return this.clamped},r.render=function(){var n=this,i=this.state,c=i.html,h=i.clamped,u=this.props,x=u.component,d=u.className,w=u.unsafeHTML,C=$e(u,Ke);return $.default.createElement(x,q({className:"LinesEllipsis "+(h?"LinesEllipsis--clamped":"")+" "+d,ref:function(_){return n.target=_}},De(C,ke)),$.default.createElement("div",{dangerouslySetInnerHTML:{__html:h?c:w}}))},t}($.default.Component);le.defaultProps=oe;var Ge=le;const ot=Z(Ge),ze=e=>{const t="explorer.arcblockio.cn";return e&&{beta:"beta.abtnetwork.io",main:"main.abtnetwork.io"}[e]||t},Ye=e=>{try{return new URL(e).host}catch{return e}};var lt={getChainHost:ze,getUrlHost:Ye},ct={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 a;let r="?v=";return t?r+=Te(t):r+=`${(a=e==null?void 0:e.meta)==null?void 0:a.version}${Se(e==null?void 0:e.status)?"~":""}`,r};function Ve({blocklet:e}){var o,p,v,y,E,O,L,f,T;const{inService:t}=Ee(),r=(o=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:o.value,a=(p=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE_DARK))==null?void 0:p.value,n=(v=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:v.value,i=(y=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT_DARK))==null?void 0:y.value,c=(E=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:E.value,h=(O=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))==null?void 0:O.value,u=(L=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))==null?void 0:L.value,x=(f=((e==null?void 0:e.environments)||[]).find(g=>g.key===U.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_OG_IMAGE))==null?void 0:f.value,d=((T=window.env)==null?void 0:T.apiPrefix)||"/",w=`${S(d,`/blocklet/logo/${t?"":e.meta.did}`)}${I(e,r)}`,C=`${S(d,`/blocklet/logo-dark/${t?"":e.meta.did}`)}${I(e,a)}`,m=`${S(d,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${I(e,n??r)}`,_=`${S(d,`/blocklet/logo-rect-dark/${t?"":e.meta.did}`)}${I(e,i??a)}`,A=`${S(d,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${I(e,c??r)}`,N=`${S(d,`/blocklet/splash/portrait/${t?"":e.meta.did}`)}${I(e,h)}`,R=`${S(d,`/blocklet/splash/landscape/${t?"":e.meta.did}`)}${I(e,u)}`,s=`${S(d,`/blocklet/og-image/${t?"":e.meta.did}`)}${I(e,x)}`;return{logoUrl:w,logoDarkUrl:C,rectLogoUrl:m,rectLogoDarkUrl:_,faviconUrl:A,splashPortraitUrl:N,splashLandscapeUrl:R,ogImageUrl:s}}function ut({blocklet:e,square:t}={}){const{logoUrl:r,logoDarkUrl:a,rectLogoUrl:n,rectLogoDarkUrl:i}=Ve({blocklet:e}),c=k.useMemo(()=>({appLogo:r,appLogoDark:a,appLogoRect:n,appLogoRectDark:i}),[r,a,n,i]);return Le({meta:c,square:t})}export{ot as H,se as M,ut as a,Ne as b,lt as c,at as d,Ie as e,we as f,je as g,Ve as h,Ae as i,st as m,ct as s,it as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as R}from"./vendor-hooks-B2N8eE_a.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-CZkpdKtR.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{bn as y}from"./vendor-ux-did-connect-
|
|
1
|
+
import{r as S}from"./vendor-react-DEoibe3W.js";import{bn as y}from"./vendor-ux-did-connect-CQtodyZB.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,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-arcblock-
|
|
2
|
-
import{bb as Z,I as ne,d as Ce,a as we,_ as je,k as ke}from"./vendor-ux-did-connect-pzpsrvqx.js";import{H as g,j as t,bo as Me,bn as Se,q as Pe,aa as v,y as L,v as he,bP as Ie,I as Re,b6 as Te,T as X,bQ as oe,w as re,bs as ae,bR as ie,O as Ee,N as Be,E as se,ah as xe,bS as Fe,ar as Oe,m as le,ab as ce}from"./vendor-mui-core-Bq8gXTan.js";import{r as s,b as $e,h as ze,l as Ne}from"./vendor-react-DEoibe3W.js";import{A as Ae,i as Le,j as We,H as _e}from"./vendor-arcblock-CwufDgLV.js";import{t as me,D as De,A as He}from"./vendor-utils-BfZ4tlod.js";import{b as O,m as qe}from"./vendor-hooks-DqdmWCmo.js";import{N as Ue,c as de}from"./list-DDNORnll.js";import{d as Ve}from"./ExpandLess-CcLTbsdW.js";import{d as Ye}from"./search-4YYphs0l.js";import{B as ue}from"./bundle-avatar-UIbxwQif.js";import{X as Ke}from"./index-CwUT0vPy.js";import"./lottie-web-jYmAQWuC.js";import"./index-DEZojGsm.js";import"./use-blocklet-logo-4UB-MFD3.js";import"./session-BGdAM8zS.js";import"./InfoOutlined-BVWbftGI.js";import"./CheckCircle-DUJmWceY.js";import"./util-BQAJqeb4.js";import"./base32-DUSifB4M.js";function Ge(){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 Qe="0px",Xe=[0],Je=Ge();function Ze(o){let c=(o==null?void 0:o.rootMargin)??Qe,p=(o==null?void 0:o.threshold)??Xe,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 et=Ze;function tt(o){var b;let[c,p]=et(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 nt=tt,ot=100;function rt({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=ot}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=nt({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 at=rt;const J={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};W.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};W.defaultProps={size:8};function W({severity:o,size:c}){return J[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:J[o]||J.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(L,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(L,{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(Me,{sx:{maxWidth:300},children:t.jsx(Se,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ae,{...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(Pe,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(W,{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",borderColor:"grey.200"}:{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(Ie,{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 it=s.memo(ve),st={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"/>'},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,R]=s.useState(b),[S,$]=s.useState(!1),[P,_]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),R(b)},[x,b]);const z=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],D=e=>{(e!==h||!c)&&d(e)},N=[{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"}],H=e=>{j(e.currentTarget),_(""),$(!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];R(n),o({severity:n,id:i})},K=e=>{_(e.target.value)},G=()=>{$(!S)},F=$e.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)||"",T=n.appPid||n.appDid;(f==="component"&&T!==m||f==="entity"&&T===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(L,{disabled:c,onClick:()=>D(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(Re,{size:"small",onClick:H,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ne,{icon:st,hFlip:!0})}),t.jsx(Te,{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(X,{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(L,{size:"small",onClick:()=>{y([]),R([]),o({severity:[],id:[]})},startIcon:t.jsx(Ce,{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(oe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:N.map(e=>t.jsx(re,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(ae,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ie,{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(W,{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(X,{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(Ee,{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(Be,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ne,{icon:Ye})})}})})]}),t.jsx(oe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(re,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(ae,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ie,{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(X,{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(L,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ve,{}):t.jsx(Le,{})})]})]})})]})]}),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=N.find(m=>m.value===e);return t.jsx(se,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(W,{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(se,{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(Fe)`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-arcblock-DzylOsX3.js","assets/vendor-mui-core-Bq8gXTan.js","assets/vendor-react-DEoibe3W.js","assets/vendor-ux-did-connect-CQtodyZB.js","assets/vendor-utils-uPLZO5mM.js","assets/vendor-hooks-B2N8eE_a.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bb as Z,I as ne,d as Ce,a as we,_ as je,k as ke}from"./vendor-ux-did-connect-CQtodyZB.js";import{H as g,j as t,bo as Me,bn as Se,q as Pe,aa as v,y as L,v as he,bP as Ie,I as Re,b6 as Te,T as X,bQ as oe,w as re,bs as ae,bR as ie,O as Ee,N as Be,E as se,ah as xe,bS as Fe,ar as Oe,m as le,ab as ce}from"./vendor-mui-core-Bq8gXTan.js";import{r as s,b as $e,h as ze,l as Ne}from"./vendor-react-DEoibe3W.js";import{A as Ae,i as Le,j as We,H as _e}from"./vendor-arcblock-DzylOsX3.js";import{t as me,D as De,A as He}from"./vendor-utils-uPLZO5mM.js";import{b as O,m as qe}from"./vendor-hooks-B2N8eE_a.js";import{N as Ue,c as de}from"./list-DWx_rlsJ.js";import{d as Ve}from"./ExpandLess-B7eaaZaz.js";import{d as Ye}from"./search-4YYphs0l.js";import{B as ue}from"./bundle-avatar-DxpUnWc9.js";import{X as Ke}from"./index-Cti-S8sI.js";import"./lottie-web-jYmAQWuC.js";import"./index-DEZojGsm.js";import"./use-blocklet-logo-Bjt6-_x3.js";import"./session-kQ1tvY5U.js";import"./InfoOutlined-GEKFkezP.js";import"./CheckCircle-BMMes-V7.js";import"./util-TW4lcckB.js";import"./base32-BTgHqgXA.js";function Ge(){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 Qe="0px",Xe=[0],Je=Ge();function Ze(o){let c=(o==null?void 0:o.rootMargin)??Qe,p=(o==null?void 0:o.threshold)??Xe,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 et=Ze;function tt(o){var b;let[c,p]=et(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 nt=tt,ot=100;function rt({loading:o,hasNextPage:c,onLoadMore:p,rootMargin:u,disabled:f,delayInMs:x=ot}){let b=s.useRef(p),[l,{rootRef:r,isVisible:d}]=nt({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 at=rt;const J={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};W.propTypes={severity:g.oneOf(["info","success","warning","error",""]).isRequired,size:g.number};W.defaultProps={size:8};function W({severity:o,size:c}){return J[o]?t.jsx(v,{component:"span",sx:{display:"inline-block",width:c,height:c,borderRadius:"50%",backgroundColor:J[o]||J.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(L,{disabled:x,onClick:()=>d(i.value),className:`profile-button ${y?"active":""}`,...b,children:i.label},i.value||C),w=(i,y,C)=>t.jsx(L,{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(Me,{sx:{maxWidth:300},children:t.jsx(Se,{value:f||"all",onChange:I,size:"small",label:"Severity",IconComponent:i=>t.jsx(Ae,{...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(Pe,{value:i.value||"all",children:t.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[t.jsx(W,{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",borderColor:"grey.200"}:{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(Ie,{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 it=s.memo(ve),st={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"/>'},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,R]=s.useState(b),[S,$]=s.useState(!1),[P,_]=s.useState(""),[E,B]=s.useState([]);s.useEffect(()=>{y(x),R(b)},[x,b]);const z=[{label:a("notification.filterType.all"),value:"all"},{label:a("notification.filterType.unread"),value:"unread"}],D=e=>{(e!==h||!c)&&d(e)},N=[{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"}],H=e=>{j(e.currentTarget),_(""),$(!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];R(n),o({severity:n,id:i})},K=e=>{_(e.target.value)},G=()=>{$(!S)},F=$e.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)||"",T=n.appPid||n.appDid;(f==="component"&&T!==m||f==="entity"&&T===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(L,{disabled:c,onClick:()=>D(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(Re,{size:"small",onClick:H,disabled:c,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:t.jsx(ne,{icon:st,hFlip:!0})}),t.jsx(Te,{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(X,{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(L,{size:"small",onClick:()=>{y([]),R([]),o({severity:[],id:[]})},startIcon:t.jsx(Ce,{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(oe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:N.map(e=>t.jsx(re,{elevation:0,sx:ge(C.includes(e.value)),children:t.jsx(ae,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...fe},control:t.jsx(ie,{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(W,{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(X,{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(Ee,{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(Be,{position:"start",sx:{marginRight:"2px"},children:t.jsx(ne,{icon:Ye})})}})})]}),t.jsx(oe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:Q.map(e=>t.jsx(re,{elevation:0,sx:ge(i.includes(e.id)),children:t.jsx(ae,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...fe},control:t.jsx(ie,{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(X,{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(L,{fullWidth:!0,size:"small",onClick:G,sx:{mt:1},endIcon:S?t.jsx(Ve,{}):t.jsx(Le,{})})]})]})})]})]}),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=N.find(m=>m.value===e);return t.jsx(se,{label:t.jsxs(v,{display:"flex",alignItems:"center",gap:.5,children:[t.jsx(W,{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(se,{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(Fe)`
|
|
3
3
|
position: fixed;
|
|
4
4
|
bottom: 20px;
|
|
5
5
|
right: 20px;
|
|
@@ -74,4 +74,4 @@ import{bb as Z,I as ne,d as Ce,a as we,_ as je,k as ke}from"./vendor-ux-did-conn
|
|
|
74
74
|
*::-webkit-scrollbar {
|
|
75
75
|
display: none; /* Chrome, Safari and Opera */
|
|
76
76
|
}
|
|
77
|
-
`;ye.propTypes={blocklets:g.array,context:g.object,pagination:g.bool,inDialog:g.bool,filterType:g.oneOf(["component","entity"]),toViewAll:g.func,type:g.oneOf(["server","service"])};function ye({blocklets:o=[],context:c,pagination:p=!0,inDialog:u=!1,filterType:f="component",toViewAll:x=()=>{},type:b="service"}){const{data:l,paging:r,refresh:d,loading:h,params:a,onReadNotification:w,componentDids:j,filterUnReadCount:I,initial:i}=c,y=e=>{d({...a,severity:e&&typeof e=="string"?[e]:e||[],paging:{...a.paging,page:1}})},[C]=ze(),R=O(()=>C.get("id"),[C]),S=he(e=>e.breakpoints.down("md")),[$,P]=s.useState(0),[_,E]=s.useState(!1),B=s.useMemo(()=>a.read===!1?"unread":"all",[a.read]),z=O(()=>me(e=>{if(h)return;const n=l.length,m=l.filter(T=>!de(T)).length;let M={...a,append:!0,paging:{...a.paging,...e,currentPage:(r.currentPage||0)+1}};B==="unread"&&m<n&&e.page>a.paging.page&&(M={...a,append:!0,paging:{...a.paging,...e,page:a.paging.page||1,currentPage:(r.currentPage||0)+1}}),d(M)},500),[l,a,B,r,h,d]);qe(()=>{i&&typeof i=="function"&&i()}),s.useEffect(()=>{(!r.currentPage||r.currentPage===1)&&P(r.total)},[r.total,r.currentPage]),s.useEffect(()=>{setTimeout(()=>{const e=document.getElementById(R);e&&e.scrollIntoView({behavior:"smooth",block:"center"}),E(!0)},100),setTimeout(()=>{E(!1)},3e3)},[R]);const D=O(()=>(l==null?void 0:l.length)>0&&l.length<$,[l,$]),N=s.useCallback(e=>{const{blocklet:n={}}=window,m=[n==null?void 0:n.did,...((n==null?void 0:n.ancestors)||[]).map(M=>M)];return(j==null?void 0:j.includes(e))||m.findIndex(M=>M===e)>-1},[j]),H=s.useMemo(()=>{const e=new Map;return o.length&&o.forEach(n=>{var M,T,A;const m=(n==null?void 0:n.did)||((M=n.meta)==null?void 0:M.did);m&&!e.has(m)&&(n.ancestors=[],e.set(m,n),((T=n==null?void 0:n.alsoKnownAs)==null?void 0:T.length)>0&&n.alsoKnownAs.forEach(k=>{e.has(k)||e.set(k,n)})),((A=n==null?void 0:n.children)==null?void 0:A.length)>0&&n.children.forEach(k=>{var te;const V=(k==null?void 0:k.did)||((te=k.meta)==null?void 0:te.did);V&&!e.has(V)&&N(V)&&(k.ancestors=[n],e.set(V,k))})}),e},[o,N]),Y=s.useCallback(()=>{h||z({page:r.page+1})},[r.page,h,z]),[q]=at({loading:h,hasNextPage:D,onLoadMore:Y}),U=e=>{!e||de(e)||w(e.id).then(()=>{u&&x()})},K=({severity:e,id:n})=>{if(h)return;let m={};f==="component"?m={entityId:[],componentDid:n}:f==="entity"&&(m={componentDid:[],entityId:n}),d({...a,severity:e,...m,paging:{...a.paging,page:1}})},G=e=>{if(h)return;let n={...a,paging:{...a.paging,page:1}};e==="unread"?(n.read=!1,n.paging.currentPage=1):n=De(n,"read"),d(n)},F=O(()=>f==="component"?Array.isArray(a.componentDid)?a.componentDid:[]:f==="entity"?Array.isArray(a.entityId)?a.entityId:[]:[],[a,f]),Q=O(()=>(Array.isArray(a.severity)?a.severity:[])[0]||"",[a.severity]);return t.jsxs(ut,{inDialog:!!u,children:[u?t.jsx(be,{currentTab:Q,type:"line",theme:"light",onSelectType:y}):t.jsx(ee,{loading:h,blockletMap:H,unReadCount:I,filterType:f,type:b,selectedId:F,onFilterChange:K,severity:a.severity,onReadFilterChange:G,currentReadFilter:B}),!S&&h?t.jsx(v,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:t.jsx(ce,{})}):t.jsx(Ue,{data:l,blockletMap:H,onReadNotification:U,onReadBatch:w,inDialog:u,highlightId:R,highlight:!u&&_,type:b}),p&&!S?t.jsx(it,{loading:h,paging:r,onChange:z}):null,p&&S&&(h||D)?t.jsx(v,{ref:q,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:t.jsx(ce,{})}):null,!u&&S?t.jsx(dt,{}):null]})}const pt=s.memo(ye),ft=s.lazy(()=>je(()=>import("./vendor-arcblock-
|
|
77
|
+
`;ye.propTypes={blocklets:g.array,context:g.object,pagination:g.bool,inDialog:g.bool,filterType:g.oneOf(["component","entity"]),toViewAll:g.func,type:g.oneOf(["server","service"])};function ye({blocklets:o=[],context:c,pagination:p=!0,inDialog:u=!1,filterType:f="component",toViewAll:x=()=>{},type:b="service"}){const{data:l,paging:r,refresh:d,loading:h,params:a,onReadNotification:w,componentDids:j,filterUnReadCount:I,initial:i}=c,y=e=>{d({...a,severity:e&&typeof e=="string"?[e]:e||[],paging:{...a.paging,page:1}})},[C]=ze(),R=O(()=>C.get("id"),[C]),S=he(e=>e.breakpoints.down("md")),[$,P]=s.useState(0),[_,E]=s.useState(!1),B=s.useMemo(()=>a.read===!1?"unread":"all",[a.read]),z=O(()=>me(e=>{if(h)return;const n=l.length,m=l.filter(T=>!de(T)).length;let M={...a,append:!0,paging:{...a.paging,...e,currentPage:(r.currentPage||0)+1}};B==="unread"&&m<n&&e.page>a.paging.page&&(M={...a,append:!0,paging:{...a.paging,...e,page:a.paging.page||1,currentPage:(r.currentPage||0)+1}}),d(M)},500),[l,a,B,r,h,d]);qe(()=>{i&&typeof i=="function"&&i()}),s.useEffect(()=>{(!r.currentPage||r.currentPage===1)&&P(r.total)},[r.total,r.currentPage]),s.useEffect(()=>{setTimeout(()=>{const e=document.getElementById(R);e&&e.scrollIntoView({behavior:"smooth",block:"center"}),E(!0)},100),setTimeout(()=>{E(!1)},3e3)},[R]);const D=O(()=>(l==null?void 0:l.length)>0&&l.length<$,[l,$]),N=s.useCallback(e=>{const{blocklet:n={}}=window,m=[n==null?void 0:n.did,...((n==null?void 0:n.ancestors)||[]).map(M=>M)];return(j==null?void 0:j.includes(e))||m.findIndex(M=>M===e)>-1},[j]),H=s.useMemo(()=>{const e=new Map;return o.length&&o.forEach(n=>{var M,T,A;const m=(n==null?void 0:n.did)||((M=n.meta)==null?void 0:M.did);m&&!e.has(m)&&(n.ancestors=[],e.set(m,n),((T=n==null?void 0:n.alsoKnownAs)==null?void 0:T.length)>0&&n.alsoKnownAs.forEach(k=>{e.has(k)||e.set(k,n)})),((A=n==null?void 0:n.children)==null?void 0:A.length)>0&&n.children.forEach(k=>{var te;const V=(k==null?void 0:k.did)||((te=k.meta)==null?void 0:te.did);V&&!e.has(V)&&N(V)&&(k.ancestors=[n],e.set(V,k))})}),e},[o,N]),Y=s.useCallback(()=>{h||z({page:r.page+1})},[r.page,h,z]),[q]=at({loading:h,hasNextPage:D,onLoadMore:Y}),U=e=>{!e||de(e)||w(e.id).then(()=>{u&&x()})},K=({severity:e,id:n})=>{if(h)return;let m={};f==="component"?m={entityId:[],componentDid:n}:f==="entity"&&(m={componentDid:[],entityId:n}),d({...a,severity:e,...m,paging:{...a.paging,page:1}})},G=e=>{if(h)return;let n={...a,paging:{...a.paging,page:1}};e==="unread"?(n.read=!1,n.paging.currentPage=1):n=De(n,"read"),d(n)},F=O(()=>f==="component"?Array.isArray(a.componentDid)?a.componentDid:[]:f==="entity"?Array.isArray(a.entityId)?a.entityId:[]:[],[a,f]),Q=O(()=>(Array.isArray(a.severity)?a.severity:[])[0]||"",[a.severity]);return t.jsxs(ut,{inDialog:!!u,children:[u?t.jsx(be,{currentTab:Q,type:"line",theme:"light",onSelectType:y}):t.jsx(ee,{loading:h,blockletMap:H,unReadCount:I,filterType:f,type:b,selectedId:F,onFilterChange:K,severity:a.severity,onReadFilterChange:G,currentReadFilter:B}),!S&&h?t.jsx(v,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:t.jsx(ce,{})}):t.jsx(Ue,{data:l,blockletMap:H,onReadNotification:U,onReadBatch:w,inDialog:u,highlightId:R,highlight:!u&&_,type:b}),p&&!S?t.jsx(it,{loading:h,paging:r,onChange:z}):null,p&&S&&(h||D)?t.jsx(v,{ref:q,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:t.jsx(ce,{})}):null,!u&&S?t.jsx(dt,{}):null]})}const pt=s.memo(ye),ft=s.lazy(()=>je(()=>import("./vendor-arcblock-DzylOsX3.js").then(o=>o.a0),__vite__mapDeps([0,1,2,3,4,5,6,7])));function Ft(){var l;const{t:o}=we(),p=Ne().tab,f=new URLSearchParams(window.location.search).get("embed")||((l=window.sessionStorage)==null?void 0:l.getItem("embed")),x=Ke(),b=O(()=>{var r;return{...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:(r=window==null?void 0:window.blocklet)==null?void 0:r.componentMountPoints.map(d=>({...d,meta:{...d,did:d.did,name:d.name||d.title||"",logo:"logo.png"}}))}});return t.jsxs(t.Fragment,{children:[t.jsx(_e,{children:t.jsx("title",{children:o("pageTitle.userCenter")})}),t.jsx(ft,{embed:f==="1",currentTab:p?He(ke.WELLKNOWN_SERVICE_PATH_PREFIX,"user",p):"",disableAutoRedirect:p==="settings",children:p==="notifications"?t.jsx(pt,{blocklets:[b],context:x}):null})]})}export{Ft as default};
|