@abtnode/webapp 1.17.6-beta-20251217-011553-818fcc8e → 1.17.6-beta-20251217-144034-62fafb94
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-D4d-PrqS.js → AdapterDayjs-236QfbBU.js} +1 -1
- package/dist/assets/{Add-BSsB0LgV.js → Add-Des5za4N.js} +1 -1
- package/dist/assets/ArrowDropDown-DUiaaUDs.js +1 -0
- package/dist/assets/{Autocomplete-fQULCEh3.js → Autocomplete-Bgl3dGJJ.js} +1 -1
- package/dist/assets/{Breadcrumbs-BYVgLpiJ.js → Breadcrumbs-Btf_gF-0.js} +1 -1
- package/dist/assets/{ButtonGroup-DgPN2-YM.js → ButtonGroup-Z9547yzG.js} +1 -1
- package/dist/assets/{CSSTransition-DYtKv9e9.js → CSSTransition-B5wQ0yUS.js} +1 -1
- package/dist/assets/{CallMerge-v67_Z3SC.js → CallMerge-4v2MXTdn.js} +1 -1
- package/dist/assets/{CardContent-BYECX7XP.js → CardContent-CtTlBjH7.js} +1 -1
- package/dist/assets/{ChevronLeft-CfyGnxyr.js → ChevronLeft-C9Y_ggAJ.js} +1 -1
- package/dist/assets/{ChevronRight-C4O2fZlw.js → ChevronRight-DAyMYZEW.js} +1 -1
- package/dist/assets/{Clear-CybwA2Jd.js → Clear-CzjQBpCS.js} +1 -1
- package/dist/assets/{Delete-ytwLYNdm.js → Delete-BtTxVz6z.js} +1 -1
- package/dist/assets/{DeleteOutline-CjxNIx7X.js → DeleteOutline-DDdlNULq.js} +1 -1
- package/dist/assets/{Done-BqFmWa1U.js → Done-DmttcwQI.js} +1 -1
- package/dist/assets/{Edit-DNmNGF17.js → Edit-CsYUR2zq.js} +1 -1
- package/dist/assets/{ErrorOutline-BlyorQPQ.js → ErrorOutline-C83OSg_z.js} +1 -1
- package/dist/assets/{FilterList-DD3VXN0o.js → FilterList-DNfECclT.js} +1 -1
- package/dist/assets/{Google-Bp60YdGj.js → Google-CU3piwDe.js} +1 -1
- package/dist/assets/{HelpOutline-kE6mcJHh.js → HelpOutline-Gx_yLuDF.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-5IVXxFq-.js → KeyboardArrowDown-CS63clJ4.js} +1 -1
- package/dist/assets/{Launch-Dnww4ldq.js → Launch-9bwdZPzQ.js} +1 -1
- package/dist/assets/{Link-DkJ5JSUR.js → Link-DQZf-Cnd.js} +1 -1
- package/dist/assets/{ListItemButton-Cmz2lNmj.js → ListItemButton-Tot-RyK-.js} +1 -1
- package/dist/assets/{ListSubheader-CE5Bsi9j.js → ListSubheader-BIN8GsVb.js} +1 -1
- package/dist/assets/{LoadingButton-CyiIDt4W.js → LoadingButton-Cy89o260.js} +1 -1
- package/dist/assets/{MoreVert-C-gNfdF4.js → MoreVert-DOn_691b.js} +1 -1
- package/dist/assets/{OpenInNew-Dw9F5-j0.js → OpenInNew-D2ujTWne.js} +1 -1
- package/dist/assets/{Refresh-CZ4VLHgc.js → Refresh-D0ZhzC4E.js} +1 -1
- package/dist/assets/{Replay-BJq8nepA.js → Replay-sIyuLlhq.js} +1 -1
- package/dist/assets/{Search-Cc0L1P8Y.js → Search-DXzn9Lp-.js} +1 -1
- package/dist/assets/{Stepper-DMJHwAtc.js → Stepper-Zgoofdon.js} +1 -1
- package/dist/assets/{TableSearch-DIxp58MQ.js → TableSearch-BSa4dOKp.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-D0GUjsDr.js → ToggleButtonGroup-DKenn_kW.js} +1 -1
- package/dist/assets/{UnfoldMore-CxNKo0Ry.js → UnfoldMore-C-42QCTj.js} +1 -1
- package/dist/assets/{Verified-Bmj6wp69.js → Verified-CPXkSMxG.js} +1 -1
- package/dist/assets/{VerifiedUser-U4nx-WO7.js → VerifiedUser-B8sBVwQC.js} +1 -1
- package/dist/assets/{ViewList-CFmOfqSL.js → ViewList-C8mEloA5.js} +1 -1
- package/dist/assets/{_createAggregator-BNHjiP2Z.js → _createAggregator-CT9vDd72.js} +1 -1
- package/dist/assets/{actions-LmskFz0e.js → actions-CsKJtA25.js} +1 -1
- package/dist/assets/{actions-DxhW-s_8.js → actions-D1Lm1JEd.js} +1 -1
- package/dist/assets/{agreement-Cw-Y24RV.js → agreement-BeaWnXWa.js} +1 -1
- package/dist/assets/api-QrlC06mC.js +1 -0
- package/dist/assets/{appearance-B_sAL_Xy.js → appearance-CaUuLp12.js} +1 -1
- package/dist/assets/{audit-logs-DrYw8YX2.js → audit-logs-BVvz-gNB.js} +1 -1
- package/dist/assets/{base-chart-Cnjgjyps.js → base-chart-azE0aacM.js} +1 -1
- package/dist/assets/{blocklet-CAtl3NS9.js → blocklet-B_b8vapJ.js} +1 -1
- package/dist/assets/{chain-CLyDSq6m.js → chain-DQuRoRbo.js} +1 -1
- package/dist/assets/{click-to-copy-B4kD-azC.js → click-to-copy-BuexyggU.js} +1 -1
- package/dist/assets/cloneDeep-B-GM3ClR.js +1 -0
- package/dist/assets/{config-navigation-EBUlfuPd.js → config-navigation-zi1EpHXk.js} +3 -3
- package/dist/assets/{connect-to-BBTYSJcL.js → connect-to-uRhilqPM.js} +1 -1
- package/dist/assets/{cssMode-Bt9MhaWE.js → cssMode-xzKgveff.js} +1 -1
- package/dist/assets/{delete-confirm-BW9rRHcw.js → delete-confirm-ImHpqh9B.js} +1 -1
- package/dist/assets/{depsEqual-CZmuZV4u.js → depsEqual-DIlm5Prx.js} +1 -1
- package/dist/assets/{detail-NaPLCibZ.js → detail-CsB1ATb9.js} +3 -3
- package/dist/assets/{domains-CRVaOfFE.js → domains-CnrJ8TbP.js} +1 -1
- package/dist/assets/{download-Q0QwEx4s.js → download-Chk5ZS7w.js} +1 -1
- package/dist/assets/{edit.svg-BwRgVxi0.js → edit.svg-J7XY7Hsh.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-BtAWOyO4.js +1 -0
- package/dist/assets/engine-DNd4CfoF.js +1 -0
- package/dist/assets/{freemarker2-tDqLNl-2.js → freemarker2-D7zjhCq4.js} +1 -1
- package/dist/assets/{get-safe-url-2iJX7eF-.js → get-safe-url-M4uziR0J.js} +1 -1
- package/dist/assets/getValidReactChildren-Duobzte7.js +1 -0
- package/dist/assets/{graphqlMode-BlUbMfzr.js → graphqlMode-C0GhJVjj.js} +2 -2
- package/dist/assets/{handlebars-9eJ84UTg.js → handlebars-tOVv9ziY.js} +1 -1
- package/dist/assets/{html-D6df9rSg.js → html-BW7PD4So.js} +1 -1
- package/dist/assets/{html-title-lLYk44sN.js → html-title-BVs9_wlq.js} +1 -1
- package/dist/assets/{htmlMode-LE_hT0Km.js → htmlMode-xMKOb_Lf.js} +1 -1
- package/dist/assets/{iframe-BeIjzVA5.js → iframe-BRekcQQF.js} +1 -1
- package/dist/assets/{index-D6qulFBc.js → index-8axptow7.js} +1 -1
- package/dist/assets/{index-DlsopR7t.js → index-95rGb30b.js} +1 -1
- package/dist/assets/{index-CfIM04Ha.js → index-B0pL7l-o.js} +2 -2
- package/dist/assets/{index-UQ3D2bKL.js → index-B9etyM0e.js} +1 -1
- package/dist/assets/{index-DqqrHhsp.js → index-BAvBoYZf.js} +1 -1
- package/dist/assets/{index-BPTVdEku.js → index-BGiju4eo.js} +1 -1
- package/dist/assets/{index-D6nTf7SK.js → index-BMXhbckP.js} +3 -3
- package/dist/assets/{index-DdUmpiCp.js → index-BkX5LVL8.js} +3 -3
- package/dist/assets/{index-BKiW1GO2.js → index-CUMH9ev3.js} +1 -1
- package/dist/assets/{index-B5BIzAQO.js → index-CWm3LFCr.js} +1 -1
- package/dist/assets/{index-CZuf0REe.js → index-CXjNOxDY.js} +1 -1
- package/dist/assets/{index-BhijUvdW.js → index-Cd7zjVGT.js} +1 -1
- package/dist/assets/{index-WvfzGhKH.js → index-CdFR6v70.js} +1 -1
- package/dist/assets/{index-CNTV-HhI.js → index-CoOfoUvl.js} +1 -1
- package/dist/assets/{index-ojNpFmwB.js → index-CqRJU2Wz.js} +1 -1
- package/dist/assets/{index-P7FcdKFO.js → index-CrtPsFlg.js} +1 -1
- package/dist/assets/{index-DLeyjgnC.js → index-CtpH5d08.js} +1 -1
- package/dist/assets/{index-BfBO-AOR.js → index-D2AxRjl4.js} +1 -1
- package/dist/assets/{index-cmzW_NwI.js → index-D3M-eD99.js} +1 -1
- package/dist/assets/{index-B9nSfr01.js → index-D3TFHWgY.js} +3 -3
- package/dist/assets/{index-CPcBs23J.js → index-DDo-FAUp.js} +1 -1
- package/dist/assets/{index-D1_GavIJ.js → index-DGwBkyQM.js} +1 -1
- package/dist/assets/{index-Dcu0Ced5.js → index-DK_hcqBI.js} +1 -1
- package/dist/assets/{index-Cd1hBQ_9.js → index-DN2WOMzG.js} +1 -1
- package/dist/assets/{index-BjV7y4g4.js → index-DQPdwz2Y.js} +1 -1
- package/dist/assets/{index-IxMsTtHL.js → index-DVwyJ4JG.js} +1 -1
- package/dist/assets/{index-jxWF1-Uj.js → index-DX-QhcNe.js} +1 -1
- package/dist/assets/{index-DsPQ5RNh.js → index-DcWgVTc7.js} +1 -1
- package/dist/assets/{index-YqJm1wxK.js → index-DfDp2UkB.js} +9 -9
- package/dist/assets/index-Dj8a3cuS.js +1 -0
- package/dist/assets/{index-BLPxMqb5.js → index-DliHjDiB.js} +1 -1
- package/dist/assets/{index-CxNALWK-.js → index-DqTo3Zfc.js} +1 -1
- package/dist/assets/{index-CUC9gaVs.js → index-Dzca3Eph.js} +1 -1
- package/dist/assets/{index-C8LJNLE1.js → index-GeaUvbQe.js} +1 -1
- package/dist/assets/{index-I7yLA1Ov.js → index-HNO5BP09.js} +1 -1
- package/dist/assets/{index-DmEIktUl.js → index-NFZNhczl.js} +3 -3
- package/dist/assets/{index-C88tq6i-.js → index-T7DaPPrZ.js} +1 -1
- package/dist/assets/{index-C_HV1TNt.js → index-UdYQdYeZ.js} +3 -3
- package/dist/assets/{index-Bk9ooLXT.js → index-ZGTYJOlF.js} +1 -1
- package/dist/assets/{index-Bnk9byas.js → index-aVnqs5SE.js} +1 -1
- package/dist/assets/{index-Cu2YPuaF.js → index-aZ0P5xMq.js} +1 -1
- package/dist/assets/{index-D_bACieO.js → index-eCz9tbys.js} +1 -1
- package/dist/assets/{index-20VJ2Oit.js → index-gYQgg1uX.js} +1 -1
- package/dist/assets/{index-2yC9CX7x.js → index-m0QvVu6g.js} +1 -1
- package/dist/assets/{index-Mpmy1dYW.js → index-qB7t2ll3.js} +1 -1
- package/dist/assets/{index.esm-JPVKYAuW.js → index.esm-BDwjJuws.js} +1 -1
- package/dist/assets/{install-from-url-a0384hu9.js → install-from-url-BHD7ooeJ.js} +1 -1
- package/dist/assets/{invitation-CdbygWIR.js → invitation-BdW0X7yz.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-BK7rdpKT.js → is-path-prefix-equal-CqqICkbj.js} +1 -1
- package/dist/assets/{item-C3UkBhG5.js → item-DVPBqmze.js} +1 -1
- package/dist/assets/{javascript-DkE91zSZ.js → javascript-R4JASNoM.js} +1 -1
- package/dist/assets/{jsonMode-CBrNM7_M.js → jsonMode-Dnd3iDrj.js} +1 -1
- package/dist/assets/{liquid-CnsOwi8j.js → liquid-DS_tFa90.js} +1 -1
- package/dist/assets/{list-header-C7PJrzvN.js → list-header-DIo8-J88.js} +1 -1
- package/dist/assets/{lock.svg-Rm7SZx1d.js → lock.svg-CYcx9CJE.js} +1 -1
- package/dist/assets/{log-DEFMVzdt.js → log-DxBmpu0q.js} +1 -1
- package/dist/assets/{lottie-react.esm-B-ezAxOL.js → lottie-react.esm-B1QMlD6I.js} +1 -1
- package/dist/assets/{mdx-CZIaKyUY.js → mdx-BmkQn3Gr.js} +1 -1
- package/dist/assets/{memory-i6finnCy.js → memory-NNIOAp-5.js} +1 -1
- package/dist/assets/{metric-CihRbocA.js → metric-B3PRczUq.js} +1 -1
- package/dist/assets/omit-ewJIh-hW.js +1 -0
- package/dist/assets/{overview-BKE4gv-F.js → overview-UGi51Hmm.js} +1 -1
- package/dist/assets/{permission-DlhGxFII.js → permission-DDKds_VS.js} +1 -1
- package/dist/assets/{preference-BtrpCLMm.js → preference-C6jdAtaj.js} +3 -3
- package/dist/assets/{python-DJYt3n7B.js → python-CAc1dG-m.js} +1 -1
- package/dist/assets/{raf-schd.esm-D8v9lZx_.js → raf-schd.esm-DtLayBIf.js} +1 -1
- package/dist/assets/{razor-hMRIDDQT.js → razor-ac-meNWY.js} +1 -1
- package/dist/assets/{rotate-session-key-WBI1WJWo.js → rotate-session-key-DXCF4wZ3.js} +1 -1
- package/dist/assets/{runtime-Bc-gjnta.js → runtime-4wraYeNg.js} +1 -1
- package/dist/assets/schema-C2x1Agyu.js +1 -0
- package/dist/assets/sdk-DjOw_oab.js +1 -0
- package/dist/assets/{service-C3is7e0x.js → service-BmS-Hfnk.js} +1 -1
- package/dist/assets/{shorten-label-DL-itFUz.js → shorten-label-DYIwy50H.js} +1 -1
- package/dist/assets/{simple-select-BAsjOjPA.js → simple-select-Dl66gaGg.js} +1 -1
- package/dist/assets/{spaces-Djmw0nt4.js → spaces-CIbaLYiX.js} +1 -1
- package/dist/assets/{status-D2Drllod.js → status-BLdIB43U.js} +1 -1
- package/dist/assets/{status-D7ZlLl4T.js → status-FhheVLzV.js} +1 -1
- package/dist/assets/{switch-control-BBA1I68_.js → switch-control-DMPIVGLz.js} +1 -1
- package/dist/assets/{table-icons-CqagwqOY.js → table-icons-CKVRCGfs.js} +1 -1
- package/dist/assets/{team-D2Gv3KS6.js → team-BH09WBcn.js} +1 -1
- package/dist/assets/{toLower-CreXzxO2.js → toLower-D2IQg44t.js} +1 -1
- package/dist/assets/toUpper-DhyOAo1_.js +1 -0
- package/dist/assets/{traffic-lQhdhL0g.js → traffic-Rb_HJzxE.js} +1 -1
- package/dist/assets/{tsMode-B0t-i9QO.js → tsMode-C6_gO0t8.js} +1 -1
- package/dist/assets/{typescript-BWstSdq7.js → typescript-C8KE2NUj.js} +1 -1
- package/dist/assets/{url-evaluation-xPcTMwue.js → url-evaluation-BSVN9Sr-.js} +1 -1
- package/dist/assets/{url-join-DaMo7uyz.js → url-join-7gtYpqME.js} +1 -1
- package/dist/assets/{use-mobile-DAmtuic1.js → use-mobile-CHNtQz3M.js} +1 -1
- package/dist/assets/{use-mobile-DqI6fEdw.js → use-mobile-Cvb4FhMO.js} +1 -1
- package/dist/assets/{useAsync-8DzECKWt.js → useAsync-BJp2j1-A.js} +1 -1
- package/dist/assets/{useAsyncRetry-CndpIWJk.js → useAsyncRetry-Zp4PKIr6.js} +1 -1
- package/dist/assets/{useLocalStorage-BL64yJ27.js → useLocalStorage-DQlL9Uk_.js} +1 -1
- package/dist/assets/{useThemeProps-URhp63Pk.js → useThemeProps-CR5EdUim.js} +1 -1
- package/dist/assets/{util-Cx7Tm9SQ.js → util-TQDWHiT7.js} +1 -1
- package/dist/assets/{wait-container-BAd15_CC.js → wait-container-DI1fYqjh.js} +1 -1
- package/dist/assets/{without-wallet-C_iBTPyr.js → without-wallet-CYR1YjcE.js} +1 -1
- package/dist/assets/wrap-locale-CtR1iX6O.js +1 -0
- package/dist/assets/{xml-HxQqV2ss.js → xml-CarJoMuA.js} +1 -1
- package/dist/assets/{yaml-pWyAJblD.js → yaml-cKOyFvAs.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-CNKThDMg.js +0 -1
- package/dist/assets/api-CM8nEaeN.js +0 -1
- package/dist/assets/cloneDeep-B7ITWJEe.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-OrWbvjn-.js +0 -1
- package/dist/assets/engine-CyztVVgp.js +0 -1
- package/dist/assets/getValidReactChildren-BaHtQCbY.js +0 -1
- package/dist/assets/index-BtepVdqB.js +0 -1
- package/dist/assets/omit-CzDjJ0V8.js +0 -1
- package/dist/assets/schema-HU2ZEH5u.js +0 -1
- package/dist/assets/sdk-46pKrnQg.js +0 -1
- package/dist/assets/toUpper-Crz2bdSG.js +0 -1
- package/dist/assets/wrap-locale-DIHRO_br.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,K as g,_ as ue,s as R,a0 as K,V as U,r as f,a1 as fe,y as v,a2 as Me,a3 as ze,o as E,a4 as oe,a5 as We,H as I,Y as Q,T as $,a6 as He,v as B,$ as Ve,D as qe,t as Ye,X as xe,C as ge,a7 as Ke,a8 as Qe,a9 as Xe,u as N,p as Je,aa as M,n as se,B as Ze,ab as re,A as ye,q as ne,ac as et,W as ae,L as X,w as we,x as J,ad as tt,ae as ke,af as st,b as P,ag as le,ah as ot,I as rt,ai as nt,aj as at,M as it,i as lt,f as ct,ak as dt,al as be,am as Se,an as ve,ao as L,ap as je,aq as Re,ar as Ce,as as Pe,at as Te,au as pt,av as ce}from"./index-
|
|
1
|
+
import{j as e,K as g,_ as ue,s as R,a0 as K,V as U,r as f,a1 as fe,y as v,a2 as Me,a3 as ze,o as E,a4 as oe,a5 as We,H as I,Y as Q,T as $,a6 as He,v as B,$ as Ve,D as qe,t as Ye,X as xe,C as ge,a7 as Ke,a8 as Qe,a9 as Xe,u as N,p as Je,aa as M,n as se,B as Ze,ab as re,A as ye,q as ne,ac as et,W as ae,L as X,w as we,x as J,ad as tt,ae as ke,af as st,b as P,ag as le,ah as ot,I as rt,ai as nt,aj as at,M as it,i as lt,f as ct,ak as dt,al as be,am as Se,an as ve,ao as L,ap as je,aq as Re,ar as Ce,as as Pe,at as Te,au as pt,av as ce}from"./index-NFZNhczl.js";import{t as mt}from"./toLower-D2IQg44t.js";import{a as W,u as ht,W as ut,P as Ee,L as Be}from"./index-aZ0P5xMq.js";import{A as ft,D as ie,u as xt,W as gt,P as yt,a as De,L as Ue}from"./wait-container-DI1fYqjh.js";import{g as Z}from"./get-safe-url-M4uziR0J.js";import{u as de}from"./useLocalStorage-DQlL9Uk_.js";import{L as wt}from"./Launch-9bwdZPzQ.js";import{D as kt}from"./DeleteOutline-DDdlNULq.js";import{g as bt,i as St}from"./spaces-CIbaLYiX.js";import{I as vt}from"./MoreVert-DOn_691b.js";import{y as jt}from"./index-T7DaPPrZ.js";import"./url-join-7gtYpqME.js";import"./use-mobile-Cvb4FhMO.js";import"./api-QrlC06mC.js";function Oe({children:s,selected:a=!1}){return e.jsxs(Rt,{children:[s,e.jsx(g,{className:`selected-container ${a?"selected":""}`,children:e.jsx(ue,{className:"selected-icon"})})]})}const Rt=R(g)`
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
.selected-container {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c1 as Ke,c0 as Fe,r as h,c2 as Ge,j as e,b9 as ee,c4 as Ye,ch as J,c5 as $e,b_ as He,cj as qe,aF as he,M as q,bo as A,cw as Ce,H as B,Y as V,bg as E,fD as we,aQ as Be,b as N,iP as Ve,V as D,gD as Qe,o as f,x as Xe,ax as De,y as fe,al as Ze,p as Je,C as L,T as j,k as et,s as tt,f as st,iQ as X,h_ as Z,iR as ot,K as S,aW as K,aH as T,L as nt,g as H,dm as at,O as Se,R as G,aE as Y,a9 as $,a5 as rt,bB as it,fu as ct,b0 as lt,v as pe,w as dt,G as be,Z as Ee,bE as xe,B as pt}from"./index-DmEIktUl.js";import{T as ut}from"./html-title-lLYk44sN.js";import{u as U}from"./blocklet-CAtl3NS9.js";import{u as mt}from"./use-mobile-DqI6fEdw.js";import{c as Ie,d as ft,e as xt,f as gt,S as ht,g as ue,h as St,b as yt,u as bt,C as kt,D as jt,a as Ct}from"./connect-to-BBTYSJcL.js";import"./index-BjV7y4g4.js";import"./index-BojVbZw0.js";import"./api-CM8nEaeN.js";import{d as wt,a as Bt,g as Dt,i as Et,e as ge,f as It,h as Tt,j as Rt}from"./spaces-Djmw0nt4.js";import{v as zt}from"./index-BKiW1GO2.js";import{E as vt}from"./index-CUC9gaVs.js";import{H as Pt}from"./HelpOutline-kE6mcJHh.js";import{H as At}from"./index-B5BIzAQO.js";import{x as Lt}from"./index-DRYJ0xIl.js";import{D as Ut}from"./DeleteOutline-CjxNIx7X.js";import{g as ke}from"./get-safe-url-2iJX7eF-.js";import{S as Ot}from"./switch-control-BBA1I68_.js";import{L as je}from"./list-header-C7PJrzvN.js";import"./OpenInNew-Dw9F5-j0.js";import"./ButtonGroup-DgPN2-YM.js";import"./getValidReactChildren-BaHtQCbY.js";import"./FilterList-DD3VXN0o.js";import"./CSSTransition-DYtKv9e9.js";import"./emotion-cache.browser.esm-OrWbvjn-.js";import"./index-DqqrHhsp.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-CZmuZV4u.js";import"./index-C88tq6i-.js";import"./TableSearch-DIxp58MQ.js";import"./Search-Cc0L1P8Y.js";import"./Clear-CybwA2Jd.js";import"./MoreVert-C-gNfdF4.js";function Mt(t){return Ke("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:s,fontSize:n,classes:o}=t,r={root:["root",s!=="inherit"&&`color${J(s)}`,`fontSize${J(n)}`]};return $e(r,Mt,o)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.color!=="inherit"&&s[`color${J(n.color)}`],s[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([s])=>({props:{color:s},style:{color:(t.vars||t).palette[s].main}}))]}))),ye=h.forwardRef(function(s,n){const o=Ge({props:s,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=o,p={...o,baseClassName:r,color:c,component:i,fontSize:d},u=Nt(p);return e.jsx(_t,{as:i,className:Ye(r,"notranslate",u.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Kt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Gt({blockletDid:t,nodeApi:s,spaceGateways:n}){let o=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await wt(a.endpoint);return!q(i)&&i!==c&&(c=i,o=!0),{...a,name:c}}));return o&&await Promise.all(r.filter(a=>a.did).map(a=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function Yt({refresh:t}={}){const{blocklet:s}=U(),n=s?.meta?.did,{api:o}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await o.getBlockletSpaceGateways({input:{did:n}});return await Gt({blockletDid:n,nodeApi:o,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:s,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:o}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(s(!0),!o){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:o.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{s(!1)}},1e3);return Be(async()=>{l()},[o?.meta?.did].concat(t)),{backups:r}}function $t({appDid:t}){const{backups:s}=Te(),[n,o]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&o(()=>({...c}))},[t]),h.useEffect(()=>{if(s?.length&&Ve(s[0]?.status)){const[c]=s;o(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),n}function Ht({deps:t=[],setLoading:s=()=>{}}={}){const{blocklet:n}=U(),[o,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{s(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}}),p=Array.isArray(l)?l.map(u=>({...u,successCount:+u.successCount,errorCount:+u.errorCount})):[];r(p)}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{s(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:o}}const Re=h.createContext({}),{Provider:qt,Consumer:Ws}=Re;function ze({children:t}){const{t:s}=D(),{api:n}=A(),{blocklet:o}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=Yt({refresh:c}),u=Qe(d),x=$t({appDid:o?.appDid}),m=h.useMemo(()=>Bt(o?.environments),[o?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[se,oe]=h.useState(0),{backupSummary:ne}=Ht({deps:[se]}),[_,M]=h.useState(d?.find(g=>g.endpoint===m)),I=o?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{oe(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:o.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:o.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:g}}),m!==P&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===m&&(await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:g.did},spaceGateway:g}}),m!==g.endpoint&&n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===m;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:u,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:m,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:f.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:s}=U(),{info:n}=A(),{t:o}=D(),r=Ie({blocklet:s}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:u,name:x,did:m})=>{const k=await Dt(u);if(!await Et(k)){B.error(o("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===u)){B.error(o("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:m,url:k,endpoint:u},u)},p=async({spaceGateway:u})=>{try{await l(u)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:s}=U(),{data:n,loading:o}=Ce(()=>t.getBlocklet({input:{did:s?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!s?.meta?.did,refreshDeps:[s?.meta?.did]});return{blocklet:n?.blocklet??null,loading:o}}function Pe({...t}){const{t:s}=h.useContext(Je),{blocklet:n,loading:o}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(zt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return o?e.jsx(L,{}):e.jsx(j,{children:s("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:s,backupSummary:n}=O(),o=xt({key:"lg"}),r=h.useRef(null),a=st(),c=h.useCallback(l=>{s(l)},[s]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),u=new Map(n.map(m=>[m.date,{date:m.date,successCount:m.successCount,errorCount:m.errorCount}])),x=[];for(let m=p.clone();E(m).isBefore(l);m=m.add(1,"day")){const k=m.format("YYYY-MM-DD");x.push(u.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
|
|
1
|
+
import{c1 as Ke,c0 as Fe,r as h,c2 as Ge,j as e,b9 as ee,c4 as Ye,ch as J,c5 as $e,b_ as He,cj as qe,aF as he,M as q,bo as A,cw as Ce,H as B,Y as V,bg as E,fD as we,aQ as Be,b as N,iP as Ve,V as D,gD as Qe,o as f,x as Xe,ax as De,y as fe,al as Ze,p as Je,C as L,T as j,k as et,s as tt,f as st,iQ as X,h_ as Z,iR as ot,K as S,aW as K,aH as T,L as nt,g as H,dm as at,O as Se,R as G,aE as Y,a9 as $,a5 as rt,bB as it,fu as ct,b0 as lt,v as pe,w as dt,G as be,Z as Ee,bE as xe,B as pt}from"./index-NFZNhczl.js";import{T as ut}from"./html-title-BVs9_wlq.js";import{u as U}from"./blocklet-B_b8vapJ.js";import{u as mt}from"./use-mobile-Cvb4FhMO.js";import{c as Ie,d as ft,e as xt,f as gt,S as ht,g as ue,h as St,b as yt,u as bt,C as kt,D as jt,a as Ct}from"./connect-to-uRhilqPM.js";import"./index-DQPdwz2Y.js";import"./index-BojVbZw0.js";import"./api-QrlC06mC.js";import{d as wt,a as Bt,g as Dt,i as Et,e as ge,f as It,h as Tt,j as Rt}from"./spaces-CIbaLYiX.js";import{v as zt}from"./index-CUMH9ev3.js";import{E as vt}from"./index-Dzca3Eph.js";import{H as Pt}from"./HelpOutline-Gx_yLuDF.js";import{H as At}from"./index-CWm3LFCr.js";import{x as Lt}from"./index-DRYJ0xIl.js";import{D as Ut}from"./DeleteOutline-DDdlNULq.js";import{g as ke}from"./get-safe-url-M4uziR0J.js";import{S as Ot}from"./switch-control-DMPIVGLz.js";import{L as je}from"./list-header-DIo8-J88.js";import"./OpenInNew-D2ujTWne.js";import"./ButtonGroup-Z9547yzG.js";import"./getValidReactChildren-Duobzte7.js";import"./FilterList-DNfECclT.js";import"./CSSTransition-B5wQ0yUS.js";import"./emotion-cache.browser.esm-BtAWOyO4.js";import"./index-BAvBoYZf.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DIlm5Prx.js";import"./index-T7DaPPrZ.js";import"./TableSearch-BSa4dOKp.js";import"./Search-DXzn9Lp-.js";import"./Clear-CzjQBpCS.js";import"./MoreVert-DOn_691b.js";function Mt(t){return Ke("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:s,fontSize:n,classes:o}=t,r={root:["root",s!=="inherit"&&`color${J(s)}`,`fontSize${J(n)}`]};return $e(r,Mt,o)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.color!=="inherit"&&s[`color${J(n.color)}`],s[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([s])=>({props:{color:s},style:{color:(t.vars||t).palette[s].main}}))]}))),ye=h.forwardRef(function(s,n){const o=Ge({props:s,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=o,p={...o,baseClassName:r,color:c,component:i,fontSize:d},u=Nt(p);return e.jsx(_t,{as:i,className:Ye(r,"notranslate",u.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Kt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Gt({blockletDid:t,nodeApi:s,spaceGateways:n}){let o=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await wt(a.endpoint);return!q(i)&&i!==c&&(c=i,o=!0),{...a,name:c}}));return o&&await Promise.all(r.filter(a=>a.did).map(a=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function Yt({refresh:t}={}){const{blocklet:s}=U(),n=s?.meta?.did,{api:o}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await o.getBlockletSpaceGateways({input:{did:n}});return await Gt({blockletDid:n,nodeApi:o,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:s,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:o}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(s(!0),!o){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:o.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{s(!1)}},1e3);return Be(async()=>{l()},[o?.meta?.did].concat(t)),{backups:r}}function $t({appDid:t}){const{backups:s}=Te(),[n,o]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&o(()=>({...c}))},[t]),h.useEffect(()=>{if(s?.length&&Ve(s[0]?.status)){const[c]=s;o(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),n}function Ht({deps:t=[],setLoading:s=()=>{}}={}){const{blocklet:n}=U(),[o,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{s(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}}),p=Array.isArray(l)?l.map(u=>({...u,successCount:+u.successCount,errorCount:+u.errorCount})):[];r(p)}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{s(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:o}}const Re=h.createContext({}),{Provider:qt,Consumer:Ws}=Re;function ze({children:t}){const{t:s}=D(),{api:n}=A(),{blocklet:o}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=Yt({refresh:c}),u=Qe(d),x=$t({appDid:o?.appDid}),m=h.useMemo(()=>Bt(o?.environments),[o?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[se,oe]=h.useState(0),{backupSummary:ne}=Ht({deps:[se]}),[_,M]=h.useState(d?.find(g=>g.endpoint===m)),I=o?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{oe(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:o.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:o.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:g}}),m!==P&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===m&&(await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:g.did},spaceGateway:g}}),m!==g.endpoint&&n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===m;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:u,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:m,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:f.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:s}=U(),{info:n}=A(),{t:o}=D(),r=Ie({blocklet:s}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:u,name:x,did:m})=>{const k=await Dt(u);if(!await Et(k)){B.error(o("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===u)){B.error(o("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:m,url:k,endpoint:u},u)},p=async({spaceGateway:u})=>{try{await l(u)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:s}=U(),{data:n,loading:o}=Ce(()=>t.getBlocklet({input:{did:s?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!s?.meta?.did,refreshDeps:[s?.meta?.did]});return{blocklet:n?.blocklet??null,loading:o}}function Pe({...t}){const{t:s}=h.useContext(Je),{blocklet:n,loading:o}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(zt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return o?e.jsx(L,{}):e.jsx(j,{children:s("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:s,backupSummary:n}=O(),o=xt({key:"lg"}),r=h.useRef(null),a=st(),c=h.useCallback(l=>{s(l)},[s]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),u=new Map(n.map(m=>[m.date,{date:m.date,successCount:m.successCount,errorCount:m.errorCount}])),x=[];for(let m=p.clone();E(m).isBefore(l);m=m.add(1,"day")){const k=m.format("YYYY-MM-DD");x.push(u.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
|
|
2
2
|
`)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:X[600]},{min:-9,max:-6,color:X[500]},{min:-6,max:-3,color:X[400]},{min:-3,max:-1,color:X[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:Z[300]},{min:3,max:6,color:Z[400]},{min:6,max:9,color:Z[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:Z[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:ot[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(S,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(S,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(vt,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(S,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:o?2:5,mb:2},children:e.jsxs(K,{direction:o?"column":"row",spacing:o?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:o?"flex-start":"center"},children:[e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Xt=ee(({className:t,...s})=>e.jsx(Se,{...s,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Le({status:t,message:s="",createdAt:n}){const{t:o}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(n,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&o("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),o("common.progress")]}):i?e.jsx(H,{type:"success",children:o("common.succeeded")}):e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"error",children:o("common.failed")}),e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:s||a,children:e.jsx(ye,{children:e.jsx(Pt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Le.propTypes={status:f.string.isRequired,message:f.string,createdAt:f.string.isRequired};function Ue({metadata:t={}}){const{t:s}=D();if(q(t))return e.jsx(H,{type:"success",children:s("common.succeeded")});const n=t.count||0,o=t.size||0,r=Lt(o,{iec:!0}),a=e.jsxs(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[s("common.fileCount"),": ",n]}),e.jsxs(j,{variant:"body2",children:[s("common.fileSize"),": ",r]})]});return e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"success",children:s("common.succeeded")}),e.jsx(Xt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ye,{children:e.jsx(at,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}Ue.propTypes={metadata:f.object};function Oe(){const{t,locale:s}=D(),{spaceGateways:n,backups:o,backupsLoading:r}=O(),a=h.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:p,createdAt:u}=o[i],x=p===T.BACKUPS.STATUS.PROGRESS&&E().diff(u,"hours")>=T.BACKUPS.TIMEOUT_HOURS,m=p===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||n.find(w=>d?.includes(ge(w?.endpoint)))?.name||"Unknown DID Space";return m?e.jsx(nt,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(H,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>q(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=o?.[i]??{},{status:l,message:p,createdAt:u,metadata:x}=d,m=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(u,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!m,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!m;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(Ue,{metadata:x}):e.jsx(Le,{status:l,message:p,createdAt:u})}}}],[o,n,t]),c=h.useMemo(()=>!o?.length,[o]);return e.jsx(e.Fragment,{children:c?e.jsx(S,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(At,{title:"",loading:r,data:o,columns:a,emptyNode:t("storage.spaces.record.emptyData",s),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function Zt(){const{t}=D();return e.jsxs(S,{children:[e.jsxs(S,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(gt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(ve,{})]}),e.jsxs(S,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(Ae,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Me({spaceGateway:t,onConfirm:s=()=>{},onCancel:n=()=>{}}){const{t:o}=D(),[r,a]=h.useState(!1),[c,i]=h.useState(!1),d=(u,x)=>{u?.preventDefault(),u?.stopPropagation(),a(x)},l=async u=>{try{u?.stopPropagation(),i(!0),await s?.(t),a(!1)}catch(x){console.error(x),B.error(`${o("storage.space.gateway.delete.failed")}: ${V(x)}`)}finally{a(!1),i(!1)}},p=u=>{d(u,!1),n?.(u)};return e.jsxs(e.Fragment,{children:[e.jsxs(G,{color:"red",onClick:u=>d(u,!0),children:[e.jsx(Y,{style:{minWidth:24,color:"red"},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx($,{style:{color:"red"},children:o("common.disconnect")})]}),e.jsx(rt,{title:o("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:o("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:o("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:p,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:o("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Me.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};function Ne({spaceGateway:t,selected:s,onDelete:n=()=>{},onConnect:o=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=O(),[d,l]=h.useState(null),{t:p}=D(),[u,x]=h.useState(!1),m=(y,b)=>{y.stopPropagation(),y.preventDefault(),l(b&&y.currentTarget)},k=async y=>{try{x(!0),m(y,!1),await o(t)}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}},w=async y=>{try{x(!0),m(y,!1),await i()}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[u||t?.loading?e.jsx(L,{sx:{ml:1},size:"24px"}):e.jsx(it,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:y=>m(y,!0),...c,children:e.jsx(ct,{})}),e.jsxs(lt,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:y=>m(y,!1),children:[e.jsxs(G,{onClick:y=>{m(y,!1),window.open(ke(t.endpoint?It(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Wt,{fontSize:"small"})}),e.jsx($,{children:p("common.open")})]}),e.jsxs(G,{onClick:y=>{m(y,!1),window.open(ke(Tt(t.endpoint),{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Ft,{fontSize:"small"})}),e.jsx($,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(G,{onClick:k,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Kt,{fontSize:"small"})}),e.jsx($,{children:p("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(G,{onClick:w,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(ht,{fontSize:"small"})}),e.jsx($,{children:p("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Me,{spaceGateway:t,onConfirm:async()=>{l(null),await n?.(t)},onCancel:()=>l(null)})]})]})}Ne.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};const Jt=ee(({className:t,...s})=>e.jsx(Se,{...s,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function _e({spaceGateway:t,spaceStatus:s,selected:n,onConnected:o=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=U(),{api:l,info:{did:p}}=A(),{appDid:u,appName:x,appDescription:m,scopes:k,appUrl:w,referrer:y}=Ie({blocklet:d}),{backupProgress:b,updateSpaceGateway:te,deleteSpaceGateway:se,refreshBackupSummary:oe,refreshBackups:ne}=O(),[_,M]=h.useState(!1),[I,z]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{z(C=>({...C,open:!1}))}}),ae=n&&!_&&s===ue.DISCONNECTED,re=n&&!_&&!t.loading&&s===ue.CONNECTED,F=n&&_&&s===ue.CONNECTED&&b?.progress>=0,Q=async()=>{try{if(await Rt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),o?.(null,t);return}}catch(C){console.error(C),o?.(C,t);return}z(C=>({...C,open:!0,prefix:fe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:De.create({baseURL:fe(t.url,"space")}).get,extraParams:{appDid:u,appName:x,appDescription:m,scopes:k,appUrl:w,referrer:y,nodeDid:p,spaceDid:t.did}}))},ie=async(C,g)=>{const P=g(C.endpoint),R=ge(P),v=C.space?g(C.space):{};if(t.did&&R!==t.did){z(We=>({...We,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),o?.(new Error(W),t);return}const de={...t,name:v.name??"DID Space",did:v.did??ge(P),endpoint:P};await te(de),z(W=>({...W,open:!1})),o?.(null,de)},ce=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},le=async()=>{try{await se(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return h.useEffect(()=>{b?.completed?(n&&(b?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):b.message&&a?.(new Error(b?.message),t),b.progress=0,b.message=""),M(!1),oe(),ne()):b.progress&&M(!0)},[b]),e.jsxs(e.Fragment,{children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:c("storage.spaces.strategy.backupNow")}),ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:Q,children:c("storage.spaces.disconnected.reconnectNow")}),F&&e.jsx(Jt,{title:b?.message&&e.jsx(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:b.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(L,{variant:"determinate",value:b?.progress,size:14,sx:{mr:1}}),b?.progress,"%"]})}),e.jsx(dt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ne,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:le,onConnect:Q,enableSwitchToSpace:b?.completed||q(b?.message),backupInProgress:F})]})}_e.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};function es({...t}){const{t:s}=D();return e.jsxs(S,{...t,children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("storage.spaces.backup.records")})}),e.jsx(Ae,{}),e.jsx(Oe,{})]})}function ts({...t}){const{t:s}=D(),{autoBackup:n,updateAutoBackup:o}=O(),r=async()=>{try{const a=!n?.enabled;await o({enabled:a}),B.success(s(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Ot,{checked:!!n?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function ss(){const{t}=D(),{spaceGateways:s,spaceGatewaysLoading:n,spaceGatewayIsSelected:o}=O(),r=n&&!s?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(_e,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:p=>p&&l()});return e.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(ts,{}),e.jsx(ve,{})]}),e.jsx(S,{sx:{mt:2},children:r?e.jsx(S,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(L,{})}):e.jsx(be,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:s.map(c=>e.jsx(be,{size:{xs:12,md:6},children:e.jsx(St,{endpoint:c.endpoint,selected:o(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(es,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function os(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=O();return t?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):q(s)?e.jsx(Zt,{}):e.jsx(ss,{})}function ns(){return e.jsx(ze,{children:e.jsx(os,{})})}function as(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:n,hasStorageEndpoint:o,loading:r,storageEndpoint:a}=bt(),c=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):e.jsxs(S,{sx:{maxWidth:"md",position:"relative"},children:[o?e.jsx(kt,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(jt,{}),e.jsx(S,{sx:c,children:e.jsx(Ct,{onConnect:n,storageEndpoint:a})})]})}function rs(){const{t}=D();return e.jsxs(yt,{children:[e.jsxs(K,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(as,{})]})}function is({navOrientation:t="vertical",...s}){const{t:n,locale:o}=D(),{blocklet:r}=U(),a=mt({key:"md"}),[c,i]=pt(),d=c.get("tab")||"backup",l=a?"horizontal":t,p=xe(()=>{const w=[{label:n("common.backup"),value:"backup"}],y=r?.capabilities?.didSpace;return(y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:n("common.storage"),value:"storage"}),w},[o,l]),x=xe(()=>({backup:e.jsx(ns,{}),storage:e.jsx(rs,{})}))[d],m=w=>{i(y=>(w==="backup"?y.delete("tab"):y.set("tab",w),y))};if(p.length<=1)return e.jsx(me,{children:x});const k=e.jsx(ut,{tabs:p,current:d,orientation:l,onChange:m,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(S,{...s,children:e.jsxs(K,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(S,{sx:{flexShrink:0},children:e.jsx(je,{left:k})}),e.jsx(S,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(S,{...s,children:[e.jsx(je,{left:k}),e.jsx(me,{sx:{mt:2},children:x})]})}is.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};const me=ee(S)`
|
|
3
3
|
position: relative;
|
|
4
4
|
min-height: 66vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ct as u,r as o,p as x,cu as r,B as g,j as s,K as m,cv as d}from"./index-
|
|
1
|
+
import{ct as u,r as o,p as x,cu as r,B as g,j as s,K as m,cv as d}from"./index-NFZNhczl.js";function P(){const i=u(),{blocklets:c,refresh:l}=i,{t:p}=o.useContext(x),y=r.generateKey(),[a]=g();return o.useEffect(()=>{const n=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...n,...e?{severity:e==="all"?[]:e.split(","),paging:{...n.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};l(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:p("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
|