@abtnode/blocklet-services 1.16.16-beta-2e5e3db7 → 1.16.16-beta-cfa95fa6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/emails/components/copyright.js +3 -1
- package/api/index.js +2 -2
- package/api/middlewares/verify-federated-call.js +1 -0
- package/api/routes/federated.js +147 -18
- package/api/services/auth/index.js +2 -3
- package/api/services/notification/index.js +2 -1
- package/api/socket/channel/component.js +26 -18
- package/api/util/index.js +19 -0
- package/build/asset-manifest.json +97 -97
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/js/{1013.48b6d77d.chunk.js → 1013.7b9f0d1c.chunk.js} +3 -3
- package/build/static/js/{1480.88c590c2.chunk.js → 1480.4d4dda1b.chunk.js} +2 -2
- package/build/static/js/1565.ba7ad6c9.chunk.js +2 -0
- package/build/static/js/2291.1627e4db.chunk.js +2 -0
- package/build/static/js/{2393.c5bbedfd.chunk.js → 2393.29558f48.chunk.js} +2 -2
- package/build/static/js/{2631.54f86f84.chunk.js → 2631.58f5f3bd.chunk.js} +2 -2
- package/build/static/js/2653.e7392aa1.chunk.js +2 -0
- package/build/static/js/{2686.7ae70bfd.chunk.js → 2686.890b32ed.chunk.js} +2 -2
- package/build/static/js/{2838.6fa46760.chunk.js → 2838.777de983.chunk.js} +3 -3
- package/build/static/js/{3038.8cbed218.chunk.js → 3038.40d611d1.chunk.js} +2 -2
- package/build/static/js/3593.4d68c718.chunk.js +2 -0
- package/build/static/js/3595.e2b52a55.chunk.js +3 -0
- package/build/static/js/3688.a821d97e.chunk.js +2 -0
- package/build/static/js/4023.c145cf94.chunk.js +2 -0
- package/build/static/js/{4355.42023420.chunk.js → 4355.7ff96d41.chunk.js} +2 -2
- package/build/static/js/4420.8b69d6e7.chunk.js +2 -0
- package/build/static/js/4706.d0c07efb.chunk.js +3 -0
- package/build/static/js/4716.bd8bed1b.chunk.js +2 -0
- package/build/static/js/{476.1f6135d6.chunk.js → 476.f196e88a.chunk.js} +2 -2
- package/build/static/js/4802.c534aa74.chunk.js +2 -0
- package/build/static/js/{5465.e0965b1d.chunk.js → 5465.19cd4b1f.chunk.js} +2 -2
- package/build/static/js/5628.8e4d578c.chunk.js +2 -0
- package/build/static/js/{5673.ab67c509.chunk.js → 5673.24aec022.chunk.js} +2 -2
- package/build/static/js/{5683.7e5d47f1.chunk.js → 5683.19dfa1f2.chunk.js} +2 -2
- package/build/static/js/{5960.adcd2848.chunk.js → 5960.e6da30ae.chunk.js} +2 -2
- package/build/static/js/{5982.89bdb419.chunk.js → 5982.27671e0b.chunk.js} +2 -2
- package/build/static/js/6186.99068c82.chunk.js +2 -0
- package/build/static/js/6452.8510e39f.chunk.js +2 -0
- package/build/static/js/{6498.bd96fa39.chunk.js → 6498.698608f8.chunk.js} +2 -2
- package/build/static/js/6576.2afa44eb.chunk.js +2 -0
- package/build/static/js/6737.16a327aa.chunk.js +2 -0
- package/build/static/js/{6771.1e778542.chunk.js → 6771.fae30b2e.chunk.js} +3 -3
- package/build/static/js/6856.2eb98754.chunk.js +2 -0
- package/build/static/js/{6868.f2fd5c29.chunk.js → 6868.b4a7c4d1.chunk.js} +2 -2
- package/build/static/js/{6640.f40cecbd.chunk.js → 6919.aa19f009.chunk.js} +2 -2
- package/build/static/js/{7465.babf76bb.chunk.js → 6974.9fe85473.chunk.js} +3 -3
- package/build/static/js/{7006.b72aff66.chunk.js → 7006.8f0645e5.chunk.js} +2 -2
- package/build/static/js/{7367.60cb10e0.chunk.js → 7367.c5adfbb1.chunk.js} +2 -2
- package/build/static/js/7516.eb541f26.chunk.js +2 -0
- package/build/static/js/{8143.e1c8ca20.chunk.js → 8143.34374ce2.chunk.js} +2 -2
- package/build/static/js/{8497.0cf2247d.chunk.js → 8497.e83aa0c8.chunk.js} +2 -2
- package/build/static/js/{8604.ad77a749.chunk.js → 8604.ad426a4a.chunk.js} +3 -3
- package/build/static/js/9088.4313ac38.chunk.js +3 -0
- package/build/static/js/9102.ff87def5.chunk.js +2 -0
- package/build/static/js/9409.c853d69d.chunk.js +2 -0
- package/build/static/js/941.94668382.chunk.js +2 -0
- package/build/static/js/{9899.af2e4f43.chunk.js → 9899.277d673f.chunk.js} +2 -2
- package/build/static/js/main.adbd79ef.js +3 -0
- package/package.json +26 -26
- package/build/static/js/1565.6df974b9.chunk.js +0 -2
- package/build/static/js/2291.4b1a6a86.chunk.js +0 -2
- package/build/static/js/2653.5dc29ed5.chunk.js +0 -2
- package/build/static/js/3593.c1eddcd6.chunk.js +0 -2
- package/build/static/js/3595.cbf763c8.chunk.js +0 -3
- package/build/static/js/3688.9bb1c7a8.chunk.js +0 -2
- package/build/static/js/4023.a8b23be1.chunk.js +0 -2
- package/build/static/js/4420.55971847.chunk.js +0 -2
- package/build/static/js/4706.212c92c8.chunk.js +0 -3
- package/build/static/js/4716.88f32cf2.chunk.js +0 -2
- package/build/static/js/4802.3b60e453.chunk.js +0 -2
- package/build/static/js/50.cbaa5a4e.chunk.js +0 -3
- package/build/static/js/5628.e46ecc79.chunk.js +0 -2
- package/build/static/js/6186.6c16ec07.chunk.js +0 -2
- package/build/static/js/6452.143af37a.chunk.js +0 -2
- package/build/static/js/6576.f78daf32.chunk.js +0 -2
- package/build/static/js/6700.5dfd9c70.chunk.js +0 -2
- package/build/static/js/6737.7d135225.chunk.js +0 -2
- package/build/static/js/6856.e185e317.chunk.js +0 -2
- package/build/static/js/9102.828066ce.chunk.js +0 -2
- package/build/static/js/9409.62a2aee0.chunk.js +0 -2
- package/build/static/js/941.6a4ed4dd.chunk.js +0 -2
- package/build/static/js/main.88f8260e.js +0 -3
- /package/build/static/js/{1013.48b6d77d.chunk.js.LICENSE.txt → 1013.7b9f0d1c.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2838.6fa46760.chunk.js.LICENSE.txt → 2838.777de983.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{3595.cbf763c8.chunk.js.LICENSE.txt → 3595.e2b52a55.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4706.212c92c8.chunk.js.LICENSE.txt → 4706.d0c07efb.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6771.1e778542.chunk.js.LICENSE.txt → 6771.fae30b2e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7465.babf76bb.chunk.js.LICENSE.txt → 6974.9fe85473.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8604.ad77a749.chunk.js.LICENSE.txt → 8604.ad426a4a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{50.cbaa5a4e.chunk.js.LICENSE.txt → 9088.4313ac38.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.88f8260e.js.LICENSE.txt → main.adbd79ef.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6186],{5954:function(e,n,t){t.d(n,{cK:function(){return d},h6:function(){return p}});var r=t(30969),o=t(41395),a=t(20244),i=t(48952),c=t(90781),s=t(99042),l=t(37574),u=o.sy.Provider;o.sy.Consumer;function d(e){var n=e.children,t="".concat(a.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images"),r=window.env,o=r.serverDid,d=r.serverVersion,p=r.mode,f={imgPrefix:t,api:i.Z,restApi:s.Z,ws:{getWsClient:c.ZP,create:c.Ue,useSubscription:c.mU},type:"service",info:{did:o,version:d,mode:p}};return(0,l.jsx)(u,{value:{node:f},children:n})}function p(){return(0,r.useContext)(o.sy).node}},6186:function(e,n,t){t.r(n),t.d(n,{default:function(){return en}});var r,o=t(71171),a=t(16380),i=t(30969),c=t(30734),s=t(238),l=t(38361),u=t(78744),d=t(26022),p=t(19865),f=t(7017),m=t(20244),v=t(24891),h=t(43820),g=t(94282),x=t(33028),Z=t(32723),b=t(34795),y=t(96234),k=t(59740),w=t(24974),C=t.n(w),P=t(86822),E=t(17708),j=t(94551),D=t(48082),S=t(75295),R=t(89667),_=t(94308),B=t(2689),N=t(37973),L=t(93310),T=t(86008),I=t(33359),U=t(76492),A=t(97517),O=t(49884),G=t(18877),z=t(29996),F=t(59505),K=t(1986),M=t(90617),q=t(41395),V=t(8479),W=t(55008),X=t(45008),H=t(37574),J=["blocklet","onStart","onComplete","variant","hasPermission","useBlockletUrlEvaluation"];function Y(e){var n,t,r,o,a=e.blocklet,s=e.onStart,l=e.onComplete,u=e.variant,p=e.hasPermission,h=e.useBlockletUrlEvaluation,g=(0,k.Z)(e,J),w=(0,c.useNavigate)(),C=(0,q.h6)(),Y=(0,i.useState)(null),Q=(0,y.Z)(Y,2),ee=Q[0],ne=Q[1],te=(0,i.useState)(null),re=(0,y.Z)(te,2),oe=re[0],ae=re[1],ie=(0,i.useState)(!1),ce=(0,y.Z)(ie,2),se=ce[0],le=ce[1],ue=(0,i.useState)(null),de=(0,y.Z)(ue,2),pe=de[0],fe=de[1],me=(0,i.useContext)(d.RD).t,ve=(0,E.Z)("skip-blocklet-setup",!1),he=(0,y.Z)(ve,1)[0],ge=h(a),xe=ge.loading,Ze=ge.recommendedUrl,be=(0,X.y0)().nftState,ye=(0,f.isInProgress)(a.status),ke=(null===a||void 0===a||null===(n=a.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===F.BLOCKLET_CONTROLLER_STATUS.suspended;null!==be&&void 0!==be&&be.expired||(null===a||void 0===a||null===(r=a.controller)||void 0===r||null===(o=r.status)||void 0===o?void 0:o.reason)!==F.SUSPENDED_REASON.expired||(ke=!1);var we=C.inService,Ce=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,b.Z)((0,Z.Z)().mark((function r(){var o,i,c,u,d;return(0,Z.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=function(){var t=(0,b.Z)((0,Z.Z)().mark((function t(r){var o,i,c,u,d,p,m,h,g,x;return(0,Z.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s({action:e,blocklet:a}),le(!0),ae(e),fe(null),o=!1,t.prev=5,"remove"!==e){t.next=11;break}return t.next=9,n(r);case 9:t.next=38;break;case 11:if("start"!==e){t.next=28;break}if((0,f.hasRunnableComponent)(a)){t.next=15;break}return K.Z.error(me("blocklet.noComponent")),t.abrupt("return");case 15:if(we||he||null!==(i=a.settings)&&void 0!==i&&i.initialized||a.mode===F.BLOCKLET_MODES.DEVELOPMENT){t.next=22;break}return c=(0,M.RU)(C.info),(u=new URL(Ze)).searchParams.set("serverUrl",c),window.open(u.href),l({action:e,blocklet:a}),t.abrupt("return");case 22:return d=a.children.filter((function(e){return!(0,f.isInProgress)(e.status)&&"running"!==e.status})).map((function(e){return e.meta.did})),p={did:a.meta.did,componentDids:d},t.next=26,n({input:p});case 26:t.next=38;break;case 28:if(!["stop","restart","reload"].includes(e)){t.next=35;break}return m=a.children.filter((function(e){return"running"===e.status})).map((function(e){return e.meta.did})),h={did:a.meta.did,componentDids:m},t.next=33,n({input:h});case 33:t.next=38;break;case 35:return g={did:a.meta.did},t.next=38,n({input:g});case 38:if("remove"!==e){t.next=42;break}o=!0,t.next=44;break;case 42:return t.next=44,(0,v._v)(1e3);case 44:"reload"===e&&K.Z.success(me("blocklet.reloadSuccess")),l({action:e,blocklet:a}),t.next=52;break;case 48:t.prev=48,t.t0=t.catch(5),x="Blocklet ".concat(e," failed: ").concat((0,v.Z)(t.t0)),l({action:e,blocklet:a,error:new Error(x)});case 52:return t.prev=52,o||le(!1),t.finish(52);case 55:case"end":return t.stop()}}),t,null,[[5,48,52,55]])})));return function(e){return t.apply(this,arguments)}}(),i=function(){le(!1),fe(null)},c=(0,f.getDisplayName)(a,!0),u=a.mode===F.BLOCKLET_MODES.DEVELOPMENT?{description:function(){return(0,H.jsx)(I.Z,{component:"div",children:(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")})})},params:{removeType:"complete"}}:{description:function(e,n){return(0,H.jsxs)(I.Z,{component:"div",children:[(0,H.jsx)(I.Z,{gutterBottom:!0,children:me("blocklet.action.removeApplicationDescription")}),(0,H.jsxs)(A.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,x.Z)((0,x.Z)({},e),{},{removeType:t.target.value}))},children:[(0,H.jsx)(O.Z,{value:"backup",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationAfterBackup")}),(0,H.jsx)(O.Z,{value:"complete",control:(0,H.jsx)(U.Z,{}),label:me("blocklet.action.removeApplicationComplete")})]})]})},params:{removeType:"backup"}},d={stop:{title:"".concat(me("common.stop")," ").concat(c),description:me("blocklet.action.stopDescription"),confirm:me("blocklet.action.confirmStop"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},restart:{title:"".concat(me("common.restart")," ").concat(c),description:me("blocklet.action.restartDescription"),confirm:me("blocklet.action.confirmRestart"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},remove:(0,x.Z)({title:"".concat(me("common.remove")," ").concat(c),confirm:me("blocklet.action.confirmRemove"),cancel:me("common.cancel"),onConfirm:o,onCancel:i},u),cancelDownload:{title:"".concat(me("common.cancel")),description:me("blocklet.action.cancelDownloadDescription",{name:c}),confirm:me("common.confirm"),cancel:me("common.cancel"),onConfirm:o,onCancel:i}},!t){r.next=9;break}fe(d[e]),r.next=11;break;case 9:return r.next=11,o();case 11:case"end":return r.stop()}}),r)})))},Pe=Boolean(ee),Ee=function(){var e=(0,b.Z)((0,Z.Z)().mark((function e(n,t){return(0,Z.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.stopPropagation(),t.preventDefault()}catch(r){}if(ne(null),"function"!==typeof n.handler){e.next=16;break}return e.prev=3,le(!0),ae(n.action),e.next=8,n.handler();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.error("Blocklet ".concat(n.name," failed: "),e.t0);case 13:return e.prev=13,le(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[3,10,13,16]])})));return function(n,t){return e.apply(this,arguments)}}(),je=!we&&(0,f.isDeletableBlocklet)(a)&&a.structVersion===m.APP_STRUCT_VERSION?{action:"remove",icon:W.Z.Remove,name:me("common.remove"),handler:Ce("remove",function(){var e=(0,b.Z)((0,Z.Z)().mark((function e(n){return(0,Z.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("backup"!==n.removeType){e.next=4;break}return e.next=4,C.api.backupBlocklet({input:{appDid:a.appDid,to:"disk"}});case 4:return e.next=6,C.api.deleteBlocklet({input:{did:a.meta.did,keepData:!1}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!0),disabled:ye}:null,De={action:"remove",icon:W.Z.Remove,name:me("common.cancel"),handler:Ce("cancelDownload",C.api.cancelDownloadBlocklet,!0)},Se=(0,f.getAppMissingConfigs)(a),Re=[{action:"start",icon:W.Z.Start,name:me("common.start"),handler:Ce("start",C.api.startBlocklet),disabled:ke||a.children.every((function(e){return"running"===e.status}))||(0,v.XN)(a.status)||xe||ye},{action:"stop",icon:W.Z.Stop,name:me("common.stop"),handler:Ce("stop",C.api.stopBlocklet,!0),disabled:!["running","starting"].includes(a.status)},{action:"restart",icon:W.Z.Restart,name:me("common.restart"),handler:Ce("restart",C.api.restartBlocklet,!0),disabled:ke||"running"!==a.status},{action:"reload",icon:W.Z.Reload,name:me("common.reload"),handler:Ce("reload",C.api.reloadBlocklet),disabled:ke||"running"!==a.status},(0,v.XN)(a.status)?De:je,{separator:!0},{onlyInMenu:!0,action:"config",icon:W.Z.Config,name:me("common.config"),handler:function(){w("/blocklets/".concat(a.meta.did,"/configuration"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"team",icon:W.Z.Group,name:me("common.manageTeam"),handler:function(){w("/blocklets/".concat(a.meta.did,"/members"))},disabled:(0,v.XN)(a.status)},{onlyInMenu:!0,action:"log",icon:W.Z.Log,name:me("common.log"),handler:function(){w("/logs/blocklet-".concat(a.meta.did))},disabled:(0,v.XN)(a.status)}].filter(Boolean);return"menu"===u?(0,H.jsxs)($,{"data-cy":"blocklet-actions",children:[(0,H.jsx)(j.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":a.meta.did,onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(e.currentTarget)},size:"small",disabled:!p||!(0,v.XN)(a.status)&&se,children:(0,H.jsx)(N.Z,{})}),(0,H.jsxs)(D.Z,{id:"actions-menu",anchorEl:ee,keepMounted:!0,open:Pe,onClose:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ne(null)},PaperProps:{},children:[Se.length>0&&(0,H.jsxs)(G.Z,{style:{maxWidth:"400px"},severity:"error",children:[me("blocklet.config.missingRequired"),(0,H.jsx)("br",{}),(0,H.jsx)(P.rU,{to:"/blocklets/".concat(a.meta.did,"/components"),children:me("blocklet.config.gotoFix")})]}),Re.map((function(e,n){return e.separator?(0,H.jsx)(S.Z,{},"separator-".concat(n)):(0,H.jsxs)(B.Z,{dense:!0,onClick:function(n){return Ee(e,n)},disabled:e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,H.jsx)(L.Z,{style:{minWidth:24},children:(0,H.jsx)(e.icon,{fontSize:"small"})}),(0,H.jsx)(T.Z,{primary:e.name})]},e.name)}))]}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}):(0,H.jsxs)($,(0,x.Z)((0,x.Z)({"data-cy":"blocklet-actions"},g),{},{children:[(0,H.jsx)(R.Z,{children:Re.filter((function(e){return!e.separator&&!e.onlyInMenu})).map((function(e){return(0,H.jsxs)(z.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:function(){return Ee(e)},disabled:Boolean(e.disabled)||se,children:[oe===e.action&&se&&ye?(0,H.jsx)(_.Z,{size:16}):(0,H.jsx)(e.icon,{}),(0,H.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)}))}),pe&&(0,H.jsx)(V.Z,{title:pe.title,description:pe.description,confirm:pe.confirm,cancel:pe.cancel,params:pe.params,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]}))}Y.propTypes={blocklet:C().object.isRequired,onStart:C().func.isRequired,onComplete:C().func.isRequired,variant:C().oneOf(["menu","group"]),hasPermission:C().bool,useBlockletUrlEvaluation:C().func},Y.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:function(){var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};var $=a.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),Q=t(84802),ee=t(23299),ne=t(72836),te=t(77370),re=function(e){var n={},t=null;return(0,f.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,f.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},oe=function(e,n,t){var r=e.hostname,o=e.href;if(!n)return o;if(t){var a,i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;var c=i[0],s=(((null===(a=n.site)||void 0===a?void 0:a.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(m.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(m.DEFAULT_DID_DOMAIN),"");return s?o.replace(r,"".concat(s,"-").concat(c,".").concat(m.DEFAULT_IP_DOMAIN_SUFFIX)):o}return o.replace(n.meta.bundleDid,n.appPid)};function ae(){var e=(0,d.PE)().t,n=(0,te.T)().api,t=(0,X.y0)().blocklet,r=(0,q.h6)().inService,o=(0,i.useState)(!1),a=(0,y.Z)(o,2),c=a[0],s=a[1],u=(0,i.useState)(5),p=(0,y.Z)(u,2),h=p[0],g=p[1],x=t&&t.structVersion!==m.APP_STRUCT_VERSION;return[x&&(0,H.jsxs)(ee.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(z.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void K.Z.error(e("blocklet.migrate.tip.running"));var n=re(t);if(n)return void K.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));s(!0)}catch(r){K.Z.error((0,v.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,H.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,H.jsx)(l.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,H.jsx)(ne.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=oe(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),g(5),setInterval((function(){g((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,M.iK)(t,!0),title:(0,f.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:h>=0?e("blocklet.migrate.success",{sec:h}):"Redirecting..."},onClose:function(){return s(!1)}},"connect")]}ae.propTypes={};var ie=t(66138),ce=t(90781),se=t(64864),le=t(5954),ue=t(80670),de=t(48952),pe=ue.Gy.Provider,fe=(ue.Gy.Consumer,window.env),me=fe.did,ve=fe.appId;function he(e){var n,t,r=e.children,o=(0,se.y0)().blocklet,a=(0,i.useState)([]),c=(0,y.Z)(a,2),s=c[0],l=c[1],u=(0,i.useState)([]),d=(0,y.Z)(u,2),p=d[0],v=d[1],h=(0,i.useState)([]),g=(0,y.Z)(h,2),x=g[0],k=g[1],w=(0,f.getDisplayName)(o),C=(null===(n=((null===o||void 0===o?void 0:o.environments)||[]).find((function(e){return e.key===F.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR})))||void 0===n?void 0:n.value)||"auto",P=(null===o||void 0===o?void 0:o.trustedPassports)||[],E=(null===o||void 0===o?void 0:o.trustedFactories)||[],j=!1!==(null===o||void 0===o?void 0:o.enablePassportIssuance),D=function(){var e=(0,b.Z)((0,Z.Z)().mark((function e(){var n;return(0,Z.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.Z.doBatchQuery({getRoles:{input:{teamDid:me}},getPermissions:{input:{teamDid:me}},getInvitations:{input:{teamDid:me}}});case 3:n=e.sent,v((n.getRoles.roles||[]).filter((function(e){return!m.RBAC_CONFIG.roles.some((function(n){return n.name===e.name&&(!n.passport||n.ci)}))})).map((function(e){return e.description=e.description||"Use this passport to connect ".concat(w," as ").concat(e.title),e}))),k(n.getPermissions.permissions||[]),l(n.getInvitations.invitations||[]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),K.Z.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();(0,i.useEffect)((function(){var e;null!==o&&void 0!==o&&null!==(e=o.meta)&&void 0!==e&&e.did&&D()}),[null===o||void 0===o||null===(t=o.meta)||void 0===t?void 0:t.did]);var S=function(e){e.teamDid===me&&D(me)};(0,ce.mU)(m.EVENTS.USER_ADDED,S,[me]),(0,ce.mU)(m.EVENTS.USER_REMOVED,S,[me]),(0,ce.mU)(m.EVENTS.USER_UPDATED,S,[me]);var R={teamDid:me,teamIssuerDid:ve,teamName:w,invitations:s,roles:p,permissions:x,trustedPassports:P,trustedFactories:E,isNodeTeam:!1,enablePassportIssuance:j,refresh:function(){return D()},passportColor:C,endpoint:window.location.origin,blocklet:o,api:{getUser:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).did,n={teamDid:me,user:{did:e}};return de.Z.getUser({input:n})},getUsers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,t=e.paging,r={teamDid:me};return t&&(r.paging=t),n&&(r.query=n),r.sort={lastLoginAt:-1},de.Z.getUsers({input:r})},getUsersCountPerRole:function(){return de.Z.getUsersCountPerRole({input:{teamDid:me}})}}};return(0,H.jsx)(pe,{value:R,children:r})}t(53420);var ge=t(25177),xe=t(75255),Ze=t(51921),be=t(19638),ye=t(13328);function ke(e){var n=e.infos,t=(0,d.PE)().t,r=n.map((function(e){return"* ".concat(e.label,": ").concat(e.value)})).join("\n"),o=new URL("https://github.com/blocklet/blocklet-site/issues/new");return o.searchParams.set("title","[Feedback]"),o.searchParams.set("body","\x3c!-- [Enter feedback here] --\x3e\n\n\n\n\x3c!--\nDocument Details\n".concat(r,"\n* Page: ").concat(window.location.href,"\n--\x3e\n")),(0,ye.tZ)(l.Z,{sx:{mx:{xs:0,md:2}},children:(0,ye.tZ)(be.Z,{sx:{color:"text.primary"},target:"_blank",href:o.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}ke.propTypes={infos:C().arrayOf(C().shape({label:C().string,value:C().string}))},ke.defaultProps={infos:[]};var we=t(37433),Ce=t(39563),Pe=t(19886),Ee=t.n(Pe),je=t(91380),De=t(7173),Se=t(83176),Re=t(93033),_e=t.n(Re),Be=t(22073),Ne=t(43178),Le=["launcherUrl","chainHost","nftId","retention"],Te=["sx"];function Ie(e){var n,t,r=e.launcherUrl,o=e.chainHost,a=e.nftId,c=(e.retention,(0,k.Z)(e,Le)),s=(0,d.PE)(),u=s.t,p=s.locale,f=(0,Ne.Z)({safeIframeRef:null,popoverAnchorEl:null}),m=(0,y.Z)(f,2),h=m[0],g=m[1],w=(0,i.useRef)(null),C=c.sx,P=void 0===C?{}:C,E=(0,k.Z)(c,Te),j=(0,Be.Z)((0,b.Z)((0,Z.Z)().mark((function e(){var n,t,i,c;return(0,Z.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,v.Nh)(o,a),(0,v.qZ)({launcherUrl:r||"https://launcher.arcblock.io/",nftId:a,locale:p})]);case 2:return n=e.sent,t=(0,y.Z)(n,2),i=t[0],c=t[1],e.abrupt("return",{asset:i,subscriptionURL:c});case 7:case"end":return e.stop()}}),e)}))),[p]);if(j.loading)return(0,H.jsxs)(l.Z,(0,x.Z)((0,x.Z)({sx:(0,x.Z)({display:"flex",alignItems:"center",color:"grey",gap:1},P)},E),{},{children:[(0,H.jsx)(_.Z,{size:16}),u("expiration.loading")]}));if(j.error)return console.error(j.error),(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:u("expiration.loadFailed"),color:"error",variant:"success",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(){return j.retry()}}));var D=(0,v.D9)(null===(n=j.value)||void 0===n?void 0:n.asset),S=Ee()(D).isBefore(Ee()()),R=Ee()(D).diff(Ee()(),"ms"),B="success";R<=2592e6&&(B="warning"),S&&(B="error");return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(De.Z,(0,x.Z)((0,x.Z)({label:(0,H.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,H.jsx)(je.Z,{sx:{mr:"4px"},fontSize:"small"}),u("expiration.tips.".concat(B),{validity:_e()(R,{locale:(0,v.tA)(p),compact:!0,verbose:!0})})]}),color:B,variant:"success"!==B?"contained":"outlined",sx:(0,x.Z)({cursor:"pointer"},P)},E),{},{onClick:function(e){g({popoverAnchorEl:e.currentTarget})}})),(0,H.jsx)(Se.ZP,{id:"popover-info",open:Boolean(h.popoverAnchorEl),anchorEl:h.popoverAnchorEl,onClose:function(){g({popoverAnchorEl:null})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,H.jsx)("iframe",{ref:w,title:u("common.subscription"),width:"360px",height:"600px",style:{border:0},src:null===(t=j.value)||void 0===t?void 0:t.subscriptionURL})})]})}Ie.propTypes={chainHost:C().string.isRequired,nftId:C().string.isRequired,sx:C().object,retention:C().number,launcherUrl:C().string.isRequired},Ie.defaultProps={sx:{},retention:0};var Ue,Ae=Ie;function Oe(e){var n,t=e.children,r=(0,d.PE)().t,o=(0,se.y0)(),a=o.loading,i=o.error,u=o.actions.refreshBlocklet,p=o.env,f=o.blocklet,h=(0,le.h6)().info,g=(0,c.useLocation)(),x=(0,xe.Z)((function(e){return e.breakpoints.down("md")})),Z=[{label:"App ID",value:p.appId},{label:"App Version",value:p.version},{label:"App Bundle Name",value:null===f||void 0===f||null===(n=f.meta)||void 0===n?void 0:n.bundleName},{label:"Server Id",value:h.did},{label:"Server Version",value:h.version}],b={};return x&&(b.logo=null),(0,ye.BX)(ze,{legacy:!1,fullWidth:!0,headerAddons:function(e){var n,t,r;if(!(0,M.ep)(f))return e;var o=Array.isArray(e)?e:[e];return o.unshift((0,ye.tZ)(Ae,{chainHost:null===f||void 0===f||null===(n=f.controller)||void 0===n?void 0:n.chainHost,nftId:null===f||void 0===f||null===(t=f.controller)||void 0===t?void 0:t.nftId,launcherUrl:null===f||void 0===f||null===(r=f.controller)||void 0===r?void 0:r.launcherUrl,retention:m.EXPIRED_BLOCKLET_DATA_RETENTION_DAYS,sx:{cursor:"pointer",marginRight:{xs:"8px",md:"48px"}}})),o},headerProps:b,footerProps:{addon:(0,ye.tZ)(ke,{infos:Z})},children:[!f&&a&&(0,ye.tZ)(s.Z,{relative:"parent",children:(0,ye.tZ)(_.Z,{})}),!f&&i&&(0,ye.BX)(s.Z,{relative:"parent",children:[(0,ye.BX)(l.Z,{display:"flex",alignItems:"center",children:[(0,ye.tZ)(ge.Z,{color:"error",sx:{marginRight:1}}),(0,v.Z)(i)]}),(0,ye.tZ)(z.Z,{onClick:function(){return u()},children:(0,ye.tZ)("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!f&&(0,ye.tZ)("div",{className:"dashboard-layout-body",children:(0,ye.tZ)("div",{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{className:"dashboard-layout-main",children:(0,ye.tZ)(l.Z,{flex:1,padding:"16px",display:"flex",flexDirection:"column",children:(0,ye.tZ)(Ze.ErrorBoundary,{FallbackComponent:we.H,resetKeys:[g.pathname],children:t})})})})})]})}Oe.defaultProps={children:null};var Ge,ze=(0,a.Z)(Ce.Z)(Ue||(Ue=(0,o.Z)(["\n .dashboard-layout-body {\n flex: 1;\n display: flex;\n padding-top: 16px;\n }\n .dashboard-layout-main {\n flex: 1;\n padding: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n"]))),Fe=t(38507),Ke=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(8497),t.e(3688)]).then(t.bind(t,13688))})),Me=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(4355),t.e(2291),t.e(6465),t.e(2653)]).then(t.bind(t,92653))})),qe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(8604),t.e(3593)]).then(t.bind(t,23593))})),Ve=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(4355),t.e(2291),t.e(4764),t.e(6919),t.e(6868),t.e(4802)]).then(t.bind(t,121))})),We=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7606),t.e(3154),t.e(6771)]).then(t.bind(t,26771))})),Xe=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(5645),t.e(5982)]).then(t.bind(t,25205))})),He=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(2838),t.e(4764),t.e(9088),t.e(4023)]).then(t.bind(t,4023))})),Je=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(4355),t.e(2291),t.e(4164),t.e(6498),t.e(7367),t.e(9657),t.e(6452)]).then(t.bind(t,76452))})),Ye=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(4355),t.e(4164),t.e(4319),t.e(6629),t.e(2838),t.e(5465),t.e(7606),t.e(476),t.e(6498),t.e(4706),t.e(6868),t.e(1565)]).then(t.bind(t,31565))})),$e=(0,i.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(5960),t.e(2631),t.e(4355),t.e(2291),t.e(5465),t.e(7516),t.e(2393)]).then(t.bind(t,2393))}));function Qe(){var e,n,t=(0,c.useNavigate)(),r=(0,c.useParams)().tab,o=void 0===r?"overview":r,a=(0,se.y0)(),x=a.blocklet,Z=a.actions.refreshBlocklet,b=(0,d.PE)().t,y=null===x||void 0===x||null===(e=x.meta)||void 0===e?void 0:e.did,k=!x||(0,v.wS)(x.status)?[]:(0,f.getAppMissingConfigs)(x),w=[{label:b("common.overview"),value:"overview"},{label:(0,H.jsx)(u.Z,{color:"error",variant:"dot",invisible:!k.length,children:b("common.components")}),value:"components"}];(0,v.wS)(null===x||void 0===x?void 0:x.status)||w.push({label:b("common.configuration"),value:"configuration"}),w.push({label:b("common.auditLogs"),value:"audit-logs"}),x&&null!==(n=x.children)&&void 0!==n&&n.length&&x.structVersion===m.APP_STRUCT_VERSION&&w.push({label:b("common.logs"),value:"logs"}),w.push({label:b("common.configNavigation"),value:"navigation"}),w.push({label:b("common.storage"),value:"storage"});var C=(0,H.jsx)(We,{scope:y,categories:["blocklet","team","security","certificates","gateway"]});(0,ce.mU)(m.EVENTS.NOTIFICATION_CREATE,(function(e){var n=e||{},t=n.severity,r=n.title,o=n.description;"error"===t?K.Z.error(o||r):K.Z.success(o||r)}),[y]);var P={overview:(0,H.jsx)(Ke,{}),members:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)(Me,{type:"blocklet",createPassportSvg:Fe.Ju})}),passports:(0,H.jsx)(l.Z,{mt:-4.5,children:(0,H.jsx)(qe,{createPassportSvg:Fe.Ju})}),components:Ye,configuration:(0,H.jsx)(Ve,{blocklet:x,onUpdate:function(){Z()}}),"audit-logs":C,logs:Xe,navigation:He,storage:(0,H.jsx)(Je,{}),analytics:(0,H.jsx)(l.Z,{mt:-5,children:(0,H.jsx)($e,{})})},E=P[o]||P.overview,j=!["members","passports","analytics"].includes(o),D=x?(0,H.jsxs)(h.g,{type:"components",children:[j&&(0,H.jsx)(p.Z,{tabs:w,current:o,onChange:function(e){t("".concat(m.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/").concat(e))},scrollButtons:"auto"}),(0,H.jsx)("div",{className:"page-content",children:(0,H.jsx)(i.Suspense,{fallback:(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})}),children:(0,i.isValidElement)(E)?E:(0,H.jsx)(E,{blocklet:x})})})]}):(0,H.jsx)(s.Z,{children:(0,H.jsx)(_.Z,{})});return(0,H.jsx)(le.cK,{children:(0,H.jsx)(he,{children:(0,H.jsx)(Oe,{children:(0,H.jsx)(ie.wV,{children:(0,H.jsxs)(nn,{children:[j&&(0,H.jsxs)(l.Z,{component:"div",className:"page-header",children:[(0,H.jsxs)(l.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[x?(0,H.jsx)(Q.Z,{blocklet:x,style:{marginRight:16}}):null,x?(0,H.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,H.jsx)(l.Z,{children:(0,f.getDisplayName)(x)}),"unknown"!==(null===x||void 0===x?void 0:x.status)&&(0,H.jsx)(g.Z,{size:"12px",style:{marginLeft:8},status:x.status,source:x.source})]}):"".concat(b("common.blocklet")," ").concat(b("common.detail"))]}),x?(0,H.jsx)(Y,{className:"page-actions",hasPermission:!0,blocklet:x,onStart:function(){},onComplete:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).error;e&&K.Z.error(e.message)},variant:"group"}):null]}),(0,H.jsx)(ae,{}),D]})})})})})}function en(){var e,n=(0,se.y0)().blocklet,t=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did;return(0,i.useEffect)((function(){var e=(0,ce.ZP)();return t&&e.connect(),function(){t&&e.isConnected()&&e.disconnect()}}),[t]),(0,H.jsx)(Qe,{})}var nn=a.Z.main(Ge||(Ge=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 36px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},84802:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(59467),s=t(62399),l=t(59505),u=t(15300),d=t(37574),p=["blocklet","style","size"];function f(e){var n,t=e.blocklet,a=e.style,i=e.size,f=(0,o.Z)(e,p),m=(0,u.Z)({blocklet:t}).logoUrl,v=f.variant,h=(0,d.jsx)("img",{src:m,alt:"",style:{width:i}});t.meta.logo||((null===(n=(t.configs||[]).find((function(e){return e.key===l.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value)||(h=(0,d.jsx)(s.Z,{did:t.meta.did||"",responsive:!0})));return(0,d.jsx)(c.Z,(0,r.Z)((0,r.Z)({variant:v||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},a)},f),{},{children:h}))}f.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string])},f.defaultProps={style:{},size:40}},55008:function(e,n,t){var r=t(10814),o=t(8825),a=t(60003),i=t(13875),c=t(57256),s=t(14079),l=t(51389),u=t(98127);n.Z={Start:o.Z,Stop:a.Z,Restart:i.default,Reload:c.Z,Remove:r.default,Config:s.Z,Log:l.Z,Group:u.Z}},94282:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(33028),o=t(59740),a=t(30969),i=t(24974),c=t.n(i),s=t(94308),l=t(6779),u=t(26022),d=t(7017),p=t(19708),f=t(61472),m=t(37574),v=["status","variant","source"],h={yellow:"#FFCF71",grey:"#888888"};function g(e){var n=e.status,t=e.variant,i=(e.source,(0,o.Z)(e,v)),c=(0,a.useContext)(u.RD).t,g={added:h.grey,waiting:h.yellow,downloading:h.yellow,downloaded:h.grey,installing:h.yellow,installed:h.grey,starting:h.yellow,running:"success",stopping:h.yellow,stopped:h.grey,error:"error",upgrading:h.yellow,restarting:h.yellow,corrupted:"error",deleting:h.yellow},x=(0,d.isInProgress)(n),Z=c("blocklet.status.".concat(n));return"dot"===t?(0,m.jsx)(l.Z,{title:c("blocklet.statusTip",{status:Z}),children:(0,m.jsx)(p.Z,(0,r.Z)({color:g[n]},i))}):(0,m.jsxs)(f.Z,(0,r.Z)((0,r.Z)({type:{added:"primary",waiting:"warning",downloading:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n]},i),{},{children:[x&&(0,m.jsx)(s.Z,{size:12,color:"inherit",style:{marginRight:5}}),Z]}))}g.propTypes={status:c().string.isRequired,variant:c().oneOf(["dot","tag"]),source:c().string},g.defaultProps={variant:"tag",source:""}},8479:function(e,n,t){t.d(n,{Z:function(){return R}});var r=t(71171),o=t(33028),a=t(32723),i=t(34795),c=t(96234),s=t(59740),l=t(30969),u=t(24974),d=t.n(u),p=t(16380),f=t(84636),m=t(94308),v=t(91862),h=t(87130),g=t(43207),x=t(38357),Z=t(18877),b=t(94702),y=t(75255),k=t(26022),w=t(29996),C=t(24891),P=t(45555);var E,j=function(){var e=(0,P.Z)();return{minWidth:(0,y.Z)(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}},D=t(37574),S=["title","description","showCancel","cancel","confirm","color","params","onCancel","onConfirm","loading"];function R(e){var n=e.title,t=e.description,r=e.showCancel,u=e.cancel,d=e.confirm,p=e.color,f=e.params,P=e.onCancel,E=e.onConfirm,R=e.loading,B=(0,s.Z)(e,S),N=(0,l.useState)(f),L=(0,c.Z)(N,2),T=L[0],I=L[1],U=(0,l.useState)(!0),A=(0,c.Z)(U,2),O=A[0],G=A[1],z=(0,l.useState)(!1),F=(0,c.Z)(z,2),K=F[0],M=F[1],q=(0,l.useState)(""),V=(0,c.Z)(q,2),W=V[0],X=V[1],H=(0,k.PE)().t,J=(0,b.Z)(),Y=function(){var e=(0,i.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof n){e.next=17;break}return M(!0),e.prev=2,e.next=5,n(T);case 5:G(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),X((0,C.Z)(e.t0)),console.error(e.t0);case 12:return e.prev=12,M(!1),e.finish(12);case 15:e.next=18;break;case 17:G(!1);case 18:case"end":return e.stop()}}),e,null,[[2,8,12,15]])})));return function(n){return e.apply(this,arguments)}}(),$="function"===typeof n?n():n,Q="function"===typeof t?t(T,I,X):t,ee=(0,y.Z)(J.breakpoints.down("md")),ne=j().minWidth;return(0,D.jsxs)(_,(0,o.Z)((0,o.Z)({onClick:function(e){e.stopPropagation()},fullScreen:ee,open:O,style:{minWidth:ne}},B),{},{children:[(0,D.jsx)(x.Z,{children:$}),(0,D.jsxs)(h.Z,{style:{minWidth:ne},children:[(0,D.jsx)(g.Z,{component:"div",children:Q}),!!W&&(0,D.jsx)(Z.Z,{severity:"error",style:{width:"100%",marginTop:8},children:W})]}),(0,D.jsxs)(v.Z,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[r&&(0,D.jsx)(w.Z,{onClick:function(e){e.stopPropagation(),Y(P)},color:"inherit","data-cy":"cancel-confirm-dialog",children:u||H("common.cancel")}),(0,D.jsxs)(w.Z,{onClick:function(e){e.stopPropagation(),Y(E)},color:p,disabled:T.__disableConfirm||K||R,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(K||R)&&(0,D.jsx)(m.Z,{size:16}),d]})]})]}))}R.propTypes={title:d().any.isRequired,description:d().any.isRequired,showCancel:d().bool,cancel:d().string,color:d().string,confirm:d().string,params:d().object,onCancel:d().func,onConfirm:d().func.isRequired,loading:d().bool},R.defaultProps={onCancel:function(){},showCancel:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1};var _=(0,p.Z)(f.Z)(E||(E=(0,r.Z)(["\n .delete-actions .Mui-disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12) !important;\n }\n"])))},66138:function(e,n,t){t.d(n,{wV:function(){return j},XN:function(){return D}});var r=t(32723),o=t(33028),a=t(34795),i=t(96234),c=t(30969),s=t(24974),l=t.n(s),u=t(1986),d=t(26022),p=t(59505),f=t(45008),m=t(30134),v=t(57982),h=t(41395),g=t(50576);function x(e){return Z.apply(this,arguments)}function Z(){return Z=(0,a.Z)((0,r.Z)().mark((function e(n){var t,i,c,s,l;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,i=n.nodeApi,c=n.spaceGateways,s=!1,e.next=4,Promise.all(c.map(function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,m.nU)(n.endpoint);case 3:return a=e.sent,(0,g.isEmpty)(a)||a===t||(t=a,s=!0),e.abrupt("return",(0,o.Z)((0,o.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(l=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(l.filter((function(e){return e.did})).map((function(e){return i.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,o.Z)({},e)}})})));case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)}))),Z.apply(this,arguments)}var b=t(85710);var y=t(24891);function k(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,o=n.setLoading,s=(0,f.y0)().blocklet,l=(0,c.useState)([]),d=(0,i.Z)(l,2),p=d[0],m=d[1],x=(0,h.h6)().api,Z=(0,g.debounce)((0,a.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,o(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z();case 1:case"end":return e.stop()}}),e)}))),[null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did].concat(t)),{backups:p}}var w=function(e){var n=e.appDid,t=k().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),a=(0,i.Z)(r,2),s=a[0],l=a[1];return(0,(0,h.h6)().ws.useSubscription)(p.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&l((function(){return(0,o.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,g.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,i.Z)(t,1)[0];l((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},C=t(37574),P=(0,c.createContext)({}),E=P.Provider;P.Consumer;function j(e){var n=e.children,t=(0,d.PE)().t,s=(0,h.h6)().api,l=(0,f.y0)().blocklet,g=(0,c.useState)(!1),Z=(0,i.Z)(g,2),y=Z[0],P=Z[1],j=(0,c.useState)(!1),D=(0,i.Z)(j,2),S=D[0],R=D[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,o=n.refresh,s=(0,f.y0)(),l=s.blocklet,d=s.actions.refreshBlocklet,p=null===l||void 0===l||null===(e=l.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),g=(0,i.Z)(m,2),Z=g[0],y=g[1],k=(0,h.h6)().api;return(0,v.Z)((0,a.Z)((0,r.Z)().mark((function e(){var n,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,p){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,k.getBlockletSpaceGateways({input:{did:p}});case 7:return n=e.sent,o=n.spaceGateways,e.next=11,x({blockletDid:p,nodeApi:k,spaceGateways:o});case 11:a=e.sent,y(null!==a&&void 0!==a?a:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,b.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[p,d,o]),{spaceGateways:Z}}({refresh:S,setLoading:P}),B=_.spaceGateways,N=w({appDid:null===l||void 0===l?void 0:l.appDid}),L=(0,c.useState)(!1),T=(0,i.Z)(L,2),I=T[0],U=T[1],A=(0,c.useMemo)((function(){return(0,m.mo)(null===l||void 0===l?void 0:l.environments)}),[l,S,I]),O=(0,c.useState)(!1),G=(0,i.Z)(O,2),z=G[0],F=k({deps:[N],setLoading:G[1]}).backups,K=(0,c.useState)(null===B||void 0===B?void 0:B.find((function(e){return e.endpoint===A}))),M=(0,i.Z)(K,2),q=M[0],V=M[1],W=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B.push((0,o.Z)((0,o.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:l.meta.did,spaceGateway:n}});case 3:if(A===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),V(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),X=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==A){e.next=5;break}return u.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:l.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),V(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:l.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(A===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[l.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:u.Z.success(t("storage.spaces.connectedWithName",{name:null!==(o=null===n||void 0===n?void 0:n.name)&&void 0!==o?o:"DID Spaces"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=function(){R((function(e){return!e}))};return(0,C.jsx)(E,{value:{spaceGateways:B,selectedSpaceGateway:q,addSpaceGateway:W,deleteSpaceGateway:X,updateSpaceGateway:H,refreshSpaceGateways:J,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===A},backupEndpoint:A,backupProgress:N,backups:F,backupsLoading:z,refreshBackupEndpoint:function(){U((function(e){return!e}))}},children:n})}function D(){return(0,c.useContext)(P)}j.propTypes={children:l().any.isRequired},j.defaultProps={}},43820:function(e,n,t){t.d(n,{K:function(){return f},g:function(){return p}});var r=t(68079),o=t(96234),a=t(30969),i=t(24974),c=t.n(i),s=t(16986),l=t.n(s),u=t(37574),d=(0,a.createContext)({});function p(e){var n=e.children,t=e.type,i=(0,a.useState)([]),c=(0,o.Z)(i,2),s=c[0],p=c[1],f=(0,a.useRef)([]),m=function(e){if(f.current.includes(e)){var n=f.current.filter((function(n){return n!==e}));p(n),f.current=n}};return(0,u.jsx)(d.Provider,{value:{type:t,deletingBlocklets:s,addDeletingDid:function(e){if(!f.current.includes(e)){var n=[].concat((0,r.Z)(f.current),[e]);p(n),f.current=n}},removeDeletingDid:m,matchDeletingDid:function(e){var n=s.filter((function(n){return e.find((function(e){return e===n}))}));l()(n,s).forEach((function(e){return m(e)}))}},children:n})}function f(){return(0,a.useContext)(d)}p.propTypes={type:c().string,children:c().node.isRequired},p.defaultProps={type:"blocklets"}},41395:function(e,n,t){t.d(n,{h6:function(){return i},sy:function(){return a}});var r=t(33028),o=t(30969),a=(0,o.createContext)({});a.Provider,a.Consumer;function i(){var e=(0,o.useContext)(a).node;return(0,r.Z)((0,r.Z)({},e),{},{inService:"service"===e.type,inDaemon:"daemon"===e.type})}},77370:function(e,n,t){t.d(n,{B:function(){return o.B3},T:function(){return a}});var r=t(30969),o=t(82972);function a(){return(0,r.useContext)(o.B3)}},80670:function(e,n,t){t.d(n,{DJ:function(){return a},Gy:function(){return o}});var r=t(30969),o=(0,r.createContext)({});o.Provider,o.Consumer;function a(){return(0,r.useContext)(o)}},19708:function(e,n,t){var r,o=t(71171),a=t(16380),i={success:"#3ab39d",error:"#D0021B"},c="10px",s=a.Z.div(r||(r=(0,o.Z)(["\n display: inline-block;\n width: ",";\n height: ",";\n background: ",";\n border-radius: 100%;\n"])),(function(e){return e.size||c}),(function(e){return e.size||c}),(function(e){return i[e.color]||e.color||i.success}));n.Z=s},15300:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(19611),o=t.n(r),a=t(41395),i=t(24891);function c(e){var n,t,r=e.blocklet,c=(0,a.h6)().inService,s=(null===(n=window.env)||void 0===n?void 0:n.apiPrefix)||"/",l="?v=".concat(null===r||void 0===r||null===(t=r.meta)||void 0===t?void 0:t.version).concat((0,i.wS)(null===r||void 0===r?void 0:r.status)?"~":"");return{logoUrl:o()(s,"/blocklet/logo/".concat(c?"":r.meta.did),l)}}},61472:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),a=t(24974),i=t.n(a),c=t(9715),s=t(37574),l=["children","style"];function u(e){var n=e.children,t=e.style,a=(0,o.Z)(e,l);return(0,s.jsx)(c.Z,(0,r.Z)((0,r.Z)({style:t},a),{},{children:n}))}u.propTypes={children:i().any.isRequired,style:i().object},u.defaultProps={style:{}}},54559:function(e,n,t){t.d(n,{hi:function(){return a},od:function(){return o.a}});var r=t(95803),o=t.n(r);o().defaults.timeout=1e4;var a=o().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return k},Jf:function(){return y},LQ:function(){return f},Nb:function(){return m},Xv:function(){return d},mo:function(){return h},nD:function(){return p},nU:function(){return Z},w2:function(){return g}});var r=t(32723),o=t(34795),a=t(92522),i=t.n(a),c=t(59505),s=t(50576),l=t(54559),u=t(19611);function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),o=t.at(-2);return u(n,"space",r,"apps",o,"explorer","?key=/apps/".concat(o,"/.did-objects/").concat(o,"/"))}function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,l.hi.head(n,{timeout:5e3});case 5:return t=e.sent,o=t.headers,e.abrupt("return","true"===o["x-listable"]&&"true"===o["x-readable"]&&"true"===o["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function h(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function g(e){return x.apply(this,arguments)}function x(){return(x=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=u(n,"space/api/did/one-click-authorization/token"),e.next=6,l.hi.get(t,{timeout:5e3});case 6:return o=e.sent,a=o.status,c=o.data,e.abrupt("return",200===a&&(0,s.isObject)(c));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function Z(e){return b.apply(this,arguments)}function b(){return(b=(0,o.Z)((0,r.Z)().mark((function e(n){var t,o,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,l.hi.head(n,{timeout:3e3});case 5:return t=e.sent,o=t.headers,a=o["x-space-name"],e.abrupt("return",a?decodeURIComponent(a):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function y(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return u(n,"/api/space/nft/display?spaceDid=".concat(t))}var k=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null}},85710:function(e,n,t){var r=t(73408).default,o=t(27609).default,a=t(91461).default,i=t(43681).default;Object.defineProperty(n,"Z",{enumerable:!0,get:function(){return Z.default}});var c,s=t(20244),l=P(t(99237)),u=P(t(63784)),d=P(t(92522)),p=P(t(46292)),f=P(t(99985)),m=P(t(18930)),v=P(t(61301)),h=P(t(19611)),g=P(t(31419)),x=P(t(19886)),Z=P(t(39882)),b=P(t(6399)),y=t(67615),k=P(t(67626)),w=t(59505),C=P(t(88617));function P(e){return e&&e.__esModule?e:{default:e}}function E(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!e)return"";var r="http";"https:"===window.location.protocol&&((0,y.isIpEcho)(e)||(0,y.isSlpDomain)(e)||(0,y.isDidDomain)(e))&&(r="https");var o="",a=Number(window.location.port);a&&![80,443].includes(a)&&(o=":".concat(a));var i=new URL("".concat(r,"://").concat(e).concat(o));i.pathname=n;var c=i.href.replace(/\/$/,"");if(!t||!Object.keys(t))return c;var s=new URLSearchParams;return Object.keys(t).forEach((function(e){s.append(e,t[e])})),"".concat(c).concat("/"===i.pathname?"/":"","?").concat(s.toString())}var j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en";return"tw"===e?"zh":e};var D=function(e){return e.replace(/^\?/,"").split("&").map((function(e){return e.split("=")})).filter((function(e){return!!i(e,1)[0]})).reduce((function(e,n){var t=n[0],r=decodeURIComponent(n[1])||!0;return e[t]=r,e}),{})};var S=function(e,n){return n.startsWith("/assets")?n:"/assets/".concat(e,"/").concat(n)};var R=function(){var e=a(o().mark((function e(n){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,y.evaluateURLs)(n);case 3:return t=e.sent,e.abrupt("return",t[0].url);case 7:return e.prev=7,e.t0=e.catch(0),console.warn("get accessible url failed"),e.abrupt("return","");case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}();function _(e){for(var n=decodeURIComponent(e);n!==decodeURIComponent(n);)n=decodeURIComponent(n);return n}function B(){return(B=a(o().mark((function e(n,t){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.default.post((0,h.default)(n,"/api/gql/"),JSON.stringify({query:'{\n getAssetState(address: "'.concat(t,'") {\n state {\n address\n data {\n typeUrl\n value\n }\n issuer\n owner\n parent\n }\n }\n }')}),{headers:{"Content-Type":"application/json",Accept:"application/json"},timeout:6e4});case 2:return r=e.sent,(a=(0,p.default)(r.data,"data.getAssetState.state"))&&"json"===a.data.typeUrl&&(a.data.value=JSON.parse(a.data.value)),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}null===(c=window.env)||void 0===c||c.groupPathPrefix,s.ROLES.ADMIN,s.ROLES.OWNER;var N=function(e){return!!e&&(e.endsWith(s.DEFAULT_DID_DOMAIN)||e.endsWith(s.DEFAULT_IP_DOMAIN_SUFFIX)||e.endsWith(s.DEFAULT_SLP_DOMAIN))};var L=function(){var e=a(o().mark((function e(n){var t,r,a,i,c,s,l,u,d,p,f,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.launcherUrl,r=void 0===t?"":t,a=n.nftId,i=void 0===a?"":a,c=n.locale,s=void 0===c?"en":c,r){e.next=3;break}return e.abrupt("return","");case 3:return l=(0,h.default)(r,"/instances"),e.prev=4,e.next=7,g.default.get((0,h.default)(r,"__blocklet__.js?type=json"),{timeout:5e3});case 7:d=e.sent,p=d.data,f=null===(u=p.componentMountPoints)||void 0===u?void 0:u.find((function(e){return"z8iZy4P83i6AgnNdNUexsh2kBcsDHoqcwPavn"===e.did})),m=new URL(r),l=(0,h.default)(m.origin,null===f||void 0===f?void 0:f.mountPoint,"/nfts"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),console.error(e.t0);case 17:return e.abrupt("return",(0,h.default)(l,"/".concat(i,"/subscription?locale=").concat(s,"&return-url=").concat(encodeURIComponent(window.location.href))));case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(n){return e.apply(this,arguments)}}()}}]);
|
|
2
|
+
//# sourceMappingURL=6186.99068c82.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6452],{92746:function(e,n,t){var r,a=t(71171),s=t(33028),o=t(59740),i=t(16380),c=t(50442),l=t(37574),p=["labelProps","className","style"];function d(e){var n=e.labelProps,t=e.className,r=e.style,a=(0,o.Z)(e,p),i=(0,s.Z)((0,s.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,l.jsx)(u,{className:t,style:r,children:(0,l.jsx)(c.Z,(0,s.Z)({labelProps:i},a))})}d.propTypes=c.Z.propTypes,d.defaultProps=c.Z.defaultProps;var u=i.Z.div(r||(r=(0,a.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=d},76452:function(e,n,t){t.r(n),t.d(n,{default:function(){return Me}});var r=t(30969),a=t(33028),s=t(38361),o=t(33359),i=t(26022),c=t(45008),l=t(32723),p=t(34795),d=t(96234),u=t(33665),h=t(94308),f=t(43207),x=t(87006),m=t(29996),g=t(72836),v=t(19611),Z=t.n(v),y=t(1986),j=t(15419),k=t(50496),A=t(23299),b=t(20244),C=t(54559),w=t(24891),S=t(41395),B=t(83998),I=t(30134),D=t(66138),U=t(37574);function R(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,S.h6)().info,R=(0,i.PE)(),E=R.t,T=R.locale,F=(0,r.useState)(""),z=(0,d.Z)(F,2),O=z[0],L=z[1],N=(0,r.useState)(!1),P=(0,d.Z)(N,2),M=P[0],J=P[1],G=(0,r.useState)(!1),Q=(0,d.Z)(G,2),H=Q[0],V=Q[1],X=(0,r.useState)(""),K=(0,d.Z)(X,2),W=K[0],Y=K[1],q=(0,B.Z)({blocklet:t}),_=(0,w.yP)(v),$=(0,D.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,r.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:Z()(b.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(b.PROD_DID_SPACES.CORE_URL).origin,checkFn:C.od.create({baseURL:Z()(b.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:E("storage.spaces.provideNFT.title",{appName:q.appName},T),scan:E("storage.spaces.provideNFT.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.provideNFT.success")})},onClose:function(){se((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),re=(0,d.Z)(te,2),ae=re[0],se=re[1],oe=(0,r.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:E("storage.spaces.authorize.title",{appName:q.appName},T),scan:E("storage.spaces.authorize.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.authorize.success")})},onClose:function(){le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),ie=(0,d.Z)(oe,2),ce=ie[0],le=ie[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var r,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=t(n.endpoint),s=n.space?t(n.space):{},e.next=5,de((0,a.Z)((0,a.Z)({endpoint:r},{did:(0,I.LQ)(r),name:"DID Space"}),s));case 5:le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})})),se((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),y.Z.error((0,w.Z)(e.t0));case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}(),de=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){var t,r,a,s,o,i,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.endpoint,o=n.name,i=n.did,(c=null===s||void 0===s||null===(t=s.replace(/\/api\/.+/,""))||void 0===t||null===(r=t.trim())||void 0===r?void 0:r.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,I.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===s}))){e.next=12;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:o})),e.abrupt("return");case 12:return p={name:o,did:i,url:c,endpoint:s},e.next=15,ne(p,s);case 15:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(a=null===p||void 0===p?void 0:p.name)&&void 0!==a?a:"DID Spaces"}));case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ue=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n,t;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,J(!0),n=O.startsWith("http")?O:"https://".concat(O),e.next=5,(0,I.w2)(n);case 5:if(e.sent){e.next=7;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 7:le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!0,prefix:Z()(n,"space/api/did"),baseUrl:new URL(n).origin,checkFn:C.od.create({baseURL:Z()(n,"space")}).get,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})})),V(!1),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),t="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(t);case 15:return e.prev=15,J(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,11,15,18]])})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{children:[(0,U.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){se((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!0,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})}))},menu:[(0,U.jsx)(j.Z.Item,(0,a.Z)((0,a.Z)({sx:{textTransform:"none"},onClick:function(){return V(!0)},size:"small"},n),{},{children:E("storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,U.jsx)(o.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:E("storage.spaces.connect.useWallet")})}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ae.prefix,open:ae.open,popup:!0,action:ae.action,webWalletUrl:_,baseUrl:ae.baseUrl,checkFn:ae.checkFn,onSuccess:pe,onClose:ae.onClose,checkTimeout:ae.checkTimeout,extraParams:ae.extraParams,messages:ae.messages,locale:T}),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ce.prefix,open:ce.open,popup:!0,action:ce.action,baseUrl:ce.baseUrl,checkFn:ce.checkFn,onSuccess:pe,onClose:ce.onClose,checkTimeout:ce.checkTimeout,extraParams:ce.extraParams,messages:ce.messages,locale:T}),(0,U.jsxs)(k.ZP,{title:E("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:H,onClose:function(){return V(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{onClick:function(e){e.stopPropagation(),V(!1)},color:"inherit",children:E("common.cancel")}),(0,U.jsxs)(m.Z,{onClick:ue,color:"primary",disabled:M||!O,variant:"contained",autoFocus:!0,children:[M&&(0,U.jsx)(h.Z,{size:16}),E("common.confirm")]})]}),children:[(0,U.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,U.jsx)(f.Z,{component:"div",children:(0,U.jsx)(o.Z,{component:"div",children:(0,U.jsx)(x.Z,{label:E("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:O,onChange:function(e){Y(null),L(e.target.value)},disabled:M,onKeyPress:function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==n.key){e.next=3;break}return e.next=3,ue();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(W)&&(0,U.jsx)(A.Z,{type:"error",style:{width:"100%"},children:W})]})]})}R.propTypes={},R.defaultProps={};var E,T=R,F=t(71171),z=t(59740),O=t(16380),L=t(24974),N=t.n(L),P=t(99237),M=t.n(P),J=t(19638),G=t(70177),Q=["blocklet"];function H(e){var n=e.blocklet,t=(0,z.Z)(e,Q),s=(0,r.useContext)(i.RD).t;if(!n.diskInfo)return(0,U.jsx)(o.Z,{children:s("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,U.jsxs)(o.Z,{children:[t?(0,U.jsx)(J.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,U.jsx)("strong",{children:n?M()(n):"empty"})]})},l=n.environments.reduce((function(e,n){return e[n.key]=n.value,e}),{}),p=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,U.jsx)(V,(0,a.Z)((0,a.Z)({component:"div"},t),{},{children:p.map((function(e){return(0,U.jsx)(G.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)}))}))}H.propTypes={blocklet:N().object.isRequired},H.defaultProps={};var V=(0,O.Z)(o.Z)(E||(E=(0,F.Z)([""]))),X=function(e){return(0,U.jsxs)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:[(0,U.jsxs)("g",{filter:"url(#a)",children:[(0,U.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"}),(0,U.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-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"}),(0,U.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,U.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"})}),(0,U.jsxs)("g",{mask:"url(#b)",children:[(0,U.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,U.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,U.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"}),(0,U.jsx)("path",{d:"M117.604 47.263L121.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)"}),(0,U.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)"}),(0,U.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,U.jsx)("path",{d:"M50.928 216.089l1.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"}),(0,U.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"})]}),(0,U.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,U.jsx)("path",{d:"M192.064 213.333l.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"}),(0,U.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"})]})]}),(0,U.jsxs)("defs",{children:[(0,U.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,U.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,U.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"}),(0,U.jsx)("feOffset",{dy:"2"}),(0,U.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,U.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,U.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"}),(0,U.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,U.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,U.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,U.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,U.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#101010"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,U.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,U.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,U.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:[(0,U.jsx)("stop",{stopColor:"#016BED"}),(0,U.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,U.jsx)("clipPath",{id:"g",children:(0,U.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,U.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/vP7U26vRWhl2UnfEbX3V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UjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function K(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet;return(0,U.jsxs)(s.Z,{children:[(0,U.jsxs)(s.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,U.jsx)(X,{style:{width:200,height:250}}),(0,U.jsx)(o.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})}X.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},K.propTypes={};var W=K,Y=t(75255),q=t(7173),_=t(38627),$=t(59505),ee=t(54164),ne=t(50576),te=t(38996),re=t(36558),ae=t(92746),se=t(94551),oe=t(48082),ie=t(2689),ce=t(93310),le=t(86008),pe=t(37973),de=t(20352),ue=t(61292),he=t(60030),fe=t(30291),xe=t(67531);function me(e){var n=e.spaceGateway,t=e.onDelete,a=(0,i.PE)().t,s=(0,r.useState)(!1),o=(0,d.Z)(s,2),c=o[0],u=o[1],h=(0,r.useState)(!1),f=(0,d.Z)(h,2),x=f[0],m=f[1],g=function(e,n){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),u(n)},v=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(r){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===r||void 0===r||r.stopPropagation(),m(!0),e.next=5,t(n);case 5:u(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error("".concat(a("storage.space.gateway.delete.failed"),": ").concat((0,w.Z)(e.t0)));case 12:return e.prev=12,m(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ie.Z,{color:"red",onClick:function(e){return g(e,!0)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24,color:"red"},children:(0,U.jsx)(fe.default,{fontSize:"small"})}),(0,U.jsx)(le.Z,{style:{color:"red"},children:a("common.delete")})]}),(0,U.jsx)(xe.Z,{title:a("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:c,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:x}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:x},onConfirm:v,onCancel:function(e){return g(e,!1)}})]})}me.propTypes={onDelete:N().func,spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool}).isRequired},me.defaultProps={onDelete:function(){}};var ge=me,ve=["spaceGateway","connected","onDelete","onConnect","enableSwitchToSpace"];function Ze(e){var n=e.spaceGateway,t=e.connected,s=e.onDelete,o=e.onConnect,c=e.enableSwitchToSpace,u=(0,z.Z)(e,ve),f=(0,r.useState)(null),x=(0,d.Z)(f,2),m=x[0],g=x[1],v=(0,i.PE)().t,Z=(0,r.useState)(!1),j=(0,d.Z)(Z,2),k=j[0],A=j[1],b=function(e,n){e.stopPropagation(),e.preventDefault(),g(n&&e.currentTarget)},C=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),b(t,!1),e.next=5,o(n);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 11:return e.prev=11,A(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,7,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(se.Z,(0,a.Z)((0,a.Z)({"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:function(e){return b(e,!0)},size:"small"},u),{},{children:k||null!==n&&void 0!==n&&n.loading?(0,U.jsx)(h.Z,{size:"24px"}):(0,U.jsx)(pe.Z,{})})),(0,U.jsxs)(oe.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:Boolean(m),onClose:function(e){return b(e,!1)},children:[(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open(n.endpoint?(0,I.nD)(n.endpoint):n.url)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(de.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("common.open")})]}),(0,U.jsxs)(ie.Z,{onClick:function(e){b(e,!1),window.open((0,I.Xv)(n.endpoint))},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(he.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.strategy.viewBackupFiles")})]}),!t&&c&&(0,U.jsxs)(ie.Z,{onClick:C,children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(ue.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.connect.switchToSpace")})]}),!t&&(0,U.jsx)(ge,{spaceGateway:n,onDelete:s})]})]})}Ze.propTypes={spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool,endpoint:N().string.isRequired,loading:N().bool}).isRequired,connected:N().bool.isRequired,enableSwitchToSpace:N().bool,onDelete:N().func,onConnect:N().func},Ze.defaultProps={onDelete:function(){},onConnect:function(){},enableSwitchToSpace:!0};var ye,je=Ze,ke=t(19066),Ae=t(50202),be=["spaceGateway","connected","onDelete","onBackupNow"],Ce=function(e){return(0,U.jsx)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};Ce.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(e){return(0,U.jsx)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})}))};function Se(e){var n=e.spaceGateway,t=e.connected,u=e.onDelete,h=e.onBackupNow,f=(0,z.Z)(e,be),x=(0,Y.Z)((function(e){return e.breakpoints.down("md")})),v=(0,i.PE)(),j=v.t,k=v.locale,A=(0,c.y0)().blocklet,b=(0,S.h6)(),w=b.api,R=b.info.did,E=(0,B.Z)({blocklet:A}),T=E.appDid,F=E.appName,O=E.appDescription,L=E.scopes,N=E.appUrl,P=E.referrer,M=(0,D.XN)(),J=M.updateSpaceGateway,G=M.backupEndpoint,Q=M.backupProgress,H=M.refreshBackupEndpoint,V=(0,r.useState)(!1),X=(0,d.Z)(V,2),K=X[0],W=X[1],se=(0,r.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:j("storage.spaces.authorize.title",{appName:F},k),scan:j("storage.spaces.authorize.scan",{appName:F},k),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),oe=(0,d.Z)(se,2),ie=oe[0],ce=oe[1],le=(0,ee.Z)((0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",!0);case 2:return e.abrupt("return",(0,I.Nb)(G));case 3:case"end":return e.stop()}}),e)}))),{refreshDeps:[t,G,null===ie||void 0===ie?void 0:ie.open,K]}),pe=le.data,de=le.loading,ue=t&&pe,he=t&&!K&&pe&&!(null!==n&&void 0!==n&&n.loading),fe=t&&K&&pe,xe=t&&!pe&&!de&&!K,me=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.Nb)(null===n||void 0===n?void 0:n.endpoint);case 2:if(!e.sent){e.next=9;break}return e.next=6,w.configBlocklet({input:{did:[A.meta.did],configs:[{key:$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 6:return H(),y.Z.success(j("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""})),e.abrupt("return");case 9:ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!0,prefix:Z()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:C.od.create({baseURL:Z()(n.url,"space")}).get,extraParams:{appDid:T,appName:F,appDescription:O,scopes:L,appUrl:N,referrer:P,nodeDid:R}})}));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t,r){var s,o,i,c,p,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r(t.endpoint),c=(0,I.LQ)(i),p=t.space?r(t.space):{},!n.did||c===n.did){e.next=7;break}return ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})})),y.Z.error(j("storage.spaces.gateway.switch.failedForMismatchSpace",{name:null!==p&&void 0!==p&&p.name?p.name:""})),e.abrupt("return");case 7:return d=(0,a.Z)((0,a.Z)({},n),{},{name:null!==(s=p.name)&&void 0!==s?s:"DID Space",did:null!==(o=p.did)&&void 0!==o?o:(0,I.LQ)(i),endpoint:i}),e.next=10,J(d);case 10:ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ve=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!K){e.next=3;break}return e.abrupt("return");case 3:return W(!0),e.next=6,h();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 12:return e.prev=12,W(!0),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)((function(){null!==Q&&void 0!==Q&&Q.completed?(100===(null===Q||void 0===Q?void 0:Q.progress)?y.Z.success(j("storage.spaces.backupSuccessfully")):-1===(null===Q||void 0===Q?void 0:Q.progress)&&y.Z.error(null===Q||void 0===Q?void 0:Q.message),W(!1),Q.progress=0,Q.message=""):Q.progress&&W(!0)}),[Q]),(0,U.jsxs)(Be,{style:{position:"relative"},children:[(0,U.jsxs)(s.Z,(0,a.Z)((0,a.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},f),{},{children:[(0,U.jsx)(s.Z,{display:"flex",children:(0,U.jsx)(Ae.Z,{alt:n.did,src:(0,I.Jf)(n.endpoint)})}),(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",flexGrow:(!x||!fe)&&1,minWidth:"180px",flexDirection:fe?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,U.jsx)(o.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),ue&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ce,{style:{marginRight:"4px"}}),j("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),xe&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(we,{style:{marginRight:"4px"}}),j("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,U.jsx)(s.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,U.jsx)(o.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,U.jsx)(re.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,U.jsxs)(s.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[he&&(0,U.jsxs)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,U.jsx)(m.Z,{variant:"contained",size:"small",onClick:ve,children:j("storage.spaces.strategy.backupNow")}),ke.C&&(0,U.jsx)(ae.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,U.jsx)(o.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,U.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,U.jsxs)(s.Z,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!x&&"640px",marginLeft:x&&"16px",width:x&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[(0,U.jsx)(o.Z,{color:"primary",children:null===Q||void 0===Q?void 0:Q.message}),(0,U.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,U.jsx)(s.Z,{sx:{width:"100%",mr:1},children:(0,U.jsx)(_.Z,{color:"primary",variant:"determinate",value:null===Q||void 0===Q?void 0:Q.progress})}),(0,U.jsx)(s.Z,{sx:{maxWidth:"100%"},children:(0,U.jsxs)(o.Z,{variant:"body2",color:"text.secondary",children:[null===Q||void 0===Q?void 0:Q.progress,"%"]})})]})]}),xe&&(0,U.jsx)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,U.jsx)(m.Z,{color:"error",variant:"contained",size:"small",onClick:me,children:j("storage.spaces.disconnected.reconnectNow")})}),(0,U.jsx)(je,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:u,onConnect:me,enableSwitchToSpace:(null===Q||void 0===Q?void 0:Q.completed)||(0,ne.isEmpty)(null===Q||void 0===Q?void 0:Q.message)})]})]})),(0,U.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ie.prefix,open:ie.open,popup:!0,action:ie.action,baseUrl:ie.baseUrl,checkFn:ie.checkFn,onSuccess:ge,onClose:ie.onClose,checkTimeout:ie.checkTimeout,extraParams:ie.extraParams,messages:ie.messages,locale:k},"get-endpoint"),(0,U.jsx)(s.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,U.jsx)(te.default,{className:"selected-icon"})})]})}we.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se.propTypes={spaceGateway:N().shape({did:N().string.isRequired,name:N().string.isRequired,url:N().string.isRequired,endpoint:N().string.isRequired,protected:N().bool,loading:N().bool}).isRequired,connected:N().bool.isRequired,progress:N().any.isRequired,onDelete:N().func,onBackupNow:N().func},Se.defaultProps={onDelete:function(){},onBackupNow:function(){}};var Be=(0,O.Z)(s.Z)(ye||(ye=(0,F.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"]))),Ie=Se,De=t(9715),Ue=t(2291),Re=t(6779),Ee=t(20296),Te=t(19886),Fe=t.n(Te),ze=t(88666);function Oe(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,i.PE)(),r=t.t,c=t.locale,l=(0,D.XN)(),p=l.spaceGateways,d=l.backups,f=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:function(e){var n,t=d[e],r=t.targetUrl,a=t.targetName,s=t.status,i=t.createdAt,c=s===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(i,"hours")>=b.BACKUPS.TIMEOUT_HOURS,l=s===b.BACKUPS.STATUS.SUCCEEDED&&!c,u=a||(null===(n=p.find((function(e){return null===r||void 0===r?void 0:r.includes((0,I.LQ)(null===e||void 0===e?void 0:e.endpoint))})))||void 0===n?void 0:n.name)||"Unknown DID Space";return l?(0,U.jsx)(J.Z,{fontSize:"16px",href:r,target:"_blank",children:u}):(0,U.jsx)(o.Z,{variant:"body1",fontSize:"16px",children:u})}}},{label:r("common.strategy"),name:"strategy",options:{customBodyRender:function(e){var n=r(0===e?"common.auto":"common.manual");return(0,U.jsx)(De.Z,{children:n})}}},{label:r("common.startTime"),name:"createdAt",options:{customBodyRender:function(e){return Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:r("common.endTime"),name:"updatedAt",options:{customBodyRender:function(e){return(0,ne.isEmpty)(e)?"":Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:r("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n,t=null!==(n=null===d||void 0===d?void 0:d[e])&&void 0!==n?n:{},a=t.status,i=t.message,c=t.createdAt,l=a===b.BACKUPS.STATUS.PROGRESS&&Fe()().diff(c,"hours")>=b.BACKUPS.TIMEOUT_HOURS,p=l&&r("common.timeoutError"),u=a===b.BACKUPS.STATUS.PROGRESS&&!l,f=a===b.BACKUPS.STATUS.SUCCEEDED&&!l;return u?(0,U.jsxs)(o.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,U.jsx)(h.Z,{sx:{marginRight:"4px"},size:"12px"}),r("common.progress")]}):f?(0,U.jsx)(De.Z,{type:"success",children:r("common.succeeded")}):(0,U.jsxs)(s.Z,{display:"inline-flex",alignItems:"center",children:[(0,U.jsx)(De.Z,{type:"error",children:r("common.failed")})," \xa0",(0,U.jsx)(Re.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:i||p,children:(0,U.jsx)(Ee.Z,{children:(0,U.jsx)(ze.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,U.jsx)(s.Z,(0,a.Z)((0,a.Z)({},n),{},{children:null!==d&&void 0!==d&&d.length?(0,U.jsx)(Ue.Z,{title:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:r("storage.spaces.backup.records")}),data:d,columns:f,emptyNode:r("storage.spaces.record.emptyData",c),options:{download:!1,filter:!1,print:!1}}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:r("storage.spaces.backup.records")})}),(0,U.jsx)(s.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:r("storage.spaces.record.emptyData")})]})}))}Oe.propTypes={};var Le=Oe;var Ne=function(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet,t=(0,S.h6)().api,r=(0,D.XN)(),a=r.spaceGateways,d=r.spaceGatewaysLoading,u=r.deleteSpaceGateway,f=r.spaceGatewayIsSelected,x=d&&!(null!==a&&void 0!==a&&a.length),m=function(){var n=(0,p.Z)((0,l.Z)().mark((function n(t){return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u(t);case 2:y.Z.success(e("storage.spaces.gateway.delete.succeeded",{name:"(".concat(t.name,")")}));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),g=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.backupBlocklet({input:{appDid:n.appDid,to:"spaces"}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(s.Z,{children:x?(0,U.jsx)(s.Z,{display:"flex",justifyContent:"center",children:(0,U.jsx)(h.Z,{})}):a.map((function(e){return(0,U.jsx)(Ie,{style:{marginTop:"12px"},spaceGateway:e,connected:f(e),onDelete:m,onBackupNow:g},e.endpoint)}))}),(0,U.jsx)(Le,{sx:{marginTop:"24px"}}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})};function Pe(){return(0,D.XN)().backupEndpoint?(0,U.jsx)(Ne,{}):(0,U.jsx)(W,{})}Pe.propTypes={};var Me=Pe},19066:function(e,n,t){t.d(n,{C:function(){return r}});var r="true"===localStorage.getItem("enableDebug")}}]);
|
|
2
|
+
//# sourceMappingURL=6452.8510e39f.chunk.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6498],{70177:function(e,t,o){var n,a=o(71171),r=o(33028),i=o(59740),c=o(24974),l=o.n(c),s=o(32208),d=o.n(s),u=o(70093),m=o.n(u),h=o(33359),p=o(55581),v=o(37574),f=["name","nameFormatter","layout","children","valueComponent","nameWidth"];function w(e){var t=e.name,o=e.nameFormatter,n=e.layout,a=e.children,c=e.valueComponent,l=e.nameWidth,s=(0,i.Z)(e,f);return(0,v.jsxs)(g,(0,r.Z)((0,r.Z)({layout:n,width:l},s),{},{children:[(0,v.jsx)(h.Z,{color:"textSecondary",className:"info-row__name",children:o(t)}),a&&(0,v.jsx)(h.Z,{color:"textPrimary",component:c,className:"info-row__value",children:a})]}))}w.propTypes={name:l().any.isRequired,layout:l().oneOf(["horizontal","vertical"]),children:l().any,nameFormatter:l().func,valueComponent:l().string,nameWidth:l().number},w.defaultProps={children:null,nameWidth:90,nameFormatter:function(e){var t=e.split(" ").map((function(e){return m()(d()(e))})).join(" ");return"string"===typeof e?t:e},valueComponent:"div",layout:"horizontal"};var g=(0,p.zo)("div")(n||(n=(0,a.Z)(["\n display: flex;\n flex-direction: ",";\n justify-content: flex-start;\n align-items: ",";\n margin-bottom: 16px;\n\n .info-row__name {\n width: ","px;\n margin-right: ",";\n margin-bottom: ",";\n text-transform: capitalize;\n }\n\n .info-row__value {\n flex: 1;\n overflow: auto;\n word-wrap: break-word;\n font-weight: 500;\n }\n\n @media (max-width: ","px) {\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n .info-row__name {\n font-weight: bold;\n }\n\n .info-row__value {\n width: 100%;\n font-size: 12px;\n margin-top: 8px;\n }\n }\n"])),(function(e){return"vertical"===e.layout?"column":"row"}),(function(e){return"vertical"===e.layout?"flex-start":"center"}),(function(e){return e.width}),(function(e){return"vertical"===e.layout?"0":"8px"}),(function(e){return"vertical"===e.layout?"8px":"0"}),(function(e){return e.theme.breakpoints.values.md}));t.Z=w},30291:function(e,t,o){var n=o(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(o(48035)),r=o(37574),i=(0,a.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");t.default=i},20296:function(e,t,o){var n=o(7896),a=o(31461),r=o(30969),i=o(
|
|
2
|
-
//# sourceMappingURL=6498.
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6498],{70177:function(e,t,o){var n,a=o(71171),r=o(33028),i=o(59740),c=o(24974),l=o.n(c),s=o(32208),d=o.n(s),u=o(70093),m=o.n(u),h=o(33359),p=o(55581),v=o(37574),f=["name","nameFormatter","layout","children","valueComponent","nameWidth"];function w(e){var t=e.name,o=e.nameFormatter,n=e.layout,a=e.children,c=e.valueComponent,l=e.nameWidth,s=(0,i.Z)(e,f);return(0,v.jsxs)(g,(0,r.Z)((0,r.Z)({layout:n,width:l},s),{},{children:[(0,v.jsx)(h.Z,{color:"textSecondary",className:"info-row__name",children:o(t)}),a&&(0,v.jsx)(h.Z,{color:"textPrimary",component:c,className:"info-row__value",children:a})]}))}w.propTypes={name:l().any.isRequired,layout:l().oneOf(["horizontal","vertical"]),children:l().any,nameFormatter:l().func,valueComponent:l().string,nameWidth:l().number},w.defaultProps={children:null,nameWidth:90,nameFormatter:function(e){var t=e.split(" ").map((function(e){return m()(d()(e))})).join(" ");return"string"===typeof e?t:e},valueComponent:"div",layout:"horizontal"};var g=(0,p.zo)("div")(n||(n=(0,a.Z)(["\n display: flex;\n flex-direction: ",";\n justify-content: flex-start;\n align-items: ",";\n margin-bottom: 16px;\n\n .info-row__name {\n width: ","px;\n margin-right: ",";\n margin-bottom: ",";\n text-transform: capitalize;\n }\n\n .info-row__value {\n flex: 1;\n overflow: auto;\n word-wrap: break-word;\n font-weight: 500;\n }\n\n @media (max-width: ","px) {\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n .info-row__name {\n font-weight: bold;\n }\n\n .info-row__value {\n width: 100%;\n font-size: 12px;\n margin-top: 8px;\n }\n }\n"])),(function(e){return"vertical"===e.layout?"column":"row"}),(function(e){return"vertical"===e.layout?"flex-start":"center"}),(function(e){return e.width}),(function(e){return"vertical"===e.layout?"0":"8px"}),(function(e){return"vertical"===e.layout?"8px":"0"}),(function(e){return e.theme.breakpoints.values.md}));t.Z=w},30291:function(e,t,o){var n=o(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(o(48035)),r=o(37574),i=(0,a.default)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");t.default=i},20296:function(e,t,o){var n=o(7896),a=o(31461),r=o(30969),i=o(87023),c=o(26540),l=o(45971),s=o(17363),d=o(24099),u=o(30868),m=o(37574),h=["baseClassName","className","color","component","fontSize"],p=(0,l.ZP)("span",{name:"MuiIcon",slot:"Root",overridesResolver:function(e,t){var o=e.ownerState;return[t.root,"inherit"!==o.color&&t["color".concat((0,d.Z)(o.color))],t["fontSize".concat((0,d.Z)(o.fontSize))]]}})((function(e){var t=e.theme,o=e.ownerState;return{userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:t.typography.pxToRem(20),medium:t.typography.pxToRem(24),large:t.typography.pxToRem(36)}[o.fontSize],color:{primary:(t.vars||t).palette.primary.main,secondary:(t.vars||t).palette.secondary.main,info:(t.vars||t).palette.info.main,success:(t.vars||t).palette.success.main,warning:(t.vars||t).palette.warning.main,action:(t.vars||t).palette.action.active,error:(t.vars||t).palette.error.main,disabled:(t.vars||t).palette.action.disabled,inherit:void 0}[o.color]}})),v=r.forwardRef((function(e,t){var o=(0,s.Z)({props:e,name:"MuiIcon"}),r=o.baseClassName,l=void 0===r?"material-icons":r,v=o.className,f=o.color,w=void 0===f?"inherit":f,g=o.component,Z=void 0===g?"span":g,b=o.fontSize,y=void 0===b?"medium":b,x=(0,a.Z)(o,h),S=(0,n.Z)({},o,{baseClassName:l,color:w,component:Z,fontSize:y}),k=function(e){var t=e.color,o=e.fontSize,n=e.classes,a={root:["root","inherit"!==t&&"color".concat((0,d.Z)(t)),"fontSize".concat((0,d.Z)(o))]};return(0,c.Z)(a,u.d,n)}(S);return(0,m.jsx)(p,(0,n.Z)({as:Z,className:(0,i.Z)(l,"notranslate",k.root,v),ownerState:S,"aria-hidden":!0,ref:t},x))}));v.muiName="Icon",t.Z=v},30868:function(e,t,o){o.d(t,{d:function(){return r}});var n=o(62746),a=o(2975);function r(e){return(0,a.Z)("MuiIcon",e)}var i=(0,n.Z)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);t.Z=i},34159:function(e,t,o){o.d(t,{Z:function(){return k}});var n=o(56666),a=o(31461),r=o(7896),i=o(30969),c=o(87023),l=o(26540),s=o(74262),d=o(24099),u=o(71885),m=o(17363),h=o(45971),p=o(62746),v=o(2975);function f(e){return(0,v.Z)("MuiSwitch",e)}var w=(0,p.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),g=o(37574),Z=["className","color","edge","size","sx"],b=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:function(e,t){var o=e.ownerState;return[t.root,o.edge&&t["edge".concat((0,d.Z)(o.edge))],t["size".concat((0,d.Z)(o.size))]]}})((function(e){var t,o=e.ownerState;return(0,r.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===o.edge&&{marginLeft:-8},"end"===o.edge&&{marginRight:-8},"small"===o.size&&(t={width:40,height:24,padding:7},(0,n.Z)(t,"& .".concat(w.thumb),{width:16,height:16}),(0,n.Z)(t,"& .".concat(w.switchBase),(0,n.Z)({padding:4},"&.".concat(w.checked),{transform:"translateX(16px)"})),t))})),y=(0,h.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:function(e,t){var o=e.ownerState;return[t.switchBase,(0,n.Z)({},"& .".concat(w.input),t.input),"default"!==o.color&&t["color".concat((0,d.Z)(o.color))]]}})((function(e){var t,o=e.theme;return t={position:"absolute",top:0,left:0,zIndex:1,color:o.vars?o.vars.palette.Switch.defaultColor:"".concat("light"===o.palette.mode?o.palette.common.white:o.palette.grey[300]),transition:o.transitions.create(["left","transform"],{duration:o.transitions.duration.shortest})},(0,n.Z)(t,"&.".concat(w.checked),{transform:"translateX(20px)"}),(0,n.Z)(t,"&.".concat(w.disabled),{color:o.vars?o.vars.palette.Switch.defaultDisabledColor:"".concat("light"===o.palette.mode?o.palette.grey[100]:o.palette.grey[600])}),(0,n.Z)(t,"&.".concat(w.checked," + .").concat(w.track),{opacity:.5}),(0,n.Z)(t,"&.".concat(w.disabled," + .").concat(w.track),{opacity:o.vars?o.vars.opacity.switchTrackDisabled:"".concat("light"===o.palette.mode?.12:.2)}),(0,n.Z)(t,"& .".concat(w.input),{left:"-100%",width:"300%"}),t}),(function(e){var t,o=e.theme,a=e.ownerState;return(0,r.Z)({"&:hover":{backgroundColor:o.vars?"rgba(".concat(o.vars.palette.action.activeChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):(0,s.Fq)(o.palette.action.active,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==a.color&&(t={},(0,n.Z)(t,"&.".concat(w.checked),(0,n.Z)({color:(o.vars||o).palette[a.color].main,"&:hover":{backgroundColor:o.vars?"rgba(".concat(o.vars.palette[a.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):(0,s.Fq)(o.palette[a.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&.".concat(w.disabled),{color:o.vars?o.vars.palette.Switch["".concat(a.color,"DisabledColor")]:"".concat("light"===o.palette.mode?(0,s.$n)(o.palette[a.color].main,.62):(0,s._j)(o.palette[a.color].main,.55))})),(0,n.Z)(t,"&.".concat(w.checked," + .").concat(w.track),{backgroundColor:(o.vars||o).palette[a.color].main}),t))})),x=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:function(e,t){return t.track}})((function(e){var t=e.theme;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),S=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:function(e,t){return t.thumb}})((function(e){var t=e.theme;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),k=i.forwardRef((function(e,t){var o=(0,m.Z)({props:e,name:"MuiSwitch"}),n=o.className,i=o.color,s=void 0===i?"primary":i,u=o.edge,h=void 0!==u&&u,p=o.size,v=void 0===p?"medium":p,w=o.sx,k=(0,a.Z)(o,Z),z=(0,r.Z)({},o,{color:s,edge:h,size:v}),C=function(e){var t=e.classes,o=e.edge,n=e.size,a=e.color,i=e.checked,c=e.disabled,s={root:["root",o&&"edge".concat((0,d.Z)(o)),"size".concat((0,d.Z)(n))],switchBase:["switchBase","color".concat((0,d.Z)(a)),i&&"checked",c&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,l.Z)(s,f,t);return(0,r.Z)({},t,u)}(z),_=(0,g.jsx)(S,{className:C.thumb,ownerState:z});return(0,g.jsxs)(b,{className:(0,c.Z)(C.root,n),sx:w,ownerState:z,children:[(0,g.jsx)(y,(0,r.Z)({type:"checkbox",icon:_,checkedIcon:_,ref:t,ownerState:z},k,{classes:(0,r.Z)({},C,{root:C.switchBase})})),(0,g.jsx)(x,{className:C.track,ownerState:z})]})}))}}]);
|
|
2
|
+
//# sourceMappingURL=6498.698608f8.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6576],{26576:function(n,e,t){t.r(e),t.d(e,{default:function(){return I}});var r=t(71171),o=t(32723),i=t(34795),a=t(96234),c=t(30969),l=t(16380),s=t(76492),u=t(97517),d=t(49884),p=t(87535),f=t(38361),m=t(88876),h=t(94702),v=t(26022),Z=t(1986),x=t(20244),b=t(7017),g=t(99398),k=t(24891),w=t(70115),y=t(64864),j=t(62975),z=t(96699),C=t(56552),S=t(55829),N=t(6779),A=t(94551),M=t(37574);function W(n){var e=n.children,t=(0,v.PE)().t;return(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[e,(0,M.jsx)(N.Z,{title:t("blocklet.config.access.publicInstanceTip"),children:(0,M.jsx)(A.Z,{children:(0,M.jsx)(S.Z,{fontSize:"small"})})})]})}var E,P=(0,c.memo)(W);function I(n){var e=n.onNext,t=(0,h.Z)(),r=(0,v.PE)(),l=r.t,j=r.locale,S=(0,c.useState)(!1),N=(0,a.Z)(S,2),A=N[0],W=N[1],E=(0,c.useState)(""),I=(0,a.Z)(E,2),_=I[0],L=I[1],B=(0,c.useState)(!1),H=(0,a.Z)(B,2),T=H[0],V=H[1],R=(0,y.y0)(),F=R.blocklet,q=R.actions,D=R.getPublicInstance;(0,c.useEffect)((function(){L((0,b.getWhoCanAccess)(F)),V(D(F))}),[F]);var Y=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,W(!0),n.next=4,(0,k._v)(800);case 4:return n.next=6,q.configWhoCanAccess(e);case 6:W(!1),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),W(!1),Z.Z.error(n.t0.message);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(e){return n.apply(this,arguments)}}(),G=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!A){n.next=2;break}return n.abrupt("return");case 2:return L(e.target.value),n.next=5,Y(e.target.value);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),J=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){var t;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.target.checked,n.prev=1,W(!0),n.next=5,q.configPublicToStore(t);case 5:W(!1),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),W(!1),Z.Z.error(n.t0.message);case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e){return n.apply(this,arguments)}}(),K={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:t.palette.text.secondary};return(0,M.jsxs)(O,{children:[(0,M.jsx)("div",{className:"header",children:(0,M.jsx)(g.Z,{title:l("blocklet.config.access.description")})}),(0,M.jsx)(p.Z,{component:"fieldset",children:(0,M.jsx)(u.Z,{name:"inherit",value:_,onChange:G,children:w.Z.map((function(n){return(0,M.jsxs)("div",{style:{marginBottom:16},children:[(0,M.jsx)(d.Z,{value:n.value,control:(0,M.jsx)(s.Z,{color:"primary"}),label:(0,M.jsxs)("span",{children:[(0,M.jsx)(n.icon,{style:K}),n.title[j]]})}),(0,M.jsxs)(f.Z,{className:"tip",children:[n.description[j],n.value===x.WHO_CAN_ACCESS.ALL&&_===x.WHO_CAN_ACCESS.ALL&&"registry"===F.source&&(0,M.jsx)(P,{children:(0,M.jsx)(d.Z,{style:{marginRight:0},value:n.value,control:(0,M.jsx)(m.Z,{size:"small"}),label:(0,M.jsx)("span",{children:l("blocklet.config.access.publicToStore")}),onChange:J,checked:T,disabled:A})})]})]},n.value)}))})}),(0,M.jsx)(z.Z,{mt:8,disabled:A,blocklet:F,onStartNow:function(){return e("complete")},children:(0,M.jsx)(f.Z,{display:"flex",alignItems:"center",children:(0,M.jsx)(C.Z,{loading:A,variant:"outlined",disabled:A,onClick:function(){return e()},children:l("setup.continue")})})})]})}I.defaultProps={onNext:function(){}};var O=(0,l.Z)(j.Z)(E||(E=(0,r.Z)(["\n height: 100%;\n overflow-y: auto;\n .header {\n width: 100%;\n }\n .tip {\n margin-left: 32px;\n font-size: 12px;\n margin-top: -8px;\n color: ",";\n }\n"])),(function(n){return n.theme.palette.text.secondary}))},56552:function(n,e,t){t.d(e,{Z:function(){return c}});var r=t(33028),o=t(33665),i=t(29996),a=t(37574);function c(n){var e=Object.assign({},((0,o.Z)(n),n));return(0,a.jsx)(i.Z,(0,r.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},62975:function(n,e,t){t.d(e,{Z:function(){return h}});var r,o=t(71171),i=t(16380),a=t(33028),c=t(59740),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,c.Z)(n,d);return(0,u.jsx)(m,(0,a.Z)((0,a.Z)({},t),{},{children:e}))}p.propTypes={children:s().any.isRequired};var f,m=i.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")})),h=(0,i.Z)(p)(f||(f=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}))},96699:function(n,e,t){t.d(e,{Z:function(){return p}});var r,o,i=t(71171),a=t(16380),c=t(38361),l=t(26022),s=t(29996),u=t(38507),d=t(37574);function p(n){var e=n.blocklet,t=n.onStartNow,r=n.children,o=n.disabled,i=(0,l.PE)().t;return!e||(0,u.bg)(e.meta)?(0,d.jsx)(f,{children:r}):(0,d.jsxs)(m,{children:[(0,d.jsx)(s.Z,{className:"start-now",variant:"contained",color:"primary",disabled:o,onClick:function(){return t()},children:i("setup.startNow")}),(0,d.jsx)(c.Z,{display:"flex",alignItems:"center",children:r})]})}p.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1};var f=(0,a.Z)(c.Z)(r||(r=(0,i.Z)(["\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n min-width: 150px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")})),m=(0,a.Z)(c.Z)(o||(o=(0,i.Z)(["\n padding-bottom: 48px;\n padding-top: 24px;\n margin: 0 auto;\n width: 80%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: 100px;\n }\n .bottom-button {\n min-width: 80px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}))},70115:function(n,e,t){var r=t(39517),o=t(87642),i=t(64076),a=t(20244);e.Z=[{value:a.WHO_CAN_ACCESS.ALL,icon:i.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:a.WHO_CAN_ACCESS.INVITED,icon:o.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:a.WHO_CAN_ACCESS.OWNER,icon:r.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}]},99398:function(n,e,t){var r,o=t(71171),i=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(15405),d=t(37574),p=["title","subTitle","onClickBack"];function f(n){var e=n.title,t=n.subTitle,r=n.onClickBack,o=(0,a.Z)(n,p);return(0,d.jsxs)(m,(0,i.Z)((0,i.Z)({},o),{},{children:[r&&(0,d.jsx)(u.Z,{className:"back-btn",onClick:r}),(0,d.jsx)("div",{className:"title",children:e}),(0,d.jsx)("div",{className:"sub-title",children:t})]}))}var m=c.Z.div(r||(r=(0,o.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));e.Z=f,f.propTypes={title:s().string,subTitle:s().string,onClickBack:s().oneOfType([s().func,s().string])},f.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=a},87642:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"}),"ContactMail");e.Z=a},55829:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=a},39517:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");e.Z=a},64076:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");e.Z=a},88876:function(n,e,t){t.d(e,{Z:function(){return z}});var r=t(56666),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(74262),u=t(71885),d=t(17469),p=t(37574),f=(0,d.Z)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),v=t(24099),Z=t(17363),x=t(45971),b=t(72726),g=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],k=(0,x.ZP)(u.Z,{shouldForwardProp:function(n){return(0,x.FO)(n)||"classes"===n},name:"MuiCheckbox",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return[e.root,t.indeterminate&&e.indeterminate,"default"!==t.color&&e["color".concat((0,v.Z)(t.color))]]}})((function(n){var e,t=n.theme,o=n.ownerState;return(0,i.Z)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&(e={},(0,r.Z)(e,"&.".concat(b.Z.checked,", &.").concat(b.Z.indeterminate),{color:(t.vars||t).palette[o.color].main}),(0,r.Z)(e,"&.".concat(b.Z.disabled),{color:(t.vars||t).palette.action.disabled}),e))})),w=(0,p.jsx)(m,{}),y=(0,p.jsx)(f,{}),j=(0,p.jsx)(h,{}),z=a.forwardRef((function(n,e){var t,r,s=(0,Z.Z)({props:n,name:"MuiCheckbox"}),u=s.checkedIcon,d=void 0===u?w:u,f=s.color,m=void 0===f?"primary":f,h=s.icon,x=void 0===h?y:h,z=s.indeterminate,C=void 0!==z&&z,S=s.indeterminateIcon,N=void 0===S?j:S,A=s.inputProps,M=s.size,W=void 0===M?"medium":M,E=s.className,P=(0,o.Z)(s,g),I=C?N:x,O=C?N:d,_=(0,i.Z)({},s,{color:m,indeterminate:C,size:W}),L=function(n){var e=n.classes,t=n.indeterminate,r=n.color,o=n.size,a={root:["root",t&&"indeterminate","color".concat((0,v.Z)(r)),"size".concat((0,v.Z)(o))]},c=(0,l.Z)(a,b.y,e);return(0,i.Z)({},e,c)}(_);return(0,p.jsx)(k,(0,i.Z)({type:"checkbox",inputProps:(0,i.Z)({"data-indeterminate":C},A),icon:a.cloneElement(I,{fontSize:null!=(t=I.props.fontSize)?t:W}),checkedIcon:a.cloneElement(O,{fontSize:null!=(r=O.props.fontSize)?r:W}),ownerState:_,ref:e,className:(0,c.Z)(L.root,E)},P,{classes:L}))}))},72726:function(n,e,t){t.d(e,{y:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiCheckbox",n)}var a=(0,r.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);e.Z=a},87535:function(n,e,t){var r=t(96234),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(17363),u=t(45971),d=t(81133),p=t(24099),f=t(86209),m=t(43611),h=t(35572),v=t(37574),Z=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],x=(0,u.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return(0,i.Z)({},e.root,e["margin".concat((0,p.Z)(t.margin))],t.fullWidth&&e.fullWidth)}})((function(n){var e=n.ownerState;return(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})})),b=a.forwardRef((function(n,e){var t=(0,s.Z)({props:n,name:"MuiFormControl"}),u=t.children,b=t.className,g=t.color,k=void 0===g?"primary":g,w=t.component,y=void 0===w?"div":w,j=t.disabled,z=void 0!==j&&j,C=t.error,S=void 0!==C&&C,N=t.focused,A=t.fullWidth,M=void 0!==A&&A,W=t.hiddenLabel,E=void 0!==W&&W,P=t.margin,I=void 0===P?"none":P,O=t.required,_=void 0!==O&&O,L=t.size,B=void 0===L?"medium":L,H=t.variant,T=void 0===H?"outlined":H,V=(0,o.Z)(t,Z),R=(0,i.Z)({},t,{color:k,component:y,disabled:z,error:S,fullWidth:M,hiddenLabel:E,margin:I,required:_,size:B,variant:T}),F=function(n){var e=n.classes,t=n.margin,r=n.fullWidth,o={root:["root","none"!==t&&"margin".concat((0,p.Z)(t)),r&&"fullWidth"]};return(0,l.Z)(o,h.e,e)}(R),q=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){if((0,f.Z)(e,["Input","Select"])){var t=(0,f.Z)(e,["Select"])?e.props.input:e;t&&(0,d.B7)(t.props)&&(n=!0)}})),n})),D=(0,r.Z)(q,2),Y=D[0],G=D[1],J=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){(0,f.Z)(e,["Input","Select"])&&((0,d.vd)(e.props,!0)||(0,d.vd)(e.props.inputProps,!0))&&(n=!0)})),n})),K=(0,r.Z)(J,2),Q=K[0],U=K[1],X=a.useState(!1),$=(0,r.Z)(X,2),nn=$[0],en=$[1];z&&nn&&en(!1);var tn,rn=void 0===N||z?nn:N,on=a.useMemo((function(){return{adornedStart:Y,setAdornedStart:G,color:k,disabled:z,error:S,filled:Q,focused:rn,fullWidth:M,hiddenLabel:E,size:B,onBlur:function(){en(!1)},onEmpty:function(){U(!1)},onFilled:function(){U(!0)},onFocus:function(){en(!0)},registerEffect:tn,required:_,variant:T}}),[Y,k,z,S,Q,rn,M,E,tn,_,B,T]);return(0,v.jsx)(m.Z.Provider,{value:on,children:(0,v.jsx)(x,(0,i.Z)({as:y,ownerState:R,className:(0,c.Z)(F.root,b),ref:e},V,{children:u}))})}));e.Z=b},35572:function(n,e,t){t.d(e,{e:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiFormControl",n)}var a=(0,r.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);e.Z=a},81133:function(n,e,t){function r(n){return null!=n&&!(Array.isArray(n)&&0===n.length)}function o(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&(r(n.value)&&""!==n.value||e&&r(n.defaultValue)&&""!==n.defaultValue)}function i(n){return n.startAdornment}t.d(e,{B7:function(){return i},vd:function(){return o}})},33665:function(n,e,t){function r(n){if(null==n)throw new TypeError("Cannot destructure "+n)}t.d(e,{Z:function(){return r}})}}]);
|
|
2
|
+
//# sourceMappingURL=6576.2afa44eb.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6737],{76737:function(n,e,t){t.r(e),t.d(e,{default:function(){return q}});var r,o,i,a,l=t(71171),c=t(32723),s=t(34795),d=t(33028),p=t(96234),u=t(59740),h=t(30969),f=t(86822),v=t(16380),m=t(54470),x=t(38361),g=t(8825),b=t(60680),j=t(46672),w=t(19638),y=t(29996),Z=t(26022),z=t(1986),k=t(62399),O=t(36558),P=t(12268),_=t(238),S=t(59505),C=t(94308),N=t(75255),M=t(47650),E=t(7017),L=t(20244),D=t(99574),R=t(24891),I=t(83364),T=t(99042),V=t(48952),A=t(4485),B=t(38507),H=t(37574),U=["appInfo"];function F(n){var e=n.appInfo,t=(0,u.Z)(n,U),r=(0,h.useState)(!1),o=(0,p.Z)(r,2),i=o[0],a=o[1],l=(0,N.Z)((function(n){return n.breakpoints.down("md")}))?32:48;return i?(0,H.jsx)(k.Z,{did:e.publisher,size:l}):(0,H.jsx)(P.Z,(0,d.Z)((0,d.Z)({src:e.icon,alt:e.title,width:l,height:l},t),{},{onError:function(){return a(!0)}}))}var W=function(n,e){return(0,E.findComponentByIdV2)(n,e)||n};function q(){var n,e,t,r=(0,Z.PE)(),o=r.t,i=r.locale,a=(0,h.useState)(null),l=(0,p.Z)(a,2),d=l[0],u=l[1],v=(0,h.useState)(null),j=(0,p.Z)(v,2),k=j[0],P=j[1],U=(0,h.useState)(!1),q=(0,p.Z)(U,2),Q=q[0],Y=q[1],$=(0,h.useState)(!1),nn=(0,p.Z)($,2),en=nn[0],tn=nn[1],rn=(0,N.Z)((function(n){return n.breakpoints.down("md")})),on=new URL(window.location.href),an=on.searchParams.get("componentId"),ln=function(){var n=on.searchParams.get("redirect")||"/";window.location=decodeURIComponent(n)},cn=function(){var n=setInterval((function(){T.Z.get("/blocklet/detail").then((function(e){var t=e.data,r=W(t,an);"running"!==r.status?"starting"!==r.status&&(tn(!1),u(t),t!==r&&P(r),clearInterval(n)):ln()})).catch((function(n){Y(!1),z.Z.error(n.message)}))}),3e3)};(0,h.useEffect)((function(){Y(!0),T.Z.get("/blocklet/detail").then(function(){var n=(0,s.Z)((0,c.Z)().mark((function n(e){var t,r,o;return(0,c.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.data,r=W(t,an),!(o=t.controller)){n.next=7;break}return n.next=6,(0,R.Nh)(o.chainHost,o.nftId);case 6:t.nftState=n.sent;case 7:if(Y(!1),"running"!==r.status){n.next=11;break}return ln(),n.abrupt("return");case 11:u(t),t!==r&&P(r),"starting"===r.status&&(tn(!0),cn());case 14:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()).catch((function(n){Y(!1),z.Z.error(n.message)}))}),[]);var sn=(0,h.useCallback)((function(){Y(!0),tn(!0);var n={did:d.meta.did};k&&(n.componentDids=[k.meta.did]),V.Z.startBlocklet({input:n}).then((function(){cn()})).catch((function(n){z.Z.error(n.message),Y(!1),tn(!1)}))}),[k,d]);if(!d)return(0,H.jsx)(_.Z,{children:(0,H.jsx)(C.Z,{})});var dn={icon:"".concat(L.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),title:(0,E.getDisplayName)(d),publisher:d.appDid},pn=localStorage.getItem("blocklet-server-url");return(0,H.jsxs)(K,{children:[(0,H.jsx)(m.Global,{styles:G}),(0,H.jsxs)("header",{className:"root-header",children:[!rn&&(0,H.jsx)("div",{className:"left",children:(0,H.jsx)(M.Z,{width:"128",height:"48",onClick:function(){pn&&window.open(pn)},style:{cursor:pn?"pointer":""}})}),(0,H.jsx)("div",{className:"right",children:(0,H.jsx)(D.Z,{SessionContext:A.B3})})]}),(0,H.jsxs)(X,{elevation:0,children:[(0,H.jsxs)(J,{children:[(0,H.jsx)(F,{appInfo:dn}),(0,H.jsxs)("div",{className:"app-info_content",children:[(0,H.jsx)(x.Z,{className:"app-info_name",children:dn.title}),(0,H.jsx)(O.Z,{size:14,className:"app-info_did",did:dn.publisher})]})]}),(null===d||void 0===d||null===(n=d.controller)||void 0===n||null===(e=n.status)||void 0===e?void 0:e.value)!==S.BLOCKLET_CONTROLLER_STATUS.suspended&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{className:"title-box",children:[(0,H.jsx)(x.Z,{className:"icon",children:(0,H.jsx)(g.Z,{})}),(0,H.jsx)(x.Z,{className:"title",children:o("blocklet.startApplication")})]}),(0,H.jsx)(x.Z,{className:"sub-title",children:o("blocklet.startDescription",{name:k?(0,E.getDisplayName)(k,!0):(0,E.getDisplayName)(d)})}),(0,H.jsx)(x.Z,{mt:8,children:(0,H.jsx)(y.Z,{style:{minWidth:200},disabled:Q||en,variant:"contained",color:"primary",size:"large",loading:en,onClick:function(){return sn()},children:o(en?"blocklet.starting":"blocklet.start")})})]}),(0,B.xp)(null===d||void 0===d?void 0:d.controller,null===d||void 0===d?void 0:d.nftState)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{className:"title-box",children:[(0,H.jsx)(b.Z,{className:"icon-error"}),(0,H.jsx)(x.Z,{className:"title error",children:o("blocklet.suspended")})]}),(0,H.jsx)(x.Z,{className:"sub-title",children:o("blocklet.redemptionTip",{deadline:(0,B.a7)((0,I.getNftExpirationDate)(d.nftState),i)})}),(0,H.jsx)(x.Z,{mt:8,children:(0,H.jsx)(y.Z,{component:w.Z,style:{minWidth:200},variant:"contained",color:"primary",size:"large",href:(0,R.Hz)({nftState:d.nftState,nftId:null===(t=d.nftState)||void 0===t?void 0:t.address,locale:i}),children:o("common.renew")})})]}),(0,H.jsx)(x.Z,{mt:5,children:(0,H.jsx)(f.rU,{className:"footer-link",to:"".concat(L.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/overview"),children:o("blocklet.dashboard")})})]})]})}var G=(0,m.css)(r||(r=(0,l.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),K=v.Z.div(o||(o=(0,l.Z)(["\n width: 100vw;\n height: 100%;\n background: #f6f8fa;\n display: flex;\n justify-content: center;\n align-items: center;\n\n .root-header {\n position: fixed;\n z-index: 200;\n top: 0;\n display: flex;\n width: 100%;\n height: 68px;\n align-items: center;\n justify-content: flex-end;\n padding: 24px;\n max-width: 1245px;\n\n "," {\n padding: 14px 16px;\n height: 56px;\n }\n\n .left {\n margin-top: 4px;\n margin-right: auto;\n "," {\n margin-top: 0%;\n }\n }\n\n .right {\n display: flex;\n align-items: center;\n "," {\n button,\n a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")})),X=(0,v.Z)(j.Z)(i||(i=(0,l.Z)(["\n width: 80vw;\n max-width: 1245px;\n height: 80vh;\n box-sizing: border-box;\n padding: 32px;\n &.MuiPaper-rounded {\n border-radius: 8px;\n }\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n "," {\n width: 100vw;\n height: 100%;\n left: 0;\n top: 0;\n padding: 32px 0;\n }\n\n .MuiIconButton-root {\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n\n .title-box {\n display: flex;\n align-items: center;\n "," {\n margin-top: 60px;\n }\n }\n\n .icon {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: ",";\n color: ",";\n }\n\n .icon-error {\n width: 32px;\n height: 32px;\n color: ",";\n }\n\n .title {\n margin-left: 12px;\n color: ",";\n font-size: 24px;\n font-weight: bolder;\n }\n\n .error {\n color: ",";\n }\n\n .sub-title {\n margin-top: 24px;\n color: ",";\n font-size: 16px;\n max-width: 360px;\n word-break: break-word;\n hyphens: auto;\n\n "," {\n padding: 0 32px;\n }\n }\n\n .footer-link {\n color: ",";\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.common.white}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.primary.main}),(function(n){return n.theme.palette.error.main}),(function(n){return n.theme.palette.grey[700]}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.primary.main})),J=v.Z.div(a||(a=(0,l.Z)(["\n display: flex;\n align-items: center;\n position: absolute;\n left: 24px;\n right: 24px;\n top: 24px;\n font-size: 16px;\n font-weight: 500;\n color: #222;\n\n /* \u7981\u6b62 app icon shrink */\n > *:first-child {\n flex: 0 0 auto;\n }\n\n .app-info_content {\n padding-left: 16px;\n overflow: hidden;\n }\n\n .app-info_name {\n max-width: 100%;\n padding-right: 32px;\n line-height: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: bold;\n }\n\n .app-info_did {\n transform: translate(0, 2px);\n }\n\n .app-info_did .did-address__text {\n color: #666;\n font-size: 14px;\n }\n\n "," {\n top: 12px;\n .app-info_did {\n transform: translate(0, 0);\n }\n .app-info_did .did-address__text {\n font-size: 12px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}))},36558:function(n,e,t){var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),l=t(86822),c=t(19638),s=t(23586),d=t(37574),p=["did","href","external","avatarProps"];function u(n){var e=n.did,t=n.href,i=n.external,a=(n.avatarProps,(0,o.Z)(n,p)),u=(0,d.jsx)(s.Z,(0,r.Z)({did:e},a));return t?i?(0,d.jsx)(c.Z,{target:"_blank",href:t,underline:"hover",children:u}):(0,d.jsx)(l.rU,{to:t,children:u}):u}u.propTypes={did:a().string.isRequired,to:a().string,href:a().string,avatarProps:a().object,external:a().bool},u.defaultProps={to:"",href:"",avatarProps:{},external:!1},e.Z=u},99574:function(n,e,t){t.d(e,{Z:function(){return g}});var r,o=t(71171),i=t(33028),a=t(30969),l=t(16380),c=t(24974),s=t.n(c),d=t(94551),p=t(30734),u=t(19230),h=t(26681),f=t(26022),v=t(46513),m=t(91077),x=t(37574);function g(n){var e=n.SessionContext,t=n.extraItems,r=n.showLocale,o=n.showHelper,l=n.showSessionManager,c=n.sessionManagerProps,s=(0,a.useContext)(e).session,g=(0,a.useContext)(f.RD).locale,j=(0,p.useLocation)(),w={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,x.jsxs)(b,{children:[t.map((function(n,e){return(0,a.cloneElement)(n,{key:e})})),r&&(0,x.jsx)(h.Z,{"data-cy":"locale-addon",icon:v.Z,size:23,showText:!1,className:"locale-addon"}),o&&(0,x.jsx)(d.Z,{onClick:function(){var n=j.pathname,e={};n.indexOf("/store")>-1?e=w["/store"]:w[n]&&(e=w[n]),window.open("".concat(e.endpoint||"https://developer.blocklet.io/docs","/").concat(g).concat(e.path||""),"_blank")},children:(0,x.jsx)(m.Z,{})}),l&&(0,x.jsx)(u.Z,(0,i.Z)((0,i.Z)({locale:g,session:s,size:24,showRole:!0},c),{},{showManageBlocklet:!1}))]})}g.propTypes={SessionContext:s().object.isRequired,webWalletUrl:s().string,extraItems:s().array,showLocale:s().bool,showSessionManager:s().bool,showHelper:s().bool,sessionManagerProps:s().object},g.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};var b=l.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .MuiIconButton-root svg {\n width: 26px;\n height: 26px;\n }\n\n .user-addon {\n .user-avatar {\n width: 28px;\n border-radius: 14px;\n height: auto;\n }\n }\n\n "," {\n > button,\n > a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}))},62399:function(n,e,t){t.d(e,{Z:function(){return r.Z}});var r=t(22797)},46513:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsx)("svg",a(a({},n),{},{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};c.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="globe";var s=c;e.Z=s},91077:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsxs)("svg",a(a({},n),{},{children:[(0,o.jsx)("path",{d:"M9.928 13.133a.981.981 0 0 0-.678.252.79.79 0 0 0-.281.61c0 .27.094.482.283.636.19.154.41.231.663.231.257 0 .48-.076.673-.228.19-.153.287-.365.287-.639a.796.796 0 0 0-.275-.61.958.958 0 0 0-.672-.252zM12.633 7.2a2.526 2.526 0 0 0-1.035-.88c-.441-.212-.955-.32-1.528-.32-.617 0-1.166.129-1.63.383-.467.255-.826.582-1.07.972-.245.392-.37.786-.37 1.172 0 .205.086.397.254.57.169.174.38.262.625.262.419 0 .705-.246.85-.729.132-.399.296-.703.485-.905.177-.19.465-.286.856-.286.336 0 .602.095.813.29.208.191.309.42.309.698a.78.78 0 0 1-.1.387c-.07.125-.156.24-.258.342-.108.109-.287.27-.53.484a9.184 9.184 0 0 0-.679.647 2.268 2.268 0 0 0-.42.656 2.27 2.27 0 0 0-.159.884c0 .288.08.511.24.663.156.15.352.227.58.227.439 0 .714-.24.796-.687.041-.186.073-.316.094-.39.019-.067.046-.136.081-.205.034-.068.089-.144.162-.227.076-.088.179-.19.305-.306.472-.422.805-.727.99-.908.19-.186.356-.41.493-.665A1.9 1.9 0 0 0 13 8.416a2.18 2.18 0 0 0-.367-1.217",fill:"currentColor"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zm0 1.5a9 9 0 1 0 0-18 9 9 0 0 0 0 18z",fill:"currentColor"})]}))};c.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="question-mark-circle";var s=c;e.Z=s},47650:function(n,e,t){e.Z=void 0;(r=t(30969))&&r.__esModule;var r,o=t(37574);function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?i(Object(t),!0).forEach((function(e){l(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function l(n,e,t){return(e=function(n){var e=function(n,e){if("object"!==typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===typeof e?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var c=function(n){return(0,o.jsxs)("svg",a(a({},n),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.673L30.72 0 12.288 10.673v14.194L0 31.982v21.345L18.432 64l12.258-7.098.03.017.03-.017L43.008 64 61.44 53.327V31.982l-12.288-7.115V10.673zm10.368 22.42l-12.288-7.115V11.784L30.72 2.224l-16.512 9.56v14.194L1.92 33.093v19.122l16.512 9.561L30.69 54.68l.03.017.03-.017 12.258 7.097 16.512-9.56V33.093z",fill:"url(#paint0_linear_615_418)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 26.07V10.03h7.737a3.795 3.795 0 0 1 3.79 3.8v1.152c0 1.01-.394 1.929-1.035 2.61a3.801 3.801 0 0 1 1.901 3.295v1.382c0 2.1-1.696 3.8-3.79 3.8h-8.603zm1.684-8.983h6.226a2.11 2.11 0 0 0 1.932-2.104V13.83a2.108 2.108 0 0 0-2.105-2.112h-6.053v5.369zm0 7.294v-5.598l6.92-.007c1.163 0 2.105.945 2.105 2.111v1.382a2.108 2.108 0 0 1-2.105 2.112h-6.92zm15.566-14.352v16.04h-1.762V10.03h1.762zm8.733 4.331h-1.827a3.816 3.816 0 0 0-3.811 3.822v4.066a3.816 3.816 0 0 0 3.811 3.822h1.827a3.817 3.817 0 0 0 3.811-3.822v-4.066a3.817 3.817 0 0 0-3.811-3.822zm-1.827 1.768c-1.131 0-2.049.92-2.049 2.054v4.066c0 1.135.918 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-4.066a2.051 2.051 0 0 0-2.048-2.054h-1.827zm21.043 9.948v-5.77h2.148l3.322 5.77h2.035l-3.821-6.638 2.993-5.198h-2.035l-2.474 4.298h-2.168V10.03h-1.762v16.047h1.762zm-5.556-7.581v-.313a2.051 2.051 0 0 0-2.048-2.054h-1.827c-1.132 0-2.049.92-2.049 2.054v4.066c0 1.135.917 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-.313h1.762v.313a3.816 3.816 0 0 1-3.81 3.822h-1.827a3.816 3.816 0 0 1-3.811-3.822v-4.066a3.816 3.816 0 0 1 3.811-3.822h1.827a3.816 3.816 0 0 1 3.81 3.822v.313h-1.762zm17.918 7.575V10.03h-1.762v16.04h1.762zm4.989-5.372v1.55c0 1.135.917 2.054 2.049 2.054h1.827c1.131 0 2.048-.92 2.048-2.054v-.313h1.762v.313a3.816 3.816 0 0 1-3.81 3.822h-1.827a3.816 3.816 0 0 1-3.811-3.822v-4.066a3.816 3.816 0 0 1 3.811-3.822h1.827a3.816 3.816 0 0 1 3.81 3.822v.748h.001v1.768h-7.687zm5.924-1.768h-5.924v-.748c0-1.134.917-2.054 2.049-2.054h1.827c1.131 0 2.048.92 2.048 2.054v.748zm5.489-1.917H152.4v-1.768h1.568V12.39h1.684v2.856h4.077v1.768h-4.077v5.693c0 .925.747 1.675 1.669 1.675s1.67-.75 1.67-1.675v-.351h1.684v.351a3.358 3.358 0 0 1-3.354 3.364 3.358 3.358 0 0 1-3.353-3.364v-5.693z",fill:"#121319"}),(0,o.jsx)("path",{d:"M91.034 36.52c-.112.196-.233.34-.364.434a.793.793 0 0 1-.462.126c-.196 0-.41-.07-.644-.21-.224-.15-.495-.313-.812-.49a6.307 6.307 0 0 0-1.12-.476c-.42-.15-.92-.224-1.498-.224-.523 0-.98.065-1.372.196a2.87 2.87 0 0 0-.994.518 2.117 2.117 0 0 0-.588.812 2.59 2.59 0 0 0-.196 1.022c0 .476.13.872.392 1.19.27.317.625.588 1.064.812.439.224.938.424 1.498.602.56.177 1.134.368 1.722.574.588.196 1.162.429 1.722.7.56.261 1.06.597 1.498 1.008.439.401.789.896 1.05 1.484.27.588.406 1.302.406 2.142 0 .914-.159 1.773-.476 2.576a5.884 5.884 0 0 1-1.372 2.086c-.597.588-1.33 1.054-2.198 1.4-.868.336-1.862.504-2.982.504a9.288 9.288 0 0 1-1.904-.196 9.827 9.827 0 0 1-1.806-.532 9.763 9.763 0 0 1-1.61-.84 7.8 7.8 0 0 1-1.344-1.092l1.106-1.806c.093-.131.215-.238.364-.322a.883.883 0 0 1 .476-.14c.233 0 .485.098.756.294.27.186.593.396.966.63.373.233.807.448 1.302.644.504.186 1.106.28 1.806.28 1.073 0 1.904-.252 2.492-.756.588-.514.882-1.246.882-2.198 0-.532-.135-.966-.406-1.302a3.073 3.073 0 0 0-1.05-.84 7.585 7.585 0 0 0-1.498-.588c-.56-.159-1.13-.332-1.708-.518a14.738 14.738 0 0 1-1.708-.672 5.535 5.535 0 0 1-1.498-1.022 4.75 4.75 0 0 1-1.064-1.568c-.261-.635-.392-1.414-.392-2.338 0-.738.145-1.456.434-2.156.299-.7.728-1.321 1.288-1.862.56-.542 1.25-.976 2.072-1.302.821-.327 1.764-.49 2.828-.49 1.195 0 2.296.186 3.304.56 1.008.373 1.867.896 2.576 1.568l-.938 1.778zM104.274 44.248a3.95 3.95 0 0 0-.196-1.26 2.909 2.909 0 0 0-.56-1.05 2.557 2.557 0 0 0-.966-.7c-.382-.178-.83-.266-1.344-.266-.998 0-1.787.284-2.365.854-.57.569-.934 1.376-1.093 2.422h6.524zm-6.594 2.086c.056.737.187 1.376.392 1.918a4 4 0 0 0 .813 1.33c.335.345.732.606 1.189.784.467.168.98.252 1.54.252s1.041-.066 1.442-.196c.411-.131.766-.276 1.064-.434.308-.159.574-.304.798-.434a1.38 1.38 0 0 1 .672-.196c.29 0 .504.107.644.322l.994 1.26a5.902 5.902 0 0 1-1.288 1.134 7.653 7.653 0 0 1-1.498.728 8.298 8.298 0 0 1-1.582.378c-.532.074-1.05.112-1.554.112a7.772 7.772 0 0 1-2.785-.49 6.361 6.361 0 0 1-2.24-1.47c-.635-.654-1.135-1.456-1.499-2.408-.364-.962-.545-2.072-.545-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.47 6.47 0 0 1 2.17-1.526c.858-.374 1.824-.56 2.897-.56.906 0 1.741.144 2.506.434.766.289 1.424.714 1.974 1.274.551.55.98 1.232 1.288 2.044.318.802.476 1.722.476 2.758 0 .522-.056.877-.168 1.064-.112.177-.326.266-.644.266h-8.89zM113.24 41.21c.448-.859.98-1.531 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.144 1.596.434l-.224 2.59c-.047.168-.117.289-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.024-.63-.07a4.694 4.694 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.354 3.354 0 0 0-.63.756c-.178.298-.346.639-.504 1.022v8.848h-3.458V38.718h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624zM133.373 38.718l-5.698 14.364h-3.136l-5.698-14.364h2.856c.261 0 .476.06.644.182a.849.849 0 0 1 .35.462l2.772 7.672a20.846 20.846 0 0 1 .686 2.604 31.6 31.6 0 0 1 .308-1.288c.112-.43.247-.868.406-1.316l2.828-7.672a.944.944 0 0 1 .35-.462 1 1 0 0 1 .602-.182h2.73zM144.032 44.248a3.95 3.95 0 0 0-.196-1.26 2.909 2.909 0 0 0-.56-1.05 2.557 2.557 0 0 0-.966-.7c-.382-.178-.83-.266-1.344-.266-.998 0-1.787.284-2.366.854-.569.569-.933 1.376-1.092 2.422h6.524zm-6.594 2.086c.056.737.187 1.376.392 1.918.206.532.476.975.812 1.33.336.345.733.606 1.19.784.467.168.98.252 1.54.252s1.041-.066 1.442-.196c.411-.131.766-.276 1.064-.434.308-.159.574-.304.798-.434a1.38 1.38 0 0 1 .672-.196c.29 0 .504.107.644.322l.994 1.26a5.902 5.902 0 0 1-1.288 1.134 7.653 7.653 0 0 1-1.498.728 8.298 8.298 0 0 1-1.582.378c-.532.074-1.05.112-1.554.112a7.776 7.776 0 0 1-2.786-.49 6.37 6.37 0 0 1-2.24-1.47c-.634-.654-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.159-1.9.476-2.758.318-.868.77-1.62 1.358-2.254a6.48 6.48 0 0 1 2.17-1.526c.859-.374 1.825-.56 2.898-.56.906 0 1.741.144 2.506.434.766.289 1.424.714 1.974 1.274.551.55.98 1.232 1.288 2.044.318.802.476 1.722.476 2.758 0 .522-.056.877-.168 1.064-.112.177-.326.266-.644.266h-8.89zM152.997 41.21c.448-.859.98-1.531 1.596-2.016.616-.495 1.344-.742 2.184-.742.663 0 1.195.144 1.596.434l-.224 2.59c-.046.168-.116.289-.21.364a.556.556 0 0 1-.35.098c-.14 0-.35-.024-.63-.07a4.676 4.676 0 0 0-.798-.07c-.382 0-.723.056-1.022.168a2.599 2.599 0 0 0-.812.49 3.408 3.408 0 0 0-.63.756c-.177.298-.345.639-.504 1.022v8.848h-3.458V38.718h2.03c.355 0 .602.065.742.196.14.121.234.345.28.672l.21 1.624z",fill:"#121319"}),(0,o.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.939zm13.338-2.894a.96.96 0 0 1 .924-.696h4.5a.96.96 0 0 1 .924.696l.856 2.999 2.12 1.223 3.025-.757a.96.96 0 0 1 1.064.451l2.25 3.898a.96.96 0 0 1-.14 1.148l-2.17 2.24v2.448l2.17 2.24a.96.96 0 0 1 .14 1.148l-2.25 3.899a.96.96 0 0 1-1.065.45l-3.024-.756-2.12 1.223-.856 2.998a.96.96 0 0 1-.923.697H28.47a.96.96 0 0 1-.924-.697L26.69 44.9l-2.12-1.223-3.024.757a.96.96 0 0 1-1.065-.451l-2.25-3.898a.96.96 0 0 1 .141-1.148l2.168-2.241v-2.447l-2.168-2.241a.96.96 0 0 1-.142-1.148l2.251-3.898a.96.96 0 0 1 1.065-.451l3.025.757 2.119-1.223.856-2.999zm.44 4.467a.96.96 0 0 0 .443-.567l.765-2.676h3.053l.764 2.676a.96.96 0 0 0 .443.567l2.792 1.612a.96.96 0 0 0 .713.1l2.7-.676 1.526 2.644-1.935 2a.96.96 0 0 0-.27.668v3.223c0 .25.097.489.27.668l1.935 2-1.527 2.643-2.699-.675a.96.96 0 0 0-.713.1l-2.792 1.612a.96.96 0 0 0-.443.567l-.764 2.676h-3.053l-.765-2.676a.96.96 0 0 0-.443-.567l-2.792-1.612a.96.96 0 0 0-.713-.1l-2.7.675-1.526-2.643 1.935-2a.96.96 0 0 0 .27-.668V33.86a.96.96 0 0 0-.27-.667l-1.935-2 1.527-2.644 2.7.676a.96.96 0 0 0 .712-.1l2.792-1.612zm2.734 14.128a6.168 6.168 0 1 1 0-12.337 6.168 6.168 0 0 1 0 12.337zm4.248-6.169a4.248 4.248 0 1 1-8.496 0 4.248 4.248 0 0 1 8.496 0z",fill:"url(#paint1_linear_615_418)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_418",x1:"30.72",y1:"96",x2:"94.667",y2:"34.611",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_418",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};c.defaultProps={width:"170",height:"64",viewBox:"0 0 170 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.displayName="server-logo";var s=c;e.Z=s},26681:function(n,e,t){t.d(e,{Z:function(){return P}});var r,o,i=t(71171),a=t(33028),l=t(96234),c=t(59740),s=t(30969),d=t(24974),p=t.n(d),u=t(72097),h=t(94551),f=t(38361),v=t(33359),m=t(71127),x=t(23484),g=t(2689),b=t(85791),j=t(38996),w=t(46513),y=t(79216),Z=t(26022),z=t(55581),k=t(37574),O=["showText","popperProps","popperType","icon","size"];function P(n){var e,t,r,o=n.showText,i=n.popperProps,d=n.popperType,p=n.icon,b=n.size,y=(0,c.Z)(n,O),P=(0,s.useContext)(Z.RD),C=P.locale,N=P.changeLocale,M=P.languages,E=(0,s.useRef)(null),L=(0,s.useState)(!1),D=(0,l.Z)(L,2),R=D[0],I=D[1],T=(0,z.Fg)(),V="dark"===(null===T||void 0===T||null===(e=T.palette)||void 0===e?void 0:e.mode),A=o?u.Z:h.Z,B="hover"===d?{onMouseEnter:function(){I(!0)},onMouseLeave:function(){I(!1)}}:{onClick:function(){I(!R)}},H=(0,s.useMemo)((function(){return p?(0,k.jsx)(p,{}):(0,k.jsx)(w.Z,{style:{width:"auto",height:b,color:T.palette.text.secondary}})}),[p,null===T||void 0===T||null===(t=T.palette)||void 0===t||null===(r=t.text)||void 0===r?void 0:r.secondary,b]);return(0,k.jsxs)(_,(0,a.Z)((0,a.Z)((0,a.Z)({component:"div",dark:V,theme:T},y),B),{},{children:[(0,k.jsx)(A,{ref:E,className:"trigger",role:"button","aria-label":"Locale selector button",children:(0,k.jsxs)(f.Z,{display:"flex",alignItems:"center",children:[H,o?(0,k.jsx)(v.Z,{component:"strong",className:"trigger-text",children:M.find((function(n){return n.code===C})).name}):""]})}),(0,k.jsx)(S,(0,a.Z)((0,a.Z)({open:R,anchorEl:E.current},i),{},{disablePortal:!0,children:(0,k.jsx)("div",{className:"locales",children:(0,k.jsx)(m.d,{onClickAway:function(n){var e;null!==(e=E.current)&&void 0!==e&&e.contains(n.target)||I(!1)},children:(0,k.jsx)(x.Z,{children:M.map((function(e){var t=e.code,r=e.name;return(0,k.jsxs)(g.Z,{className:"locale-item",onClick:function(){return N(e=t),I(!1),void("function"===typeof n.onChange&&n.onChange(e));var e},children:[(0,k.jsx)(j.default,{className:t===C?"check-icon check-icon-visible":"check-icon",fontSize:"small"}),r]},t)}))})})})}))]}))}P.propTypes={size:p().number,showText:p().bool,popperProps:p().object,onChange:p().func,popperType:p().oneOf(["hover","click"]),icon:p().any},P.defaultProps={showText:!0,size:24,popperProps:{},onChange:function(){},popperType:"click",icon:null};var _=(0,z.zo)("div",{shouldForwardProp:function(n){return"dark"!==n}})(r||(r=(0,i.Z)(["\n display: inline-block;\n\n .trigger {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: 14px;\n white-space: nowrap;\n\n .trigger-text {\n margin-left: 5px;\n font-size: 14px;\n color: ",";\n }\n }\n\n .locales {\n background: ",";\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);\n }\n\n .locale-item {\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: 2px;\n text-align: center;\n color: ",";\n cursor: pointer;\n display: flex;\n padding: 16px;\n align-items: center;\n .check-icon {\n visibility: hidden;\n margin-right: 4px;\n }\n .check-icon-visible {\n visibility: visible;\n }\n }\n"])),(function(n){return(0,y.Lq)(n)}),(function(n){return(0,y.Vu)(n)}),(function(n){return(0,y.Lq)(n)})),S=(0,z.zo)(b.Z)(o||(o=(0,i.Z)(["\n z-index: ",";\n"])),(function(n){return n.theme.zIndex.tooltip+10}))},60680:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");e.Z=a},8825:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");e.Z=a}}]);
|
|
2
|
+
//# sourceMappingURL=6737.16a327aa.chunk.js.map
|