@abtnode/webapp 1.16.29-beta-db5c4ed6 → 1.16.29-beta-a076832b
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/{Add-DQn3cqMW.js → Add-BhAOgw8n.js} +1 -1
- package/dist/assets/{ArrowDropDown-DgSq2iBW.js → ArrowDropDown-BhDZI_jd.js} +1 -1
- package/dist/assets/{Autocomplete-D45bpyUt.js → Autocomplete-chf9WG4F.js} +1 -1
- package/dist/assets/{Breadcrumbs-vXPlhiXQ.js → Breadcrumbs-Un40qFmK.js} +1 -1
- package/dist/assets/{ButtonGroup-BJxZnIfi.js → ButtonGroup-BE_QoGeC.js} +1 -1
- package/dist/assets/{CheckCircle-CSrK3P5m.js → CheckCircle-B2UAY6EW.js} +1 -1
- package/dist/assets/{ChevronLeft-Cka_f59Q.js → ChevronLeft-LgQFTPg9.js} +1 -1
- package/dist/assets/{ChevronRight-BGYzd2RP.js → ChevronRight-R1AD6T8t.js} +1 -1
- package/dist/assets/{Close-CwmvmaYY.js → Close-BA4_6LGT.js} +1 -1
- package/dist/assets/{Delete-DD7mLtbV.js → Delete-BuQlLthh.js} +1 -1
- package/dist/assets/DeleteOutline-BuR7k_j3.js +1 -0
- package/dist/assets/DeleteOutline-CfWsbc1a.js +1 -0
- package/dist/assets/{Done-DwujAils.js → Done-CbG1n7TV.js} +1 -1
- package/dist/assets/{Edit-C50TQSDX.js → Edit-D2R20RFt.js} +1 -1
- package/dist/assets/{EditIcon-kalr65uP.js → EditIcon-DWIVTczi.js} +1 -1
- package/dist/assets/{FilterList-DQ4qv4dK.js → FilterList-gGx11q-p.js} +1 -1
- package/dist/assets/{Google-3BfCV8G_.js → Google-CpcA0NCN.js} +1 -1
- package/dist/assets/{Https-BmyDNa7Y.js → Https-YbDZUE--.js} +1 -1
- package/dist/assets/{InputAdornment-Ca2Af6jh.js → InputAdornment-BPwm2dnh.js} +1 -1
- package/dist/assets/{InputLabel-D4R09Jce.js → InputLabel-CfRvg3E0.js} +1 -1
- package/dist/assets/{LastPage-GxCoDWrp.js → LastPage-BkIsmfi2.js} +1 -1
- package/dist/assets/{Launch-CgKKCuVE.js → Launch-BFRTKCgX.js} +1 -1
- package/dist/assets/{Link-DRvMIooJ.js → Link-BZodiBIz.js} +1 -1
- package/dist/assets/{LoadingButton-BkYiSDzb.js → LoadingButton-DQ3wXyLh.js} +1 -1
- package/dist/assets/{LockIcon-CF3-It7s.js → LockIcon-CF3Yl9tf.js} +1 -1
- package/dist/assets/{Loop-z2LWMmIN.js → Loop-DJX-NWYU.js} +1 -1
- package/dist/assets/{MoreVert-DUbpisWb.js → MoreVert-Cw5JqD-n.js} +1 -1
- package/dist/assets/{Pagination-R49NcVMS.js → Pagination-Dw6rLiDa.js} +1 -1
- package/dist/assets/{Public-Bsj8SC7o.js → Public-4ZipZDUd.js} +1 -1
- package/dist/assets/{SchemaReference.es-iQvrSN65.js → SchemaReference.es-C2JY9xEh.js} +1 -1
- package/dist/assets/{Search-BJQlC2tf.js → Search-Co3tOmY1.js} +1 -1
- package/dist/assets/{Select-Dir7Eleh.js → Select-BHyxLJXO.js} +1 -1
- package/dist/assets/{Skeleton-C1foIJDy.js → Skeleton-FWWrVymY.js} +1 -1
- package/dist/assets/{Slider-DUhMdZ8E.js → Slider-CTrqzFQ0.js} +1 -1
- package/dist/assets/{Stepper-BmHFaVU-.js → Stepper-BYinN7qr.js} +1 -1
- package/dist/assets/{TextField-DrpVwtbW.js → TextField-DsYRZFfL.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-B-GBbZiA.js → ToggleButtonGroup-LuLWYYav.js} +1 -1
- package/dist/assets/{ViewList-Du_jkxCT.js → ViewList-IW1QaH_L.js} +1 -1
- package/dist/assets/{actions-C3sU2Ddh.js → actions-DCJ-sSPn.js} +1 -1
- package/dist/assets/{actions-aBeGAWlf.js → actions-DkgRiPBw.js} +1 -1
- package/dist/assets/{agreement-CZNFuXRD.js → agreement-DByQv9ZX.js} +1 -1
- package/dist/assets/api-Bm6QocBj.js +1 -0
- package/dist/assets/{app-avatar-C8eXlLv7.js → app-avatar-Cx6kCeuS.js} +1 -1
- package/dist/assets/{audit-logs-MEDvpc7h.js → audit-logs-XHAxITYC.js} +1 -1
- package/dist/assets/blocklet-sVlwX65X.js +1 -0
- package/dist/assets/{brace-fold.es-B9fSdEU8.js → brace-fold.es-LH9Jpy3f.js} +1 -1
- package/dist/assets/{bundle-avatar-OSJKvWqT.js → bundle-avatar-D3srwykJ.js} +1 -1
- package/dist/assets/{chart-CH8M9EVl.js → chart-CwUcOCm9.js} +1 -1
- package/dist/assets/{click-to-copy-DXvKjv09.js → click-to-copy-CPgkX4m2.js} +1 -1
- package/dist/assets/{closebrackets.es-BXZB1Qr2.js → closebrackets.es-CZSR_3xe.js} +1 -1
- package/dist/assets/{codemirror.es-eOhYWqBu.js → codemirror.es-CDBPSM3n.js} +1 -1
- package/dist/assets/{comment.es-kwvrJJEn.js → comment.es-DGH4itKk.js} +1 -1
- package/dist/assets/{config-navigation-Ctjl7Q09.js → config-navigation-NRSeF0zB.js} +1 -1
- package/dist/assets/{delete-confirm-BQlN8F7p.js → delete-confirm-DGNC6LoB.js} +1 -1
- package/dist/assets/{detail-DF7saIlF.js → detail-gUZ7dE3r.js} +3 -3
- package/dist/assets/{dialog.es-nrprHWg2.js → dialog.es-BCpHrEUI.js} +1 -1
- package/dist/assets/{download-CJFZXJUK.js → download-cKQNB8IS.js} +1 -1
- package/dist/assets/{foldgutter.es-DarIv8r7.js → foldgutter.es-B4z5FPpx.js} +1 -1
- package/dist/assets/getValidReactChildren-CYcUTCCR.js +1 -0
- package/dist/assets/{hint.es-BRl3gS64.js → hint.es-CjtvhU7v.js} +1 -1
- package/dist/assets/{hint.es2-C6RN76yx.js → hint.es2-C3fkpJdT.js} +1 -1
- package/dist/assets/{iframe-Cay9rSYx.js → iframe-a4uHsJw3.js} +1 -1
- package/dist/assets/{index-Btn4YKyJ.js → index-223JGPy0.js} +1 -1
- package/dist/assets/{index-BNQ7lPMP.js → index-7DZ48QpY.js} +1 -1
- package/dist/assets/{index-BHUo4xfz.js → index-987rzvE8.js} +1 -1
- package/dist/assets/{index--HL1x2Ao.js → index-9D4yHZMO.js} +1 -1
- package/dist/assets/{index-BcHL3W7d.js → index-Asa_0R8u.js} +1 -1
- package/dist/assets/{index-CFSUHZ6I.js → index-B6yK_bzX.js} +3 -3
- package/dist/assets/{index-BpbNBF5W.js → index-BH5Du5OK.js} +3 -3
- package/dist/assets/{index-DroD8EXA.js → index-BPGGylov.js} +1 -1
- package/dist/assets/{index-mn6_lk6h.js → index-BS3cETry.js} +5 -5
- package/dist/assets/{index-qMPXnPuV.js → index-BdXc-VnA.js} +1 -1
- package/dist/assets/{index-DIE6fYSQ.js → index-Bl4RVAyg.js} +1 -1
- package/dist/assets/{index-NuGKx8L8.js → index-BooGyAWJ.js} +1 -1
- package/dist/assets/{index-CW48XZK8.js → index-BsnWcB_C.js} +1 -1
- package/dist/assets/{index-Wzigi2fg.js → index-ByUD-X5g.js} +1 -1
- package/dist/assets/{index-DIXftOyc.js → index-Byw0qEee.js} +1 -1
- package/dist/assets/index-C32jjYE0.js +54 -0
- package/dist/assets/{index-Bq7tYdVD.js → index-C4vYMHes.js} +1 -1
- package/dist/assets/{index-tEOo6QqD.js → index-C7XdmdZm.js} +1 -1
- package/dist/assets/{index-C30eBcf3.js → index-CaILkSHA.js} +2 -2
- package/dist/assets/{index-CrL1aK9F.js → index-CbVpP-kP.js} +1 -1
- package/dist/assets/{index-BFaWpopy.js → index-CiHdSPzG.js} +1 -1
- package/dist/assets/{index-CMfXUntK.js → index-CmnxH5_7.js} +1 -1
- package/dist/assets/{index-CFGfdRbL.js → index-CuDSWVTP.js} +1 -1
- package/dist/assets/{index-k_fGqveR.js → index-CuQoWTSG.js} +1 -1
- package/dist/assets/{index-DlOF8Gqo.js → index-D21hPRpg.js} +1 -1
- package/dist/assets/{index-DT2_9fGF.js → index-D2bnoRiO.js} +1 -1
- package/dist/assets/{index-CABSlD6A.js → index-D3BiJZx7.js} +1 -1
- package/dist/assets/{index-DaJYuGOJ.js → index-D858U3Qw.js} +1 -1
- package/dist/assets/{index-CFKgBVg-.js → index-DCdEnHXm.js} +1 -1
- package/dist/assets/index-DECoPT7p.js +21 -0
- package/dist/assets/{index-Dyq4IyeC.js → index-DGMii6rV.js} +1 -1
- package/dist/assets/{index-D2i4ZR4J.js → index-DLXcR0K0.js} +1 -1
- package/dist/assets/{index-S4EMvNri.js → index-DesqGCgv.js} +1 -1
- package/dist/assets/{index-BO13G4BO.js → index-DlnomLD1.js} +1 -1
- package/dist/assets/{index-Cd6JqFfP.js → index-Do9FcEok.js} +1 -1
- package/dist/assets/{index-DSMNya_x.js → index-Dp7ygnu_.js} +1 -1
- package/dist/assets/{index-2z9-wC0z.js → index-DtSAlyAb.js} +2 -2
- package/dist/assets/{index-r7R5IelG.js → index-QpveLXno.js} +1 -1
- package/dist/assets/{index-B-D5pRTJ.js → index-ZT9QeB3O.js} +1 -1
- package/dist/assets/{index-D-Vuoioo.js → index-dI-5DMUE.js} +1 -1
- package/dist/assets/{index-Gy1QJcJ2.js → index-erVE_nO9.js} +10 -10
- package/dist/assets/{index-C6_9iL4I.js → index-iAyUVxpq.js} +1 -1
- package/dist/assets/{index-CcrJJ2au.js → index-ltfZ8gtL.js} +1 -1
- package/dist/assets/{index-qqXmVMwc.js → index-rDmYbmrh.js} +1 -1
- package/dist/assets/{index.es-D1C7OtmS.js → index.es-D7AXw11H.js} +1 -1
- package/dist/assets/{index.esm-BUiTPKrv.js → index.esm-UKhIq9Zf.js} +1 -1
- package/dist/assets/{info-addon.es-C6yRBU5l.js → info-addon.es-BOBKDmMJ.js} +1 -1
- package/dist/assets/{info.es-DN_l0kaO.js → info.es-TxCSWnxL.js} +1 -1
- package/dist/assets/{install-from-url-MsescETE.js → install-from-url-C2MMBwn8.js} +1 -1
- package/dist/assets/{invitation-C2gEFjl6.js → invitation-fKgtV8Zz.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-Du3BuD2Q.js → is-path-prefix-equal-DSWbb6Lw.js} +1 -1
- package/dist/assets/{isEqual-iiwY4iir.js → isEqual-j-zS_8Gf.js} +1 -1
- package/dist/assets/{item-BRRPCHyk.js → item-DafV54vj.js} +1 -1
- package/dist/assets/{javascript.es-mbpWdj5A.js → javascript.es-Bs8LWftY.js} +1 -1
- package/dist/assets/{jump-to-line.es-DFRr7i_x.js → jump-to-line.es-D-yW_11z.js} +1 -1
- package/dist/assets/{jump.es-BvCvZeFx.js → jump.es-BOkuipP6.js} +1 -1
- package/dist/assets/{line-DVrvRbGP.js → line-BT-CqrvO.js} +3 -3
- package/dist/assets/{lint.es-DMdq-Y-g.js → lint.es-Bnw9EvpL.js} +1 -1
- package/dist/assets/{lint.es2-Dqt3569F.js → lint.es2-ClUYPmWE.js} +1 -1
- package/dist/assets/{lint.es3-D3U2VWsd.js → lint.es3-Wt4762FH.js} +1 -1
- package/dist/assets/{list-header-BDxctf6E.js → list-header-D8gIqGsc.js} +1 -1
- package/dist/assets/{log-CSpSWkjX.js → log-B4RGVLfQ.js} +1 -1
- package/dist/assets/{lottie-CbqhvmtY.js → lottie-DPC4uwjn.js} +1 -1
- package/dist/assets/{matchbrackets.es-BPOu4LMM.js → matchbrackets.es-B_DBzsmq.js} +1 -1
- package/dist/assets/{memory-BISFPxDW.js → memory-BkPehB2B.js} +1 -1
- package/dist/assets/{mode.es-Z1DAbN8t.js → mode.es-Rcfl9bQx.js} +1 -1
- package/dist/assets/{mode.es2-CHQiAyxP.js → mode.es2-q3QJyvaG.js} +1 -1
- package/dist/assets/{mode.es3-Cj_KuR6d.js → mode.es3-BFNoOjTH.js} +1 -1
- package/dist/assets/{onlineParser.es-B9MCqAnq.js → onlineParser.es-Co9RB_dz.js} +1 -1
- package/dist/assets/{overview-C6LgKKEI.js → overview-B0Vrv3iN.js} +1 -1
- package/dist/assets/{react-WuDSAoir.js → react-DspsQPdu.js} +3 -3
- package/dist/assets/{redux-CD2ncFeP.js → redux-CW-2wISG.js} +1 -1
- package/dist/assets/{resource-dialog-BQqHx66M.js → resource-dialog-B2JtbLNW.js} +1 -1
- package/dist/assets/{runtime-CpSf_4mO.js → runtime-Cdoj20eA.js} +1 -1
- package/dist/assets/{search.es-D1a1zW9L.js → search.es-CZGl1gJE.js} +1 -1
- package/dist/assets/{searchcursor.es-Ch8qmAsh.js → searchcursor.es-CV5CjRq7.js} +1 -1
- package/dist/assets/service-DM6evFxx.js +1 -0
- package/dist/assets/{shorten-label-C4kZR0n4.js → shorten-label-MNOvw9uc.js} +1 -1
- package/dist/assets/{show-hint.es-u6p2CZ_T.js → show-hint.es-Dv8MKhoo.js} +1 -1
- package/dist/assets/{slicedToArray-CbnyPXnm.js → slicedToArray-BjdTUeMu.js} +1 -1
- package/dist/assets/{spaces-BiapvYKU.js → spaces-CJAn8A_O.js} +1 -1
- package/dist/assets/{sublime.es-U_aIS_89.js → sublime.es-CeJNrSLR.js} +1 -1
- package/dist/assets/{switch-control-DkswRhHo.js → switch-control-DRGFY74g.js} +1 -1
- package/dist/assets/{table-icons-B2SKzxW9.js → table-icons-BL8xSB3P.js} +2 -2
- package/dist/assets/{tag-BfKVgkWM.js → tag-BcsNyCIC.js} +1 -1
- package/dist/assets/{team-D-J7HAOY.js → team-BwAkC099.js} +1 -1
- package/dist/assets/{toUpper-DVlFUiz7.js → toUpper-Cc1D9AuZ.js} +1 -1
- package/dist/assets/{traffic-Uf5GnmE4.js → traffic-D8r3k_ae.js} +1 -1
- package/dist/assets/{url-evaluation-Db5FZwb_.js → url-evaluation-Ddzyc50Z.js} +1 -1
- package/dist/assets/{url-join-Du3smYaq.js → url-join-BdHqt1dS.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DH0VryKJ.js → use-blocklet-info-for-connect-did-spaces-ByiBXoYS.js} +1 -1
- package/dist/assets/{useLocalStorage-BrzpK517.js → useLocalStorage-xuSREX68.js} +1 -1
- package/dist/assets/{util-BNwGe21a.js → util-BxfggyNA.js} +1 -1
- package/dist/assets/{wait-container-DPHYN0Ie.js → wait-container-Cb5wu-yb.js} +1 -1
- package/dist/assets/{withStyles-DN7-rDVx.js → withStyles-Bix6STf4.js} +1 -1
- package/dist/assets/{wrap-locale-BefWbM-O.js → wrap-locale-C2eTlgXw.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-Cb2SX8N_.js +0 -1
- package/dist/assets/api-hFKJ6jO0.js +0 -1
- package/dist/assets/blocklet-DbaWAVgP.js +0 -1
- package/dist/assets/getValidReactChildren-DC9QCktM.js +0 -1
- package/dist/assets/index-5a8_1U30.js +0 -21
- package/dist/assets/index-BQIiWzqe.js +0 -54
- package/dist/assets/service-CGBEuf5u.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-
|
|
1
|
+
import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-DtSAlyAb.js";import{T as de}from"./index-Do9FcEok.js";import pe from"./audit-logs-XHAxITYC.js";import{P as ue,M as fe}from"./index-rDmYbmrh.js";import ye from"./index-CuDSWVTP.js";import{T as ge}from"./team-BwAkC099.js";import{E as xe}from"./index-Dp7ygnu_.js";import{d as he}from"./Add-BhAOgw8n.js";import{T as N}from"./TextField-DsYRZFfL.js";import{F as H,S as V}from"./Select-BHyxLJXO.js";import{I as J}from"./InputLabel-CfRvg3E0.js";import{C as W}from"./click-to-copy-CPgkX4m2.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-BuQlLthh.js";import{C as Ce}from"./delete-confirm-DGNC6LoB.js";import{d as ke}from"./Edit-D2R20RFt.js";import"./index-iAyUVxpq.js";import"./useLocalStorage-xuSREX68.js";import"./Pagination-Dw6rLiDa.js";import"./LastPage-BkIsmfi2.js";import"./index-ltfZ8gtL.js";import"./Loop-DJX-NWYU.js";import"./ViewList-IW1QaH_L.js";import"./list-header-D8gIqGsc.js";import"./Search-Co3tOmY1.js";import"./index-DlnomLD1.js";import"./FilterList-gGx11q-p.js";import"./index-7DZ48QpY.js";import"./redux-CW-2wISG.js";import"./MoreVert-Cw5JqD-n.js";import"./index-D858U3Qw.js";import"./resource-dialog-B2JtbLNW.js";import"./index-D3BiJZx7.js";import"./index-D2bnoRiO.js";import"./tag-BcsNyCIC.js";import"./blocklet-sVlwX65X.js";import"./index-9D4yHZMO.js";import"./actions-DkgRiPBw.js";import"./shorten-label-MNOvw9uc.js";import"./index-BPGGylov.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./EditIcon-DWIVTczi.js";import"./LockIcon-CF3Yl9tf.js";import"./Google-CpcA0NCN.js";import"./index-CbVpP-kP.js";import"./isEqual-j-zS_8Gf.js";import"./index-dI-5DMUE.js";import"./InputAdornment-BPwm2dnh.js";import"./ToggleButtonGroup-LuLWYYav.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},R={},Ae=Y;Object.defineProperty(R,"__esModule",{value:!0});var X=R.default=void 0,we=Ae(Q()),Ie=e;X=R.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.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-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function T(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(L,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}T.propTypes={remark:j.string,onCreate:j.func};T.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d,j as o,C as f,z as h,aw as v,ch as j,ci as u,O as C,bj as I,ae as P,F as R}from"./index-
|
|
1
|
+
import{u as d,j as o,C as f,z as h,aw as v,ch as j,ci as u,O as C,bj as I,ae as P,F as R}from"./index-DtSAlyAb.js";import{I as S}from"./invitation-fKgtV8Zz.js";import"./index-223JGPy0.js";import"./index-DesqGCgv.js";import"./CheckCircle-B2UAY6EW.js";import"./wrap-locale-C2eTlgXw.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),s=j(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),w=u(async(e,x=t=>t)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?g(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(C,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as $,P,r as w,f as ge,j as e,C as V,i as ke,u as me,q,t as je,v as ye,D as Ce,B as W,w as ve,m as L,x as Se,y as Be,z as de,A as z,E as we,d as Ae,F as De,H as Te,J as ee,K as Ee,M as T,N as te,O as y,Q as Ie,R as F,S as Le,U as Pe,V as Re}from"./index-
|
|
1
|
+
import{n as $,P,r as w,f as ge,j as e,C as V,i as ke,u as me,q,t as je,v as ye,D as Ce,B as W,w as ve,m as L,x as Se,y as Be,z as de,A as z,E as we,d as Ae,F as De,H as Te,J as ee,K as Ee,M as T,N as te,O as y,Q as Ie,R as F,S as Le,U as Pe,V as Re}from"./index-DtSAlyAb.js";import{_ as se}from"./useLocalStorage-xuSREX68.js";import{g as _e,D as Fe}from"./index-DlnomLD1.js";import{E as Ne}from"./index-Dp7ygnu_.js";import{u as $e,B as oe}from"./url-evaluation-Ddzyc50Z.js";import{D as Ue,u as Me,B as ne}from"./actions-DCJ-sSPn.js";import{l as le}from"./index-CbVpP-kP.js";import{W as Oe}from"./tag-BcsNyCIC.js";import{I as We,B as ze}from"./install-from-url-C2MMBwn8.js";import{B as ae}from"./app-avatar-Cx6kCeuS.js";import{d as Ve}from"./Add-BhAOgw8n.js";import{S as E}from"./index-BPGGylov.js";import{T as re}from"./TextField-DsYRZFfL.js";import{F as qe,S as Ke}from"./Select-BHyxLJXO.js";import"./FilterList-gGx11q-p.js";import"./Delete-BuQlLthh.js";import"./InputLabel-CfRvg3E0.js";import"./LastPage-BkIsmfi2.js";import"./index-7DZ48QpY.js";import"./redux-CW-2wISG.js";import"./Search-Co3tOmY1.js";import"./MoreVert-Cw5JqD-n.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./isEqual-j-zS_8Gf.js";import"./index-9D4yHZMO.js";import"./Stepper-BYinN7qr.js";function N({blocklet:g,skipAccessibilityCheck:c=!1,...p}){const{t:a}=w.useContext(ge),{urls:C,loading:o,recommendedUrl:m}=$e(g);if(o&&!c)return e.jsx(V,{size:12,...p});const x=c?C[0]:m;return x?e.jsx(He,{...p,children:e.jsx(Qe,{children:e.jsx(ke,{href:x,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})}):a("blocklet.router.noAccessibleUrl")}const Qe=$.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 4px 0;
|
|
4
4
|
`,He=$.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,c as ue,u as J,e as Pe,aE as Rr,j as e,F as D,aF as ln,aG as $n,aH as Tr,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,m as L,U as te,ax as pe,J as ge,B as G,C as Y,aN as Mn,K as de,O as ee,A as ce,f as Dt,R as zn,aO as Er,aP as Pr,aa as Ar,aQ as Ir,aR as Lr,aS as Or,z as Bn,W as un,T as mn,k as Q,aT as Rt,a as xt,S as ie,b as Je,aU as Wn,aV as qn,aW as Hn,aX as kr,a2 as Fr,aY as Nr,aZ as Ur,a_ as $r,a$ as Mr,b0 as zr,b1 as ze,a8 as Br,d as Kn,M as Wr,b2 as qr,aD as ut,b3 as Hr,a9 as mt,a6 as ft,b4 as Kr,a7 as yt,i as Gn,N as Gr,b5 as Yr,b6 as we,b7 as _e,b8 as Vr,b9 as Xr,D as Yn,w as vt,ba as Qr,h as Jr,at as fn,bb as Zr,bc as pn,aj as ei,bd as ti,be as ni,bf as ri}from"./index-
|
|
1
|
+
import{r as p,c as ue,u as J,e as Pe,aE as Rr,j as e,F as D,aF as ln,aG as $n,aH as Tr,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,m as L,U as te,ax as pe,J as ge,B as G,C as Y,aN as Mn,K as de,O as ee,A as ce,f as Dt,R as zn,aO as Er,aP as Pr,aa as Ar,aQ as Ir,aR as Lr,aS as Or,z as Bn,W as un,T as mn,k as Q,aT as Rt,a as xt,S as ie,b as Je,aU as Wn,aV as qn,aW as Hn,aX as kr,a2 as Fr,aY as Nr,aZ as Ur,a_ as $r,a$ as Mr,b0 as zr,b1 as ze,a8 as Br,d as Kn,M as Wr,b2 as qr,aD as ut,b3 as Hr,a9 as mt,a6 as ft,b4 as Kr,a7 as yt,i as Gn,N as Gr,b5 as Yr,b6 as we,b7 as _e,b8 as Vr,b9 as Xr,D as Yn,w as vt,ba as Qr,h as Jr,at as fn,bb as Zr,bc as pn,aj as ei,bd as ti,be as ni,bf as ri}from"./index-DtSAlyAb.js";import{T as ii}from"./index-Do9FcEok.js";import{d as oi}from"./ArrowDropDown-BhDZI_jd.js";import{u as Tt,C as re,a as gn}from"./index.esm-UKhIq9Zf.js";import{S as Ce}from"./switch-control-DRGFY74g.js";import{d as Vn,i as ai}from"./is-path-prefix-equal-DSWbb6Lw.js";import{T as K,F as si}from"./TextField-DsYRZFfL.js";import{D as Xn,g as li}from"./index-DlnomLD1.js";import{d as Qn}from"./Link-BZodiBIz.js";import{d as Ae}from"./Delete-BuQlLthh.js";import{C as Et}from"./delete-confirm-DGNC6LoB.js";import{I as Be}from"./index-9D4yHZMO.js";import{s as ci}from"./logo-BKA11TRi.js";import{_ as di}from"./useLocalStorage-xuSREX68.js";import{L as ui}from"./LoadingButton-DQ3wXyLh.js";import{C as mi,d as Jn}from"./Public-4ZipZDUd.js";import{d as Pt}from"./Add-BhAOgw8n.js";import{a as fi,B as Zn,D as hn,R as pi,b as gi}from"./url-evaluation-Ddzyc50Z.js";import{d as hi}from"./CheckCircle-B2UAY6EW.js";import{d as xi}from"./ChevronRight-R1AD6T8t.js";import{d as yi}from"./MoreVert-Cw5JqD-n.js";import{d as er}from"./Edit-D2R20RFt.js";import{d as vi,a as tr}from"./Https-YbDZUE--.js";import{W as $e}from"./tag-BcsNyCIC.js";import{w as bi}from"./withStyles-Bix6STf4.js";import{S as ji}from"./Slider-CTrqzFQ0.js";import"./index-D2bnoRiO.js";import"./Select-BHyxLJXO.js";import"./InputLabel-CfRvg3E0.js";import"./FilterList-gGx11q-p.js";import"./LastPage-BkIsmfi2.js";import"./index-7DZ48QpY.js";import"./redux-CW-2wISG.js";import"./Search-Co3tOmY1.js";import"./index-Dp7ygnu_.js";import"./click-to-copy-CPgkX4m2.js";import"./shorten-label-MNOvw9uc.js";const fe="Dashboard",nr=p.createContext({}),{Provider:Ci,Consumer:ns}=nr,xn=[fe,D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP],Si=(t,n)=>{if(t.name===D.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===D.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=xn.includes(t.name),i=xn.includes(n.name);return r&&i?cn(t.name,n.name):r?-1:i?1:cn(t.name,n.name)},wi=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=fe,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:j,from:{pathPrefix:b},to:S}=f;if(S.type===D.ROUTING_RULE_TYPES.BLOCKLET){let R="";Number.parseInt(S.port,10)===Number.parseInt(n,10)?(R="Blocklet Server Dashboard",S.type=D.ROUTING_RULE_TYPES.DAEMON):R=S.did,g.items.push({id:y,name:ln(b||"/"),title:R,type:"rule",isProtected:j,pathPrefix:b,to:S})}else g.items.push({id:y,pathPrefix:b,name:ln(b||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:j,to:S})}),g.items=$n(g.items,f=>f.name),g}).sort(Si),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(D.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},_i=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return _t(a.value,l,o)},Di=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>_t(l.value,a,i))},Ri=t=>{const n=t.map(i=>i.domain).filter(i=>![D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function yn({children:t}){const n=ue(),{info:r}=J(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Pe(async()=>{const{sites:P}=await n.getRoutingSites({input:{snapshotHash:""}}),T=P||[];await Promise.all(T.map(async v=>(v.domainAliases=await Rr(v.domainAliases,{getIP:Tr}),v)));const I=Ri(T);o(T),a(I.domains),c([window.location.hostname,...I.domains,...I.domainsAliases.map(v=>v.value)])},[r]),d=(P,T)=>{o(I=>I.map(v=>v.id===P?T.domain?T:{...T,domain:v.domain}:v))},m=P=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(P)}}),g=async P=>{const T=await n.addRoutingSite({input:P});o(i.concat(T.site))},f=async(P,T)=>{const I=await n.updateRoutingSite({input:{id:P,...T}});if(I.site&&I.site.id){const v=i.findIndex(A=>A.id===I.site.id);v!==-1&&(i.splice(v,1,I.site),o([].concat(i)))}},y=async P=>{await n.deleteRoutingSite({input:{id:P}}),o(i.filter(T=>T.id!==P))},j=async(P,T,I)=>{const v=await n.addDomainAlias({input:{id:P,domainAlias:T,force:I}});d(P,v.site)},b=async(P,T)=>{const I=await n.deleteDomainAlias({input:{id:P,domainAlias:T}});d(P,I.site)},S=async(P,T)=>{const{site:I}=await n.addRoutingRule({input:{id:P,rule:T}});d(P,I)},R=async(P,T)=>{const{site:I}=await n.updateRoutingRule({input:{id:P,rule:T}});d(P,I)},C=async(P,T)=>{const{site:I}=await n.deleteRoutingRule({input:{id:P,ruleId:T}});d(P,I)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:j,deleteDomainAlias:b,takeSnapshot:m,addRule:S,updateRule:R,deleteRule:C}},{sites:E,siteMap:_}=wi({sites:i,nodePort:r.port});return x.sites=E,x.siteMap=_,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:P,domain:T,mountPoint:I,params:v})=>_i({did:P,domain:T,mountPoint:I,siteMap:x.siteMap,params:v}),x.getBlockletUrls=({did:P,mountPoint:T,params:I})=>Di({did:P,mountPoint:T,siteMap:x.siteMap,params:I}),e.jsx(Ci,{value:{routing:x},children:t})}function ae(){const{routing:t}=p.useContext(nr);return t}function At(t){const n=[D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE,D.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var It={},Ti=xe;Object.defineProperty(It,"__esModule",{value:!0});var rr=It.default=void 0,Ei=Ti(he()),Pi=e;rr=It.default=(0,Ei.default)((0,Pi.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function Ai(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=N(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?dn.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),dn.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Ii,{children:[e.jsx(Ai,{message:a}),n&&e.jsx(ne,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Ii=V.div`
|
|
2
2
|
margin-bottom: 24px;
|
|
3
3
|
.top-btns-alert {
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as l,bf as m,u as p,j as s,S as u}from"./index-
|
|
1
|
+
import{z as l,bf as m,u as p,j as s,S as u}from"./index-DtSAlyAb.js";import{L as g,D as v}from"./download-cKQNB8IS.js";import{F as f,S as x}from"./Select-BHyxLJXO.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";function k(){const i=l(),{name:a="abtnode"}=m(),{info:n}=p(),r=n.routing.provider,o=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(r){const e=`Service Gateway(${r})`;o.push({id:`service-gateway-${r}`,name:e,types:["error","access"]})}const c=e=>{i(`/logs/${e.target.value}`)},d=s.jsx(f,{sx:{minWidth:240},children:s.jsx(x,{value:a,onChange:c,size:"small",children:o.map(e=>s.jsx(u,{value:e.id,children:e.name},e.id))})}),t=o.find(e=>e.id===a)||o[0];return s.jsx(g,{name:t.name,logId:t.id,types:t.types,prepend:d,postpend:s.jsx(v,{id:n.did,name:"blocklet-server"})},t.id)}export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as fe,j as P,q as Be,u as ze,aj as Bt,ct as Ve,M as Fe,n as be,cu as Vr,cv as Gr,cw as Wr,cx as Hr,cy as Kr,cz as me,cA as Xr,F as zt,b as De,B as Yr,P as Xe,aw as Zr,z as Vt,cB as Jr,v as Qr,cC as en,ac as tn,av as vt,bl as bt,a1 as Pe,A as Ye,K as _t,ah as rn,Q as Me,V as qe,C as je,N as Gt,i as nn,W as sn,x as an,y as Wt,ag as on,cD as ln,ae as cn,c4 as Ht,cE as Kt,aa as un,aC as fn,H as mn,ak as dn,al as hn,am as pn,cF as gn,an as yn,J as vn,ao as bn,ap as Ce,aq as _n,ar as wn}from"./index-2z9-wC0z.js";import{L as Ue,P as Xt,A as En,S as xn,a as Rn}from"./index-B-D5pRTJ.js";import{u as $n,A as jn,W as Sn,P as On,D as wt,L as Et,d as xt,a as Rt}from"./wait-container-DPHYN0Ie.js";import{C as Yt,d as kn,A as In}from"./agreement-CZNFuXRD.js";import{a as An}from"./api-hFKJ6jO0.js";import{i as Ln}from"./isEqual-iiwY4iir.js";import{_ as Tn}from"./useLocalStorage-BrzpK517.js";import{l as Ge}from"./index-CrL1aK9F.js";import{p as Nn}from"./index-DlOF8Gqo.js";import{s as Cn}from"./logo-BKA11TRi.js";import"./url-join-Du3smYaq.js";import"./Skeleton-C1foIJDy.js";import"./Close-CwmvmaYY.js";import"./lottie-CbqhvmtY.js";import"./index-C6_9iL4I.js";var et={};Object.defineProperty(et,"__esModule",{value:!0});var Zt=et.default=void 0;Dn(fe);var ue=P;function Dn(g){return g&&g.__esModule?g:{default:g}}function $t(g,b){var k=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);b&&(A=A.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),k.push.apply(k,A)}return k}function jt(g){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?$t(Object(k),!0).forEach(function(A){Pn(g,A,k[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(k)):$t(Object(k)).forEach(function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(k,A))})}return g}function Pn(g,b,k){return b=Mn(b),b in g?Object.defineProperty(g,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):g[b]=k,g}function Mn(g){var b=Fn(g,"string");return typeof b=="symbol"?b:String(b)}function Fn(g,b){if(typeof g!="object"||!g)return g;var k=g[Symbol.toPrimitive];if(k!==void 0){var A=k.call(g,b||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(g)}var tt=function(b){return(0,ue.jsxs)("svg",jt(jt({},b),{},{children:[(0,ue.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,ue.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,ue.jsxs)("defs",{children:[(0,ue.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,ue.jsx)("stop",{stopColor:"#0FA4B7"}),(0,ue.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,ue.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,ue.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,ue.jsx)("stop",{stopColor:"#0FA4B7"}),(0,ue.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,ue.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};tt.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};tt.displayName="launcher-logo-notext";Zt=et.default=tt;var rt={};Object.defineProperty(rt,"__esModule",{value:!0});var Jt=rt.default=void 0;qn(fe);var oe=P;function qn(g){return g&&g.__esModule?g:{default:g}}function St(g,b){var k=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);b&&(A=A.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),k.push.apply(k,A)}return k}function Ot(g){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?St(Object(k),!0).forEach(function(A){Un(g,A,k[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(k)):St(Object(k)).forEach(function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(k,A))})}return g}function Un(g,b,k){return b=Bn(b),b in g?Object.defineProperty(g,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):g[b]=k,g}function Bn(g){var b=zn(g,"string");return typeof b=="symbol"?b:String(b)}function zn(g,b){if(typeof g!="object"||!g)return g;var k=g[Symbol.toPrimitive];if(k!==void 0){var A=k.call(g,b||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(g)}var nt=function(b){return(0,oe.jsxs)("svg",Ot(Ot({},b),{},{children:[(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,oe.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,oe.jsxs)("defs",{children:[(0,oe.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,oe.jsx)("stop",{stopColor:"#0FA4B7"}),(0,oe.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,oe.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,oe.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,oe.jsx)("stop",{stopColor:"#0FA4B7"}),(0,oe.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,oe.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};nt.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};nt.displayName="launcher-logo";Jt=rt.default=nt;function Vn(){const{t:g}=Be(),{info:b}=ze(),k=Bt(),A=decodeURIComponent(k.get("accessUrl")||""),{meta:I}=Ve();return P.jsx(Wn,{children:P.jsx("div",{className:"body",children:P.jsx(Ue,{variant:"success",title:Fe.getDisplayName({meta:I},!0),subTitle:g("launchBlocklet.installSuccess",{serverName:b.name}),footer:P.jsx(Gn,{href:A,rel:"noreferrer","data-cy":"open-blocklet",children:g("common.open")})})})})}const Gn=be.a`
|
|
1
|
+
import{r as fe,j as P,q as Be,u as ze,aj as Bt,ct as Ve,M as Fe,n as be,cu as Vr,cv as Gr,cw as Wr,cx as Hr,cy as Kr,cz as me,cA as Xr,F as zt,b as De,B as Yr,P as Xe,aw as Zr,z as Vt,cB as Jr,v as Qr,cC as en,ac as tn,av as vt,bl as bt,a1 as Pe,A as Ye,K as _t,ah as rn,Q as Me,V as qe,C as je,N as Gt,i as nn,W as sn,x as an,y as Wt,ag as on,cD as ln,ae as cn,c4 as Ht,cE as Kt,aa as un,aC as fn,H as mn,ak as dn,al as hn,am as pn,cF as gn,an as yn,J as vn,ao as bn,ap as Ce,aq as _n,ar as wn}from"./index-DtSAlyAb.js";import{L as Ue,P as Xt,A as En,S as xn,a as Rn}from"./index-ZT9QeB3O.js";import{u as $n,A as jn,W as Sn,P as On,D as wt,L as Et,d as xt,a as Rt}from"./wait-container-Cb5wu-yb.js";import{C as Yt,d as kn,A as In}from"./agreement-DByQv9ZX.js";import{a as An}from"./api-Bm6QocBj.js";import{i as Ln}from"./isEqual-j-zS_8Gf.js";import{_ as Tn}from"./useLocalStorage-xuSREX68.js";import{l as Ge}from"./index-CbVpP-kP.js";import{p as Nn}from"./index-D21hPRpg.js";import{s as Cn}from"./logo-BKA11TRi.js";import"./url-join-BdHqt1dS.js";import"./Skeleton-FWWrVymY.js";import"./Close-BA4_6LGT.js";import"./lottie-DPC4uwjn.js";import"./index-iAyUVxpq.js";var et={};Object.defineProperty(et,"__esModule",{value:!0});var Zt=et.default=void 0;Dn(fe);var ue=P;function Dn(g){return g&&g.__esModule?g:{default:g}}function $t(g,b){var k=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);b&&(A=A.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),k.push.apply(k,A)}return k}function jt(g){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?$t(Object(k),!0).forEach(function(A){Pn(g,A,k[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(k)):$t(Object(k)).forEach(function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(k,A))})}return g}function Pn(g,b,k){return b=Mn(b),b in g?Object.defineProperty(g,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):g[b]=k,g}function Mn(g){var b=Fn(g,"string");return typeof b=="symbol"?b:String(b)}function Fn(g,b){if(typeof g!="object"||!g)return g;var k=g[Symbol.toPrimitive];if(k!==void 0){var A=k.call(g,b||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(g)}var tt=function(b){return(0,ue.jsxs)("svg",jt(jt({},b),{},{children:[(0,ue.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,ue.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,ue.jsxs)("defs",{children:[(0,ue.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,ue.jsx)("stop",{stopColor:"#0FA4B7"}),(0,ue.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,ue.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,ue.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,ue.jsx)("stop",{stopColor:"#0FA4B7"}),(0,ue.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,ue.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};tt.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};tt.displayName="launcher-logo-notext";Zt=et.default=tt;var rt={};Object.defineProperty(rt,"__esModule",{value:!0});var Jt=rt.default=void 0;qn(fe);var oe=P;function qn(g){return g&&g.__esModule?g:{default:g}}function St(g,b){var k=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);b&&(A=A.filter(function(I){return Object.getOwnPropertyDescriptor(g,I).enumerable})),k.push.apply(k,A)}return k}function Ot(g){for(var b=1;b<arguments.length;b++){var k=arguments[b]!=null?arguments[b]:{};b%2?St(Object(k),!0).forEach(function(A){Un(g,A,k[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(k)):St(Object(k)).forEach(function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(k,A))})}return g}function Un(g,b,k){return b=Bn(b),b in g?Object.defineProperty(g,b,{value:k,enumerable:!0,configurable:!0,writable:!0}):g[b]=k,g}function Bn(g){var b=zn(g,"string");return typeof b=="symbol"?b:String(b)}function zn(g,b){if(typeof g!="object"||!g)return g;var k=g[Symbol.toPrimitive];if(k!==void 0){var A=k.call(g,b||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(g)}var nt=function(b){return(0,oe.jsxs)("svg",Ot(Ot({},b),{},{children:[(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,oe.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,oe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,oe.jsxs)("defs",{children:[(0,oe.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,oe.jsx)("stop",{stopColor:"#0FA4B7"}),(0,oe.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,oe.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,oe.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,oe.jsx)("stop",{stopColor:"#0FA4B7"}),(0,oe.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,oe.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};nt.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};nt.displayName="launcher-logo";Jt=rt.default=nt;function Vn(){const{t:g}=Be(),{info:b}=ze(),k=Bt(),A=decodeURIComponent(k.get("accessUrl")||""),{meta:I}=Ve();return P.jsx(Wn,{children:P.jsx("div",{className:"body",children:P.jsx(Ue,{variant:"success",title:Fe.getDisplayName({meta:I},!0),subTitle:g("launchBlocklet.installSuccess",{serverName:b.name}),footer:P.jsx(Gn,{href:A,rel:"noreferrer","data-cy":"open-blocklet",children:g("common.open")})})})})}const Gn=be.a`
|
|
2
2
|
display: block;
|
|
3
3
|
height: 36px;
|
|
4
4
|
color: ${g=>g.theme.palette.primary.main};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{bk as ce,q as E,r as v,y as Ze,av as ie,a1 as Z,ak as Pe,j as e,m as x,O as u,x as re,D as Qe,B as W,C as Y,w as He,J as Ve,$ as de,A as B,K as le,P as p,n as ve,f as Ke,i as Be,l as Xe,aK as q,aL as _,S as V,aD as K,a9 as X,a3 as We,a2 as Ge,aY as Ye,H as qe,ch as _e,eB as je,W as $e,L as et,Z as tt,b as st,F as L,bb as H,T as ae,ax as ot,hj as nt}from"./index-DtSAlyAb.js";import{u as $}from"./blocklet-sVlwX65X.js";import{S as ye}from"./index-BPGGylov.js";import"./api-Bm6QocBj.js";import{u as Ie,P as at}from"./use-blocklet-info-for-connect-did-spaces-ByiBXoYS.js";import{f as G,g as Ae,h as it,i as Se,j as rt,k as lt,l as Ce,e as ct}from"./spaces-CJAn8A_O.js";import{u as J}from"./detail-gUZ7dE3r.js";import{T as dt}from"./TextField-DsYRZFfL.js";import{I as pt}from"./index-9D4yHZMO.js";import{S as De}from"./switch-control-DRGFY74g.js";import{d as ht}from"./MoreVert-Cw5JqD-n.js";import{D as mt}from"./DeleteOutline-BuR7k_j3.js";import{e as ut}from"./mode-B2dWMeTO.js";import{D as ft}from"./index-DlnomLD1.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./index-D3BiJZx7.js";import"./index-Do9FcEok.js";import"./Delete-BuQlLthh.js";import"./url-evaluation-Ddzyc50Z.js";import"./tag-BcsNyCIC.js";import"./actions-DCJ-sSPn.js";import"./useLocalStorage-xuSREX68.js";import"./app-avatar-Cx6kCeuS.js";import"./team-BwAkC099.js";import"./Breadcrumbs-Un40qFmK.js";import"./Select-BHyxLJXO.js";import"./InputLabel-CfRvg3E0.js";import"./index-D2bnoRiO.js";import"./DeleteOutline-CfWsbc1a.js";import"./FilterList-gGx11q-p.js";import"./LastPage-BkIsmfi2.js";import"./index-7DZ48QpY.js";import"./redux-CW-2wISG.js";import"./Search-Co3tOmY1.js";import"./index-Dp7ygnu_.js";function ee({...t}){const{blocklet:s}=$(),{info:d}=ce(),{t:a,locale:i}=E(),[m,o]=v.useState(""),[r,j]=v.useState(!1),[c,h]=v.useState(!1),[D,y]=v.useState(""),f=Ie({blocklet:s}),g=Ze(d),{spaceGateways:I,addSpaceGateway:se}=J(),[k,M]=v.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:ie.create({baseURL:Z(window.location.origin,Pe())}).get,messages:{title:a("storage.spaces.provideNFT.title",{appName:f.appName},i),scan:a("storage.spaces.provideNFT.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.provideNFT.success")})},onClose:()=>{M(l=>({...l,open:!1}))}}),[n,z]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:f.appName},i),scan:a("storage.spaces.authorize.scan",{appName:f.appName},i),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{z(l=>({...l,open:!1}))}}),b=async({endpoint:l,name:A,did:S})=>{const R=await Ae(l);if(!await Se(R)){B.error(a("storage.spaces.gateway.add.invalidUrl"));return}if(I.some(P=>P.endpoint===l)){B.error(a("storage.spaces.gateway.add.duplicate",{name:A}));return}const O={name:A,did:S,url:R,endpoint:l};await se(O,l),B.success(a("storage.spaces.connectedWithName",{name:(O==null?void 0:O.name)??"DID Spaces"}))},T=async(l,A)=>{try{if(!de.isEmpty(l.spaceGateway))await b(A(l.spaceGateway));else{const S=A(l.endpoint),R=l.space?A(l.space):{};await b({endpoint:S,did:G(S),name:"DID Space",...R})}z(S=>({...S,open:!1})),o(null),M(S=>({...S,open:!1}))}catch(S){console.error(S),B.error(le(S))}},C=()=>{M(l=>({...l,open:!0,extraParams:{appPid:s.appPid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did}}))},w=async()=>{try{j(!0);const l=await Ae(m),A=it(l),S=new URL(l).searchParams.get("spaceDid");if(!await Se(A))throw new Error(a("storage.spaces.gateway.add.invalidUrl"));z(R=>({...R,open:!0,prefix:Z(A,"space/api/did"),baseUrl:new URL(A).origin,checkFn:ie.create({baseURL:Z(A,"space")}).get,extraParams:{appDid:f.appDid,appName:f.appName,appDescription:f.appDescription,scopes:f.scopes,appUrl:f.appUrl,referrer:f.referrer,nodeDid:d.did,spaceDid:S}})),h(!1)}catch(l){const A=`${a("storage.spaces.gateway.add.failed",i)}: ${le(l)}`;y(A)}finally{j(!1)}};return e.jsxs(u,{children:[e.jsx(ye,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:C,menu:[e.jsx(ye.Item,{sx:{textTransform:"none"},onClick:()=>h(!0),size:"small",...t,children:a("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(x,{sx:{fontWeight:"bold",textTransform:"none"},children:a("storage.spaces.connect.useWallet")})}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:k.prefix,open:k.open,popup:!0,action:k.action,webWalletUrl:g,baseUrl:k.baseUrl,checkFn:k.checkFn,onSuccess:T,onClose:k.onClose,checkTimeout:k.checkTimeout,extraParams:k.extraParams,messages:k.messages,locale:i}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:n.prefix,open:n.open,popup:!0,action:n.action,baseUrl:n.baseUrl,checkFn:n.checkFn,onSuccess:T,onClose:n.onClose,checkTimeout:n.checkTimeout,extraParams:n.extraParams,messages:n.messages,locale:i}),e.jsxs(Qe,{title:a("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:c,onClose:()=>h(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:l=>{l.stopPropagation(),h(!1)},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:w,color:"primary",disabled:r||!m,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Y,{size:16}),a("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(He,{component:"div",children:e.jsx(x,{component:"div",children:e.jsx(dt,{label:a("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:m,onChange:l=>{y(null),o(l.target.value)},disabled:r,onKeyPress:async l=>{l.key==="Enter"&&await w()},autoFocus:!0})})})}),!!D&&e.jsx(Ve,{severity:"error",style:{width:"100%"},children:D})]})]})}ee.propTypes={};ee.defaultProps={};function te({blocklet:t,...s}){const{t:d}=v.useContext(Ke);if(!t.diskInfo)return e.jsx(x,{children:d("blocklet.diskInfo.empty")});const a=(o,r,j)=>e.jsxs(x,{children:[j?e.jsx(Be,{style:{cursor:"pointer"},onClick:j,underline:"hover",children:o}):o," ",e.jsx("strong",{children:r?Xe(r):"empty"})]}),i=t.environments.reduce((o,r)=>(o[r.key]=r.value,o),{}),m=[{key:"appDir",name:d("blocklet.diskInfo.appDir"),value:a(i.BLOCKLET_APP_DIR,t.diskInfo.app)},{key:"dataDir",name:d("blocklet.diskInfo.dataDir"),value:a(i.BLOCKLET_DATA_DIR,t.diskInfo.data)},{key:"logDir",name:d("blocklet.diskInfo.logDir"),value:a(i.BLOCKLET_LOG_DIR,t.diskInfo.log)},{key:"cacheDir",name:d("blocklet.diskInfo.cacheDir"),value:a(i.BLOCKLET_CACHE_DIR,t.diskInfo.cache)}];return e.jsx(xt,{component:"div",...s,children:m.map(o=>e.jsx(pt,{valueComponent:"div",nameWidth:120,name:o.name,children:o.value},o.key))})}te.propTypes={blocklet:p.object.isRequired};te.defaultProps={};const xt=ve(x)``;var ke=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwIslv1JmRwcSzAo+URPCF5M8AGzEF8yG+QVBFl53FqhfYqd7/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXddVCKizUTFu3CbUMxyxgOUoSpidf+JEuRy/g3EyyCTz0yw2KRGtDs4fE8btEktCKZzL3J6mFoLZdlcJKLW33guKRC44aAhkhSWKMOT5uF2kd283asHcBt5C15MVUJUPpX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rKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};ke.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Ue(){const{t}=E(),{blocklet:s}=$();return e.jsxs(u,{children:[e.jsxs(u,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(ke,{style:{width:200,height:250}}),e.jsx(x,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ee,{})]}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}Ue.propTypes={};var pe={},gt=_;Object.defineProperty(pe,"__esModule",{value:!0});var be=pe.default=void 0,jt=gt(q()),yt=e;be=pe.default=(0,jt.default)((0,yt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var he={},At=_;Object.defineProperty(he,"__esModule",{value:!0});var Re=he.default=void 0,St=At(q()),Ct=e;Re=he.default=(0,St.default)((0,Ct.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"}),"ElectricBoltOutlined");var me={},vt=_;Object.defineProperty(me,"__esModule",{value:!0});var Ee=me.default=void 0,Bt=vt(q()),It=e;Ee=me.default=(0,Bt.default)((0,It.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"}),"FolderOutlined");function ue({spaceGateway:t,onDelete:s}){const{t:d}=E(),[a,i]=v.useState(!1),[m,o]=v.useState(!1),r=(c,h)=>{c==null||c.preventDefault(),c==null||c.stopPropagation(),i(h)},j=async c=>{try{c==null||c.stopPropagation(),o(!0),await s(t),i(!1)}catch(h){console.error(h),B.error(`${d("storage.space.gateway.delete.failed")}: ${le(h)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(V,{color:"red",onClick:c=>r(c,!0),children:[e.jsx(K,{style:{minWidth:24,color:"red"},children:e.jsx(mt,{fontSize:"small"})}),e.jsx(X,{style:{color:"red"},children:d("common.delete")})]}),e.jsx(We,{title:d("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:a,confirmButton:{text:d("common.confirm"),props:{variant:"contained",color:"error",loading:m}},cancelButton:{text:d("common.cancel"),props:{variant:"contained",color:"primary"},loading:m},onConfirm:j,onCancel:c=>r(c,!1)})]})}ue.propTypes={onDelete:p.func,spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool}).isRequired};ue.defaultProps={onDelete:()=>{}};function fe({spaceGateway:t,connected:s,onDelete:d,onConnect:a,enableSwitchToSpace:i,backupInProgress:m,...o}){const[r,j]=v.useState(null),{t:c}=E(),[h,D]=v.useState(!1),y=(g,I)=>{g.stopPropagation(),g.preventDefault(),j(I&&g.currentTarget)},f=async g=>{try{D(!0),y(g,!1),await a(t)}catch(I){console.error(I),B.error(I.message)}finally{D(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:g=>y(g,!0),size:"small",...o,children:h||t!=null&&t.loading?e.jsx(Y,{size:"24px"}):e.jsx(ht,{})}),e.jsxs(Ye,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:g=>y(g,!1),children:[e.jsxs(V,{onClick:g=>{y(g,!1),window.open(t.endpoint?rt(t.endpoint):t.url)},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(be,{fontSize:"small"})}),e.jsx(X,{children:c("common.open")})]}),e.jsxs(V,{onClick:g=>{y(g,!1),window.open(lt(t.endpoint))},children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Ee,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.strategy.viewBackupFiles")})]}),!s&&i&&e.jsxs(V,{onClick:f,children:[e.jsx(K,{style:{minWidth:24},children:e.jsx(Re,{fontSize:"small"})}),e.jsx(X,{children:c("storage.spaces.connect.switchToSpace")})]}),!m&&e.jsx(ue,{spaceGateway:t,onDelete:d})]})]})}fe.propTypes={spaceGateway:p.shape({name:p.string.isRequired,url:p.string.isRequired,protected:p.bool,endpoint:p.string.isRequired,loading:p.bool}).isRequired,connected:p.bool.isRequired,enableSwitchToSpace:p.bool,onDelete:p.func,onConnect:p.func,backupInProgress:p.bool};fe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Te=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Te.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};we.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe({spaceGateway:t,connected:s,onDelete:d,onBackupNow:a,...i}){const m=qe(U=>U.breakpoints.down("md")),{t:o,locale:r}=E(),{blocklet:j}=$(),{api:c,info:{did:h}}=ce(),{appDid:D,appName:y,appDescription:f,scopes:g,appUrl:I,referrer:se}=Ie({blocklet:j}),{updateSpaceGateway:k,backupEndpoint:M,backupProgress:n,refreshBackupEndpoint:z}=J(),[b,T]=v.useState(!1),[C,w]=v.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:y},r),scan:o("storage.spaces.authorize.scan",{appName:y},r),confirm:"",success:e.jsx(x,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{w(U=>({...U,open:!1}))}}),{data:l,loading:A}=_e(async()=>s?Ce(M):!0,{refreshDeps:[s,M,C==null?void 0:C.open,b]}),S=s&&l,R=s&&!b&&l&&!(t!=null&&t.loading),F=s&&b&&l,O=s&&!l&&!A&&!b,P=async()=>{if(await Ce(t==null?void 0:t.endpoint)){await c.configBlocklet({input:{did:[j.meta.did],configs:[{key:st.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),z(),B.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}w(Q=>({...Q,open:!0,prefix:Z(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:ie.create({baseURL:Z(t.url,"space")}).get,extraParams:{appDid:D,appName:y,appDescription:f,scopes:g,appUrl:I,referrer:se,nodeDid:h,spaceDid:t.did}}))},Me=async(U,Q)=>{const oe=Q(U.endpoint),Je=G(oe),N=U.space?Q(U.space):{};if(t.did&&Je!==t.did){w(ne=>({...ne,open:!1})),B.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""}));return}const ze={...t,name:N.name??"DID Space",did:N.did??G(oe),endpoint:oe};await k(ze),w(ne=>({...ne,open:!1}))},Ne=async()=>{try{if(b)return;T(!0),await a()}catch(U){console.error(U),B.error(U.message)}finally{T(!0)}};return v.useEffect(()=>{n!=null&&n.completed?((n==null?void 0:n.progress)===100?B.success(o("storage.spaces.backupSuccessfully")):(n==null?void 0:n.progress)===-1&&B.error(n==null?void 0:n.message),T(!1),n.progress=0,n.message=""):n.progress&&T(!0)},[n]),e.jsxs(Dt,{style:{position:"relative"},children:[e.jsxs(u,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...i,children:[e.jsx(u,{display:"flex",children:e.jsx(at,{alt:t.did,src:ct(t.endpoint)})}),e.jsxs(u,{className:"spaces-info",display:"flex",flexGrow:(!m||!F)&&1,minWidth:"180px",flexDirection:F?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[e.jsxs(u,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[e.jsx(x,{color:s?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:t.name}),S&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(Te,{style:{marginRight:"4px"}}),o("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),O&&e.jsx(je,{label:e.jsxs(e.Fragment,{children:[e.jsx(we,{style:{marginRight:"4px"}}),o("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),e.jsx(u,{className:"spaces-address",display:F?"none":"flex",color:"#9397A1",marginTop:"8px",children:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx($e,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})})]}),e.jsxs(u,{className:"spaces-backup",display:"flex",alignItems:"center",flex:m&&F&&1,children:[R&&e.jsxs(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[e.jsx(W,{variant:"contained",size:"small",onClick:Ne,children:o("storage.spaces.strategy.backupNow")}),ut&&e.jsx(De,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(x,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),F&&e.jsxs(u,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!m&&"640px",marginLeft:m&&"16px",width:m&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(x,{color:"primary",children:n==null?void 0:n.message}),e.jsxs(u,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(u,{sx:{width:"100%",mr:1},children:e.jsx(et,{color:"primary",variant:"determinate",value:n==null?void 0:n.progress})}),e.jsx(u,{sx:{maxWidth:"100%"},children:e.jsxs(x,{variant:"body2",color:"text.secondary",children:[n==null?void 0:n.progress,"%"]})})]})]}),O&&e.jsx(u,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:e.jsx(W,{color:"error",variant:"contained",size:"small",onClick:P,children:o("storage.spaces.disconnected.reconnectNow")})}),e.jsx(fe,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:t,connected:s,onDelete:d,onConnect:P,enableSwitchToSpace:(n==null?void 0:n.completed)||de.isEmpty(n==null?void 0:n.message),backupInProgress:F})]})]}),e.jsx(re,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:Me,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:r},"get-endpoint"),e.jsx(u,{className:`selected-container ${s?"selected":""}`,children:e.jsx(tt,{className:"selected-icon"})})]})}xe.propTypes={spaceGateway:p.shape({did:p.string.isRequired,name:p.string.isRequired,url:p.string.isRequired,endpoint:p.string.isRequired,protected:p.bool,loading:p.bool}).isRequired,connected:p.bool.isRequired,progress:p.any.isRequired,onDelete:p.func,onBackupNow:p.func};xe.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const Dt=ve(u)`
|
|
2
|
+
.selected-container {
|
|
3
|
+
position: absolute;
|
|
4
|
+
right: 0px;
|
|
5
|
+
bottom: 0px;
|
|
6
|
+
display: flex;
|
|
7
|
+
-webkit-box-pack: end;
|
|
8
|
+
justify-content: flex-end;
|
|
9
|
+
align-items: flex-end;
|
|
10
|
+
width: 32px;
|
|
11
|
+
height: 32px;
|
|
12
|
+
border-radius: 0px 0px 8px;
|
|
13
|
+
color: rgb(255, 255, 255);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: all 0.4s ease 0s;
|
|
16
|
+
|
|
17
|
+
&::after {
|
|
18
|
+
position: absolute;
|
|
19
|
+
z-index: 0;
|
|
20
|
+
left: 60px;
|
|
21
|
+
top: 60px;
|
|
22
|
+
display: block;
|
|
23
|
+
width: 0px;
|
|
24
|
+
height: 0px;
|
|
25
|
+
border-width: 16px;
|
|
26
|
+
border-style: solid;
|
|
27
|
+
border-color: transparent #1dc1c7 #1dc1c7 transparent;
|
|
28
|
+
transition: all 0.1s ease 0s;
|
|
29
|
+
content: '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.selected-icon {
|
|
33
|
+
visibility: hidden;
|
|
34
|
+
width: 60%;
|
|
35
|
+
height: 60%;
|
|
36
|
+
position: relative;
|
|
37
|
+
z-index: 2;
|
|
38
|
+
margin: 0px 1px 1px 0px;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
transition: all 0.2s ease 0s;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.selected-container.selected {
|
|
45
|
+
&::after {
|
|
46
|
+
left: 0px;
|
|
47
|
+
top: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.selected-icon {
|
|
51
|
+
visibility: visible;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;var ge={},kt=_;Object.defineProperty(ge,"__esModule",{value:!0});var Fe=ge.default=void 0,Ut=kt(q()),bt=e;Fe=ge.default=(0,Ut.default)((0,bt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline");function Oe({...t}){const{t:s,locale:d}=E(),{spaceGateways:a,backups:i}=J(),m=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:o=>{var g;const{targetUrl:r,targetName:j,status:c,createdAt:h}=i[o],D=c===L.BACKUPS.STATUS.PROGRESS&&H().diff(h,"hours")>=L.BACKUPS.TIMEOUT_HOURS,y=c===L.BACKUPS.STATUS.SUCCEEDED&&!D,f=j||((g=a.find(I=>r==null?void 0:r.includes(G(I==null?void 0:I.endpoint))))==null?void 0:g.name)||"Unknown DID Space";return y?e.jsx(Be,{fontSize:"16px",href:r,target:"_blank",children:f}):e.jsx(x,{variant:"body1",fontSize:"16px",children:f})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:o=>{const r=s(o===0?"common.auto":"common.manual");return e.jsx(ae,{children:r})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:o=>H(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:o=>de.isEmpty(o)?"":H(o).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:o=>{const{status:r,message:j,createdAt:c}=(i==null?void 0:i[o])??{},h=r===L.BACKUPS.STATUS.PROGRESS&&H().diff(c,"hours")>=L.BACKUPS.TIMEOUT_HOURS,D=h&&s("common.timeoutError"),y=r===L.BACKUPS.STATUS.PROGRESS&&!h,f=r===L.BACKUPS.STATUS.SUCCEEDED&&!h;return y?e.jsxs(x,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(Y,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):f?e.jsx(ae,{type:"success",children:s("common.succeeded")}):e.jsxs(u,{display:"inline-flex",alignItems:"center",children:[e.jsx(ae,{type:"error",children:s("common.failed")})," ",e.jsx(ot,{style:{display:"flex",alignItems:"center",flexShrink:0},title:j||D,children:e.jsx(nt,{children:e.jsx(Fe,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(u,{...t,children:i!=null&&i.length?e.jsx(ft,{title:e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:i,columns:m,emptyNode:s("storage.spaces.record.emptyData",d),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(u,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(u,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}Oe.propTypes={};function Le({...t}){const{t:s}=E(),{autoBackup:d,updateAutoBackup:a}=J(),i=async()=>{try{const m=!d.enabled;await a({enabled:m}),B.success(s(m?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(m){B.error(m.message)}};return e.jsx(De,{checked:!!(d!=null&&d.enabled),onChange:i,name:"enableWelcomePage",labelProps:{label:e.jsx(x,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Le.propTypes={};function Rt(){const{t}=E(),{blocklet:s}=$(),{api:d}=ce(),{spaceGateways:a,spaceGatewaysLoading:i,deleteSpaceGateway:m,spaceGatewayIsSelected:o}=J(),r=i&&!(a!=null&&a.length),j=async h=>{await m(h),B.success(t("storage.spaces.gateway.delete.succeeded",{name:`(${h.name})`}))},c=async()=>{await d.backupBlocklet({input:{appDid:s.appDid,to:"spaces"}})};return e.jsxs(u,{display:"flex",flexDirection:"column",children:[e.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Le,{style:{marginRight:"32px"}}),e.jsx(ee,{})]}),e.jsx(u,{children:r?e.jsx(u,{display:"flex",justifyContent:"center",children:e.jsx(Y,{})}):a.map(h=>e.jsx(xe,{style:{marginTop:"12px"},spaceGateway:h,connected:o(h),onDelete:j,onBackupNow:c},h.endpoint))}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(x,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(te,{blocklet:s})]})}function Et(){const{backupEndpoint:t}=J();return t?e.jsx(Rt,{}):e.jsx(Ue,{})}Et.propTypes={};export{Et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as y}from"./index-
|
|
1
|
+
import{g as y}from"./index-DtSAlyAb.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],o=n.message,a=(e[o]||0)+1;e[o]=a,a>=t&&(i=n,t=a)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)r[n]=t[n];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<r.retries;a++)o.push(this.createTimeout(a,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(a,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var n=r.randomize?Math.random()+1:1,o=Math.round(n*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var a=0;a<n.length;a++){var s=n[a],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as Oe,aL as Re,j as t,P as U,n as _e,dS as pa,r as K,b9 as ma,O as m,fa as Mn,eB as ns,a2 as Le,C as en,q as be,t as ha,v as ba,F as he,gH as Ea,A as Y,M as Me,ad as _a,x as ss,fB as xa,m as $t,gI as ya,at as Sa,aW as Te,aX as as,D as Qe,B as ie,w as va,J as Na,K as rs,b as se,bk as fe,bG as is,cc as Aa,f as xe,k as ze,bo as Ut,bc as Ye,U as Ta,gJ as Ca,g as et,ci as j,cn as De,dA as me,a3 as Oa,gK as Ce,bJ as Ra,a1 as ft,fb as Ge,S as os,ba as tt,a9 as wa,bH as Ia,bI as La,ax as Dn,b4 as ja,b3 as cs,dO as Ae,d8 as rt,fR as He,gL as Ma,gM as Da,gN as ka,aP as Pa,bt as Ba,bu as Fa,gO as $a,gw as Ua,bA as Ka,b5 as ls,bi as Kt,Q as za,eV as us,s as Ha,fg as Ie,Z as Wa,cW as ds,E as Ga,G as Nt}from"./index-
|
|
1
|
+
import{aK as Oe,aL as Re,j as t,P as U,n as _e,dS as pa,r as K,b9 as ma,O as m,fa as Mn,eB as ns,a2 as Le,C as en,q as be,t as ha,v as ba,F as he,gH as Ea,A as Y,M as Me,ad as _a,x as ss,fB as xa,m as $t,gI as ya,at as Sa,aW as Te,aX as as,D as Qe,B as ie,w as va,J as Na,K as rs,b as se,bk as fe,bG as is,cc as Aa,f as xe,k as ze,bo as Ut,bc as Ye,U as Ta,gJ as Ca,g as et,ci as j,cn as De,dA as me,a3 as Oa,gK as Ce,bJ as Ra,a1 as ft,fb as Ge,S as os,ba as tt,a9 as wa,bH as Ia,bI as La,ax as Dn,b4 as ja,b3 as cs,dO as Ae,d8 as rt,fR as He,gL as Ma,gM as Da,gN as ka,aP as Pa,bt as Ba,bu as Fa,gO as $a,gw as Ua,bA as Ka,b5 as ls,bi as Kt,Q as za,eV as us,s as Ha,fg as Ie,Z as Wa,cW as ds,E as Ga,G as Nt}from"./index-DtSAlyAb.js";import{I as qa}from"./iframe-a4uHsJw3.js";import{F as Va,R as Ya,I as Za,a as zt,L as At,b as Ja,d as Xa}from"./line-BT-CqrvO.js";import{d as fs}from"./ChevronRight-R1AD6T8t.js";import{T as tn}from"./index-Do9FcEok.js";import{B as gs}from"./bundle-avatar-D3srwykJ.js";import{u as Qa,B as er}from"./app-avatar-Cx6kCeuS.js";import{i as tr}from"./isEqual-j-zS_8Gf.js";import{d as nr}from"./Loop-DJX-NWYU.js";import{d as sr}from"./Done-CbG1n7TV.js";import{a as kn,A as ar}from"./Autocomplete-chf9WG4F.js";import{T as te,F as rr}from"./TextField-DsYRZFfL.js";import{e as ir}from"./mode-B2dWMeTO.js";import{C as or,d as cr}from"./Public-4ZipZDUd.js";import{u as ge}from"./blocklet-sVlwX65X.js";import{C as lr}from"./click-to-copy-CPgkX4m2.js";import{a as nn}from"./team-BwAkC099.js";import{a as We}from"./index-D2bnoRiO.js";import{E as sn}from"./index-Dp7ygnu_.js";import{u as ke,C as X}from"./index.esm-UKhIq9Zf.js";import{F as re}from"./Select-BHyxLJXO.js";import{d as ur}from"./Launch-BFRTKCgX.js";import{d as dr}from"./EditIcon-DWIVTczi.js";import{d as fr}from"./Edit-D2R20RFt.js";import{d as gr}from"./actions-DCJ-sSPn.js";import{u as pr,a as mr,D as hr,H as br}from"./index-7DZ48QpY.js";import{S as ht}from"./switch-control-DRGFY74g.js";import{S as Er}from"./Slider-CTrqzFQ0.js";import{D as _r}from"./index-DlnomLD1.js";import{I as xr}from"./index-9D4yHZMO.js";import"./index-DesqGCgv.js";import"./ArrowDropDown-BhDZI_jd.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./index-ltfZ8gtL.js";import"./Delete-BuQlLthh.js";import"./InputLabel-CfRvg3E0.js";import"./useLocalStorage-xuSREX68.js";import"./MoreVert-Cw5JqD-n.js";import"./url-evaluation-Ddzyc50Z.js";import"./tag-BcsNyCIC.js";import"./redux-CW-2wISG.js";import"./FilterList-gGx11q-p.js";import"./LastPage-BkIsmfi2.js";import"./Search-Co3tOmY1.js";var an={},yr=Re;Object.defineProperty(an,"__esModule",{value:!0});var ps=an.default=void 0,Sr=yr(Oe()),vr=t;ps=an.default=(0,Sr.default)((0,vr.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"}),"TuneRounded");var rn={},Nr=Re;Object.defineProperty(rn,"__esModule",{value:!0});var ms=rn.default=void 0,Ar=Nr(Oe()),Tr=t;ms=rn.default=(0,Ar.default)((0,Tr.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"}),"Key");var on={},Cr=Re;Object.defineProperty(on,"__esModule",{value:!0});var hs=on.default=void 0,Or=Cr(Oe()),Rr=t;hs=on.default=(0,Or.default)((0,Rr.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"}),"Login");var cn={},wr=Re;Object.defineProperty(cn,"__esModule",{value:!0});var bs=cn.default=void 0,Ir=wr(Oe()),Lr=t;bs=cn.default=(0,Ir.default)((0,Lr.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"}),"NotificationsNone");function ln({label:e,disabled:n,required:s,initialValue:r,onChange:u,style:c,onSubmit:i,triggers:a,options:o,formatterBeforeSubmit:l,helperText:d,placeholder:y,renderImage:b,renderLabel:h,filterKeys:v,noEmpty:A,...C}){const[I,f]=K.useState(!1),[g,S]=K.useState(!1),[p,x]=ma.useState(""),[O,D]=K.useState(r),[R,_]=K.useState(O),w=K.useMemo(()=>{if(!o)return{};const F={};return o.forEach(E=>{F[E.code]=E}),F},[o]),T=()=>{if(!o)return[];if(!p)return o.map(E=>E.code);const F=new RegExp(p.toLowerCase());return o.filter(E=>{var N;for(let k=0;k<v.length;k++){const z=v[k];if(F.test((N=E[z])==null?void 0:N.toLowerCase()))return!0}return!1}).map(E=>E.code)},M=async()=>{S(!0);try{await i(typeof l=="function"?l(R):R)===!1?_(O):A&&!R.length?(_(r),D(r)):(_(R),D(R))}catch{_(O)}finally{S(!1),f(!1)}},$=(F,E)=>{if(!Array.isArray(E)){_([]),u([]);return}const N=E.filter(k=>w[k]);if(!N.length){_([]),u([]);return}_(N),u(N)},q=I?t.jsx(ar,{options:o,value:R,onChange:$,inputValue:p,onInputChange:(F,E)=>{x(E)},PopperComponent:Mr,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:T,getOptionLabel:F=>{var E;return(E=w[F])==null?void 0:E.name},renderInput:F=>t.jsx(te,{...F,label:"",placeholder:y}),renderOption:(F,E)=>{var k;const N=R.indexOf(E)!==-1;return K.createElement(jr,{component:"li",...F,key:E},b(w[E]||{}),t.jsx(m,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:h(E,w[E])||((k=w[E])==null?void 0:k.name)}),t.jsx(m,{component:Mn,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...C}):t.jsx(m,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:R.filter(F=>o.some(E=>E.code===F)).map(F=>t.jsx(ns,{label:o.find(E=>E.code===F).name,style:{marginRight:8},size:"small"},F))});return t.jsx(Va,{className:"form",style:c,children:t.jsxs(m,{className:"form-item",children:[t.jsxs(m,{className:"form-item-label",children:[e,s&&t.jsx(Ya,{})]}),t.jsxs(m,{className:"form-item-body",children:[t.jsx(m,{className:"form-item-input",children:q}),t.jsx(m,{className:"form-item-action",children:I?t.jsxs(t.Fragment,{children:[t.jsx(Le,{"data-cy":"schema-form-item-confirm",onClick:M,disabled:n||g,size:"large",children:g?t.jsx(en,{size:24}):t.jsx(sr,{})}),t.jsx(Le,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(O),f(!1)},disabled:n||g,size:"large",children:t.jsx(Mn,{})})]}):t.jsx(Za,{triggers:a,onEnterEdit:()=>f(!0),disabled:n})})]}),I&&d&&t.jsx(rr,{children:d})]})})}ln.propTypes={style:U.object,onSubmit:U.func,onChange:U.func,label:U.string,initialValue:U.string,required:U.bool,disabled:U.bool,triggers:U.array,options:U.array,helperText:U.string,formatterBeforeSubmit:U.func,placeholder:U.string,renderImage:U.func,filterKeys:U.arrayOf(U.string),noEmpty:U.bool,renderLabel:U.func};ln.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const jr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bK as zo,j as e,aK as qt,aL as _t,q as z,O as y,ax as ve,P as r,A,bk as J,r as f,f as Ce,bo as Je,b as X,M as O,J as dt,U as Mt,cc as Oe,n as F,K as Z,gJ as Vo,bG as Me,aV as ue,aU as gt,aC as Ft,a2 as $,D as xt,F as D,bm as qo,Y as Ke,$ as Wn,a_ as _o,fF as Wo,fG as Ho,C as re,fa as Yo,y as po,av as pt,a1 as we,x as Gt,hx as Jo,hy as Ko,B as ne,ba as uo,H as Wt,hz as Qo,m as ee,a3 as Zo,eB as Xo,W as mo,Z as fo,ak as $o,w as es,Q as He,V as ts,hA as ho,S as ge,az as ns,aA as os,aB as ss,i as yt,hB as rs,cF as is,bf as as,h8 as ls,hC as cs,ay as Hn,cD as ds,ad as Fe,aJ as go,bI as Ht,ce as ps,hD as us,b5 as ms,z as fs,aW as zt,T as hs,aN as Ye,at as Nt,dG as gs,bp as xo,aF as xs,fR as Pe,dO as ys,hE as Cs,gi as Yn,hF as Jn,gk as Kn,aX as js,G as at,gm as vs,bH as Ss}from"./index-
|
|
1
|
+
import{bK as zo,j as e,aK as qt,aL as _t,q as z,O as y,ax as ve,P as r,A,bk as J,r as f,f as Ce,bo as Je,b as X,M as O,J as dt,U as Mt,cc as Oe,n as F,K as Z,gJ as Vo,bG as Me,aV as ue,aU as gt,aC as Ft,a2 as $,D as xt,F as D,bm as qo,Y as Ke,$ as Wn,a_ as _o,fF as Wo,fG as Ho,C as re,fa as Yo,y as po,av as pt,a1 as we,x as Gt,hx as Jo,hy as Ko,B as ne,ba as uo,H as Wt,hz as Qo,m as ee,a3 as Zo,eB as Xo,W as mo,Z as fo,ak as $o,w as es,Q as He,V as ts,hA as ho,S as ge,az as ns,aA as os,aB as ss,i as yt,hB as rs,cF as is,bf as as,h8 as ls,hC as cs,ay as Hn,cD as ds,ad as Fe,aJ as go,bI as Ht,ce as ps,hD as us,b5 as ms,z as fs,aW as zt,T as hs,aN as Ye,at as Nt,dG as gs,bp as xo,aF as xs,fR as Pe,dO as ys,hE as Cs,gi as Yn,hF as Jn,gk as Kn,aX as js,G as at,gm as vs,bH as Ss}from"./index-DtSAlyAb.js";import{d as bs}from"./Add-BhAOgw8n.js";import{a as Rs,R as ct,F as Es,L as Ts,d as Yt,b as Jt}from"./line-BT-CqrvO.js";import{C as ws,A as Ps,d as Is}from"./agreement-DByQv9ZX.js";import{E as ks}from"./index-Dp7ygnu_.js";import{b as Us,a as Ds,c as Bs,u as Kt,e as Ns}from"./actions-DCJ-sSPn.js";import{S as As}from"./switch-control-DRGFY74g.js";import{u as Ls}from"./detail-gUZ7dE3r.js";import{d as yo}from"./Edit-D2R20RFt.js";import{T as Os}from"./index-Do9FcEok.js";import{T as Ms,M as Fs,t as Gs}from"./table-icons-BL8xSB3P.js";import{C as Qn}from"./click-to-copy-CPgkX4m2.js";import{T as K}from"./TextField-DsYRZFfL.js";import{d as Qt}from"./Link-BZodiBIz.js";import{c as zs,C as Vs,a as qs,b as _s,D as Ws,A as Hs,B as Ys,d as Js,S as Ks}from"./item-DafV54vj.js";import{u as Qs,a as Zs,P as Co,L as Zn,A as Xs,S as $s}from"./index-ZT9QeB3O.js";import{u as jo,t as er}from"./toUpper-Cc1D9AuZ.js";import{u as ie}from"./blocklet-sVlwX65X.js";import{c as tr,d as nr,a as or,e as sr,f as rr,g as Xn,h as ir,i as $n}from"./spaces-CJAn8A_O.js";import{d as ar}from"./EditIcon-DWIVTczi.js";import{d as lr}from"./Done-CbG1n7TV.js";import{C as cr}from"./Google-CpcA0NCN.js";import{I as dr,B as pr}from"./install-from-url-C2MMBwn8.js";import{a as eo}from"./api-Bm6QocBj.js";import{v as vo,a as ut}from"./util-BxfggyNA.js";import{P as ur,u as mr}from"./use-blocklet-info-for-connect-did-spaces-ByiBXoYS.js";import{D as fr}from"./DeleteOutline-BuR7k_j3.js";import{S as to}from"./index-BPGGylov.js";import{d as hr}from"./ArrowDropDown-BhDZI_jd.js";import{_ as gr}from"./useLocalStorage-xuSREX68.js";import{d as xr}from"./LockIcon-CF3Yl9tf.js";import{d as Ct}from"./Delete-BuQlLthh.js";import{d as So}from"./Launch-BFRTKCgX.js";import{C as yr}from"./delete-confirm-DGNC6LoB.js";import{W as Qe}from"./tag-BcsNyCIC.js";import{d as Cr}from"./is-path-prefix-equal-DSWbb6Lw.js";import{R as jr,b as no,B as bo}from"./url-evaluation-Ddzyc50Z.js";import{B as vr}from"./bundle-avatar-D3srwykJ.js";import{A as Ro}from"./actions-DkgRiPBw.js";import{I as At}from"./index-9D4yHZMO.js";import{a as Sr}from"./index-D2bnoRiO.js";import{u as br}from"./team-BwAkC099.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./index-ltfZ8gtL.js";import"./index-iAyUVxpq.js";import"./url-join-BdHqt1dS.js";import"./MoreVert-Cw5JqD-n.js";import"./app-avatar-Cx6kCeuS.js";import"./Breadcrumbs-Un40qFmK.js";import"./FilterList-gGx11q-p.js";import"./Select-BHyxLJXO.js";import"./InputLabel-CfRvg3E0.js";import"./LastPage-BkIsmfi2.js";import"./slicedToArray-BjdTUeMu.js";import"./Search-Co3tOmY1.js";import"./ChevronLeft-LgQFTPg9.js";import"./ChevronRight-R1AD6T8t.js";import"./DeleteOutline-CfWsbc1a.js";import"./redux-CW-2wISG.js";import"./Skeleton-FWWrVymY.js";import"./InputAdornment-BPwm2dnh.js";import"./memoize-one.esm-BdPwpGay.js";import"./index-dI-5DMUE.js";import"./preact.module-B1z5cdvs.js";import"./Close-BA4_6LGT.js";import"./lottie-DPC4uwjn.js";import"./Stepper-BYinN7qr.js";import"./index-D3BiJZx7.js";import"./shorten-label-MNOvw9uc.js";const Rr=zo(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Zt={},Er=_t;Object.defineProperty(Zt,"__esModule",{value:!0});var Eo=Zt.default=void 0,Tr=Er(qt()),wr=e;Eo=Zt.default=(0,Tr.default)((0,wr.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Xt({children:t,...o}){const{t:s}=z(),{updateAutoCheckUpdate:a,autoCheckUpdate:n}=Ls(),i=async()=>{try{const l=!(n!=null&&n.enabled);await a({enabled:l}),A.success(s(l?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(l){A.error(l.message)}},m=!!(n!=null&&n.enabled);return e.jsxs(y,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(ve,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(As,{checked:m,onChange:i,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Xt.propTypes={children:r.any};Xt.defaultProps={children:null};const Pr=(t,o)=>{let{description:s}=t;return(Object.values(X.CHAIN_PROP_MAP).includes(t.key)||O.isEnvShareable(t))&&(s?s=`${s} (${o("blocklet.config.sharedToAllComponents")})`:s=o("blocklet.config.sharedToAllComponents")),s&&e.jsx("div",{style:{marginLeft:12},children:s})},Lt=(t,o,s=[])=>!(s!=null&&s.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(n=>n.name===t.key))?!0:t.custom;function mt({blocklet:t,ancestors:o}){const s=J(),{inService:a}=s,{t:n}=f.useContext(Ce),i=[...o.map(c=>c.meta.did),t.meta.did],m=()=>A.success(n("blocklet.config.changedTip")),l=c=>Lt(c,t,o);if(Je(t.status)||t.status==="unknown"&&Je(t.status))return null;const u=async c=>{if(!c.key.trim()||!c.value.trim()){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(c.key.startsWith("BLOCKLET_")||c.key.startsWith("COMPONENT_")){A.error(n("blocklet.config.environment.invalidKey"));return}c.custom=!0;try{const v=await s.api.configBlocklet({input:{did:i,configs:[c]}});m(v.blocklet)}catch(v){A.error(Z(v))}},h=async(c,v)=>{if(c.required&&(!c.key.trim()||!c.value.trim())){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(c.key.startsWith("BLOCKLET_")&&!X.BLOCKLET_CONFIGURABLE_KEY[c.key]){A.error(n("blocklet.config.environment.invalidKey"));return}if(c.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const T=Vo(c);if(T){A.error(T);return}}const j=[{...c,value:c.secure&&c.value==="__encrypted__"?"":c.value}];if(c.key!==v.key){if(!Lt(c,t,o)){A.error("Only key of custom env can be changed");return}j.push({key:v.key,custom:!0})}try{const T=await s.api.configBlocklet({input:{did:i,configs:j}});m(T.blocklet)}catch(T){A.error(Z(T))}},g=async c=>{if(c.required){A.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Lt(c,t,o)){A.error("Only key of custom env can be changed");return}try{const v=await s.api.configBlocklet({input:{did:i,configs:[{key:c.key,custom:!0}]}});m(v.blocklet)}catch(v){A.error(Z(v))}},p=(t.configs||[]).filter(c=>!X.BLOCKLET_CONFIGURABLE_KEY[c.key]),S=O.getSharedConfigObj(o[0],t),d=O.getComponentMissingConfigs(t,o[0]),b=p.map(c=>({...c,value:Object.values(X.CHAIN_PROP_MAP).includes(c.key)&&Object.keys(S).includes(c.key)?S[c.key]:S[c.key]||c.value})),C=b.some(c=>c.key&&c.key.startsWith("BWA_")),x={onRowAdd:u,onRowUpdate:h,onRowDelete:g,isDeletable:l},R=()=>[{title:n("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:c=>e.jsx(Qn,{value:c.value,style:{color:c.required&&!c.value?"#ff4436":"#222222",fontWeight:c.required?"bold":"normal"},children:c.key}),editComponent:c=>{const{value:v,rowData:j,onChange:T}=c;return e.jsx(oo,{children:e.jsx(K,{fullWidth:!0,size:"small",disabled:l(j)===!1,value:v,onChange:I=>T(I.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:c=>c.value?c.secure?"******":e.jsx(Qn,{unstyled:!0,value:c.value,style:{wordBreak:"break-all"},children:c.value}):null,editComponent:c=>{const{value:v,rowData:j,onChange:T}=c;return e.jsxs(oo,{children:[e.jsx(K,{fullWidth:!0,size:"small",value:v==="__encrypted__"?"":v,onChange:I=>T(I.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),Pr(j,n)]})}}];return e.jsxs(Ir,{children:[!!d.length&&e.jsx(dt,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(dt,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Mt,{permission:a?"":"mutate_blocklets",role:a?Oe:[],children:c=>e.jsx(Ms,{className:"config-table",children:e.jsx(Fs,{title:e.jsx("h4",{children:n("common.environment")}),columns:R(),icons:{...Us,...Gs},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:b,editable:c?x:{}})})})]})}mt.propTypes={blocklet:r.object.isRequired,ancestors:r.array};mt.defaultProps={ancestors:[]};const Ir=F.div`
|
|
2
2
|
.config-table {
|
|
3
3
|
margin-bottom: 24px;
|
|
4
4
|
position: relative;
|
|
@@ -63,7 +63,7 @@ import{bK as zo,j as e,aK as qt,aL as _t,q as z,O as y,ax as ve,P as r,A,bk as J
|
|
|
63
63
|
.ux-dialog_right {
|
|
64
64
|
padding-right: 20px;
|
|
65
65
|
}
|
|
66
|
-
`,{NODE_MODES:so}=D,Ar=({mode:t,previousMode:o}={})=>t===so.SERVERLESS||o===so.SERVERLESS;var To={isInServerlessMode:Ar};function Lr(){const[t,o]=f.useState(null),{blocklet:s}=ie();return f.useEffect(()=>{o(tr(s))},[s]),{storageEndpoint:t}}const wo=f.createContext({}),{Provider:Or,Consumer:
|
|
66
|
+
`,{NODE_MODES:so}=D,Ar=({mode:t,previousMode:o}={})=>t===so.SERVERLESS||o===so.SERVERLESS;var To={isInServerlessMode:Ar};function Lr(){const[t,o]=f.useState(null),{blocklet:s}=ie();return f.useEffect(()=>{o(tr(s))},[s]),{storageEndpoint:t}}const wo=f.createContext({}),{Provider:Or,Consumer:Qa}=wo;function $t({children:t}){const[o,s]=f.useState(!1),[a,n]=f.useState(null),{blocklet:i,actions:{refreshBlocklet:m}}=ie(),{storageEndpoint:l}=Lr(),{api:u}=J();qo(async()=>{try{if(s(!0),Wn.isEmpty(l)){n(null);return}const d=await nr(l);n(d)}catch(d){console.error(d),A.error(d.message)}finally{s(!1)}},[l]);const h=()=>{n(null),m()},g=async d=>{n(d),await p(d.endpoint),m()},p=async d=>{await u.configBlocklet({input:{did:[i.meta.did],configs:[{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),m()};f.useEffect(()=>{async function d(){if(!a)return;const b=await or(a.endpoint,a.name),C=Wn.merge(a,{name:b});n(C)}d()},[]);const S=!!(l&&a);return e.jsx(Or,{value:{loading:o,spaceGateway:a,deleteSpaceGateway:h,updateSpaceGateway:g,storageEndpoint:l,settingStorageEndpoint:p,hasStorageEndpoint:S},children:t})}$t.propTypes={children:Ke.node.isRequired};$t.defaultProps={};function en(){return f.useContext(wo)}const tn={description:r.string,editing:r.bool,onChange:r.func,required:r.bool,value:r.any,componentProps:r.object,render:r.func,renderFormItem:r.func};function nn({editing:t,value:o,onChange:s}){const[a,n]=f.useState(!1),i=f.useRef(),m=f.useRef(o);f.useEffect(()=>{let p=null;return t&&(p=setTimeout(()=>{n(!0)},50)),()=>{clearTimeout(p)}},[t]);const l=p=>{m.current=p,s(p)},u=()=>{n(!1),s(m.current)},h=e.jsx(y,{className:"form-item-input slot",px:1,children:e.jsxs(y,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),g=e.jsxs(y,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:u,children:[e.jsx(y,{display:"flex",alignItems:"center",onClick:()=>n(!0),children:e.jsx("div",{ref:i,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),e.jsx(_o,{open:a,anchorEl:i.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(cr,{color:o,onChange:p=>l(p.hex)})})]});return t?g:h}nn.propTypes=tn;function on({editing:t,description:o,value:s,onChange:a,componentProps:n,...i}){const{placeholder:m}=n,l=f.useRef(s),u=g=>{g.key==="Enter"&&a(l.current,"confirm")},h=g=>{l.current=g,a(g)};return t?e.jsx(K,{style:{flex:1},fullWidth:!0,value:s,onChange:g=>{g.persist(),h(g.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||m,onKeyDown:u,...i}):e.jsx(y,{px:1,className:"form-item-input slot",children:s})}on.propTypes=tn;on.defaultProps={componentProps:{}};function sn({editing:t,value:o,onChange:s,componentProps:a,...n}){const{blocklet:i}=a,m=o==="auto"?Wo.getPassportColorFromDid(i.appDid):o;return e.jsxs(y,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Ho({title:"Owner",issuer:O.getDisplayName(i),issuerDid:i.appDid,ownerName:"Your Name",ownerDid:i.appDid,preferredColor:o||"auto"})}}),e.jsx(nn,{...n,editing:t,value:t?m:o,onChange:s,componentProps:a})]})}sn.propTypes={...tn,componentProps:r.shape({blocklet:r.object.isRequired}).isRequired};sn.defaultProps={};const Mr={input:on,color:nn,passport:sn,uploader:t=>e.jsx(Ts,{...t.componentProps})};function Fr(t,{editing:o=!1}){const{componentType:s="input",render:a,renderFormItem:n}=t;return o&&n?n:!o&&a?a:Mr[s==null?void 0:s.toLowerCase()]}function rn({schema:t,loading:o,value:s,defaultValue:a,onChange:n,style:i,disabled:m}){const l=Object.prototype.toString.call(s)==="[object Object]",[u,h]=f.useState(null),[g,p]=f.useState(l?s:a),S=f.useRef();function d(x,R,c){const{key:v,secure:j}=x,I=g[v]!==R,U={...g,[v]:R};I&&p(U),n({[v]:R},{allValues:U,action:c,currentItem:x}),c==="confirm"&&j&&p({...g,[v]:"__encrypted__"}),["confirm","cancel"].includes(c)?b(null):b(x)}function b(x){if(x){S.current=g[x.key],h(x);return}S.current=null,h(null)}function C(x,{editing:R=!1}){const{key:c}=x,v=l?s[c]:g[c];return v==="__encrypted__"?R?"":"******":v}return e.jsx(Gr,{className:"form",style:i,children:t==null?void 0:t.map(x=>{const{key:R,description:c,required:v,solo:j=!1,hidden:T=!1,componentProps:I={}}=x;if(T)return null;const U=!!(u&&R===u.key),L=C(x,{editing:U}),k=Fr(x,{editing:U}),M={inputProps:{"data-cy":"schema-form-item-component"},key:R,description:c,editing:U,value:L,onChange:(B,V="change")=>d(x,B,V),componentProps:I};return e.jsxs(y,{className:"form-item",children:[!j&&e.jsxs(y,{className:"form-item-label",style:{color:v&&!L?"#ff0000":"#333"},children:[c,v&&e.jsx(ct,{})]}),e.jsxs(y,{className:"form-item-body",children:[e.jsx(y,{className:"form-item-input",sx:{textAlign:j?"center":"left"},children:e.jsx(k,{...M})}),!j&&e.jsx(y,{className:"form-item-action",children:U?e.jsxs(e.Fragment,{children:[e.jsx($,{"data-cy":"schema-form-item-confirm",onClick:()=>{d(x,L,"confirm")},disabled:m||o,size:"large",children:o?e.jsx(re,{size:24}):e.jsx(lr,{})}),e.jsx($,{"data-cy":"schema-form-item-cancel",onClick:()=>{d(x,S.current,"cancel")},disabled:m||o,size:"large",children:e.jsx(Yo,{})})]}):e.jsx($,{"data-cy":"schema-form-item-edit",onClick:()=>{d(x,g[R],"edit")},disabled:m||u,size:"large",children:e.jsx(ar,{})})})]})]},R)})})}rn.propTypes={schema:r.array.isRequired,loading:r.bool,onChange:r.func.isRequired,value:r.object,defaultValue:r.object,style:r.object,disabled:r.bool};rn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Gr=F(Es)``;function an({meta:t,onCancel:o,mode:s,handlePaySuccess:a}){const{t:n,locale:i}=z(),{info:m}=J(),l=po(m),[u,h]=f.useState(null),g=new URL(t==null?void 0:t.registryUrl).origin,p=O.getDisplayName({meta:t}),S=async(b,C)=>{const x=({downloadTokenList:v})=>{a({downloadTokenList:v})},R=v=>{A.error(v),o(v)};function c(v){return Ko(()=>eo.get(v).then(async({data:j})=>{const T=j==null?void 0:j.downloadTokenList;if(j.status==="succeed"){if(T&&T.length)await x({downloadTokenList:T});else return await R(n("blocklet.component.missDownloadTokenTip")),!0;return!0}return j.status==="error"?(console.error("vc error: ",j),await R(j==null?void 0:j.error),!0):!1}),{interval:1e3})}if(s==="purchase"&&u){const{statusUrl:v}=Jo(u);await c(v)}else await x({downloadTokenList:b.downloadTokenList&&C(b.downloadTokenList)})};if(f.useEffect(()=>{if(s==="purchase"){const b=new URL(g);b.pathname="/api/did/verify-purchase-blocklet/token",b.searchParams.set("serverDid",m.did),b.searchParams.set("blockletDid",t==null?void 0:t.did);try{eo.get(b.href).then(({data:C})=>{const x=`${C.url}`;h(x)})}catch(C){console.error("get next workflow url error: ",C)}}return()=>{h(null)}},[s]),s==="purchase"&&!u)return"";const d={verify:{action:"verify-purchase-blocklet",checkFn:pt.create({baseURL:g}).get,extraParams:{serverDid:m.did,blockletDid:t==null?void 0:t.did},messages:{title:n("store.purchase.verify.auth.title",{name:p}),scan:n("store.purchase.verify.auth.scan"),confirm:n("store.purchase.verify.auth.confirm"),success:n("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:pt.create({baseURL:we(g,"/store")}).get,extraParams:{factory:t.nftFactory,nw:u},messages:{title:n("store.purchase.auth.title",{name:p}),scan:n("store.purchase.auth.scan"),confirm:n("store.purchase.auth.confirm"),success:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:n("store.purchase.auth.success")}),e.jsx("p",{children:n("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return e.jsx(Gt,{open:!0,locale:i,popup:!1,saveConnect:!1,className:"connect",baseUrl:g,onSuccess:S,cancelWhenScanned:o,onClose:o,checkTimeout:60*5e3,webWalletUrl:l,disableClose:!0,showDownload:!1,...d[s]})}an.propTypes={...zs,handlePaySuccess:r.func,mode:r.oneOf(["verify","purchase"]).isRequired};an.defaultProps={handlePaySuccess:()=>{}};const ln=f.forwardRef(({mode:t,...o},s)=>{const[a,n]=f.useState(t!=="both"?t:"verify"),[i,m]=f.useState(t!=="both"?2:1),l=h=>{h!==a&&n(h)},u=()=>{a&&i!==2&&m(2)};return f.useImperativeHandle(s,()=>({onNext:u,getCurrentStep:()=>i})),i===1?e.jsx("div",{style:{maxWidth:520},children:e.jsx(Vs,{action:a,onNext:null,onSelect:l})}):e.jsx(an,{...o,mode:a})});ln.propTypes={mode:r.oneOf(["both","verify","purchase"]).isRequired,ref:r.any};ln.defaultProps={ref:{}};const zr=ln;function Vr({...t}){return e.jsx(ne,{className:"bottom-button",variant:"contained",color:"primary",...t})}function cn({key:t}={key:"sm"}){const o=uo();return Wt(o.breakpoints.down(t))}function dn({blocklet:t,onStartNow:o,children:s,disabled:a}){const{t:n}=z(),i=cn();return!t||Qo(t.meta)?e.jsx(qr,{children:s}):e.jsxs(_r,{isMobile:i,children:[e.jsx(Vr,{className:"start-now",variant:"contained",color:"primary",disabled:a,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(y,{display:"flex",alignItems:"center",children:s})]})}dn.propTypes={blocklet:r.object,onStartNow:r.func,children:r.any,disabled:r.bool};dn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const qr=F(y)`
|
|
67
67
|
width: 100%;
|
|
68
68
|
margin-top: auto;
|
|
69
69
|
padding-top: 24px;
|