@abtnode/webapp 1.17.6-beta-20251217-144034-62fafb94 → 1.17.6-beta-20251218-120326-5b44dadf
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-236QfbBU.js → AdapterDayjs-DbXM02a3.js} +1 -1
- package/dist/assets/{Add-Des5za4N.js → Add-17-jFd7z.js} +1 -1
- package/dist/assets/ArrowDropDown-JQ3Rq4ea.js +1 -0
- package/dist/assets/{Autocomplete-Bgl3dGJJ.js → Autocomplete-C8NhTbRF.js} +1 -1
- package/dist/assets/{Breadcrumbs-Btf_gF-0.js → Breadcrumbs-8EmlaNJn.js} +1 -1
- package/dist/assets/{ButtonGroup-Z9547yzG.js → ButtonGroup-BI0yydFN.js} +1 -1
- package/dist/assets/{CSSTransition-B5wQ0yUS.js → CSSTransition-680AnN9b.js} +1 -1
- package/dist/assets/{CallMerge-4v2MXTdn.js → CallMerge-BWum6aKS.js} +1 -1
- package/dist/assets/{CardContent-CtTlBjH7.js → CardContent-Be8HVTG5.js} +1 -1
- package/dist/assets/{ChevronLeft-C9Y_ggAJ.js → ChevronLeft-Bqr4v0-x.js} +1 -1
- package/dist/assets/{ChevronRight-DAyMYZEW.js → ChevronRight-C92WXl3G.js} +1 -1
- package/dist/assets/{Clear-CzjQBpCS.js → Clear-BEIkQJ0G.js} +1 -1
- package/dist/assets/{Delete-BtTxVz6z.js → Delete-etfqa5ht.js} +1 -1
- package/dist/assets/{DeleteOutline-DDdlNULq.js → DeleteOutline-Cbw_xWxX.js} +1 -1
- package/dist/assets/{Done-DmttcwQI.js → Done-BmIqndwD.js} +1 -1
- package/dist/assets/{Edit-CsYUR2zq.js → Edit-C2AKW3eS.js} +1 -1
- package/dist/assets/{ErrorOutline-C83OSg_z.js → ErrorOutline-ClnZlnrx.js} +1 -1
- package/dist/assets/{FilterList-DNfECclT.js → FilterList-CZU1TLat.js} +1 -1
- package/dist/assets/{Google-CU3piwDe.js → Google-P_iv8JkV.js} +1 -1
- package/dist/assets/{HelpOutline-Gx_yLuDF.js → HelpOutline-OXFYzlS-.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-CS63clJ4.js → KeyboardArrowDown-CPhWpi6G.js} +1 -1
- package/dist/assets/{Launch-9bwdZPzQ.js → Launch-Cqfwr2jr.js} +1 -1
- package/dist/assets/{Link-DQZf-Cnd.js → Link-3-c9oFLq.js} +1 -1
- package/dist/assets/{ListItemButton-Tot-RyK-.js → ListItemButton-B_8LnCjp.js} +1 -1
- package/dist/assets/{ListSubheader-BIN8GsVb.js → ListSubheader-4ZgX-yqr.js} +1 -1
- package/dist/assets/{LoadingButton-Cy89o260.js → LoadingButton-DlIR2Kfo.js} +1 -1
- package/dist/assets/{MoreVert-DOn_691b.js → MoreVert-C4JPmAZs.js} +1 -1
- package/dist/assets/{OpenInNew-D2ujTWne.js → OpenInNew-BIfjUAPQ.js} +1 -1
- package/dist/assets/{Refresh-D0ZhzC4E.js → Refresh-Dpf0qLZl.js} +1 -1
- package/dist/assets/{Replay-sIyuLlhq.js → Replay-B86FlV2V.js} +1 -1
- package/dist/assets/{Search-DXzn9Lp-.js → Search-D5OHIH5t.js} +1 -1
- package/dist/assets/{Stepper-Zgoofdon.js → Stepper-k2fg0C07.js} +1 -1
- package/dist/assets/{TableSearch-BSa4dOKp.js → TableSearch-DKi7Ktdg.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-DKenn_kW.js → ToggleButtonGroup-DjxoDLGP.js} +1 -1
- package/dist/assets/{UnfoldMore-C-42QCTj.js → UnfoldMore-BlVk7See.js} +1 -1
- package/dist/assets/{Verified-CPXkSMxG.js → Verified-6JELqJq_.js} +1 -1
- package/dist/assets/{VerifiedUser-B8sBVwQC.js → VerifiedUser-Bglv4i1U.js} +1 -1
- package/dist/assets/{ViewList-C8mEloA5.js → ViewList-YgHYVpVp.js} +1 -1
- package/dist/assets/{_createAggregator-CT9vDd72.js → _createAggregator-B12F8TpH.js} +1 -1
- package/dist/assets/{actions-CsKJtA25.js → actions-BUAriJOB.js} +1 -1
- package/dist/assets/{actions-D1Lm1JEd.js → actions-DS_Ri_37.js} +1 -1
- package/dist/assets/{agreement-BeaWnXWa.js → agreement-r1s2sh3Y.js} +1 -1
- package/dist/assets/api-D8P27G7r.js +1 -0
- package/dist/assets/{appearance-CaUuLp12.js → appearance-aM7wH57p.js} +1 -1
- package/dist/assets/{audit-logs-BVvz-gNB.js → audit-logs-zQaiGV7b.js} +1 -1
- package/dist/assets/{base-chart-azE0aacM.js → base-chart-ADeRHccn.js} +1 -1
- package/dist/assets/{blocklet-B_b8vapJ.js → blocklet-BmfFK15q.js} +1 -1
- package/dist/assets/{chain-DQuRoRbo.js → chain-B7t_6AFd.js} +1 -1
- package/dist/assets/{click-to-copy-BuexyggU.js → click-to-copy-B1Ez8jE-.js} +1 -1
- package/dist/assets/cloneDeep-CH6T7y2B.js +1 -0
- package/dist/assets/config-navigation-B481mXc2.js +457 -0
- package/dist/assets/{connect-to-uRhilqPM.js → connect-to-CIL-wYnq.js} +3 -3
- package/dist/assets/{cssMode-xzKgveff.js → cssMode-Rm-CifKW.js} +1 -1
- package/dist/assets/{delete-confirm-ImHpqh9B.js → delete-confirm-CuK1fe0a.js} +1 -1
- package/dist/assets/{depsEqual-DIlm5Prx.js → depsEqual-Cn18gXKK.js} +1 -1
- package/dist/assets/{detail-CsB1ATb9.js → detail-IsCuaNgz.js} +3 -3
- package/dist/assets/{domains-CnrJ8TbP.js → domains-C6NvGCZC.js} +1 -1
- package/dist/assets/{download-Chk5ZS7w.js → download-Bi8Vdh5L.js} +1 -1
- package/dist/assets/{edit.svg-J7XY7Hsh.js → edit.svg-17FJ505g.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-Cvn7wadW.js +1 -0
- package/dist/assets/engine-Df3lbfPA.js +1 -0
- package/dist/assets/{freemarker2-D7zjhCq4.js → freemarker2-d8rE1704.js} +1 -1
- package/dist/assets/{get-safe-url-M4uziR0J.js → get-safe-url-CDPasMZR.js} +1 -1
- package/dist/assets/getValidReactChildren-BjYEIaVV.js +1 -0
- package/dist/assets/{graphqlMode-C0GhJVjj.js → graphqlMode-DBqrr_Ti.js} +2 -2
- package/dist/assets/{handlebars-tOVv9ziY.js → handlebars-cbZ5wMAy.js} +1 -1
- package/dist/assets/{html-BW7PD4So.js → html-BQvWPc3p.js} +1 -1
- package/dist/assets/{html-title-BVs9_wlq.js → html-title-DCtKzGAT.js} +1 -1
- package/dist/assets/{htmlMode-xMKOb_Lf.js → htmlMode-Cmym7gaz.js} +1 -1
- package/dist/assets/{iframe-BRekcQQF.js → iframe-Db5U2ou8.js} +1 -1
- package/dist/assets/{index-m0QvVu6g.js → index-2wL8aZ8Y.js} +1 -1
- package/dist/assets/{index-eCz9tbys.js → index-688fVCdg.js} +1 -1
- package/dist/assets/{index-qB7t2ll3.js → index-Ad8X02VO.js} +1 -1
- package/dist/assets/{index-DX-QhcNe.js → index-B-CzffZS.js} +1 -1
- package/dist/assets/{index-D3TFHWgY.js → index-B1nZmgB5.js} +3 -3
- package/dist/assets/{index-DliHjDiB.js → index-B4wihLhl.js} +1 -1
- package/dist/assets/{index-D2AxRjl4.js → index-B8HlSswG.js} +1 -1
- package/dist/assets/{index-CXjNOxDY.js → index-B9EmgVee.js} +1 -1
- package/dist/assets/{index-DQPdwz2Y.js → index-BBX_ii_N.js} +2 -2
- package/dist/assets/{index-aZ0P5xMq.js → index-BT4EuDNg.js} +1 -1
- package/dist/assets/{index-GeaUvbQe.js → index-BiJP3v8L.js} +1 -1
- package/dist/assets/{index-BkX5LVL8.js → index-BjARkkNc.js} +4 -4
- package/dist/assets/{index-ZGTYJOlF.js → index-Bm0XXN_O.js} +1 -1
- package/dist/assets/index-BvSt3OAt.js +1 -0
- package/dist/assets/{index-DqTo3Zfc.js → index-BzuzQ5ox.js} +1 -1
- package/dist/assets/{index-CtpH5d08.js → index-Bzx8w-Mu.js} +1 -1
- package/dist/assets/{index-CrtPsFlg.js → index-C1ATBIiS.js} +1 -1
- package/dist/assets/{index-DGwBkyQM.js → index-C2xdmced.js} +1 -1
- package/dist/assets/{index-gYQgg1uX.js → index-C7eGFDSn.js} +1 -1
- package/dist/assets/{index-T7DaPPrZ.js → index-CB511uzw.js} +1 -1
- package/dist/assets/{index-DN2WOMzG.js → index-CG4ppk8J.js} +11 -11
- package/dist/assets/{index-aVnqs5SE.js → index-CNDdV4IL.js} +1 -1
- package/dist/assets/{index-CWm3LFCr.js → index-COMjcH0c.js} +1 -1
- package/dist/assets/{index-DcWgVTc7.js → index-CPCvlb_T.js} +1 -1
- package/dist/assets/{index-Cd7zjVGT.js → index-CWj_8JE3.js} +1 -1
- package/dist/assets/{index-UdYQdYeZ.js → index-CYbhWvbu.js} +3 -3
- package/dist/assets/{index-DK_hcqBI.js → index-CZSoNWI1.js} +1 -1
- package/dist/assets/{index-BAvBoYZf.js → index-Cbdkr0wH.js} +1 -1
- package/dist/assets/{index-B0pL7l-o.js → index-CiIX-HNp.js} +2 -2
- package/dist/assets/{index-BMXhbckP.js → index-CndCNiXH.js} +36 -36
- package/dist/assets/{index-CqRJU2Wz.js → index-CpDPXgfj.js} +1 -1
- package/dist/assets/{index-DfDp2UkB.js → index-CpRoN1v3.js} +9 -9
- package/dist/assets/{index-HNO5BP09.js → index-CpezWuja.js} +1 -1
- package/dist/assets/{index-DDo-FAUp.js → index-D4-1sQAl.js} +1 -1
- package/dist/assets/{index-BGiju4eo.js → index-DExySHId.js} +1 -1
- package/dist/assets/{index-8axptow7.js → index-DGikbjUL.js} +1 -1
- package/dist/assets/{index-DVwyJ4JG.js → index-DT3F-KxU.js} +1 -1
- package/dist/assets/{index-95rGb30b.js → index-DWu1iSJu.js} +1 -1
- package/dist/assets/{index-B9etyM0e.js → index-DhYO7LNp.js} +1 -1
- package/dist/assets/{index-NFZNhczl.js → index-DijM3Brt.js} +16 -16
- package/dist/assets/{index-CdFR6v70.js → index-YVUABogE.js} +1 -1
- package/dist/assets/{index-CoOfoUvl.js → index-nv0vusfQ.js} +1 -1
- package/dist/assets/{index-CUMH9ev3.js → index-owbIHPzo.js} +1 -1
- package/dist/assets/{index-Dzca3Eph.js → index-uT6ey1Ij.js} +1 -1
- package/dist/assets/{index-D3M-eD99.js → index-uYv-1R7S.js} +1 -1
- package/dist/assets/{index.esm-BDwjJuws.js → index.esm--uzTB2FV.js} +1 -1
- package/dist/assets/{install-from-url-BHD7ooeJ.js → install-from-url-C0_MJ6GL.js} +1 -1
- package/dist/assets/{invitation-BdW0X7yz.js → invitation-DSBhIqPu.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-CqqICkbj.js → is-path-prefix-equal-nx3bAefD.js} +1 -1
- package/dist/assets/{item-DVPBqmze.js → item-ZFwK1W_m.js} +1 -1
- package/dist/assets/{javascript-R4JASNoM.js → javascript-QDfkina6.js} +1 -1
- package/dist/assets/{jsonMode-Dnd3iDrj.js → jsonMode-CByhSCCJ.js} +1 -1
- package/dist/assets/{liquid-DS_tFa90.js → liquid-BLsruGsx.js} +1 -1
- package/dist/assets/{list-header-DIo8-J88.js → list-header-C17aMDSV.js} +1 -1
- package/dist/assets/{lock.svg-CYcx9CJE.js → lock.svg-Ce14O-HS.js} +1 -1
- package/dist/assets/{log-DxBmpu0q.js → log-BYBaL_HU.js} +1 -1
- package/dist/assets/{lottie-react.esm-B1QMlD6I.js → lottie-react.esm-BT7Tc0ny.js} +1 -1
- package/dist/assets/{mdx-BmkQn3Gr.js → mdx-DGszQu-n.js} +1 -1
- package/dist/assets/{memory-NNIOAp-5.js → memory-DEYeLtlR.js} +1 -1
- package/dist/assets/{metric-B3PRczUq.js → metric-CcZM7hMw.js} +1 -1
- package/dist/assets/omit-0SEPYCGW.js +1 -0
- package/dist/assets/{overview-UGi51Hmm.js → overview-DNJ7u_wX.js} +1 -1
- package/dist/assets/{permission-DDKds_VS.js → permission-B57fakhN.js} +1 -1
- package/dist/assets/{preference-C6jdAtaj.js → preference-BdUFP7FH.js} +3 -3
- package/dist/assets/{python-CAc1dG-m.js → python-DwNaTwnF.js} +1 -1
- package/dist/assets/{raf-schd.esm-DtLayBIf.js → raf-schd.esm-CnTVXaU3.js} +1 -1
- package/dist/assets/{razor-ac-meNWY.js → razor-CYG0tniA.js} +1 -1
- package/dist/assets/{rotate-session-key-DXCF4wZ3.js → rotate-session-key-rywGtiKG.js} +1 -1
- package/dist/assets/{runtime-4wraYeNg.js → runtime-Br1BXdVa.js} +1 -1
- package/dist/assets/schema-BKOGdXcY.js +1 -0
- package/dist/assets/sdk-Ml4VOZ8I.js +1 -0
- package/dist/assets/{service-BmS-Hfnk.js → service-JGRCidBc.js} +1 -1
- package/dist/assets/{shorten-label-DYIwy50H.js → shorten-label-DNQydA43.js} +1 -1
- package/dist/assets/{simple-select-Dl66gaGg.js → simple-select-DTSEgkTK.js} +1 -1
- package/dist/assets/{spaces-CIbaLYiX.js → spaces-BCtuyMgR.js} +1 -1
- package/dist/assets/{status-BLdIB43U.js → status-CfOHQcWj.js} +1 -1
- package/dist/assets/{status-FhheVLzV.js → status-ClxmfwnA.js} +1 -1
- package/dist/assets/{switch-control-DMPIVGLz.js → switch-control-_mPRn1TT.js} +1 -1
- package/dist/assets/{table-icons-CKVRCGfs.js → table-icons-BCjGfZ_O.js} +1 -1
- package/dist/assets/{team-BH09WBcn.js → team-DJ1sxIWJ.js} +1 -1
- package/dist/assets/{toLower-D2IQg44t.js → toLower-BSV3IbDQ.js} +1 -1
- package/dist/assets/toUpper-P9za5QoT.js +1 -0
- package/dist/assets/{traffic-Rb_HJzxE.js → traffic-CKmj2zi9.js} +1 -1
- package/dist/assets/{tsMode-C6_gO0t8.js → tsMode-DT1APwIi.js} +1 -1
- package/dist/assets/{typescript-C8KE2NUj.js → typescript-esvOVxsa.js} +1 -1
- package/dist/assets/{url-evaluation-BSVN9Sr-.js → url-evaluation-DNJ48_wb.js} +1 -1
- package/dist/assets/{url-join-7gtYpqME.js → url-join-CDhrsaDR.js} +1 -1
- package/dist/assets/{use-mobile-CHNtQz3M.js → use-mobile-BlNK1r7t.js} +1 -1
- package/dist/assets/{use-mobile-Cvb4FhMO.js → use-mobile-Do94upEI.js} +1 -1
- package/dist/assets/{useAsync-BJp2j1-A.js → useAsync-BJIXRppj.js} +1 -1
- package/dist/assets/{useAsyncRetry-Zp4PKIr6.js → useAsyncRetry-D8_fwb_i.js} +1 -1
- package/dist/assets/{useLocalStorage-DQlL9Uk_.js → useLocalStorage-BT1idF5p.js} +1 -1
- package/dist/assets/{useThemeProps-CR5EdUim.js → useThemeProps-Cjy804xx.js} +1 -1
- package/dist/assets/{util-TQDWHiT7.js → util-BuBDzST7.js} +1 -1
- package/dist/assets/{wait-container-DI1fYqjh.js → wait-container-C3xVNo3H.js} +1 -1
- package/dist/assets/{without-wallet-CYR1YjcE.js → without-wallet-CSLsp-R3.js} +1 -1
- package/dist/assets/wrap-locale-BnQ35YJ5.js +1 -0
- package/dist/assets/{xml-CarJoMuA.js → xml-XqwsWxhl.js} +1 -1
- package/dist/assets/{yaml-cKOyFvAs.js → yaml-CCl6p8Pa.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-DUiaaUDs.js +0 -1
- package/dist/assets/api-QrlC06mC.js +0 -1
- package/dist/assets/cloneDeep-B-GM3ClR.js +0 -1
- package/dist/assets/config-navigation-zi1EpHXk.js +0 -457
- package/dist/assets/emotion-cache.browser.esm-BtAWOyO4.js +0 -1
- package/dist/assets/engine-DNd4CfoF.js +0 -1
- package/dist/assets/getValidReactChildren-Duobzte7.js +0 -1
- package/dist/assets/index-Dj8a3cuS.js +0 -1
- package/dist/assets/omit-ewJIh-hW.js +0 -1
- package/dist/assets/schema-C2x1Agyu.js +0 -1
- package/dist/assets/sdk-DjOw_oab.js +0 -1
- package/dist/assets/toUpper-DhyOAo1_.js +0 -1
- package/dist/assets/wrap-locale-CtR1iX6O.js +0 -1
|
@@ -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-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(`
|
|
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,iT 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,iU as X,h_ as Z,iV 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-DijM3Brt.js";import{T as ut}from"./html-title-DCtKzGAT.js";import{u as U}from"./blocklet-BmfFK15q.js";import{u as mt}from"./use-mobile-Do94upEI.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-CIL-wYnq.js";import"./index-BBX_ii_N.js";import"./index-BojVbZw0.js";import"./api-D8P27G7r.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-BCtuyMgR.js";import{v as zt}from"./index-owbIHPzo.js";import{E as vt}from"./index-uT6ey1Ij.js";import{H as Pt}from"./HelpOutline-OXFYzlS-.js";import{H as At}from"./index-COMjcH0c.js";import{x as Lt}from"./index-DRYJ0xIl.js";import{D as Ut}from"./DeleteOutline-Cbw_xWxX.js";import{g as ke}from"./get-safe-url-CDPasMZR.js";import{S as Ot}from"./switch-control-_mPRn1TT.js";import{L as je}from"./list-header-C17aMDSV.js";import"./OpenInNew-BIfjUAPQ.js";import"./ButtonGroup-BI0yydFN.js";import"./getValidReactChildren-BjYEIaVV.js";import"./FilterList-CZU1TLat.js";import"./CSSTransition-680AnN9b.js";import"./emotion-cache.browser.esm-Cvn7wadW.js";import"./index-Cbdkr0wH.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-Cn18gXKK.js";import"./index-CB511uzw.js";import"./TableSearch-DKi7Ktdg.js";import"./Search-D5OHIH5t.js";import"./Clear-BEIkQJ0G.js";import"./MoreVert-C4JPmAZs.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,4 +1,4 @@
|
|
|
1
|
-
import{aF as ce,j as e,hh as Zr,hi as Vr,bR as Wr,r as q,s as ye,K as A,f5 as Tt,t as H,eO as bt,a4 as le,C as Ee,bj as Xt,dL as Ur,o as T,hj as Kr,b3 as Qt,cB as Jr,cU as Gr,dq as Yr,T as Y,dH as ut,bo as ne,bF as jt,p as ue,hk as Xr,bG as _t,b as K,bh as ee,bB as re,H as F,aW as ie,V as ae,n as er,q as Qr,w as tr,ad as es,i as rr,ge as ts,hl as rs,au as ss,aV as G,U as Te,$ as Se,D as ns,X as is,v as X,Y as ht,hm as as,hn as os,eA as ls,eC as cs,F as _e,aH as J,g3 as ds,d0 as Et,W as us,fn as sr,O as te,aR as It,ho as hs,hp as fs,be as ms,gk as Ie,f9 as be,aP as ge,aT as E,hq as Ye,hr as ft,P as W,z as ps,y as wt,bE as xe,aD as se,hs as Me,a2 as gs,ht as Xe,c8 as Re,eD as xs,hu as ys,dI as he,f as Oe,bA as mt,M as vs,cI as nr,bt as bs,hv as js,ba as _s,L as ws,cw as Be,aJ as We,hw as ks,R as Ss,bq as Cs,ag as Dt,a3 as ir,bk as Ue,hx as ar,b7 as Rs,gD as ke,fa as or,c_ as lr,B as Os,b6 as Lt,fc as As,fh as $s,G as Qe,J as Ps,by as Ts}from"./index-NFZNhczl.js";import{S as Es}from"./actions-CsKJtA25.js";import{N as qt}from"./ChevronRight-DAyMYZEW.js";import{T as He}from"./html-title-BVs9_wlq.js";import{w as De,P as Is}from"./permission-DDKds_VS.js";import{u as kt}from"./index-Dj8a3cuS.js";import{F as Ds,R as Ls,S as M,a as pt,s as qs,L as we,A as Ms,b as zs,c as Bs,d as Hs,B as Ns}from"./preference-C6jdAtaj.js";import{D as Fs}from"./Done-DmttcwQI.js";import{A as Zs,a as Mt}from"./Autocomplete-Bgl3dGJJ.js";import{C as Vs,R as Ws,S as Us,P as Ks}from"./rotate-session-key-DXCF4wZ3.js";import{u as oe}from"./blocklet-B_b8vapJ.js";import{C as cr}from"./click-to-copy-BuexyggU.js";import{u as Ke}from"./team-BH09WBcn.js";import{v as dr}from"./index-CUMH9ev3.js";import{g as Js}from"./chain-DQuRoRbo.js";import{V as Gs,d as Ys}from"./status-FhheVLzV.js";import{a as de,S as Ne,u as Xs}from"./switch-control-DMPIVGLz.js";import{u as ve,C as z,b as zt}from"./index.esm-BDwjJuws.js";import{y as Qs}from"./index-T7DaPPrZ.js";import{I as en,J as tn,K as rn,L as sn}from"./index-BAvBoYZf.js";import{D as Bt}from"./Delete-BtTxVz6z.js";import{A as Ht}from"./Add-Des5za4N.js";import{H as Je}from"./index-CWm3LFCr.js";import{u as ur}from"./use-mobile-Cvb4FhMO.js";import{S as et}from"./simple-select-Dl66gaGg.js";import{C as nn}from"./CardContent-CtTlBjH7.js";import{R as hr,a as fr}from"./url-evaluation-BSVN9Sr-.js";import"./useLocalStorage-DQlL9Uk_.js";import"./MoreVert-DOn_691b.js";import"./DeleteOutline-DDdlNULq.js";import"./get-safe-url-M4uziR0J.js";import"./ButtonGroup-Z9547yzG.js";import"./getValidReactChildren-Duobzte7.js";import"./omit-ewJIh-hW.js";import"./index-95rGb30b.js";import"./edit.svg-J7XY7Hsh.js";import"./ArrowDropDown-DUiaaUDs.js";import"./index-gYQgg1uX.js";import"./iframe-BRekcQQF.js";import"./ListSubheader-BIN8GsVb.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-C83OSg_z.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-DNfECclT.js";import"./CSSTransition-B5wQ0yUS.js";import"./emotion-cache.browser.esm-BtAWOyO4.js";import"./depsEqual-DIlm5Prx.js";import"./TableSearch-BSa4dOKp.js";import"./Search-DXzn9Lp-.js";import"./Clear-CzjQBpCS.js";const mr=ce([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),an=ce([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),on=ce(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),ln=ce(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),cn=ce(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),dn=ce(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),un=ce(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),hn=ce(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),gt=ce(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),fn=ce([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),mn=ce(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),pn=ce(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),pr=ce(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),gn=ce(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),xn=ce(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var yn=Array.prototype,Nt=yn.splice;function vn(v,R,C,O){var _=Vr,j=-1,p=R.length,i=v;for(v===R&&(R=Zr(R));++j<p;)for(var m=0,f=R[j],u=f;(m=_(i,u,m))>-1;)i!==v&&Nt.call(i,m,1),Nt.call(v,m,1);return v}function bn(v,R){return v&&v.length&&R&&R.length?vn(v,R):v}var jn=Wr(bn);const _n={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function gr({label:v="",disabled:R=!1,required:C=!1,initialValue:O="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:u="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:s=["name"],noEmpty:r=!1,...c}){const[n,a]=q.useState(!1),[h,x]=q.useState(!1),[g,S]=q.useState(""),k=q.useRef(null),[d,y]=q.useState(O),[b,w]=q.useState(d),$=q.useMemo(()=>{if(!m)return{};const N={};return m.forEach(D=>{N[D.code]=D}),N},[m]),P=()=>{if(!m)return[];if(!g)return m.map(D=>D.code);const N=new RegExp(g.toLowerCase());return m.filter(D=>{for(let B=0;B<s.length;B++){const V=s[B];if(N.test(D[V]?.toLowerCase()))return!0}return!1}).map(D=>D.code)},I=async()=>{x(!0);try{await p(typeof f=="function"?f(b):b)===!1?w(d):r&&!b.length?(w(O),y(O)):(w(b),y(b))}catch{w(d)}finally{x(!1),a(!1)}},L=(N,D)=>{if(!Array.isArray(D)){w([]),_([]);return}const B=D.filter(V=>$[V]);if(!B.length){w([]),_([]);return}w(B),_(B)},Z=N=>{N.stopPropagation(),a(!0),setTimeout(()=>{if(k.current){const D=k.current.querySelector("input");D&&D.focus()}},500)},U=n?e.jsx(Zs,{ref:k,options:m,value:b,onChange:L,inputValue:g,onInputChange:(N,D)=>{S(D)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:N=>$[N]?.name,renderInput:N=>e.jsx(H,{...N,label:"",placeholder:t}),renderOption:(N,D)=>{const B=b.indexOf(D)!==-1;return q.createElement(wn,{component:"li",...N,key:D},l($[D]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(D,$[D])||$[D]?.name}),e.jsx(A,{component:Tt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:kn}}):e.jsx(A,{className:"form-item-input slot",onClick:Z,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(N=>m.some(D=>D.code===N)).map(N=>e.jsx(bt,{label:m.find(D=>D.code===N).name,style:{marginRight:8},size:"small"},N))});return e.jsx(Ds,{className:"form",style:j,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[v,C&&e.jsx(Ls,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:U}),n?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(le,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:R||h,size:"large",children:h?e.jsx(Ee,{size:24}):e.jsx(Fs,{})}),e.jsx(le,{"data-cy":"schema-form-item-cancel",onClick:()=>{w(d),a(!1)},disabled:R||h,size:"large",children:e.jsx(Tt,{})})]})}):null]}),n&&u&&e.jsx(Xt,{children:u})]})})}gr.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const wn=ye.div`
|
|
1
|
+
import{aF as ce,j as e,hh as Zr,hi as Vr,bR as Wr,r as q,s as ye,K as A,f5 as Tt,t as H,eO as bt,a4 as le,C as Ee,bj as Xt,dL as Ur,o as T,hj as Kr,b3 as Qt,cB as Jr,cU as Gr,dq as Yr,T as Y,dH as ut,bo as ne,bF as jt,p as ue,hk as Xr,bG as _t,b as K,bh as ee,bB as re,H as F,aW as ie,V as ae,n as er,q as Qr,w as tr,ad as es,i as rr,ge as ts,hl as rs,au as ss,aV as G,U as Te,$ as Se,D as ns,X as is,v as X,Y as ht,hm as as,hn as os,eA as ls,eC as cs,F as _e,aH as J,g3 as ds,d0 as Et,W as us,fn as sr,O as te,aR as It,ho as hs,hp as fs,be as ms,gk as Ie,f9 as be,aP as ge,aT as E,hq as Ye,hr as ft,P as W,z as ps,y as wt,bE as xe,aD as se,hs as Me,a2 as gs,ht as Xe,c8 as Re,eD as xs,hu as ys,dI as he,f as Oe,bA as mt,M as vs,cI as nr,bt as bs,hv as js,ba as _s,L as ws,cw as Be,aJ as We,hw as ks,R as Ss,bq as Cs,ag as Dt,a3 as ir,bk as Ue,hx as ar,b7 as Rs,gD as ke,fa as or,c_ as lr,B as Os,b6 as Lt,fc as As,fh as $s,G as Qe,J as Ps,by as Ts}from"./index-DijM3Brt.js";import{S as Es}from"./actions-BUAriJOB.js";import{N as qt}from"./ChevronRight-C92WXl3G.js";import{T as He}from"./html-title-DCtKzGAT.js";import{w as De,P as Is}from"./permission-B57fakhN.js";import{u as kt}from"./index-BvSt3OAt.js";import{F as Ds,R as Ls,S as M,a as pt,s as qs,L as we,A as Ms,b as zs,c as Bs,d as Hs,B as Ns}from"./preference-BdUFP7FH.js";import{D as Fs}from"./Done-BmIqndwD.js";import{A as Zs,a as Mt}from"./Autocomplete-C8NhTbRF.js";import{C as Vs,R as Ws,S as Us,P as Ks}from"./rotate-session-key-rywGtiKG.js";import{u as oe}from"./blocklet-BmfFK15q.js";import{C as cr}from"./click-to-copy-B1Ez8jE-.js";import{u as Ke}from"./team-DJ1sxIWJ.js";import{v as dr}from"./index-owbIHPzo.js";import{g as Js}from"./chain-B7t_6AFd.js";import{V as Gs,d as Ys}from"./status-ClxmfwnA.js";import{a as de,S as Ne,u as Xs}from"./switch-control-_mPRn1TT.js";import{u as ve,C as z,b as zt}from"./index.esm--uzTB2FV.js";import{y as Qs}from"./index-CB511uzw.js";import{I as en,J as tn,K as rn,L as sn}from"./index-Cbdkr0wH.js";import{D as Bt}from"./Delete-etfqa5ht.js";import{A as Ht}from"./Add-17-jFd7z.js";import{H as Je}from"./index-COMjcH0c.js";import{u as ur}from"./use-mobile-Do94upEI.js";import{S as et}from"./simple-select-DTSEgkTK.js";import{C as nn}from"./CardContent-Be8HVTG5.js";import{R as hr,a as fr}from"./url-evaluation-DNJ48_wb.js";import"./useLocalStorage-BT1idF5p.js";import"./MoreVert-C4JPmAZs.js";import"./DeleteOutline-Cbw_xWxX.js";import"./get-safe-url-CDPasMZR.js";import"./ButtonGroup-BI0yydFN.js";import"./getValidReactChildren-BjYEIaVV.js";import"./omit-0SEPYCGW.js";import"./index-DWu1iSJu.js";import"./edit.svg-17FJ505g.js";import"./ArrowDropDown-JQ3Rq4ea.js";import"./index-C7eGFDSn.js";import"./iframe-Db5U2ou8.js";import"./ListSubheader-4ZgX-yqr.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-ClnZlnrx.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-CZU1TLat.js";import"./CSSTransition-680AnN9b.js";import"./emotion-cache.browser.esm-Cvn7wadW.js";import"./depsEqual-Cn18gXKK.js";import"./TableSearch-DKi7Ktdg.js";import"./Search-D5OHIH5t.js";import"./Clear-BEIkQJ0G.js";const mr=ce([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),an=ce([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),on=ce(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),ln=ce(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),cn=ce(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),dn=ce(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),un=ce(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),hn=ce(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),gt=ce(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),fn=ce([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),mn=ce(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),pn=ce(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),pr=ce(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),gn=ce(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),xn=ce(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var yn=Array.prototype,Nt=yn.splice;function vn(v,R,C,O){var _=Vr,j=-1,p=R.length,i=v;for(v===R&&(R=Zr(R));++j<p;)for(var m=0,f=R[j],u=f;(m=_(i,u,m))>-1;)i!==v&&Nt.call(i,m,1),Nt.call(v,m,1);return v}function bn(v,R){return v&&v.length&&R&&R.length?vn(v,R):v}var jn=Wr(bn);const _n={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function gr({label:v="",disabled:R=!1,required:C=!1,initialValue:O="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:u="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:s=["name"],noEmpty:r=!1,...c}){const[n,a]=q.useState(!1),[h,x]=q.useState(!1),[g,S]=q.useState(""),k=q.useRef(null),[d,y]=q.useState(O),[b,w]=q.useState(d),$=q.useMemo(()=>{if(!m)return{};const N={};return m.forEach(D=>{N[D.code]=D}),N},[m]),P=()=>{if(!m)return[];if(!g)return m.map(D=>D.code);const N=new RegExp(g.toLowerCase());return m.filter(D=>{for(let B=0;B<s.length;B++){const V=s[B];if(N.test(D[V]?.toLowerCase()))return!0}return!1}).map(D=>D.code)},I=async()=>{x(!0);try{await p(typeof f=="function"?f(b):b)===!1?w(d):r&&!b.length?(w(O),y(O)):(w(b),y(b))}catch{w(d)}finally{x(!1),a(!1)}},L=(N,D)=>{if(!Array.isArray(D)){w([]),_([]);return}const B=D.filter(V=>$[V]);if(!B.length){w([]),_([]);return}w(B),_(B)},Z=N=>{N.stopPropagation(),a(!0),setTimeout(()=>{if(k.current){const D=k.current.querySelector("input");D&&D.focus()}},500)},U=n?e.jsx(Zs,{ref:k,options:m,value:b,onChange:L,inputValue:g,onInputChange:(N,D)=>{S(D)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:N=>$[N]?.name,renderInput:N=>e.jsx(H,{...N,label:"",placeholder:t}),renderOption:(N,D)=>{const B=b.indexOf(D)!==-1;return q.createElement(wn,{component:"li",...N,key:D},l($[D]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(D,$[D])||$[D]?.name}),e.jsx(A,{component:Tt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:kn}}):e.jsx(A,{className:"form-item-input slot",onClick:Z,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(N=>m.some(D=>D.code===N)).map(N=>e.jsx(bt,{label:m.find(D=>D.code===N).name,style:{marginRight:8},size:"small"},N))});return e.jsx(Ds,{className:"form",style:j,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[v,C&&e.jsx(Ls,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:U}),n?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(le,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:R||h,size:"large",children:h?e.jsx(Ee,{size:24}):e.jsx(Fs,{})}),e.jsx(le,{"data-cy":"schema-form-item-cancel",onClick:()=>{w(d),a(!1)},disabled:R||h,size:"large",children:e.jsx(Tt,{})})]})}):null]}),n&&u&&e.jsx(Xt,{children:u})]})})}gr.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const wn=ye.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{dI as M,r as o,R as d,j as e,bB as c,b6 as C,dJ as I,bz as z,dK as
|
|
1
|
+
import{dI as M,r as o,R as d,j as e,bB as c,b6 as C,dJ as I,bz as z,dK as A,bs as u,dL as E}from"./index-DijM3Brt.js";import{B as L}from"./ButtonGroup-BI0yydFN.js";function P({...r}){const{size:p="medium",color:i="primary",menu:a=[],children:s=null,variant:m="contained",onClick:x=M,menuButtonProps:f={},...h}=r,[j,l]=o.useState(!1),n=o.useRef(null),g=Array.isArray(a)?a.map((t,B)=>o.isValidElement(t)?t:o.createElement(d,{...t,key:B})):a,y=()=>{l(t=>!t)},b=t=>{n.current&&n.current.contains(t.target)||l(!1)},k=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:m,size:p,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:y,color:i,...f,"aria-label":"more functions",children:e.jsx(C,{})})]}),e.jsx(w,{open:j,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(z,{onClickAway:b,children:e.jsx(A,{onClick:k,children:g})})})})]})}P.Item=d;const v=u(L)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
5
5
|
padding-right: 0;
|
|
6
6
|
}
|
|
7
|
-
`,w=u(
|
|
7
|
+
`,w=u(E)`
|
|
8
8
|
z-index: ${r=>r.theme.zIndex.tooltip};
|
|
9
9
|
.MuiList-root {
|
|
10
10
|
padding: 4px 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,be as getDefaultExportFromCjs,E as useMediaQuery,s as styled,dq as Skeleton,cU as M$1,_ as CheckIcon,O as Tooltip,bB as Button,T as Typography,K as Box,C as CircularProgress,f as useTheme,dD as isObject,f0 as mergeThemeOptions,f1 as StyledEngineProvider,f2 as ThemeProvider,f3 as ThemeProvider$1,f4 as s,Z as o$1,b9 as styled$1,f5 as CloseIcon,cJ as Buffer,bf as U,bK as __vitePreload,dI as noop,bs as l$2}from"./index-
|
|
1
|
+
import{aF as createSvgIcon,j as jsxRuntimeExports,r as reactExports$1,o,be as getDefaultExportFromCjs,E as useMediaQuery,s as styled,dq as Skeleton,cU as M$1,_ as CheckIcon,O as Tooltip,bB as Button,T as Typography,K as Box,C as CircularProgress,f as useTheme,dD as isObject,f0 as mergeThemeOptions,f1 as StyledEngineProvider,f2 as ThemeProvider,f3 as ThemeProvider$1,f4 as s,Z as o$1,b9 as styled$1,f5 as CloseIcon,cJ as Buffer,bf as U,bK as __vitePreload,dI as noop,bs as l$2}from"./index-DijM3Brt.js";import{j as joinUrl}from"./url-join-CDhrsaDR.js";const l$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"})),d$2=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")]),k$2=reactExports$1.createContext(),{Provider:w$3}=k$2,d$1=(C,F,V=window.location.pathname.replace(/\/$/,"/"))=>C?F?C===V:new RegExp(C).test(V):!1;function P({children:C,steps:F,mode:V="history"}){const[D,B]=reactExports$1.useState("");!D&&F.length&&B(F[0].key);const O=F.map(X=>X.children?[{key:X.key,hasChild:!0},X.children.map(at=>({parentKey:X.key,key:at.key}))]:{key:X.key}).flat(1/0),j=O.filter(X=>!X.hasChild),H=X=>{let at;const rt=O.findIndex(ft=>ft.key===D?(at=ft.parentKey,!0):!1);if(at===X)return"current";const tt=O.findIndex(ft=>ft.key===X);if(tt!==-1){if(tt===rt)return"current";if(tt<rt)return"before"}return"after"};function G(X){B(X)}function K(X){if(typeof X=="function"){const at=X(j.findIndex(rt=>rt.key===D));B(j[at].key)}else B(j[X].key)}const it=j.findIndex(X=>X.key===D);reactExports$1.useEffect(()=>{if(V==="history"){let X="";F.some(at=>at.children&&at.children.length?at.children.some(rt=>d$1(rt.path,rt.exact)?(X=rt.key,!0):!1):d$1(at.path,at.exact)?(X=at.key,!0):!1),X&&B(X)}return()=>{}},[F,V]);const ot={steps:F,totalStepsCount:j.length,getStepStatus:H,setActiveStepByKey:G,setActiveStepByIndex:K,activeStep:it,canBackToStep:X=>V==="memory"&&it!==0&&X<it};return jsxRuntimeExports.jsx(w$3,{value:ot,children:C})}function T$1(){return reactExports$1.use(k$2)}P.propTypes={children:o.any.isRequired,steps:o.array.isRequired,mode:o.string};var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var C=Object.prototype.hasOwnProperty,F=Object.prototype.toString;function V(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(D.toString==F)switch(D.toString()){case"[object File]":case"[object Map]":case"[object Set]":return D.size===0;case"[object Object]":{for(var B in D)if(C.call(D,B))return!1;return!0}}return!1}return lib=V,lib}var libExports=requireLib();const k$1=getDefaultExportFromCjs(libExports),S=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,t$1={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},a$1=C=>t$1[C]?t$1[C]:t$1.en,i=C=>C==="zh"?"启动":"Launching",g$2=C=>C?.title||C?.name||"";function T({blockletMeta:C={},subTitle:F="",logoUrl:V="",locale:D="",navLogo:B="",loading:O=!1}){const j=useMediaQuery(ot=>ot.breakpoints.down("md")),H=j?18:48,G=reactExports$1.useRef(null),[K,it]=reactExports$1.useState("");return reactExports$1.useEffect(()=>{G.current&&G.current.offsetHeight>34&&(K===""?it("middle"):K==="middle"&&it("small"))},[K]),jsxRuntimeExports.jsxs(R,{className:K==="small"?"center-mode":"",children:[j?jsxRuntimeExports.jsx("div",{className:"app-icon",children:B}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[O&&jsxRuntimeExports.jsx(I,{blockletSize:H,isMobile:j}),!O&&jsxRuntimeExports.jsx(u$1,{blockletSize:H,logoUrl:V})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[j&&F&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:F}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!j&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:F||i(D)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${K==="middle"||K==="small"?"middle-size":""}`,ref:G,children:jsxRuntimeExports.jsx(w$2,{logoUrl:V,isMobile:j,blockletMeta:C,blockletSize:H,loading:O})})]})]})]})}T.propTypes={blockletMeta:o.object,subTitle:o.any,logoUrl:o.string,locale:o.string,navLogo:o.any,loading:o.bool};function I({blockletSize:C,isMobile:F}){return F?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:C,height:C})}function u$1({logoUrl:C,blockletSize:F}){return jsxRuntimeExports.jsx(M$1,{width:F,height:F,src:C,alt:"blocklet icon",fallback:S,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${C}`)}function w$2({isMobile:C,logoUrl:F,blockletMeta:V={},blockletSize:D,loading:B}){const O=g$2(V);return B?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):k$1(V)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):C?jsxRuntimeExports.jsxs(L$1,{children:[jsxRuntimeExports.jsx(u$1,{blockletSize:D,logoUrl:F}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:g$2(V)})]}):jsxRuntimeExports.jsx(E,{className:"app-link",target:"_blank",href:joinUrl(V?.registryUrl||"",`/blocklets/${V?.did}`),title:O,children:O})}const L$1=styled.div`
|
|
2
2
|
.ellipsis-title {
|
|
3
3
|
flex: 1;
|
|
4
4
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eH as D}from"./index-NFZNhczl.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){j(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):j(w[0][2],u)}function z(u){I("next",u)}function G(u){I("throw",u)}function j(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:j=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,B=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(B),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});B++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function F(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),F()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?F():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,B=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||B>=z||!j(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const F=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(F);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
|
|
1
|
+
import{eH as D}from"./index-DijM3Brt.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){j(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):j(w[0][2],u)}function z(u){I("next",u)}function G(u){I("throw",u)}function j(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:j=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,B=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(B),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});B++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function F(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),F()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?F():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,B=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||B>=z||!j(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const F=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(F);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as d,cx as z,c6 as U,cy as F,cz as X,aF as B,j as s,s as E,o as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DGikbjUL.js","./index-DijM3Brt.js","./index-DGkT7afN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as d,cx as z,c6 as U,cy as F,cz as X,aF as B,j as s,s as E,o as j,E as H,aP as V,p as G,cA as K,w as D,K as p,cB as O,W as J,v as L,b8 as Q,T as I,cC as M,L as q,cD as Y,bK as Z,cE as ee,cF as te,u as se,x as ae,bC as oe,ar as ne,af as re}from"./index-DijM3Brt.js";import{V as ie}from"./ViewList-YgHYVpVp.js";import{D as ce}from"./Done-BmIqndwD.js";import{N as le}from"./index-CNDdV4IL.js";import{w as pe}from"./wrap-locale-BnQ35YJ5.js";import{g as de}from"./get-safe-url-CDPasMZR.js";import{S as ue,a as me,b as fe}from"./Stepper-k2fg0C07.js";import"./emotion-cache.browser.esm-Cvn7wadW.js";import"./index-CZSoNWI1.js";var T=function(e){if(!e)return 0;var r=X(e).valueOf()-Date.now();return r<0?0:r},he=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},xe=function(e){e===void 0&&(e={});var r=e||{},l=r.leftTime,i=r.targetDate,u=r.interval,w=u===void 0?1e3:u,x=r.onEnd,g=d.useMemo(function(){return z(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in e?g:i,m=U(d.useState(function(){return T(a)}),2),h=m[0],f=m[1],o=F(x);d.useEffect(function(){if(!a){f(0);return}f(T(a));var v=setInterval(function(){var n,c=T(a);f(c),c===0&&(clearInterval(v),(n=o.current)===null||n===void 0||n.call(o))},w);return function(){return clearInterval(v)}},[a,w]);var k=d.useMemo(function(){return he(h)},[h]);return[h,k]};const ge=B(s.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}));function _({list:e=[],width:r=300,height:l=400,cardSpace:i=40,onSelect:u=()=>{},defaultIndex:w=0}){const[x,g]=d.useState(0),[a,m]=d.useState(0),h=d.useRef(null),f=n=>{if(n<0||n>e.length-1)return;g(n);const c=h.current.clientWidth;m(n*(r+i)-(c-r)/2+i*.5),u(n)};d.useEffect(()=>{f(w);const n=c=>c.preventDefault();h.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const k=n=>{o=n.touches[0].clientX},v=n=>{const c=n.changedTouches[0],y=o-c.clientX;Math.abs(y)>60&&(y>0?f(x+1):f(x-1))};return s.jsx(ve,{ref:h,onTouchStart:k,onTouchEnd:v,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:e.map((n,c)=>s.jsx("div",{className:`card-item ${c===x?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>f(c),children:n.display?s.jsx("div",{className:"card-content",children:s.jsx(le,{data:n.display,style:{width:"100%",height:"100%"}})}):s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ve=E.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as d,cx as z,c6 as U,cy as F,cz as X,aF as B,j as s,s as E,o as k,E as
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;_.propTypes={list:
|
|
36
|
+
`;_.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};function be({icon:e,active:r,completed:l}){const i={1:s.jsx(ie,{className:"step-icon"}),2:s.jsx(ge,{className:"step-icon"}),3:s.jsx(ce,{className:"step-icon"})},u=["step-icon-w"];return r&&u.push("step-icon-w--active"),l&&u.push("step-icon-w--completed"),s.jsx("div",{className:u.join(" "),children:i[String(e)]})}function we({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:u,teamDid:w}){const{api:x}=d.useContext(e),g=H(t=>t.breakpoints.down("sm")),a=V({user:null,passport:null,success:!1,activeStep:0}),m=d.useRef({sessionToken:"",refreshToken:"",csrfToken:""}),{setPassportId:h,clearPassportId:f}=Y(),{t:o,locale:k}=d.useContext(G),{wallet:v}=K(),[n,c]=d.useState(0),{searchParams:y}=new URL(window.location.href),P=()=>{a.activeStep++},$=t=>{a.user=t.user},W=()=>{P()},A=(t,b)=>{t?.passportId&&h(t.passportId),t?.sessionToken&&(m.current.sessionToken=b(t.sessionToken)),t?.refreshToken&&(m.current.refreshToken=b(t.refreshToken)),t?.csrfToken&&(m.current.csrfToken=b(t.csrfToken)),a.success=!0,P()},S=async()=>{if(v&&M()){Z(()=>import("./index-DGikbjUL.js").then(b=>b.i),__vite__mapDeps([0,1,2]),import.meta.url).then(b=>{b.call("arcClosePage")});return}ee(u)&&u({sessionToken:m.current.sessionToken,refreshToken:m.current.refreshToken,csrfToken:m.current.csrfToken});const t=y.get("redirect");if(t){window.location.replace(de(t));return}f(),window.location.replace("/")},R=t=>{a.passport=t.target.value},[C]=xe({leftTime:n,onEnd:()=>{S()}}),N=[{label:o("lostPassport.recoverPassport"),content:()=>{if(!a.user){const t=y.get("scope")||"passport";return s.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:$,locale:k,messages:{title:o("lostPassport.recoverDialog.title"),scan:o("lostPassport.recoverDialog.scan"),confirm:o("lostPassport.recoverDialog.confirm"),success:o("lostPassport.recoverDialog.success")},extraParams:{scope:t}})}return s.jsxs(p,{className:"select-passport",children:[s.jsxs(p,{className:"user-info",sx:{my:1,display:"flex",alignItems:"center"},children:[s.jsx(O,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(p,{children:[s.jsx(p,{className:"name",children:a.user.fullName}),s.jsx(p,{className:"did",sx:{mt:1},children:s.jsx(J,{responsive:!g,compact:g,did:a.user.did})})]})]}),s.jsx(p,{children:s.jsx(_,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(t=>({src:l({scope:t.scope,role:t.role,title:t.scope==="kyc"?t.name:t.title,issuer:t.issuer.name,issuerDid:t.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto",extra:t.scope==="kyc"?{key:"Email",value:t.name}:void 0}),name:t.title,id:t.id,display:t.display})),onSelect:t=>R({target:{value:a.user.passportTypes[t].id}}),defaultIndex:0})}),s.jsx(p,{sx:{textAlign:"center"},children:s.jsx(L,{variant:"contained",color:"primary",onClick:()=>W(),disabled:!a.passport,children:o("common.next")})})]})}},{label:o("lostPassport.receivePassport"),content:()=>{const t={receiverDid:a.user.did,passportId:a.passport,teamDid:w||window?.blocklet?.did};return s.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:A,forceConnected:!1,locale:k,messages:{title:`${o("lostPassport.receiveDialog.title")}`,scan:o("lostPassport.receiveDialog.scan"),confirm:o("lostPassport.receiveDialog.confirm"),success:o("lostPassport.receiveDialog.success")},extraParams:t})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),s.jsxs(p,{sx:{textAlign:"center"},children:[s.jsx(p,{sx:{mb:3,color:"success.main"},children:s.jsx(Q,{style:{fontSize:60}})}),s.jsx(I,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),s.jsx(I,{component:"p",variant:"body2",color:"gray",children:v&&M()?o("issuePassport.dialog.autoClose",{seconds:Math.round(C/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(C/1e3)})}),s.jsx(L,{style:{marginTop:40},variant:"contained",color:"primary",onClick:S,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(ke,{children:s.jsxs(p,{className:"stepper",children:[s.jsx(ue,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:N.map(({label:t})=>s.jsx(me,{children:s.jsx(fe,{slots:{stepIcon:be},children:t})},t))}),s.jsx(p,{className:"stepper-content",children:N[a.activeStep].content()}),!a.success&&s.jsx(p,{sx:{textAlign:"center",fontSize:12},children:s.jsx(q,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:o("lostPassport.return")})})]})})}const ke=E(te)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|
|
@@ -165,4 +165,4 @@ import{r as d,cx as z,c6 as U,cy as F,cz as X,aF as B,j as s,s as E,o as k,E as
|
|
|
165
165
|
.connect {
|
|
166
166
|
background: #fafafa;
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,je=pe(we);function Me(){const{info:e}=se(),r=ae(e),l=({sessionToken:i}={})=>{i&&re(i)};return s.jsx(je,{SessionContext:ne,webWalletUrl:r,createPassportSvg:i=>oe(i,e),passportColor:"default",onLogin:l,teamDid:e.did})}export{Me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,p as n,j as t,s as r}from"./index-
|
|
1
|
+
import{r as o,p as n,j as t,s as r}from"./index-DijM3Brt.js";import{p as a}from"./index-CpezWuja.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c6 as c,r as _,aT as f,h1 as S,cW as r}from"./index-DijM3Brt.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],o=a[1],i=f(function(t){o(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,i]};export{d as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ak as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,aw as A,i as F,j as t,w as q,ax as oe,T as C,y as k,$,o as m,ay as ne,O as ae,v as _,C as N,az as ie,H as W,Y as O,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,aa as he,s as M,a7 as fe,a8 as me,aE as ge,a9 as xe}from"./index-
|
|
1
|
+
import{ak as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,aw as A,i as F,j as t,w as q,ax as oe,T as C,y as k,$,o as m,ay as ne,O as ae,v as _,C as N,az as ie,H as W,Y as O,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,aa as he,s as M,a7 as fe,a8 as me,aE as ge,a9 as xe}from"./index-DijM3Brt.js";import{u as L}from"./useLocalStorage-BT1idF5p.js";import{C as be,c as ke,e as ye,_ as Se,a as je,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-ZFwK1W_m.js";import{e as D}from"./engine-Df3lbfPA.js";import{g as U}from"./get-safe-url-CDPasMZR.js";import{P as z}from"./permission-B57fakhN.js";import{A as Re}from"./ArrowDropDown-JQ3Rq4ea.js";import{B as Le}from"./Breadcrumbs-8EmlaNJn.js";import"./index-688fVCdg.js";import"./KeyboardArrowDown-CPhWpi6G.js";import"./ChevronLeft-Bqr4v0-x.js";import"./ChevronRight-C92WXl3G.js";import"./Search-D5OHIH5t.js";import"./index-CB511uzw.js";import"./blocklet-BmfFK15q.js";import"./Autocomplete-C8NhTbRF.js";import"./ListSubheader-4ZgX-yqr.js";import"./Verified-6JELqJq_.js";import"./VerifiedUser-Bglv4i1U.js";import"./Add-17-jFd7z.js";import"./Launch-Cqfwr2jr.js";import"./Done-BmIqndwD.js";import"./DeleteOutline-Cbw_xWxX.js";import"./delete-confirm-CuK1fe0a.js";import"./click-to-copy-B1Ez8jE-.js";import"./MoreVert-C4JPmAZs.js";import"./ButtonGroup-BI0yydFN.js";import"./getValidReactChildren-BjYEIaVV.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=S(),{info:l}=j(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=S(),l=T(),{info:u}=j(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(O(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},J=()=>{i(!1),g(!1)},X=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:J,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:X,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=S(),o=j();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(je,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Y({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=S(),l=j(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(Se,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Y.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=M(ve)`
|
|
2
2
|
.ms-highlight {
|
|
3
3
|
color: ${e=>e.theme.palette.primary.main};
|
|
4
4
|
}
|
|
@@ -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-DijM3Brt.js";import{t as mt}from"./toLower-BSV3IbDQ.js";import{a as W,u as ht,W as ut,P as Ee,L as Be}from"./index-BT4EuDNg.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-C3xVNo3H.js";import{g as Z}from"./get-safe-url-CDPasMZR.js";import{u as de}from"./useLocalStorage-BT1idF5p.js";import{L as wt}from"./Launch-Cqfwr2jr.js";import{D as kt}from"./DeleteOutline-Cbw_xWxX.js";import{g as bt,i as St}from"./spaces-BCtuyMgR.js";import{I as vt}from"./MoreVert-C4JPmAZs.js";import{y as jt}from"./index-CB511uzw.js";import"./url-join-CDhrsaDR.js";import"./use-mobile-Do94upEI.js";import"./api-D8P27G7r.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 {
|