@abtnode/webapp 1.16.21-beta-420f105a → 1.16.21-beta-93c6e42b

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.
Files changed (28) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +12 -12
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/js/1846.5498f998.chunk.js +1 -0
  7. package/build/static/js/2960.a9d50cef.chunk.js +1 -0
  8. package/build/static/js/406.37ef18fa.chunk.js +1 -0
  9. package/build/static/js/{4549.329cdc3b.chunk.js → 4549.2e181d10.chunk.js} +1 -1
  10. package/build/static/js/5059.cdf6a8ed.chunk.js +1 -0
  11. package/build/static/js/6511.d2053fe1.chunk.js +1 -0
  12. package/build/static/js/{6931.a2586ea5.chunk.js → 6931.4d7ae323.chunk.js} +1 -1
  13. package/build/static/js/7022.bed53fd5.chunk.js +1 -0
  14. package/build/static/js/7875.bdda6a53.chunk.js +2 -0
  15. package/build/static/js/9552.d6884439.chunk.js +1 -0
  16. package/build/static/js/main.00b6b214.js +2 -0
  17. package/package.json +1 -1
  18. package/build/static/js/2960.6a54b27f.chunk.js +0 -1
  19. package/build/static/js/4240.ecc8270b.chunk.js +0 -1
  20. package/build/static/js/4930.dff28f86.chunk.js +0 -2
  21. package/build/static/js/5059.b85795c1.chunk.js +0 -1
  22. package/build/static/js/5396.56766685.chunk.js +0 -1
  23. package/build/static/js/6511.d99b4e75.chunk.js +0 -1
  24. package/build/static/js/7022.9d96c66f.chunk.js +0 -1
  25. package/build/static/js/9552.3effa95b.chunk.js +0 -1
  26. package/build/static/js/main.29169d5e.js +0 -2
  27. /package/build/static/js/{4930.dff28f86.chunk.js.LICENSE.txt → 7875.bdda6a53.chunk.js.LICENSE.txt} +0 -0
  28. /package/build/static/js/{main.29169d5e.js.LICENSE.txt → main.00b6b214.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5059],{43120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r.Z});var r=n(70461)},30756:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r.Z});var r=n(71363)},7199:(e,t,n)=>{"use strict";n.d(t,{V:()=>r.V,Z:()=>r.Z});var r=n(63406)},24138:(e,t,n)=>{"use strict";n.d(t,{BZ:()=>g,ZN:()=>y});var r=n(5057),i=n(6352),a=n.n(i),o=n(35432),l=n(49714),s=n(41365),c=n.n(s),d=n(32243),m=n.n(d),u=n(68420),p=n(14491);const f=m()((e=>c()(a()(new URL(e).origin,o.WELLKNOWN_PING_PREFIX)))),h={};function x(e){let{urls:t,checkAccessible:n=c(),disableCache:i=!1}=e;const a=(0,r.useRef)(t.filter((e=>h[e])).map((e=>h[e]))),o=a.current.length===t.length,[s,d]=(0,r.useState)(o?a.current:[]),[m,u]=(0,r.useState)(!o),p=(0,r.useMemo)((()=>!m&&s.length?s[0]:null),[s,m]);return(0,r.useEffect)((()=>{if((null===t||void 0===t?void 0:t.length)>0&&!o){(async()=>{let e;if(u(!0),i)e=await(0,l.evaluateURLs)(t,{checkAccessible:n}),e.forEach((e=>{h[e.url]=e}));else{(await(0,l.evaluateURLs)(t.filter((e=>!h[e])),{checkAccessible:n})).forEach((e=>{h[e.url]=e})),e=t.map((e=>h[e])).sort(((e,t)=>t.score-e.score))}d(e),u(!1)})()}}),[t,i,o]),{urlsState:s,loading:m,recommendedUrlState:p,recommendedUrl:null===p||void 0===p?void 0:p.url}}function g(e){const{locale:t}=(0,r.useContext)(u.RD),n=(0,r.useMemo)((()=>e?(0,p.A6)({blocklet:e,params:(0,p.f0)(e,t)}):[]),[e,t]),{loading:i,recommendedUrlState:a,recommendedUrl:o}=x({urls:n,checkAccessible:f});return{urls:n,loading:i,recommendedUrlState:a,recommendedUrl:o}}function y(e){const t=(0,r.useMemo)((()=>e.map((e=>(0,p.Sk)(e)))),[e]),{urlsState:n,loading:i,recommendedUrl:a}=x({urls:t,checkAccessible:f});let o;if(i)o={domainsAccessibility:e.reduce(((e,t)=>({...e,[t]:{loading:!0}})),{}),recommendedDomain:null};else{var l;const e=n.reduce(((e,t)=>{const n=new URL(t.url).hostname;return e[n]={...t,domain:n},e}),{}),t=(null===(l=n.find((e=>e.accessible)))||void 0===l?void 0:l.url)||a;o={domainsAccessibility:e,recommendedDomain:t?new URL(t).hostname:null}}return o}},55059:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ur});var r=n(71171),i=n(5057),a=n(33518),o=n(85493),l=n(11750),s=n(94464),c=n(68420),d=n(62219),m=n.n(d),u=n(74511),p=n(57156),f=n.n(p),h=n(35432),x=n(14491),g=n(4651),y=n(33234),j=n(75793),v=n(10155),b=n(74094),Z=n(96266);const C="Dashboard",w=(0,i.createContext)({}),{Provider:E,Consumer:P}=w,S=[C,h.DOMAIN_FOR_IP_SITE,h.DOMAIN_FOR_IP_SITE_REGEXP],_=(e,t)=>{if(e.name===h.DOMAIN_FOR_DEFAULT_SITE)return-1;if(t.name===h.DOMAIN_FOR_DEFAULT_SITE)return 1;const n=S.includes(e.name),r=S.includes(t.name);return n&&r?(0,b.W8)(e.name,t.name):n?-1:r?1:(0,b.W8)(e.name,t.name)},T=e=>{let{sites:t,nodePort:n}=e;const r=window.location.host,i=(t||[]).map((e=>{const{id:t,rules:i=[],corsAllowedOrigins:a=[]}=e;let{domain:o,domainAliases:l}=e;l=l||[],[h.DOMAIN_FOR_IP_SITE,h.DOMAIN_FOR_IP_SITE_REGEXP].includes(o)&&(o=C,l.find((e=>e.value===r))||l.unshift({protected:!1,value:r}));const s={id:t,name:o,type:"domain",items:[],domainAliases:l,isProtected:e.isProtected,corsAllowedOrigins:a};return(i||[]).forEach((e=>{const{id:t,isProtected:r,from:{pathPrefix:i},to:a}=e;if(a.type===h.ROUTING_RULE_TYPES.BLOCKLET){let e="";Number.parseInt(a.port,10)===Number.parseInt(n,10)?(e="Blocklet Server Dashboard",a.type=h.ROUTING_RULE_TYPES.DAEMON):e=a.did,s.items.push({id:t,name:f()(i||"/"),title:e,type:"rule",isProtected:r,pathPrefix:i,to:a})}else s.items.push({id:t,pathPrefix:i,name:f()(i||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:r,to:a})})),s.items=m()(s.items,(e=>e.name)),s})).sort(_),a=i.reduce(((e,t)=>{let{name:n}=t;return n.endsWith(h.BLOCKLET_SITE_GROUP_SUFFIX)&&([n]=n.split(".")),e[n]={...t,rules:t.items},e}),{});return{sites:i,siteMap:a}},R=function(){let{did:e,domain:t,mountPoint:n,siteMap:r,params:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!r)return null;const a=r[e];if(!a)return null;const o=t||(a.domainAliases||[])[0];if(!o)return null;let l=n;if(!l){const e=a.rules.filter((e=>!e.name.startsWith(h.WELLKNOWN_PATH_PREFIX)))[0];l=e?e.name:"/"}return(0,x.Sk)(o.value,l,i)},k=function(){let{did:e,mountPoint:t,siteMap:n,params:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n)return[];const i=n[e];if(!i)return[];const a=i.domainAliases||[];if(!a.length)return[];let o=t;if(!o){const e=i.rules.filter((e=>!e.name.startsWith(h.WELLKNOWN_PATH_PREFIX)))[0];o=e?e.name:"/"}return a.map((e=>(0,x.Sk)(e.value,o,r)))},N=e=>{const t=e.map((e=>e.domain)).filter((e=>![h.DOMAIN_FOR_IP_SITE_REGEXP,h.DOMAIN_FOR_DEFAULT_SITE].includes(e)));let n=[];return e.forEach((e=>n.push(...e.domainAliases||[]))),n=n.map((e=>"string"===typeof e?{value:e,isProtected:!1}:e)),{domains:t,domainsAliases:n}};function A(e){let{children:t}=e;const n=(0,v.Z)(),{info:r}=(0,j.h6)(),[a,o]=(0,i.useState)([]),[l,s]=(0,i.useState)([]),[c,d]=(0,i.useState)([]),m=(0,u.Z)((async()=>{const{sites:e}=await n.getRoutingSites({input:{snapshotHash:""}}),t=e||[];await Promise.all(t.map((async e=>(e.domainAliases=await(0,g.Q6)(e.domainAliases,{getIP:y.Z}),e))));const r=N(t);o(t),s(r.domains),d([window.location.hostname,...r.domains,...r.domainsAliases.map((e=>e.value))])}),[r]),p=(e,t)=>{o((n=>n.map((n=>n.id===e?t.domain?t:{...t,domain:n.domain}:n))))},f={loading:m.loading,error:m.error,refresh:m.retry,api:n,actions:{addSite:async e=>{const t=await n.addRoutingSite({input:e});o(a.concat(t.site))},updateSite:async(e,t)=>{const r=await n.updateRoutingSite({input:{id:e,...t}});if(r.site&&r.site.id){const e=a.findIndex((e=>e.id===r.site.id));-1!==e&&(a.splice(e,1,r.site),o([].concat(a)))}},deleteSite:async e=>{await n.deleteRoutingSite({input:{id:e}}),o(a.filter((t=>t.id!==e)))},addDomainAlias:async(e,t,r)=>{const i=await n.addDomainAlias({input:{id:e,domainAlias:t,force:r}});p(e,i.site)},deleteDomainAlias:async(e,t)=>{const r=await n.deleteDomainAlias({input:{id:e,domainAlias:t}});p(e,r.site)},takeSnapshot:e=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(e)}}),addRule:async(e,t)=>{const{site:r}=await n.addRoutingRule({input:{id:e,rule:t}});p(e,r)},updateRule:async(e,t)=>{const{site:r}=await n.updateRoutingRule({input:{id:e,rule:t}});p(e,r)},deleteRule:async(e,t)=>{const{site:r}=await n.deleteRoutingRule({input:{id:e,ruleId:t}});p(e,r)}}},{sites:h,siteMap:x}=T({sites:a,nodePort:r.port});return f.sites=h,f.siteMap=x,f.domains=l,f.allDomains=c,f.getBlockletUrl=e=>{let{did:t,domain:n,mountPoint:r,params:i}=e;return R({did:t,domain:n,mountPoint:r,siteMap:f.siteMap,params:i})},f.getBlockletUrls=e=>{let{did:t,mountPoint:n,params:r}=e;return k({did:t,mountPoint:n,siteMap:f.siteMap,params:r})},(0,Z.jsx)(E,{value:{routing:f},children:t})}function L(){const{routing:e}=(0,i.useContext)(w);return e}function U(e){const t=[h.DOMAIN_FOR_IP_SITE_REGEXP,h.DOMAIN_FOR_DEFAULT_SITE,h.DOMAIN_FOR_IP_SITE];return"undefined"!==typeof window&&"undefined"!==typeof window.location&&t.push(window.location.hostname),t.includes(e)}var I,D=n(39948),O=n(55673),F=n(49390),z=n(86229),B=n(28726),M=n(80506),W=n(47020),G=n(88574),q=n(44846),Y=n(44784),K=n(24065),H=n(43120);function V(){return null}function Q(e){let{confirm:t}=e;const[n,r]=(0,i.useState)(null),{t:a}=(0,c.PE)();return(0,Z.jsxs)(X,{children:[(0,Z.jsx)(V,{message:function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];let l="function"===typeof t?t(e,...i):t;return!l||("string"===typeof l&&(l={description:l}),r({title:a("common.noticeTitle"),description:a("common.leavePageTip"),confirm:a("common.confirm"),cancel:a("common.cancel"),onConfirm:()=>(async e=>{if(e){let t=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";"/"===t?K.Z.push("".concat(e.pathname)):(t.endsWith("/")&&(t=t.substring(0,t.length-1)),K.Z.push("".concat(t).concat(e.pathname))),window.location.reload()}})(e),onCancel:()=>{r(null)},...l}),!1)}}),n&&(0,Z.jsx)(H.Z,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Q.defaultProps={confirm:null};const X=a.Z.div(I||(I=(0,r.Z)(["\n margin-bottom: 24px;\n .top-btns-alert {\n @media (max-width: ","px) {\n flex-direction: column;\n padding-bottom: 15px;\n padding-right: 20px;\n }\n }\n .top-btns-action {\n @media (max-width: ","px) {\n margin-right: 0px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.breakpoints.values.sm));var J,$=n(7199);function ee(e){let{children:t,...n}=e;return(0,Z.jsx)(te,{children:(0,Z.jsx)("form",{...n,children:t})})}const te=a.Z.div(J||(J=(0,r.Z)(["\n width: 100%;\n\n form {\n width: 100%;\n flex: 1;\n display: flex;\n flex-direction: column;\n\n .form-submit {\n margin-top: 32px;\n margin-right: 32px;\n width: 180px;\n }\n\n .form-actions {\n display: flex;\n @media (max-width: ","px) {\n flex-direction: column;\n width: 100%;\n button {\n width: 100%;\n margin-right: 0;\n }\n }\n }\n\n .form-item {\n margin-top: 16px;\n margin-right: 0;\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm));var ne;const re=e=>({name:e.name,description:e.description,registerUrl:e.registerUrl,webWalletUrl:e.webWalletUrl,nftDomainUrl:e.nftDomainUrl,diskAlertThreshold:e.diskAlertThreshold,enableWelcomePage:!1,enableBetaRelease:!1});function ie(e){let{onSaved:t,title:n,submit:r,disabled:a,...o}=e;const s=(0,j.h6)(),{t:d}=(0,c.PE)(),{control:m,handleSubmit:u,formState:p,reset:f}=(0,M.cI)({defaultValues:re(s.info)}),[x,g]=(0,i.useState)(""),[y,C]=(0,i.useState)(""),[w,E]=(0,i.useState)(!1),[P,S]=(0,i.useState)(s.info.autoUpgrade),[_,T]=(0,i.useState)(!!s.info.enableWelcomePage),[R,k]=(0,i.useState)(!!s.info.enableBetaRelease);(0,i.useEffect)((()=>{let e="";(p.isDirty||P!==s.info.autoUpgrade||_!==!!s.info.enableWelcomePage)&&(e=d("setting.unSavedTip")),C(e)}),[d,s,P,_,p]);const N=async e=>{g(""),E(!0);try{const n=await(0,v.Z)().updateNodeInfo({input:{...e,name:e.name.trim(),description:e.description.trim(),registerUrl:e.registerUrl.trim(),webWalletUrl:e.webWalletUrl.trim(),diskAlertThreshold:e.diskAlertThreshold,autoUpgrade:P,enableWelcomePage:_,enableBetaRelease:R}});await(0,b._v)(1e3),f(re(n.info)),"function"===typeof t&&t(n)}catch(n){g((0,b.Z)(n))}finally{E(!1)}},{errors:A}=p;return(0,Z.jsxs)(ae,{...o,children:[(0,Z.jsxs)(ee,{noValidate:!0,autoComplete:"off",onSubmit:u(N),children:[!!n&&(0,Z.jsx)(l.Z,{component:"h2",variant:"h5",className:"stepper-tip",children:n}),(0,Z.jsx)($.Z,{permission:"mutate_node",children:e=>{var t;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M.Qr,{name:"name",control:m,rules:{validate:e=>!!e.trim()||d("setting.form.nameRequired")},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{variant:"outlined",label:d("setting.form.name"),placeholder:d("setting.form.namePlaceholder"),disabled:w||!e,"data-cy":"node-name-input",error:A.name&&!!A.name.message,helperText:A.name?A.name.message:"",margin:"normal",...n})}}),(0,Z.jsx)(M.Qr,{name:"description",control:m,rules:{validate:e=>!!e.trim()||d("setting.form.descriptionRequired")},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{variant:"outlined",label:d("setting.form.description"),placeholder:d("setting.form.descriptionHolder"),disabled:w||!e,"data-cy":"node-description-input",error:A.description&&!!A.description.message,helperText:A.description?A.description.message:"",margin:"normal",...n})}}),(0,Z.jsx)(M.Qr,{name:"registerUrl",control:m,rules:{},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{variant:"outlined",label:d("setting.form.registerUrl"),placeholder:d("setting.form.registerUrlPlaceholder"),disabled:w||!e,error:A.registerUrl&&!!A.registerUrl.message,helperText:A.registerUrl?A.registerUrl.message:"",margin:"normal",...n})}}),(0,Z.jsx)(M.Qr,{name:"nftDomainUrl",control:m,rules:{},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{variant:"outlined",label:d("setting.form.nftDomainUrl"),placeholder:d("setting.form.nftDomainUrlPlaceholder"),disabled:w||!e,error:A.nftDomainUrl&&!!A.nftDomainUrl.message,helperText:A.nftDomainUrl?A.nftDomainUrl.message:"",margin:"normal",...n})}}),(0,Z.jsx)(M.Qr,{name:"webWalletUrl",control:m,rules:{},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{variant:"outlined",label:d("setting.form.webWalletUrl"),placeholder:d("setting.form.webWalletUrlPlaceholder"),disabled:w||!e,error:A.webWalletUrl&&!!A.webWalletUrl.message,helperText:A.webWalletUrl?A.webWalletUrl.message:"",margin:"normal",...n})}}),(0,Z.jsx)(M.Qr,{name:"diskAlertThreshold",control:m,rules:{},render:t=>{let{field:n}=t;return(0,Z.jsx)(W.Z,{type:"number",variant:"outlined",label:d("setting.form.monitor.diskThreshold"),placeholder:d("setting.form.monitor.diskThresholdPlaceholder"),disabled:w||!e,error:A.diskAlertThreshold&&!!A.diskAlertThreshold.message,inputProps:{min:1,max:99},helperText:A.diskAlertThreshold?A.diskAlertThreshold.message:"",margin:"normal",...n})}}),(0,Z.jsx)(Y.Z,{checked:P,onChange:()=>S(!P),name:"autoUpgrade",disabled:!e,labelProps:{label:(0,Z.jsx)(l.Z,{children:(0,Z.jsx)("span",{children:d("setting.form.upgrade.switchLabel")})})},style:{marginTop:20}}),P&&(0,Z.jsx)(Y.Z,{checked:R,onChange:()=>k(!R),name:"enableBetaRelease",disabled:!e,labelProps:{label:(0,Z.jsx)(l.Z,{children:(0,Z.jsx)("span",{children:d("setting.form.upgrade.enableBetaRelease")})})},style:{marginTop:20}}),(null===(t=s.info)||void 0===t?void 0:t.mode)!==h.NODE_MODES.SERVERLESS&&(0,Z.jsx)(Y.Z,{checked:_,onChange:()=>T(!_),name:"enableWelcomePage",disabled:!e,labelProps:{label:(0,Z.jsx)(l.Z,{children:(0,Z.jsx)("span",{children:d("setting.form.welcome.switchLabel")})})},style:{marginTop:16}})]})}}),!!y&&(0,Z.jsx)(G.Z,{type:"warning",variant:"icon",children:y}),(0,Z.jsx)("div",{className:"form-actions",children:(0,Z.jsx)($.Z,{permission:"mutate_node",children:(0,Z.jsxs)(B.Z,{onClick:u(N),disabled:a||w,color:"primary",variant:"contained","data-cy":"submit-btn",className:"form-submit",children:[r," ",w?(0,Z.jsx)(q.Z,{size:16}):null]})})}),!!x&&(0,Z.jsx)(G.Z,{type:"error",variant:"icon",error:x,children:x})]}),y&&(0,Z.jsx)(Q,{confirm:d("setting.unSavedLeaveTip")})]})}ie.defaultProps={disabled:!1};const ae=a.Z.div(ne||(ne=(0,r.Z)(["\n display: flex;\n align-items: flex-start;\n width: 100%;\n max-width: 720px;\n"])));var oe;function le(){const{refresh:e,info:t}=(0,j.h6)(),{t:n}=(0,c.PE)(),[r,a]=(0,i.useState)(!1);(0,i.useEffect)((()=>{e({silent:!0})}),[]);return(0,Z.jsx)(se,{children:(0,Z.jsxs)(D.Z,{mb:4,children:[(0,Z.jsx)(ie,{onSaved:()=>{e({silent:!0}),z.Z.success(n("setting.saveSuccess"))},submit:n("common.saveChanges"),title:""}),(0,Z.jsx)(D.Z,{mt:6,style:{marginLeft:-8},children:(0,Z.jsxs)(B.Z,{onClick:()=>{a((e=>!e))},children:[n("common.readMore"),r?(0,Z.jsx)(O.Z,{}):(0,Z.jsx)(F.Z,{})]})}),r&&(0,Z.jsxs)(D.Z,{fontSize:12,color:"text.secondary",children:[(0,Z.jsxs)(D.Z,{children:[n("dashboard.runtimeConfig.blockletMaxMemoryLimit"),": ",t.runtimeConfig.blockletMaxMemoryLimit," MB"]}),(0,Z.jsxs)(D.Z,{children:[n("dashboard.runtimeConfig.daemonMaxMemoryLimit"),": ",t.runtimeConfig.daemonMaxMemoryLimit," MB"]}),(0,Z.jsxs)(D.Z,{children:[n("dashboard.runtimeConfig.proxyMaxMemoryLimit"),": ",t.runtimeConfig.proxyMaxMemoryLimit," MB"]})]})]})})}const se=a.Z.div(oe||(oe=(0,r.Z)(["\n .eula-btn {\n text-decoration-line: underline;\n margin-top: 32px;\n margin-bottom: 32px;\n }\n\n .danger-zone {\n margin-top: 1vw;\n width: 100%;\n max-width: 720px;\n }\n"])));var ce,de,me,ue=n(93938),pe=n(49384),fe=n(75760),he=n(33271),xe=n(84639),ge=n(27773),ye=n(30756);function je(e){const{t:t}=(0,c.PE)(),[n,r]=(0,i.useState)(!1),[a,o]=(0,i.useState)(null),{item:l,onDelete:s=(()=>{})}=e,{id:d,title:m}=l,u=(0,v.Z)(),p={keyName:d,title:t("setting.webhook.delTitle"),description:"".concat(t("setting.webhook.description",{name:"<b>".concat(m,"</b>"),id:"<b>".concat(d,"</b>")})),confirmPlaceholder:t("setting.webhook.confirm_desc",{name:d}),confirm:t("common.delConfirm"),cancel:t("common.cancel"),onConfirm:async()=>{r(!0);try{await u.deleteWebHook({input:{id:d}}),s()}catch(e){console.error(e)}finally{r(!1),o(null)}},onCancel:()=>{r(!1),o(null)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(B.Z,{edge:"end",onClick:()=>o(p),size:"small",className:"rule-action",color:"error",children:[n?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(ge.default,{style:{fontSize:16}}),t("common.delete")]}),a&&(0,Z.jsx)(ye.Z,{keyName:a.keyName,title:a.title,description:a.description,confirmPlaceholder:a.confirmPlaceholder,confirm:a.confirm,cancel:a.cancel,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}function ve(){const{api:e,imgPrefix:t}=(0,j.h6)(),{t:n,locale:r}=(0,i.useContext)(c.RD),[a,o]=(0,i.useState)([]),[l,s]=(0,i.useState)(null),d=(0,u.Z)((async()=>{const[{webhooks:t},{senders:n}]=await Promise.all([e.getWebHooks(),e.getWebhookSenders()]);return o(n),t})),m=d.value||[],{loading:p,error:f}=d,h=()=>{s(null)},x=t=>{const r={title:t.title,description:(e,t,r)=>{const i=e.list||[];return(0,Z.jsx)(be,{children:i.map(((e,a)=>(0,Z.jsx)(Ze,{children:(0,Z.jsx)(W.Z,{label:e.description,autoComplete:"off",variant:"outlined","data-cy":"webhook-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:16},margin:"dense",value:e.value||e.defaultValue,onChange:o=>{e.required&&(e.disable=!0);const l=o.target.value.trim();var s;e.value=l,i[a]=e,l?(0,b.rg)(e.type,l)?(e.disable=!1,r("")):(e.disable=!0,r(n("setting.webhook.requiredError",{type:e.type}))):(e.required&&(e.disable=!0),r("")),s=[...i],t({list:s,__disableConfirm:s.some((e=>e.disable))})}})},e.name)))})},params:{list:t.params,__disableConfirm:!0},confirm:n("setting.webhook.add"),cancel:n("common.cancel"),onConfirm:n=>{t.params=n.list,(async t=>{try{await e.createWebHook({input:t}),d.retry()}catch(n){z.Z.error((0,b.Z)(n),{autoHideDuration:4e3}),console.error("create webhook error",n)}s(null)})(t)},onCancel:h};s(r)},g=e=>"slack"===e.type?(0,Z.jsx)("img",{src:"".concat(t,"/").concat(e.type,".png"),alt:"icon",style:{width:20,height:20}}):(0,Z.jsx)(he.Z,{}),y=[{label:n("setting.webhook.columns.description"),name:"id",verticalKeyAlign:"center",options:{sort:!1,customBodyRenderLite:e=>{const t=m[e],n=a.find((e=>e.name===t.name));return(0,Z.jsxs)("div",{style:{display:"flex",alignItems:"center",whiteSpace:"nowrap"},children:[g(t),(0,Z.jsxs)("div",{style:{marginLeft:10},children:[(0,Z.jsxs)("b",{children:["ID: ",t.id]}),(0,Z.jsx)("div",{children:n?n.description:null})]})]})}}},{label:n("setting.webhook.columns.params"),name:"params",options:{sort:!1,customBodyRenderLite:e=>{const t=m[e].params.map((e=>(0,Z.jsx)("div",{children:e.value})));return(0,Z.jsx)("div",{style:{display:"flex",alignItems:"center",whiteSpace:"nowrap"},children:t})}}},{label:n("setting.webhook.columns.createdAt"),name:"createdAt",options:{customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)(pe.Z,{value:Number(t.createdAt),locale:r})}}},{label:n("common.actions"),align:"center",verticalKeyAlign:"center",options:{sort:!1,customBodyRenderLite:t=>{const r=m[t],i=a.find((e=>e.name===r.name))||{};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{item:{...r,title:i.title},onDelete:()=>{d.retry()}}),(0,Z.jsxs)(B.Z,{size:"small",color:"secondary",onClick:()=>{(async t=>{const n={webhookId:t.id,message:"This is a test notification in order to test the integration"};await e.sendTestMessage({input:n})})(r)},children:[(0,Z.jsx)(Ce,{}),n("setting.webhook.test")]})]})}}}];if(!m.length&&p)return(0,Z.jsx)("div",{style:{textAlign:"center",marginTop:"50px"},children:(0,Z.jsx)(q.Z,{})});if(!m.length&&f)return(0,Z.jsx)(ue.Z,{severity:"error",children:(0,b.Z)(f)});const v=a.map((e=>({icon:g(e),title:"".concat(n("common.add")," ").concat(e.title),onClick:()=>{x(e)}})));return(0,Z.jsxs)(be,{children:[l&&(0,Z.jsx)(H.Z,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel}),(0,Z.jsx)(fe.Z,{columns:y,data:m,locale:r,customButtons:v,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}})]})}je.defaultProps={onDelete:()=>{}};const be=a.Z.div(ce||(ce=(0,r.Z)(["\n .button-addon {\n text-align: right;\n }\n\n .add-list {\n width: 420px;\n max-width: calc(100vw - 10px);\n text-align: left;\n background: #fff;\n border-radius: 5px;\n }\n"]))),Ze=a.Z.div(de||(de=(0,r.Z)(["\n display: flex;\n"]))),Ce=(0,a.Z)(xe.Z)(me||(me=(0,r.Z)(["\n font-size: 16px !important;\n margin-right: 3px;\n"])));var we,Ee,Pe=n(43681),Se=n.n(Pe),_e=n(64886),Te=n(19778),Re=n(17450),ke=n(52581);function Ne(e){let{title:t,description:n,children:r}=e;return(0,Z.jsxs)(Ae,{children:[(0,Z.jsxs)(l.Z,{component:"div",className:"danger-item-info",children:[(0,Z.jsx)(l.Z,{className:"title",component:"h3",variant:"h6",color:"textPrimary",gutterBottom:!0,children:t}),(0,Z.jsx)(l.Z,{className:"desc",component:"p",variant:"body1",color:"textSecondary",children:n})]}),(0,Z.jsx)(l.Z,{component:"div",className:"danger-item-action",children:r})]})}const Ae=a.Z.div(we||(we=(0,r.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .danger-item-info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n .title {\n word-break: break-word;\n }\n .desc {\n word-break: break-word;\n }\n }\n\n .danger-item-action {\n width: 160px;\n flex-shrink: 0;\n text-align: right;\n cursor: pointer;\n @media (max-width: ","px) {\n width: auto;\n margin-left: 10px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm));function Le(e){let{children:t,...n}=e;return(0,Z.jsx)(Ue,{...n,children:t})}const Ue=a.Z.div(Ee||(Ee=(0,r.Z)(["\n border: 1px solid #dedede;\n padding: 16px;\n"])));function Ie(e){let{action:t}=e;const{t:n}=(0,c.PE)(),{info:r,api:a}=(0,j.h6)(),[o,l]=(0,i.useState)(!1),[s,d]=(0,i.useState)(null);if("upgrade"===t&&!r.nextVersion)return null;const m={title:n("setting.form.".concat(t,".title"),{version:r.nextVersion}),description:n("setting.form.".concat(t,".dialog")),confirm:n("common.confirm"),cancel:n("common.cancel"),onConfirm:async()=>{try{l(!0),"upgrade"===t&&await a.upgradeNodeVersion(),"restart"===t&&await a.restartServer()}catch(e){z.Z.error((0,b.Z)(e))}finally{l(!1),d(null)}},onCancel:()=>{l(!1),d(null)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Le,{className:"danger-zone",children:(0,Z.jsx)(Ne,{title:n("setting.form.".concat(t,".title"),{version:r.nextVersion}),description:n("setting.form.".concat(t,".description")),children:(0,Z.jsxs)(B.Z,{onClick:()=>d(m),color:"error",variant:"outlined",size:"large",children:[o?(0,Z.jsx)(q.Z,{size:16,style:{marginRight:3}}):null,n("setting.form.".concat(t,".confirm"))]})})}),s&&(0,Z.jsx)(H.Z,{title:s.title,description:s.description,confirm:s.confirm,cancel:s.cancel,onConfirm:s.onConfirm,onCancel:s.onCancel})]})}var De=n(67654),Oe=n(74976),Fe=n(39067),ze=n(24103);function Be(){const{t:e}=(0,c.PE)(),{api:t}=(0,j.h6)(),[n,r]=(0,i.useState)(!1),[a,o]=(0,i.useState)(null),[s,d]=(0,De.Z)("last-check-server-version-time"),m=()=>{r(!1),o(null)},u={title:e("setting.form.upgrade.check"),description:e("setting.form.upgrade.latest"),confirm:e("common.confirm"),showCancel:!1,color:"primary",onConfirm:m,onCancel:m},p=async e=>{try{r(!0);const{version:n}=await t.checkNodeVersion();!n&&e&&o(u),d(Date.now())}catch(n){console.error("Failed to check new version: ".concat(n.message))}finally{r(!1)}};return(0,i.useEffect)((()=>{(!s||Date.now()-Number(s)>6e4)&&p(!1)}),[]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Fe.Z,{sx:{ml:2},color:"primary",variant:"outlined",onClick:p,size:"small",loadingPosition:"end",loading:n,children:(0,Z.jsxs)(ze.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,Z.jsx)(Oe.Z,{fontSize:"small"}),(0,Z.jsx)(l.Z,{component:"span",children:e("server.checkUpgrade")})]})}),a&&(0,Z.jsx)(H.Z,{title:a.title,description:a.description,confirm:a.confirm,showCancel:a.showCancel,color:a.color,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}var Me=n(78410);function We(){const{t:e}=(0,c.PE)(),{info:t}=(0,j.h6)();return(0,Z.jsx)(Le,{className:"danger-zone",children:(0,Z.jsx)(Ne,{title:e("blocklet.config.clearCache.name"),description:e("blocklet.config.clearCache.purpose"),children:(0,Z.jsx)(Me.Z,{teamDid:t.did,size:"large"})})})}var Ge,qe=n(26796),Ye=n(94874),Ke=n.n(Ye);const He="z8iZkFBbrVQxZHvcWWB3Sa2TrfGmSeFz9MSU7";function Ve(){const{t:e,locale:t}=(0,c.PE)(),{info:n}=(0,j.h6)(),r=(0,i.useRef)(null),a=(0,g.RU)(n),[o,l]=(0,i.useState)(!1),s=(0,i.useRef)(null),[d,m]=(0,i.useState)({}),{createdAt:u,did:p,description:f,name:h}=n,x=(0,i.useMemo)((()=>(0,b.i7)()),[]),y=(0,qe.default)((async()=>{var e;let{registerUrl:t}=n;localStorage.getItem("__registerUrl")&&(t=localStorage.getItem("__registerUrl"));const r=new URL(t);r.pathname="__blocklet__.js",r.searchParams.set("type","json");const{data:i}=await Ke().get(r.toString()),a=null===i||void 0===i||null===(e=i.componentMountPoints)||void 0===e?void 0:e.find((e=>e.did===He)),o=new URL(t);return o.pathname=(null===a||void 0===a?void 0:a.mountPoint)||"",o.toString()})),v={did:p,name:h,createdAt:u,description:f,url:a},C=(0,i.useMemo)((()=>d.type&&"notAdded"!==d.type),[d]),w=(0,i.useMemo)((()=>o?e("setting.form.register.detecting"):"update"===d.type?e("setting.form.register.update"):e(C?"setting.form.register.added":"setting.form.register.btn")),[o,d,t]),E=(0,i.useMemo)((()=>"update"!==d.type&&!!C),[d]),P=()=>{clearTimeout(s.current),l(!1),x&&r.current.contentWindow.postMessage({...v,action:"queryRegisterInfo"},"*")};if((0,i.useEffect)((()=>{let t;return window.addEventListener("message",t=t=>{const{data:n}=t;"launcher init"===n?P():"registerNode"===(null===n||void 0===n?void 0:n.action)&&(m(n),"addSucceed"===n.type&&z.Z.success(e("setting.form.register.addSucceed")),"updateSucceed"===n.type&&z.Z.success(e("setting.form.register.updateSucceed")))}),x&&(l(!0),s.current=setTimeout((()=>{z.Z.error(e("setting.form.register.timeout")),l(!1)}),6e3)),()=>{window.removeEventListener("message",t),clearTimeout(s.current)}}),[]),y.loading)return"";const S=y.value,_=x?(0,Z.jsx)(B.Z,{disabled:E,loading:o,onClick:()=>{r.current.contentWindow.postMessage({...v,action:"registerNode"},"*")},color:"primary",variant:"contained",size:"large",children:w}):(0,Z.jsx)(B.Z,{color:"primary",loading:o,component:"a",href:"".concat(S,"?register-server=").concat(encodeURIComponent(JSON.stringify(v))),target:"_blank",variant:"contained",size:"large",children:e("setting.form.register.btn")});return(0,Z.jsxs)(Qe,{children:[(0,Z.jsx)(Le,{className:"danger-zone",children:(0,Z.jsx)(Ne,{title:e(C?"setting.form.register.titleAdded":"setting.form.register.title"),description:e(C?"setting.form.register.descriptionOnAdded":"setting.form.register.description",{url:S}),children:_})}),x&&(0,Z.jsx)("iframe",{ref:r,src:"".concat(S,"?register-detect=1"),title:"register",style:{display:"none"}})]})}const Qe=a.Z.div(Ge||(Ge=(0,r.Z)(["\n .danger-zone {\n margin-top: 1vw;\n width: 100%;\n }\n"])));var Xe;function Je(){const e=(0,o.useNavigate)(),{api:t,info:n}=(0,j.h6)(),{t:r}=(0,c.PE)(),i=(0,u.Z)((async()=>{const e=await t.getNodeEnv();return Object.assign({},e.info||{})})),a=[];return a.push({name:r("dashboard.nodeDid"),value:(0,Z.jsx)(Re.Z,{did:n.did})},n.nodeOwner?{name:r("dashboard.ownerDid"),value:(0,Z.jsx)(Re.Z,{did:n.nodeOwner.did})}:null,{name:r("dashboard.routingEngine"),value:n.routing.provider}),i.value&&a.push({name:"".concat(r("common.os")),value:i.value.os},i.value.docker?{name:"".concat(r("common.docker")),value:(0,Z.jsx)(Te.Z,{type:"success",children:"Yes"})}:null,i.value.gitpod?{name:"".concat(r("common.gitpod")),value:(0,Z.jsx)(Te.Z,{type:"success",children:"Yes"})}:null),Array.isArray(Se()(i,"value.blockletEngines",null))&&i.value.blockletEngines.filter((e=>e.visible&&e.available)).forEach((e=>{a.push({name:e.displayName,value:e.version})})),(0,Z.jsxs)($e,{children:[(0,Z.jsx)($.Z,{permission:"mutate_node",children:e=>(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(D.Z,{display:"flex",alignItems:"center",style:{marginBottom:24},children:[(0,Z.jsx)(D.Z,{width:50,height:50,children:(0,Z.jsx)("img",{src:ke.Z,height:50,alt:""})}),(0,Z.jsxs)(D.Z,{ml:2,children:[(0,Z.jsx)("h2",{style:{margin:0},children:n.name}),(0,Z.jsx)("p",{style:{margin:0,color:"#888"},children:n.description})]})]}),(0,Z.jsxs)(_e.Z,{style:{marginBottom:4},valueComponent:"div",nameWidth:150,name:r("common.version"),children:[n.version,e&&(0,Z.jsx)(Be,{})]},"version"),a.filter(Boolean).map((e=>(0,Z.jsx)(_e.Z,{valueComponent:"div",nameWidth:150,name:e.name,children:e.value},e.name))),e&&(0,Z.jsx)("div",{style:{maxWidth:720,marginBottom:"1vw"},children:(0,Z.jsx)(Ie,{action:"upgrade"})})]})}),(0,Z.jsx)($.Z,{permission:"mutate_node",children:e=>e&&(0,Z.jsx)("div",{style:{maxWidth:720,marginBottom:"1vw"},children:(0,Z.jsx)(Ie,{action:"restart"})})}),(0,Z.jsx)($.Z,{permission:"mutate_router",children:e=>e&&(0,Z.jsx)("div",{style:{maxWidth:720,marginBottom:"1vw"},children:(0,Z.jsx)(We,{})})}),(0,Z.jsx)($.Z,{permission:"mutate_blocklets",children:!!n.registerUrl&&(0,Z.jsx)("div",{style:{maxWidth:720,marginTop:"-1vw"},children:(0,Z.jsx)(Ve,{})})}),(0,Z.jsx)(D.Z,{mt:10,style:{marginLeft:-8},children:(0,Z.jsx)(B.Z,{className:"eula-btn",onClick:()=>{e("/eula")},children:r("common.goEULA")})})]})}const $e=a.Z.div(Xe||(Xe=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n margin-top: 32px;\n"])));var et=n(19577),tt=n(44919),nt=n(52926),rt=n(34937),it=n(24138);const at=(0,i.createContext)({}),{Provider:ot,Consumer:lt}=at;function st(e){let{children:t,domains:n}=e;const r=(0,v.Z)(),a=JSON.stringify(n),[o,l]=(0,i.useState)({}),s=(0,i.useMemo)((()=>n.filter((e=>(0,b.rM)(e)))),[a]);(0,rt.mU)(h.EVENTS.DOMAIN_STATUS,(e=>{e&&l((t=>({...t,[e.domain]:{...t[e.domain],...e}})))}));const{domainsAccessibility:c,recommendedDomain:d}=(0,it.ZN)(s),m=(0,i.useMemo)((()=>{const e={...o};return Object.keys(c).forEach((t=>{const n=e[t]||{};e[t]={...n,...c[t]}})),e}),[o,c]),u=()=>{s.length>0&&r.checkDomains({input:{domains:s}})};(0,i.useEffect)((()=>{u()}),[s]);const p={refresh:u,updateStatus:e=>{e&&r.checkDomains({input:{domains:[e]}})},api:r,status:m,recommendedDomain:d,recommendedDomainStatus:m[d]};return(0,Z.jsx)(ot,{value:p,children:t})}function ct(){const{status:e,recommendedDomainStatus:t,recommendedDomain:n,updateStatus:r}=(0,i.useContext)(at);return{status:e,recommendedDomainStatus:t,recommendedDomain:n,updateStatus:r}}var dt=n(53906),mt=n(74490),ut=n(77277),pt=n(81010);const ft=e=>(Se()(e,"meta.interfaces")||[]).find((e=>e.type===ut.BLOCKLET_INTERFACE_TYPE_WEB));function ht(e){let{params:t,blocklets:n,setParams:r,setError:a,serviceTypes:o}=e;const{t:l}=(0,c.PE)(),s={301:l("common.redirectPermanently"),302:l("common.redirectTemporary"),307:l("common.redirectTemporary"),308:l("common.redirectPermanently")},d=m()(n,(e=>e.meta.name)),u=(e,n)=>{if(!n)return{};let{port:r}=e;n&&e.ports&&n.port&&(e.ports[n.port]&&(r=e.ports[n.port]),e.ports[n.port.internal]&&(r=e.ports[n.port.internal]));let{pathPrefix:i}=t;return n&&n.prefix!==ut.BLOCKLET_DYNAMIC_PATH_PREFIX&&(i=n.prefix),{port:r,pathPrefix:i}},p=e=>{const t=d.find((t=>t.meta.did===e)),n=ft(t);return{...u(t,n),interfaceName:n?n.name:""}};return(0,i.useEffect)((()=>{t.interfaceName||t.type!==h.ROUTING_RULE_TYPES.BLOCKLET||r({...t,...p(t.did),__disableConfirm:!1})}),[]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(W.Z,{select:!0,label:l("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:t.type,onChange:e=>{a(""),r({...t,type:e.target.value,__disableConfirm:!1})},style:{marginBottom:32},SelectProps:{},children:o.map((e=>{let{name:t,value:n}=e;return(0,Z.jsx)(mt.Z,{value:n,children:t},n)}))}),t.type===h.ROUTING_RULE_TYPES.BLOCKLET&&(0,Z.jsxs)(W.Z,{select:!0,label:l("router.domain.add.blocklet"),autoComplete:"off",variant:"outlined",name:"did","data-cy":"domain-blocklet-select",fullWidth:!0,value:t.did,onChange:e=>{r({...t,...p(e.target.value),did:e.target.value,__disableConfirm:!1})},style:{marginBottom:32},children:[d.map((e=>(0,Z.jsxs)(mt.Z,{value:e.meta.did,children:["".concat(e.meta.name," v").concat(e.meta.version),(0,Z.jsx)("span",{style:{marginLeft:8},children:(0,Z.jsx)(pt.Z,{status:e.status})})]},e.meta.did))),0===n.length&&(0,Z.jsx)(mt.Z,{value:"",children:l("common.empty")},"empty")]}),t.type===h.ROUTING_RULE_TYPES.REDIRECT&&[(0,Z.jsx)(W.Z,{select:!0,label:l("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:t.redirectCode,onChange:e=>r({...t,redirectCode:e.target.value}),style:{marginBottom:32},SelectProps:{},children:Object.keys(s).map((e=>(0,Z.jsx)(mt.Z,{value:e,children:"".concat(s[e]," - ").concat(e)},e)))}),(0,Z.jsx)(W.Z,{label:l("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"redirect-url-input",fullWidth:!0,autoFocus:!0,value:t.url,helperText:l("router.urlHelperText"),style:{marginBottom:32},onChange:e=>{r({...t,url:e.target.value,__disableConfirm:!e.target.value.trim()}),e.target.value.trim()?a(""):a(l("router.validation.redirectUrlRequired"))}})]]})}ht.defaultProps={params:{},blocklets:[],serviceTypes:[{name:"Blocklet",value:h.ROUTING_RULE_TYPES.BLOCKLET},{name:"Redirect",value:h.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:h.ROUTING_RULE_TYPES.NONE}],setParams:()=>{},setError:()=>{}};var xt=n(44543),gt=n.n(xt);const yt=(e,t)=>{if(e.type===h.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(t("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(t("router.validation.redirectCodeRequired")))}else if(e.type===h.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(t("router.validation.didRequired"));return null},jt=(e,t)=>e?e.endsWith(h.DEFAULT_IP_DOMAIN_SUFFIX)?t("router.domain.validate.suffixTip",{suffix:h.DEFAULT_IP_DOMAIN_SUFFIX}):null:t("router.domain.validate.emptyTip"),vt=(e,t)=>{const n=yt(e,t);if(n)return n;const r=jt(e.domain,t);return r?new Error(r):null},bt=(e,t)=>{const n=yt(e,t);return n||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(t("router.validation.pathPrefixTooLong",{length:150})):null:new Error(t("router.validation.pathPrefixCannotBeEmpty")))},Zt=e=>{let{params:t,blocklets:n,blocklet:r,locale:i="en"}=e;if(r){let e=(r.children||[]).find((e=>gt()(e.mountPoint,t.pathPrefix)));if("gateway"!==r.meta.group&&"/"===t.pathPrefix&&(e="/"),e)return{zh:"\u6302\u8f7d\u70b9 ".concat(t.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(t.pathPrefix," already exist, please use another mount point")}[i]}const a=n.find((e=>e.meta.did===t.did));if(!a)return"";const o=a.meta.interfaces.find((e=>"web"===e.type));return o&&o.prefix!==ut.BLOCKLET_DYNAMIC_PATH_PREFIX&&t.pathPrefix!==o.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(o.prefix),en:"This blocklet can only be mounted on ".concat(o.prefix)}[i]:""},Ct=e=>{if(0===e.length)return"";const{searchParams:t}=new URL(window.location.href),n=t.get("fromDid");if(n){const t=e.find((e=>e.meta.did===n));if(t)return t.meta.did}return e[0].meta.did};function wt(e){let{blocklets:t,onActivate:n=(()=>{}),children:r}=e;const{t:a}=(0,c.PE)(),{actions:o}=L(),{info:s}=(0,j.h6)(),[d,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),f={title:a("router.domain.addSite"),description:(e,n,r)=>{const i=e=>{const t=e.__disableConfirm||!!vt(e,a);n({...e,__disableConfirm:t})};return(0,Z.jsxs)(l.Z,{component:"div",children:[(0,Z.jsx)(W.Z,{label:a("router.domain.add.description"),autoComplete:"off",variant:"outlined",name:"domain",fullWidth:!0,autoFocus:!0,value:e.domain,style:{marginTop:16,marginBottom:32},inputProps:{"data-cy":"domain-name-input"},onChange:t=>{const n=t.target.value.trim(),o=jt(n,a);i({...e,domain:t.target.value,__disableConfirm:!!o}),r(o||"")}}),(0,Z.jsx)(ht,{blocklets:t,params:e,setParams:i,setError:r})]})},confirm:a("router.domain.add.confirm"),cancel:a("router.domain.add.cancel"),params:{domain:"",did:Ct(t),port:"",interfaceName:"",type:h.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:302,__disableConfirm:!0},onConfirm:async e=>{m(!0);const n={from:{pathPrefix:"/"},to:{type:e.type}},r={domain:e.domain.trim()===s.ip?"":e.domain.trim()};if(e.type===h.ROUTING_RULE_TYPES.BLOCKLET){const i=t.find((t=>t.meta.did===e.did)),a=Se()(i,"meta.interfaces",[]).find((t=>t.name===e.interfaceName));a&&a.prefix!==ut.BLOCKLET_DYNAMIC_PATH_PREFIX&&(n.from.pathPrefix=a.prefix),n.to.port=e.port,n.to.did=e.did,n.to.interfaceName=e.interfaceName,r.rules=[n]}else e.type===h.ROUTING_RULE_TYPES.REDIRECT&&(n.to.url=e.url,n.to.redirectCode=e.redirectCode,r.rules=[n]);await o.addSite(r),m(!1),p(null)},onCancel:()=>{m(!1),p(null)}},x=e=>{e.stopPropagation(),p(f)||n()};return(0,i.useEffect)((()=>{const{searchParams:e}=new URL(window.location.href);e.get("fromDid")&&p(f)}),[]),(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof r?r({loading:d,open:x}):(0,Z.jsxs)(mt.Z,{onClick:x,className:"rule-action","data-cy":"action-add-domain",children:[d?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(dt.Z,{style:{fontSize:18,marginRight:5}}),a("router.domain.add.title")]}),u&&(0,Z.jsx)(H.Z,{title:u.title,description:u.description,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel,color:"primary"})]})}wt.defaultProps={onActivate:()=>{},children:null,blocklets:[]};var Et=n(15849),Pt=n(82434),St=n.n(Pt),_t=n(76005),Tt=n(8732),Rt=n(21017),kt=n(50725),Nt=n(75239),At=n(2478),Lt=n(46954),Ut=n(44067),It=n(38898),Dt=n(83580),Ot=n(48342),Ft=n(76720),zt=n(92273),Bt=n(38242),Mt=n(61533),Wt=n(83294),Gt=n(67680);function qt(e){const{t:t}=(0,c.PE)(),{actions:n}=L(),[r,a]=(0,i.useState)(!1),[o,l]=(0,i.useState)(null),{id:s,name:d}=e;if(U(d))return null;const m={title:t("router.domain.delete.title"),description:t("router.domain.delete.description",{name:"<b>".concat(d,"</b>")}),confirmPlaceholder:t("router.domain.delete.confirm_desc",{name:d}),confirm:t("common.delConfirm"),cancel:t("common.cancel"),onConfirm:async()=>{a(!0),await n.deleteSite(s),a(!1),l(null)},onCancel:()=>{a(!1),l(null)},keyName:d};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(mt.Z,{onClick:t=>{t.stopPropagation(),l(m)||e.onActivate()},className:"rule-action","data-cy":"action-delete-domain",children:[r?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(ge.default,{style:{fontSize:18,marginRight:5}}),t("router.domain.delete.title")]}),o&&(0,Z.jsx)(ye.Z,{keyName:o.keyName,title:o.title,description:o.description,confirmPlaceholder:o.confirmPlaceholder,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}var Yt=n(45239),Kt=n.n(Yt);function Ht(e){let{id:t,blocklets:n,onActivate:r=(()=>{}),onRuleAdded:a=(()=>{}),children:o,teamDid:s}=e;const{t:d}=(0,c.PE)(),{actions:m}=L(),[u,p]=(0,i.useState)(!1),[f,g]=(0,i.useState)(null),y={title:d("router.rule.add.title"),description:(e,t,r)=>(0,Z.jsxs)(l.Z,{component:"div",children:[(0,Z.jsx)(W.Z,{label:d("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.helperText||d("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:i=>{let a=!1;const o=Zt({params:{...e,pathPrefix:i.target.value},blocklets:n});r(o),e.type===h.ROUTING_RULE_TYPES.BLOCKLET&&o&&(a=!0),e.type!==h.ROUTING_RULE_TYPES.REDIRECT||e.url||(a=!0),i.target.value.trim()||(a=!0,r(d("router.validation.pathPrefixRequired"))),a||r("");const l=d("common.slugifyHint",{value:(0,x.LN)(i.target.value)});t({...e,pathPrefix:i.target.value,helperText:l,__disableConfirm:a})}}),(0,Z.jsx)(ht,{blocklets:n,params:e,setParams:e=>{r(null);bt(e,d)?t({...e,__disableConfirm:!0}):t({...e})},setError:r})]}),confirm:d("router.rule.add.confirm"),cancel:d("common.cancel"),params:{pathPrefix:"",type:h.ROUTING_RULE_TYPES.BLOCKLET,did:Ct(n),port:"",interfaceName:"",redirectCode:302,__disableConfirm:!0},onConfirm:async e=>{const n=await bt(e,d);if(n)throw n;p(!0);const r={from:{pathPrefix:Kt()(e.pathPrefix)},to:{type:e.type}};e.type===h.ROUTING_RULE_TYPES.BLOCKLET?(r.to.port=e.port,r.to.did=e.did,r.to.interfaceName=e.interfaceName):e.type===h.ROUTING_RULE_TYPES.REDIRECT&&(r.to.url=e.url.trim(),r.to.redirectCode=e.redirectCode),await m.addRule(t,r,s),g(null),p(!1),a()},onCancel:()=>{p(!1),g(null)}},j=e=>{e.stopPropagation(),g(y)||r()};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof o?o({loading:u,open:j}):(0,Z.jsxs)(mt.Z,{onClick:j,className:"rule-action","data-cy":"action-add-rule",children:[u?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(he.Z,{style:{fontSize:18,marginRight:5}}),d("router.rule.add.title")]}),f&&(0,Z.jsx)(H.Z,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel,color:"primary"})]})}function Vt(e){const{t:t}=(0,c.PE)(),{actions:n}=L(),[r,a]=(0,i.useState)(!1),[o,l]=(0,i.useState)(null),{id:s,parent:{id:d},name:m,children:u,onActivate:p,teamDid:f}=e,h={keyName:m,title:t("router.rule.delete.title"),description:t("router.rule.delete.description",{name:"<b>".concat(m,"</b>")}),confirmPlaceholder:t("router.rule.delete.confirm_desc",{name:m}),confirm:t("common.delConfirm"),cancel:t("router.rule.delete.cancel"),onConfirm:async()=>{a(!0),await n.deleteRule(d,s,f),a(!1),l(null)},onCancel:()=>{a(!1),l(null)}},x=e=>{e.stopPropagation(),l(h)||p()};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof u?u({loading:r,open:x}):(0,Z.jsxs)(mt.Z,{onClick:x,className:"rule-action","data-cy":"action-delete-rule",children:[r?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(ge.default,{style:{fontSize:18,marginRight:5}}),t("router.rule.delete.title")]}),o&&(0,Z.jsx)(ye.Z,{keyName:o.keyName,title:o.title,description:o.description,confirmPlaceholder:o.confirmPlaceholder,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}Ht.defaultProps={onActivate:()=>{},onRuleAdded:()=>{},children:null,blocklets:[],teamDid:""},Vt.defaultProps={onActivate:()=>{},children:null,teamDid:""};var Qt=n(76667);function Xt(e){const{id:t,name:n,did:r,parent:a,blocklets:o,to:s,children:d,onActivate:m,teamDid:u}=e,{t:p}=(0,c.PE)(),{actions:f}=L(),[g,y]=(0,i.useState)(!1),[j,v]=(0,i.useState)(null),b={title:p("router.rule.update.title"),description:(e,t,n)=>(0,Z.jsxs)(l.Z,{component:"div",children:[(0,Z.jsx)(W.Z,{label:p("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.helperText||p("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:r=>{let i=!1;const a=Zt({params:{...e,pathPrefix:r.target.value},blocklets:o});e.type===h.ROUTING_RULE_TYPES.BLOCKLET&&a&&(i=!0,n(a)),e.type!==h.ROUTING_RULE_TYPES.REDIRECT||e.url||(i=!0),r.target.value.trim()||(i=!0,n(p("router.validation.pathPrefixRequired"))),i||n("");const l=p("common.slugifyHint",{value:(0,x.LN)(r.target.value)});t({...e,pathPrefix:r.target.value,helperText:l,__disableConfirm:i})}}),(0,Z.jsx)(ht,{blocklets:o,params:e,setParams:e=>{bt(e,p)?t({...e,__disableConfirm:!0}):t({...e})},setError:n})]}),confirm:p("router.rule.update.confirm"),cancel:p("router.rule.update.cancel"),color:"primary",params:{pathPrefix:"/"===n?n:n.replace(/^\/+/,"").replace(/\/+$/,""),type:s.type||h.ROUTING_RULE_TYPES.BLOCKLET,did:r||Ct(o),port:s.port||"",interfaceName:s.interfaceName||"",redirectCode:s.redirectCode||302,url:s.url||"",__disableConfirm:!1},onConfirm:async e=>{const n=await bt(e,p);if(n)throw n;y(!0);const r={id:t,from:{pathPrefix:Kt()(e.pathPrefix)},to:{type:e.type}};e.type===h.ROUTING_RULE_TYPES.BLOCKLET?(r.to.port=e.port,r.to.did=e.did,r.to.interfaceName=e.interfaceName):e.type===h.ROUTING_RULE_TYPES.REDIRECT&&(r.to.url=e.url,r.to.redirectCode=e.redirectCode),await f.updateRule(a.id,r,u),v(null),y(!1)},onCancel:()=>{y(!1),v(null)}},C=e=>{e.stopPropagation(),v(b)||m()};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof d?d({loading:g,open:C}):(0,Z.jsxs)(mt.Z,{onClick:C,className:"rule-action","data-cy":"action-update-rule",children:[g?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(Qt.default,{style:{fontSize:18,marginRight:5}}),p("router.rule.update.title")]}),j&&(0,Z.jsx)(H.Z,{title:j.title,description:j.description,confirm:j.confirm,color:j.color,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})]})}Xt.defaultProps={onActivate:()=>{},children:null,did:"",blocklets:[],teamDid:""};var Jt=n(11593),$t=n(26174),en=n(88092);function tn(e){let{id:t,name:n,onActivate:r,children:a,title:o,teamDid:s}=e;const{t:d}=(0,c.PE)(),{actions:m}=L(),[u,p]=(0,i.useState)(!1),[f,x]=(0,i.useState)(null);if(h.DOMAIN_FOR_DEFAULT_SITE===n)return null;const g=async e=>{p(!0),await m.addDomainAlias(t,e.domain.trim(),!!e.force,s),p(!1),x(null)},y={title:o||d("router.domainAlias.add.title"),description:(e,t,n)=>(0,Z.jsxs)(l.Z,{component:"div",children:[(0,Z.jsx)(W.Z,{label:d("router.domainAlias.add.domainDescription"),autoComplete:"off",variant:"outlined",name:"domain","data-cy":"add-domain",fullWidth:!0,autoFocus:!0,inputProps:{"data-cy":"domain-name-input"},value:e.domain,style:{marginBottom:8},margin:"dense",onChange:r=>{const i=r.target.value.trim(),a=jt(i,d);t({...e,domain:i,__disableConfirm:!!a}),n(a||"")},onKeyPress:t=>{if("Enter"===t.key){t.preventDefault();const r=t.target.value.trim(),i=jt(r,d);i?n(i):(async(e,t,n)=>{try{await t(e)}catch(r){n((0,b.Z)(r))}finally{p(!1)}})(e,g,n)}}}),(0,Z.jsx)($t.Z,{control:(0,Z.jsx)(en.Z,{checked:e.force,onChange:n=>{t({...e,force:n.target.checked})},name:"checkedB",color:"primary"}),label:d("router.domainAlias.add.forceTip")})]}),confirm:d("common.confirm"),cancel:d("common.cancel"),params:{domain:"",__disableConfirm:!0},onConfirm:g,onCancel:()=>{p(!1),x(null)}},j=e=>{e.stopPropagation(),x(y)||r()};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof a?a({loading:u,open:j}):(0,Z.jsxs)(mt.Z,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[u?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(Jt.Z,{style:{fontSize:18,marginRight:5}}),d("router.domainAlias.add.title")]}),f&&(0,Z.jsx)(H.Z,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel,color:"primary"})]})}function nn(e){let{id:t,name:n,corsAllowedOrigins:r,onActivate:a,children:o,teamDid:s}=e;const{t:d}=(0,c.PE)(),{actions:m}=L(),[u,p]=(0,i.useState)(!1),[f,x]=(0,i.useState)(null);if(U(n))return null;let g=n;n.endsWith(h.BLOCKLET_SITE_GROUP_SUFFIX)&&(g="".concat(d("common.the")," Blocklet"));const y={title:d("router.domainSecurity.title"),description:(e,t,n)=>(0,Z.jsx)(l.Z,{component:"div",children:(0,Z.jsx)(W.Z,{label:d("router.domainSecurity.cors.title",{name:g}),autoComplete:"off",variant:"outlined",name:"corsAllowedOrigins",fullWidth:!0,autoFocus:!0,value:e.corsAllowedOrigins,style:{marginBottom:32},margin:"dense",helperText:d("router.domainSecurity.cors.description",{name:g}),onChange:r=>{t({...e,corsAllowedOrigins:r.target.value,__disableConfirm:!r.target.value.trim()}),r.target.value.trim()?n(""):n(d("router.domainSecurity.cors.domainInvalid"))}})}),confirm:d("common.confirm"),cancel:d("common.cancel"),params:{corsAllowedOrigins:Array.isArray(r)?r.join(", "):n,__disableConfirm:!0},onConfirm:async e=>{p(!0),await m.updateSite(t,{corsAllowedOrigins:e.corsAllowedOrigins.split(",").map((e=>e.trim()))},s),p(!1),x(null)},onCancel:()=>{p(!1),x(null)}},j=e=>{e.stopPropagation(),x(y)||a()};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof o?o({loading:u,open:j}):(0,Z.jsxs)(mt.Z,{onClick:j,className:"rule-action","data-cy":"action-update-domain",children:[u?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(tt.Z,{style:{fontSize:18,marginRight:5}}),d("router.domainSecurity.title")]}),f&&(0,Z.jsx)(H.Z,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel,color:"primary"})]})}function rn(e){let{id:t,name:n,onActivate:r}=e;const{t:a}=(0,c.PE)(),{actions:o}=L(),[s,d]=(0,i.useState)(!1),[m,u]=(0,i.useState)(null);if(U(n))return null;const p={title:a("router.domain.update.title"),description:(e,t,n)=>(0,Z.jsx)(l.Z,{component:"div",children:(0,Z.jsx)(W.Z,{label:a("router.domain.update.label"),autoComplete:"off",variant:"outlined",name:"domain",fullWidth:!0,autoFocus:!0,value:e.domain,style:{marginBottom:32},margin:"dense",helperText:a("router.domain.update.description"),onChange:r=>{const i=r.target.value.trim(),o=jt(i,a);t({...e,domain:r.target.value,__disableConfirm:!!o}),n(o||"")}})}),confirm:a("common.confirm"),cancel:a("common.cancel"),params:{domain:n,__disableConfirm:!0},onConfirm:async e=>{d(!0),await o.updateSite(t,{domain:e.domain.trim()}),d(!1),u(null)},onCancel:()=>{d(!1),u(null)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(mt.Z,{onClick:e=>{e.stopPropagation(),u(p)||r()},className:"rule-action",children:[s?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(Qt.default,{style:{fontSize:18,marginRight:5}}),a("router.domain.update.title")]}),m&&(0,Z.jsx)(H.Z,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel,color:"primary"})]})}function an(e){const[t,n]=(0,i.useState)(null),r=e=>{e&&e.stopPropagation(),n(null)},a=[];if("root"===e.type&&a.push((0,Z.jsx)(wt,{...e,onActivate:r},"add-domain")),"domain"===e.type&&a.push((0,Z.jsx)(rn,{...e,onActivate:r},"update-domain"),(0,Z.jsx)(Ht,{...e,onActivate:r,onRuleAdded:e.onRuleAdded},"add-rule"),(0,Z.jsx)(tn,{...e,onActivate:r},"add-domain-alias"),(0,Z.jsx)(nn,{...e,onActivate:r},"update-domain-security"),(0,Z.jsx)(qt,{...e,onActivate:r},"delete-domain")),"rule"===e.type&&a.push((0,Z.jsx)(Xt,{...e,onActivate:r},"update-rule"),(0,Z.jsx)(Vt,{...e,onActivate:r},"delete-rule")),e.type===h.ROUTING_RULE_TYPES.REDIRECT&&a.push((0,Z.jsx)(qt,{...e,onActivate:r},"delete-domain")),"dashboard_domain"!==e.type&&"blocklet_domain"!==e.type||a.push((0,Z.jsx)(Ht,{...e,onActivate:r},"add-rule"),(0,Z.jsx)(nn,{...e,onActivate:r},"update-domain-security"),(0,Z.jsx)(tn,{...e,onActivate:r},"add-domain-alias")),0===a.length)return null;const o=e=>{e.stopPropagation()};return(0,Z.jsxs)("div",{children:[(0,Z.jsx)(Gt.Z,{onMouseDown:o,onClick:e=>{e.stopPropagation(),n(e.currentTarget)},"data-cy":"action-trigger",size:"large",children:(0,Z.jsx)(Wt.Z,{})}),(0,Z.jsx)(Mt.Z,{keepMounted:!0,onMouseDown:o,open:!!t,onClose:r,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:a})]})}tn.defaultProps={onActivate:()=>{},children:null,title:"",teamDid:""},nn.defaultProps={onActivate:()=>{},children:null,corsAllowedOrigins:"",teamDid:""},an.defaultProps={onRuleAdded:()=>{},blocklet:{}};var on=n(55898),ln=n.n(on),sn=n(31942),cn=n(11819),dn=n(38763),mn=n(75392),un=n(69569);function pn(e){let{certificate:t}=e;const[n,r]=(0,i.useState)(null),a=(0,j.h6)(),{t:o,locale:s}=(0,c.PE)(),d=()=>{r(null)},m=Boolean(n);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(sn.Z,{"aria-owns":m?"mouse-over-popover":void 0,onMouseEnter:e=>{r(e.currentTarget)},onMouseLeave:d,style:{color:"#44cdc6",fontSize:20,marginLeft:8,cursor:"pointer"}}),(0,Z.jsx)(cn.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:m,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:d,disableRestoreFocus:!0,children:(0,Z.jsx)(dn.Z,{children:(0,Z.jsxs)(mn.Z,{style:{display:"flex"},children:[(0,Z.jsx)("div",{children:(0,Z.jsx)("img",{src:"".concat(a.imgPrefix,"/https-certificate-icon.png"),alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),(0,Z.jsxs)(l.Z,{component:"div",style:{marginLeft:"16px"},children:[(0,Z.jsx)(l.Z,{component:"div",style:{fontWeight:"bold"},children:t.domain}),(0,Z.jsx)(l.Z,{component:"div",children:"".concat(o("common.issuer"),": ").concat(Se()(t,"issuer.commonName",""))}),(0,Z.jsx)(l.Z,{component:"div",children:"".concat(o("router.cert.issuedOn"),": ").concat((0,b.pz)(t.validFrom,s))}),(0,Z.jsx)(l.Z,{component:"div",children:"".concat(o("router.cert.expiryOn"),": ").concat((0,b.pz)(t.validTo,s))})]})]})})})]})}function fn(e){const{name:t,type:n,filters:r}=e,{t:a}=(0,c.PE)(),{status:o}=ct();if("domain"!==n)return null;if(!(0,b.rM)(t))return null;let l=null,s=null;const{isHttps:d,matchedCert:m}=o[t]||{};if(!(0,b.ao)(t)){const{dns:{resolved:e,ip:n}={}}=o[t]||{};l=e||"127.0.0.1"===n?(0,Z.jsx)(Nt.Z,{title:a("router.domain.verify.ok"),children:(0,Z.jsx)(un.Z,{color:"success"})}):(0,Z.jsx)(Nt.Z,{title:a("router.domain.verify.notResolved"),children:(0,Z.jsx)(un.Z,{color:"error"})})}s=d?(0,Z.jsx)(pn,{certificate:m}):(0,Z.jsx)(Nt.Z,{title:a("router.domain.https.bad"),children:(0,Z.jsx)(sn.Z,{style:{color:"#D0021B",fontSize:20,marginLeft:8,cursor:"pointer"}})});const u=r.map((e=>"domain"===e?l:"http"===e?s:null));return(0,i.createElement)(i.Fragment,null,...u)}pn.defaultProps={certificate:{}},fn.propTypes={type:ln().string.isRequired,name:ln().string.isRequired,filters:ln().array},fn.defaultProps={filters:["domain","http"]};const hn=e=>["waiting","creating","renewaling"].includes(e);function xn(e){var t;const{t:n}=(0,c.PE)(),[r,a]=(0,i.useState)(!1),[o,l]=(0,i.useState)(null),{domain:s,onAdd:d,children:m,siteId:p}=e,{api:f}=(0,j.h6)(),[x,g]=(0,i.useState)(!1),{updateStatus:y}=ct(),b=(0,v.Z)(),C=(0,u.Z)((async()=>{const{cert:e}=await b.findCertificateByDomain({input:{domain:s}});return e})),w=e=>{e.domain===s&&g(!1)};if((0,i.useEffect)((()=>{var e;!C.loading&&hn(null===(e=C.value)||void 0===e?void 0:e.status)&&g(!0)}),[C]),(0,rt.mU)(h.EVENTS.CERT_ERROR,w),(0,rt.mU)(h.EVENTS.CERT_ISSUED,(e=>{C.retry(),y(e.domain),w(e)})),C.loading)return"";if("normal"===(null===(t=C.value)||void 0===t?void 0:t.status))return"";const E={title:n("router.cert.genLetsEncryptCert.title"),description:(0,Z.jsxs)("div",{children:[(0,Z.jsx)(G.Z,{type:"success",children:n("router.cert.genLetsEncryptCert.dnsTip")}),n("router.cert.genLetsEncryptCert.description")]}),confirm:n("common.confirm"),onConfirm:async()=>{a(!0);try{await f.issueLetsEncryptCert({input:{domain:s,siteId:p}}),d(),g(!0)}catch(e){console.error(e),g(!1)}finally{a(!1),l(null)}},onCancel:()=>{a(!1),l(null)}};return(0,Z.jsxs)(Z.Fragment,{children:[x?(0,Z.jsx)(Nt.Z,{title:n("router.cert.issuing"),children:(0,Z.jsx)(q.Z,{size:12})}):m({loading:r,open:e=>{e.stopPropagation(),l(E)}}),o&&(0,Z.jsx)(H.Z,{color:"primary",title:o.title,description:o.description,confirm:o.confirm,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}function gn(e){var t;const{status:n}=ct(),{domain:r}=e;return!(0,b.rM)(r)||null!==(t=n[r])&&void 0!==t&&t.isHttps?"":(0,Z.jsx)(xn,{...e})}function yn(e){const{t:t}=(0,c.PE)(),[n,r]=(0,i.useState)(!1),[a,o]=(0,i.useState)(null),{id:l,domain:s,onDelete:d,children:m,teamDid:u}=e,{actions:p}=L();if(s===window.location.hostname)return"";const f={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:async()=>{r(!0);try{await p.deleteDomainAlias(l,s,u),d()}catch(e){console.error(e)}finally{r(!1),o(null)}},onCancel:()=>{r(!1),o(null)}},h=e=>{e.stopPropagation(),o(f)};return(0,Z.jsxs)(Z.Fragment,{children:["function"===typeof m?m({loading:n,open:h}):(0,Z.jsxs)(B.Z,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[n?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(ge.default,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&(0,Z.jsx)(H.Z,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}var jn,vn;function bn(e){let{domain:t,isHttps:n,toUrl:r}=e;const i=n?"https":"http",{t:a}=(0,c.PE)();let o=r;return St()(o)||(o="".concat(i,"://").concat(t).concat(r)),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(l.Z,{className:"arrow-name-middle",children:a("common.redirect")}),(0,Z.jsx)("span",{className:"arrow-name-arrow",children:"\u27f6"}),(0,Z.jsx)(It.Z,{href:o,target:"_blank",underline:"hover",children:r},o)]})}function Zn(){const{t:e}=(0,c.PE)();return(0,Z.jsx)(l.Z,{className:"arrow-name-middle",children:e("common.page404")})}function Cn(e){const{t:t}=(0,c.PE)(),{data:n}=(0,nt.RJ)(),{info:r}=(0,j.h6)(),{status:a}=ct(),o=n.map((e=>({meta:{did:e.meta.did,name:(0,Bt.getDisplayName)(e,!0),version:e.meta.version,interfaces:e.meta.interfaces},port:e.port,ports:e.ports,status:e.status}))),{id:s,type:d,name:m,title:u,items:p=[],depth:f,to:g,expand:y,isProtected:v,pathPrefix:b,parent:w,domainAliases:E}=e;let P=m;const S=m.endsWith(h.BLOCKLET_SITE_GROUP_SUFFIX);let _=d;m===C&&(_="dashboard_domain"),S&&(_="blocklet_domain");const[T,R]=(0,i.useState)(y),k={root:Rt.Z,domain:dt.Z,rule:kt.Z}[d];if("domain"===d){if(v&&!S)return null;if(S){const W=m.replace(h.BLOCKLET_SITE_GROUP_SUFFIX,""),G=o.find((e=>e.meta.did===W));if(!G)return null;if(G.controller)return null;P=G.meta.title||G.meta.name}function F(e){let{domain:t,primaryDomain:n,rules:i}=e,a="http://".concat(t);return n===C?a="".concat(a,"/").concat(r.routing.adminPath.replace(/^\/+/,"")):i&&i.length&&i[0].pathPrefix&&(a="".concat(a,"/").concat(i[0].pathPrefix.replace(/^\/+/,""))),t!==C?(0,Z.jsx)(En,{href:a,target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),children:t}):t}const z=()=>{R(!0)};let M=(E||[]).filter((e=>e.value!==m));return M=(0,x.oE)(M),[(0,Z.jsxs)(wn,{alignItems:"flex-start",button:!0,disableGutters:!0,"data-cy":"rule-domain",children:[(0,Z.jsxs)(Lt.Z,{onClick:()=>R((e=>!e)),children:[p.length>0&&(T?(0,Z.jsx)(Ft.Z,{}):(0,Z.jsx)(zt.default,{})),(0,Z.jsx)(k,{style:{fontSize:22}})]}),(0,Z.jsx)(Ut.Z,{onClick:()=>R((e=>!e)),className:"rule-name rule-name--depth".concat(f),style:{flex:1},secondary:p.length<=0?(0,Z.jsx)("span",{className:"site-secondary",children:t("router.empty")}):"",primary:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"site-header",children:[m===h.DOMAIN_FOR_DEFAULT_SITE&&t("router.defaultSite"),m!==h.DOMAIN_FOR_DEFAULT_SITE&&!S&&(0,Z.jsx)(F,{domain:m,primaryDomain:m,rules:p}),S&&P,p.length&&!T?(0,Z.jsx)("span",{style:{marginLeft:5},children:"(".concat(p.length," URL)")}):null,(0,Z.jsx)("span",{style:{marginLeft:12}}),"domain"===d&&m!==h.DOMAIN_FOR_DEFAULT_SITE&&m!==C&&!S&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(fn,{type:d,name:m},m),(0,Z.jsx)("span",{style:{marginLeft:12}}),(0,Z.jsx)(gn,{siteId:s,domain:m,children:e=>{let{open:n}=e;return(0,Z.jsx)(B.Z,{size:"small",onClick:e=>n(e),children:t("router.cert.genLetsEncryptCert.title")})}})]})]}),M.map((n=>{const r="string"!==typeof n?n.value:n;return(0,Z.jsxs)("div",{className:"site-alias",children:[(0,Z.jsx)(F,{domain:r,primaryDomain:m,rules:p}),(0,Z.jsx)("span",{style:{marginLeft:12}}),(0,Z.jsx)(fn,{type:d,name:r},"domain-status-".concat(m)),(0,Z.jsx)(gn,{siteId:s,domain:r,children:e=>{let{open:n}=e;return(0,Z.jsx)(B.Z,{size:"small",onClick:e=>n(e),children:t("router.cert.genLetsEncryptCert.title")})}}),!n.isProtected&&(0,Z.jsx)(yn,{id:e.id,domain:r},"delete-domain-alias"),r!==C&&r!==window.location.hostname&&(0,Z.jsx)(an,{...e,domain:r,type:"domainAlias",onRuleAdded:z},"action-".concat(m))]},r)}))]})}),(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsx)(Dt.Z,{children:(0,Z.jsx)(an,{blocklets:o,...e,onRuleAdded:z,type:_},m)})})]},"parent"),(0,Z.jsx)(Ot.Z,{in:T,children:p.length>0&&(0,Z.jsx)(et.Z,{component:"div",className:"rule-list rule-list--depth".concat(f),disablePadding:!0,children:p.map((t=>(0,Z.jsx)(Cn,{...t,parent:e,depth:f+1},t.id)))},"children")},"rules")]}if("root"===d)return[(0,Z.jsxs)(wn,{disableGutters:!0,"data-cy":"rule-root",children:[(0,Z.jsx)(Lt.Z,{children:(0,Z.jsx)(k,{style:{fontSize:22}})}),(0,Z.jsx)(Ut.Z,{primary:m}),(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsx)(Dt.Z,{children:(0,Z.jsx)(an,{blocklets:o,...e})})})]},"root"),p.length>0&&(0,Z.jsx)(et.Z,{component:"div",className:"rule-list rule-list--depth".concat(f),disablePadding:!0,children:p.map((t=>(0,Z.jsx)(Cn,{expand:!v,...t,parent:e,depth:f+1},t.id)))},"children")];let N="/blocklets/".concat(g.did,"/overview");g.type===h.ROUTING_RULE_TYPES.DAEMON&&(N="/");const A={meta:{did:r.did,name:"Blocklet Server Dashboard",version:r.version},status:"running",port:r.port},L=g.did===r.did?A:o.find((e=>e.meta.did===g.did)),U=L&&"running"===L.status||g.type===h.ROUTING_RULE_TYPES.DAEMON,I=t(U?"router.healthy.ok":"router.healthy.error"),O=a[w.name]||{};return(0,Z.jsxs)(wn,{className:"hover-item",divider:!0,disableGutters:!0,style:{paddingBottom:8,paddingLeft:8},"data-cy":"rule-item",children:[(0,Z.jsx)(Lt.Z,{className:"arrow-icon",children:(0,Z.jsx)(k,{style:{fontSize:22}})}),(0,Z.jsx)(Ut.Z,{primary:(0,Z.jsxs)(l.Z,{component:"div",className:"arrow-name",children:[(0,Z.jsx)(l.Z,{style:{wordBreak:"break-all"},className:"arrow-name-left",children:m}),(0,Z.jsx)("span",{className:"arrow-name-arrow",children:"\u27f6"}),(g.type===h.ROUTING_RULE_TYPES.DAEMON||g.type===h.ROUTING_RULE_TYPES.BLOCKLET)&&(0,Z.jsxs)(Z.Fragment,{children:[w.name!==h.DOMAIN_FOR_DEFAULT_SITE&&U&&(0,Z.jsx)(D.Z,{className:"arrow-name-middle",children:(0,Z.jsx)(It.Z,{href:(0,x.Sk)(w.name,b),target:"_blank",underline:"hover",children:t("common.open")})}),w.name===h.DOMAIN_FOR_DEFAULT_SITE&&(0,Z.jsx)(l.Z,{component:"span",className:"arrow-name-middle",children:"Blocklet"}),!U&&(0,Z.jsx)("span",{className:"arrow-name-middle",children:t("common.unavailable")}),(0,Z.jsx)("span",{className:"arrow-name-arrow",children:"\u27f6"}),(0,Z.jsxs)(Et.Link,{to:N,className:"arrow-name-right",children:[(0,Z.jsx)(Nt.Z,{title:I,children:U?(0,Z.jsx)(_t.Z,{style:{color:"#44cdc6",fontSize:20}}):(0,Z.jsx)(Tt.Z,{style:{color:"red",fontSize:20}})}),(0,Z.jsx)("span",{children:L?L.meta.name:u}),L&&(0,Z.jsx)("span",{style:{marginLeft:8},children:(0,Z.jsx)(pt.Z,{status:L.status})})]})]}),g.type===h.ROUTING_RULE_TYPES.REDIRECT&&(0,Z.jsx)(bn,{prefix:b,domain:w.name,toUrl:g.url,isHttps:O.isHttps}),g.type===h.ROUTING_RULE_TYPES.NONE&&(0,Z.jsx)(Zn,{})]})}),(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsx)(Dt.Z,{children:(0,Z.jsx)(an,{blocklets:o,...e,did:g.did})})})]},m)}xn.defaultProps={onAdd:()=>{},children:null},gn.defaultProps={onAdd:()=>{},children:null},yn.defaultProps={onDelete:()=>{},children:null,teamDid:""},bn.defaultProps={isHttps:!1},Zn.defaultProps={},Cn.defaultProps={id:"",to:{},title:"",items:[],depth:0,parent:{},expand:!0,isProtected:!1,pathPrefix:"",domainAliases:[]};const wn=(0,a.Z)(At.ZP)(jn||(jn=(0,r.Z)(["\n .MuiListItemText-root {\n padding-right: 48px;\n }\n .MuiListItemSecondaryAction-root {\n right: 0;\n }\n .site-header {\n display: unset !important;\n vertical-align: middle;\n .MuiSvgIcon-root {\n vertical-align: middle;\n }\n }\n"]))),En=(0,a.Z)("a")(vn||(vn=(0,r.Z)(["\n color: #000;\n white-space: normal;\n word-break: break-all;\n :hover {\n color: rgba(0, 0, 0, 0.6);\n }\n"])));var Pn;function Sn(){const{sites:e,allDomains:t}=L(),{data:n}=(0,nt.RJ)(),{t:r}=(0,c.PE)(),a=e.map((e=>{const t=e.items.filter((e=>!e.isProtected));return{...e,items:t}}));return(0,Z.jsx)(st,{domains:t,children:(0,Z.jsxs)(_n,{children:[(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsx)(D.Z,{textAlign:"right",mb:1,children:(0,Z.jsx)(wt,{blocklets:n,children:e=>{let{open:t}=e;return(0,Z.jsxs)(B.Z,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:t,children:[(0,Z.jsx)(tt.Z,{style:{fontSize:"1.3em",marginRight:4}}),r("router.domain.addSite")]})}})})}),(0,Z.jsx)(et.Z,{component:"div",disablePadding:!0,children:a.map((e=>(0,i.createElement)(Cn,{...e,depth:1,key:e.id})))})]})})}const _n=a.Z.main(Pn||(Pn=(0,r.Z)(["\n margin-top: ",";\n min-height: 60vh;\n\n .MuiListItemIcon-root {\n min-width: ",";\n }\n\n .site-header {\n display: flex;\n align-items: center;\n margin-left: ",";\n font-size: 1.2rem;\n }\n\n .site-alias {\n display: flex;\n align-items: center;\n margin-left: ",";\n }\n\n .site-secondary {\n margin-left: ",";\n }\n\n .rule-list--depth1 {\n padding-left: ",";\n }\n\n .rule-list--depth2 {\n padding-left: ",";\n }\n\n .rule-action {\n margin-left: ",";\n }\n\n .rule-name--depth2 span {\n font-weight: bold;\n }\n\n .arrow-name {\n display: flex;\n align-items: center;\n .arrow-name-left {\n width: 400px;\n flex-shrink: 0;\n text-align: left;\n }\n .arrow-name-middle {\n width: 150px;\n flex-shrink: 0;\n text-align: left;\n }\n .arrow-name-arrow {\n width: 40px;\n flex-shrink: 0;\n margin: auto 16px;\n font-size: 24px;\n color: #0000008a;\n }\n .arrow-name-right {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n\n span {\n margin: 0 8px;\n }\n }\n }\n\n @media (max-width: ","px) {\n .rule-list--depth1,\n .rule-list--depth2 {\n padding-left: 0;\n }\n\n .MuiListItem-secondaryAction {\n padding-right: 0;\n }\n }\n\n @media (max-width: ","px) {\n .arrow-icon {\n margin-top: 4px;\n align-self: flex-start;\n }\n\n .arrow-name {\n flex-direction: column;\n align-items: flex-start;\n .arrow-name-left {\n width: auto;\n }\n .arrow-name-middle {\n margin: 5px 0;\n }\n .arrow-name-arrow {\n display: none;\n }\n }\n }\n"])),(e=>e.theme.spacing(2)),(e=>e.theme.spacing(4)),(e=>e.theme.spacing(1)),(e=>e.theme.spacing(1)),(e=>e.theme.spacing(1)),(e=>e.theme.spacing(4)),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(2)),(e=>e.theme.breakpoints.values.md),(e=>e.theme.breakpoints.values.lg));var Tn=n(34966),Rn=n(22228),kn=n(23484),Nn=n(49525),An=n(65140),Ln=n(87916),Un=n(13128),In=n(55372);const Dn=51200,On=e=>new Promise(((t,n)=>{const r=new FileReader;r.readAsText(e),r.onload=()=>{t(r.result)},r.onerror=e=>n(e)}));function Fn(e){let{certificate:t={},onRefresh:n,mode:r,...a}=e;const{t:o}=(0,c.PE)(),{api:s}=(0,j.h6)(),[d,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(),[f,h]=(0,i.useState)(),[x,g]=(0,i.useState)(!1),[y,v]=(0,i.useState)(""),[C,w]=(0,i.useState)("upload"),{handleSubmit:E,formState:P,control:S}=(0,M.cI)({defaultValues:{name:t.name||t.domain}}),_=(0,M.qo)({control:S,name:"name"}),T=(0,M.qo)({control:S,name:"domain"}),R=()=>{m(!1),g(!1)},k={upload:{name:o("router.cert.nginx.sourceTypes.upload"),value:"upload",onSubmit:async e=>{if("add"===r){const t=(await On(f)).replace(/\r\n/g,"\n"),n=(await On(u)).replace(/\r\n/g,"\n");await s.addCertificate({input:{name:e.name.trim(),certificate:t.split("\n").join("|"),privateKey:n.split("\n").join("|")}})}else await s.updateCertificate({input:{id:t.id,name:e.name.trim()}})}},lets_encrypt:{name:o("router.cert.nginx.sourceTypes.lets_encrypt"),value:"lets_encrypt",onSubmit:e=>s.issueLetsEncryptCert({input:{domain:e.domain}})}},N=async e=>{m(!0);try{const t=k[C];if(!t)throw new Error("Invaid certificate source");await t.onSubmit(e),n(),g(!1)}catch(t){v((0,b.Z)(t)||"unknown error, may be you can check file permission")}finally{m(!1)}},A=e=>{e.length>0&&v(Se()(e[0],"errors[0].message",o("router.cert.add.invalidFile")))},{getRootProps:L,getInputProps:U}=(0,Nn.uI)({accept:[".pem",".crt"],multiple:!1,maxSize:Dn,onDropRejected:A,onDrop:e=>{h(e[0])}}),{getRootProps:I,getInputProps:O}=(0,Nn.uI)({accept:[".pem",".key"],multiple:!1,maxSize:Dn,onDropRejected:A,onDrop:e=>{p(e[0])}}),{errors:F}=P;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(B.Z,{edge:"end",onClick:()=>{p(null),h(null),g(!0),v("")},className:"rule-action",color:"primary","data-cy":"add-cert",...a,children:[d?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(tt.Z,{style:{fontSize:16}}),o("add"===r?"common.add":"common.update")]}),x&&(0,Z.jsx)(Un.ZP,{title:o("add"===r?"router.cert.nginx.titleAdd":"router.cert.nginx.title"),open:!0,onClose:R,actions:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(B.Z,{onClick:R,color:"inherit","data-cy":"cert-cancel",children:o("router.cert.nginx.cancel")}),(0,Z.jsxs)(B.Z,{onClick:E(N),color:"secondary",disabled:!!d||("upload"===C&&"update"===r?!_:"upload"===C&&"add"===r?!_||!u||!f:"lets_encrypt"===C&&!T),variant:"contained",autoFocus:!0,"data-cy":"save-cert",children:[o("router.cert.nginx.confirm"),d&&(0,Z.jsx)(q.Z,{size:16})]})]}),children:(0,Z.jsx)("form",{className:"form","data-cy":"cert-form",noValidate:!0,autoComplete:"off",onSubmit:E(N),children:(0,Z.jsxs)(D.Z,{minWidth:{sm:480},children:[(0,Z.jsxs)(In.Z,{component:"div",children:["add"===r&&(0,Z.jsxs)("section",{className:"form-item",children:[(0,Z.jsx)("div",{className:"form-item-label",children:o("router.cert.source")}),(0,Z.jsx)(Ln.Z,{"aria-label":"cert-source",name:"certSource",value:C,onChange:e=>{w(e.target.value)},children:Object.values(k).map((e=>(0,Z.jsx)($t.Z,{value:e.value,control:(0,Z.jsx)(An.Z,{}),label:e.name},e.value)))})]}),"upload"===C&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("section",{className:"form-item",children:[(0,Z.jsx)("div",{className:"form-item-label",children:o("router.cert.name")}),(0,Z.jsx)(M.Qr,{name:"name",control:S,rules:{validate:e=>!!e.trim()||o("common.requiredErrorText",{name:o("router.cert.name")})},render:e=>{let{field:{value:t,onChange:n}}=e;return(0,Z.jsx)(W.Z,{fullWidth:!0,autoFocus:!0,defaultValue:t,onChange:n,error:!!F.name,autoComplete:"off",variant:"outlined",name:"name",className:"form-item-value","data-cy":"certificate-name-textfield",helperText:F.name&&F.name.message})}})]}),"add"===r&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("section",{className:"form-item",children:[(0,Z.jsx)("div",{className:"form-item-label",children:o("router.cert.nginx.pem")}),(0,Z.jsx)("div",{className:"form-item-value",children:(0,Z.jsxs)("div",{...L({className:"dropzone"}),children:[(0,Z.jsx)("input",{...U(),"data-cy":"pem-input"}),f&&(0,Z.jsx)(l.Z,{color:"secondary",children:f.name}),!f&&(0,Z.jsx)(l.Z,{color:"secondary",children:o("router.cert.nginx.empty")}),(0,Z.jsx)(l.Z,{component:"small",variant:"body2",color:"textSecondary",children:o("router.cert.nginx.pemTip")})]})})]}),(0,Z.jsxs)("section",{className:"form-item",children:[(0,Z.jsx)("div",{className:"form-item-label",children:o("router.cert.nginx.key")}),(0,Z.jsx)("div",{className:"form-item-value",children:(0,Z.jsxs)("div",{...I({className:"dropzone"}),children:[(0,Z.jsx)("input",{...O(),"data-cy":"key-input"}),u&&(0,Z.jsx)(l.Z,{color:"secondary",children:u.name}),!u&&(0,Z.jsx)(l.Z,{color:"secondary",children:o("router.cert.nginx.empty")}),(0,Z.jsx)(l.Z,{component:"small",variant:"body2",color:"textSecondary",children:o("router.cert.nginx.keyTip")})]})})]})]})]}),"lets_encrypt"===C&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("section",{className:"form-item",children:(0,Z.jsx)(G.Z,{type:"success",children:o("router.cert.genLetsEncryptCert.dnsTip")})}),(0,Z.jsxs)("section",{className:"form-item",children:[(0,Z.jsx)("div",{className:"form-item-label",children:o("common.domain")}),(0,Z.jsx)(M.Qr,{name:"domain",control:S,rules:{validate:e=>!!e.trim()||o("common.requiredErrorText",{name:o("common.domain")})},render:e=>{let{field:{value:t,onChange:n}}=e;return(0,Z.jsx)(W.Z,{fullWidth:!0,autoFocus:!0,defaultValue:t,error:!!F.domain,autoComplete:"off",variant:"outlined",className:"form-item-value",helperText:F.domain&&F.domain.message,onChange:n})}})]})]})]}),!!y&&(0,Z.jsx)(G.Z,{type:"error",style:{marginTop:8},children:y})]})})})]})}var zn=n(96366);function Bn(e){const t=(0,zn.Z)(),{t:n}=(0,c.PE)(),[r,a]=(0,i.useState)(!1),[o,l]=(0,i.useState)(null),{id:s,onDelete:d=(()=>{}),...m}=e,{refresh:u}=L(),p=(0,v.Z)(),f={title:n("router.cert.delete.title"),description:n("router.cert.delete.description"),confirm:n("common.delConfirm"),cancel:n("common.cancel"),onConfirm:async()=>{a(!0);try{await p.deleteCertificate({input:{id:s}}),u(),d()}catch(e){console.error(e)}finally{a(!1),l(null)}},onCancel:()=>{a(!1),l(null)}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(B.Z,{edge:"end",onClick:()=>l(f),size:"small",className:"rule-action",variant:"text","data-cy":"action-delete-cert",style:{color:t.palette.error.main},...m,children:[r?(0,Z.jsx)(q.Z,{size:16}):(0,Z.jsx)(ge.default,{style:{fontSize:16}}),n("common.delete")]}),o&&(0,Z.jsx)(H.Z,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,params:o.params,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}var Mn,Wn,Gn=n(1577),qn=n.n(Gn),Yn=n(95335),Kn=n(45568),Hn=n(29034);function Vn(e){const{certificate:t={},...n}=e,{t:r,locale:a}=(0,c.PE)(),[o,s]=(0,i.useState)(!1),d=(0,Yn.Z)(),m=[{id:"matchedSites",name:r("router.cert.matchedSites"),value:(t.matchedSites||[]).map((e=>(0,Z.jsx)(l.Z,{component:"div",style:{fontWeight:"inherit",fontSize:"1.1rem"},children:e.domain},e.id)))},{id:"updatedAt",name:r("common.updatedAt"),value:(0,b.B2)(t.updatedAt,a)},{id:"createdAt",name:r("common.createdAt"),value:(0,b.B2)(t.createdAt,a)}],u=[{id:"boundDomains",name:r("router.cert.boundDomains"),value:(0,Z.jsx)(l.Z,{component:"span",style:{fontSize:"1.1rem"},children:(Se()(t,"sans")||[]).join(", ")})},{id:"issuer",name:r("common.issuer"),value:Se()(t,"meta.issuer.commonName","")},{id:"fingerprint",name:r("common.fingerprint"),value:Se()(t,"meta.fingerprint")},{id:"fingerprintAlg",name:r("router.cert.fingerprintAlg"),value:Se()(t,"meta.fingerprintAlg")},{id:"validityPeriod",name:r("router.cert.validityPeriod"),value:qn().duration(Se()(t,"meta.validityPeriod"),"ms").humanize()},{id:"issuedOn",name:r("router.cert.issuedOn"),value:(0,b.pz)(Se()(t,"meta.validFrom"),a)},{id:"expiryOn",name:r("router.cert.expiryOn"),value:(0,b.pz)(Se()(t,"meta.validTo"),a)}];return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(B.Z,{edge:"end",onClick:()=>s(!0),size:"small",className:"rule-action",variant:"text",color:"secondary","data-cy":"action-view-cert",...n,children:[(0,Z.jsx)(Kn.Z,{style:{fontSize:16}}),r("common.detail")]}),(0,Z.jsxs)(Un.ZP,{title:r("router.cert.detail.title"),"aria-labelledby":"certificate details",fullWidth:!0,open:o,showCloseButton:!1,actions:(0,Z.jsx)(B.Z,{autoFocus:!0,variant:"contained",onClick:()=>{s(!1)},color:"secondary",children:r("common.close")}),children:[(0,Z.jsx)(In.Z,{component:"div",style:{margin:d.spacing(2)},children:m.map((e=>(0,Z.jsx)(_e.Z,{nameWidth:200,valueComponent:"div",name:e.name,children:e.value},e.id)))},"cert-basic"),(0,Z.jsx)(Hn.Z,{}),(0,Z.jsx)(In.Z,{component:"div",style:{margin:d.spacing(2)},children:u.map((e=>(0,Z.jsx)(_e.Z,{nameWidth:200,valueComponent:"div",name:e.name,children:e.value},e.id)))},"cer-info"),(0,Z.jsx)(Hn.Z,{})]})]})}function Qn(e){const{certificate:t,style:n,...r}=e,{t:a}=(0,c.PE)(),[o,s]=(0,i.useState)(!1),d=t.matchedSites||[];return(0,Z.jsxs)(l.Z,{component:"ul",...r,style:{...n,listStyle:"none"},children:[(o?d:d.slice(0,4)).map((e=>(0,Z.jsx)(l.Z,{component:"li",style:{fontSize:"1.1rem",margin:"4px 0"},children:e.domain},e.id))),d.length>4&&(0,Z.jsx)(B.Z,{style:{border:"none",padding:"5px 0"},variant:"outlined",color:"primary",className:"button",onClick:()=>{s(!o)},children:a(o?"common.collapseAll":"common.expandAll")})]})}Qn.defaultProps={style:{}};const Xn=e=>{if(!e)return!1;return e-+new Date<=0},Jn="ssl-certificates-table";function $n(e){let{name:t,value:n,style:r={},icon:i,...a}=e;return(0,Z.jsxs)(er,{style:{display:"flex",alignItems:"center",...r},...a,children:[(0,Z.jsxs)("span",{children:[t,":"]}),(0,Z.jsx)("span",{children:n}),i&&i]})}const er=a.Z.div(Mn||(Mn=(0,r.Z)(["\n & > span {\n margin: 5px;\n }\n"])));function tr(e){let{status:t,source:n,expiresTime:r}=e;const{t:i}=(0,c.PE)();return Xn(r)?(0,Z.jsx)(Rn.Z,{type:"error",children:i("router.cert.expired")}):"upload"===n?(0,Z.jsx)(Rn.Z,{type:"success",children:i("common.normal")}):"error"===t?(0,Z.jsx)(Rn.Z,{type:"error",children:i("common.error")}):"generated"===t?(0,Z.jsx)(Rn.Z,{type:"success",children:i("common.normal")}):""}tr.defaultProps={status:"",source:""};const nr=(e,t)=>{if(!t)return e;const n=(t.site.domainAliases||[]).map((e=>e.value));return e.filter((e=>(0,x.kO)(n,e.matchedSites)))};function rr(){var e;const{t:t,locale:n}=(0,i.useContext)(c.RD),r=(0,v.Z)(),{api:a}=(0,j.h6)(),o=(0,kn.Z)().get("did"),s=(0,u.Z)((async()=>{const{certificates:e}=await r.getCertificates();let t=null;if(o){const{blocklet:e}=await a.getBlocklet({input:{did:o,attachRuntimeInfo:!0}});t=e}return{certificates:nr(e,t)}})),d=()=>{s.retry()},m=null===(e=s.value)||void 0===e?void 0:e.certificates,p=[{label:t("common.certificate"),name:"",verticalKeyAlign:"center",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const n=m[e];return(0,Z.jsxs)(Z.Fragment,{children:[n.name&&(0,Z.jsx)($n,{nowrap:!0,style:{fontSize:"16px",whiteSpace:"nowrap"},name:t("common.name"),value:n.name}),(0,Z.jsx)($n,{style:{fontSize:"16px",whiteSpace:"nowrap"},name:t("common.issuer"),value:Se()(n,"meta.issuer.commonName","")}),(0,Z.jsx)($n,{style:{fontSize:"16px",whiteSpace:"nowrap"},icon:(0,Z.jsx)(Nt.Z,{title:n.isProtected?t("router.cert.protectedCertHelperText"):t("router.cert.unprotectedCertHelperText"),children:(0,Z.jsx)(Tn.Z,{style:{fontSize:"18px"},color:"secondary"})}),name:t("common.protected"),value:n.isProtected?t("common.yes"):t("common.no")})]})}}},{label:t("router.cert.boundDomains"),name:"",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)(l.Z,{noWrap:!0,component:"ul",style:{listStyle:"none"},children:[...new Set([...Se()(t,"meta.sans")||[],t.domain])].map((e=>(0,Z.jsx)(l.Z,{component:"li",title:e,style:{fontSize:"1.1rem",minWidth:200,whiteSpace:"initial",wordBreak:"break-all"},children:e},e)))})}}},{label:t("router.cert.source"),name:"",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const n=m[e];return t("router.cert.sourceTypes.".concat(n.source))}}},{label:t("common.status"),name:"",width:100,options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)(tr,{status:t.status,source:t.source,expiresTime:Se()(t,"meta.validTo")})}}},{label:t("common.expires"),name:"",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)(pe.Z,{value:Se()(t,"meta.validTo"),locale:n})}}},{label:t("router.cert.matchedSites"),name:"",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)(Qn,{id:t.id,certificate:t,style:{minWidth:200,whiteSpace:"initial",wordBreak:"break-all"}})}}},{label:t("router.cert.action"),name:"",align:"center",options:{sort:!1,filter:!1,customBodyRenderLite:e=>{const t=m[e];return(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsxs)(Z.Fragment,{children:[!t.isProtected&&(0,Z.jsxs)(Z.Fragment,{children:["upload"===t.source&&(0,Z.jsx)("div",{children:(0,Z.jsx)(Fn,{mode:"update",certificate:t,onRefresh:d})}),(0,Z.jsx)("div",{children:(0,Z.jsx)(Bn,{id:t.id,onDelete:d})})]}),(0,Z.jsx)("div",{children:(0,Z.jsx)(Vn,{id:t.id,certificate:t})})]})})}}}];if(s.error)return(0,Z.jsx)(G.Z,{type:"error",children:(0,x.Z)(s.error)});if(s.loading)return(0,Z.jsx)(q.Z,{});const f=(0,fe.$)(Jn);return(0,Z.jsx)(ir,{children:(0,Z.jsx)(fe.Z,{title:(0,Z.jsx)($.Z,{permission:"mutate_router",children:(0,Z.jsx)(Fn,{mode:"add",onRefresh:d,variant:"contained"})}),locale:n,data:s.value.certificates,columns:p,verticalKeyWidth:100,durable:Jn,options:{search:!1,download:!1,filter:!1,print:!1,...f}})})}const ir=a.Z.div(Wn||(Wn=(0,r.Z)(["\n .header {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n margin-top: 20px;\n }\n\n margin-bottom: 24px;\n .table-cell {\n span {\n font-size: 18px;\n }\n @media (max-width: ","px) {\n span {\n font-size: 15px;\n }\n }\n }\n .match-sites-cell,\n .expires-cell {\n min-width: 100px;\n }\n .actions {\n text-align: center;\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 6px;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.breakpoints.values.sm));var ar,or=n(77150),lr=n(90067);const sr=(0,n(50844).Z)((e=>({root:{color:e.palette.primary.main,height:8},thumb:{height:24,width:24,backgroundColor:"#fff",border:"2px solid currentColor","&:focus, &:hover, &$active":{boxShadow:"inherit"}},valueLabel:{left:"calc(-50% + 4px)"},track:{height:8,borderRadius:4},rail:{height:8,borderRadius:4}})))(or.ZP);function cr(){const{info:{routing:e}}=(0,j.h6)(),{t:t}=(0,c.PE)(),[n,r]=(0,i.useState)(!1),a=e.requestLimit||{};"boolean"!==typeof a.enabled&&(a.enabled=!1),"number"!==typeof a.rate&&(a.rate=h.GATEWAY_REQ_LIMIT.min),a.ipHeader||(a.ipHeader="");const{handleSubmit:o,control:s,watch:d}=(0,M.cI)({defaultValues:{requestLimit:a,cacheEnabled:"boolean"!==typeof e.cacheEnabled||e.cacheEnabled}}),m=d("requestLimit.enabled"),u=d("requestLimit.rate"),p=async e=>{try{r(!0),await(0,v.Z)().updateGateway({input:e}),await(0,b._v)(1e3),z.Z.success(t("common.saveSuccess"))}catch(n){z.Z.error((0,b.Z)(n))}finally{r(!1)}};return(0,Z.jsx)(dr,{children:(0,Z.jsx)($.Z,{permission:"mutate_node",children:e=>(0,Z.jsxs)(ee,{className:"form",noValidate:!0,autoComplete:"off",onSubmit:o(p),children:[(0,Z.jsx)(M.Qr,{name:"cacheEnabled",control:s,render:n=>{let{field:{value:r,onChange:i}}=n;return(0,Z.jsx)(Y.Z,{checked:r,disabled:!e,onChange:e=>i(e.target.checked),labelProps:{label:(0,Z.jsx)(l.Z,{children:(0,Z.jsx)("span",{children:t("router.gateway.cacheEnabled.switchLabel")})})},style:{marginTop:16}})}}),(0,Z.jsx)(M.Qr,{name:"requestLimit.enabled",control:s,render:n=>{let{field:{value:r,onChange:i}}=n;return(0,Z.jsx)(Y.Z,{checked:r,disabled:!e,onChange:e=>i(e.target.checked),labelProps:{label:(0,Z.jsx)(l.Z,{children:(0,Z.jsx)("span",{children:t("router.gateway.reqLimit.switchLabel")})})},style:{marginTop:16}})}}),m&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"form-item",children:[(0,Z.jsx)(l.Z,{id:"request-limit-rate-label",gutterBottom:!0,children:t("router.gateway.reqLimit.rate",{rate:u})}),(0,Z.jsx)(M.Qr,{name:"requestLimit.rate",control:s,render:t=>{let{field:{value:n,onChange:r}}=t;return(0,Z.jsx)(sr,{disabled:!e,onChange:(e,t)=>r(t),defaultValue:n,valueLabelDisplay:"auto",step:1,min:h.GATEWAY_REQ_LIMIT.min,max:h.GATEWAY_REQ_LIMIT.max})}})]}),(0,Z.jsx)(M.Qr,{name:"requestLimit.ipHeader",control:s,render:r=>{let{field:{value:i,onChange:a}}=r;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(W.Z,{variant:"outlined",disabled:n||!e,className:"form-item",label:t("router.gateway.reqLimit.ipHeaderLabel"),margin:"normal",value:i,onChange:a}),(0,Z.jsx)(lr.Z,{id:"req-limit-ip_header-desc",children:t("router.gateway.reqLimit.ipHeaderDesc")})]})}})]}),(0,Z.jsx)("div",{className:"form-actions",children:e&&(0,Z.jsxs)(B.Z,{disabled:n,onClick:o(p),color:"primary",variant:"contained","data-cy":"submit-btn",className:"form-submit",children:[t("common.save")," ",n&&(0,Z.jsx)(q.Z,{size:16})]})})]})})})}const dr=a.Z.div(ar||(ar=(0,r.Z)(["\n display: flex;\n align-items: flex-start;\n width: 100%;\n max-width: 720px;\n"])));var mr;function ur(){const e=(0,o.useNavigate)(),{node:t}=(0,i.useContext)(j.sy),{t:n}=(0,i.useContext)(c.RD),{tab:r="basic"}=(0,o.useParams)(),a=[{label:n("common.basic"),value:"basic"},{label:n("router.routerSetting"),value:"router"},{label:n("router.certSetting"),value:"cert"},{label:n("common.gateway"),value:"gateway"},{label:n("common.webhook"),value:"integration"},{label:n("common.about"),value:"about"}],d={basic:le,integration:ve,about:Je,router:(0,Z.jsx)(A,{children:(0,Z.jsx)(Sn,{})}),gateway:cr,cert:(0,Z.jsx)(A,{children:(0,Z.jsx)(rr,{})})},m=d[r]||d.basic;return(0,Z.jsxs)(pr,{children:[(0,Z.jsx)(l.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:n("common.setting")}),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s.Z,{tabs:a,current:r,onChange:t=>{e("/settings/".concat(t))},scrollButtons:"auto"}),(0,Z.jsx)("div",{className:"page-content",children:(0,i.isValidElement)(m)?m:(0,Z.jsx)(m,{node:t})})]})]})}const pr=a.Z.main(mr||(mr=(0,r.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-content {\n margin-top: 16px;\n }\n"])))},44543:(e,t,n)=>{const r=n(57156);e.exports=(e,t)=>r(e)===r(t)},44784:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r,i=n(71171),a=n(33518),o=n(82790),l=n(96266);function s(e){let{labelProps:t,className:n,style:r,...i}=e;const a={...t,labelPlacement:(null===t||void 0===t?void 0:t.labelPlacement)||"start"};return(0,l.jsx)(c,{className:n,style:r,children:(0,l.jsx)(o.Z,{labelProps:a,...i})})}s.propTypes=o.Z.propTypes,s.defaultProps=o.Z.defaultProps;const c=a.Z.div(r||(r=(0,i.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"])),(e=>{let{theme:t}=e;return t.breakpoints.down("sm")})),d=s},81010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(5057),i=n(55898),a=n.n(i),o=n(44846),l=n(75239),s=n(68420),c=n(38242),d=n(69569),m=n(22228),u=n(96266);const p={yellow:"#FFCF71",grey:"#888888"};function f(e){let{status:t,variant:n,source:i,...a}=e;const{t:f}=(0,r.useContext)(s.RD),h={added:p.grey,waiting:p.yellow,downloading:p.yellow,downloaded:p.grey,installing:p.yellow,installed:p.grey,starting:p.yellow,running:"success",stopping:p.yellow,stopped:p.grey,error:"error",upgrading:p.yellow,restarting:p.yellow,corrupted:"error",deleting:p.yellow},x=(0,c.isInProgress)(t),g=f("blocklet.status.".concat(t));return"dot"===n?(0,u.jsx)(l.Z,{title:f("blocklet.statusTip",{status:g}),children:(0,u.jsx)(d.Z,{color:h[t],...a})}):(0,u.jsxs)(m.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"}[t],...a,children:[x&&(0,u.jsx)(o.Z,{size:12,color:"inherit",style:{marginRight:5}}),g]})}f.propTypes={status:a().string.isRequired,variant:a().oneOf(["dot","tag"]),source:a().string},f.defaultProps={variant:"tag",source:""}},78410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(5057),i=n(86229),a=n(28726),o=n(44846),l=n(68420),s=n(14491),c=n(58238),d=n(70461),m=n(96266);function u(e){let{teamDid:t,size:n="small",...u}=e;const{t:p}=(0,l.PE)(),{api:f}=(0,c.h6)(),[h,x]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null),j={title:p("blocklet.config.clearCache.title"),description:p("blocklet.config.clearCache.description"),confirm:p("common.confirm"),cancel:p("common.cancel"),onConfirm:async()=>{try{var e;x(!0);const n=await f.clearCache({input:{teamDid:t}});i.Z.success(p("blocklet.config.clearCache.success",{count:(null===(e=n.removed)||void 0===e?void 0:e.length)||0}))}catch(n){i.Z.error((0,s.Z)(n))}finally{x(!1),y(null)}},onCancel:()=>{x(!1),y(null)}};return(0,m.jsxs)("div",{...u,children:[(0,m.jsxs)(a.Z,{onClick:()=>y(j),color:"error",variant:"outlined",size:n,children:[h?(0,m.jsx)(o.Z,{size:16,style:{marginRight:5}}):null,p("blocklet.config.clearCache.action")]}),g&&(0,m.jsx)(d.Z,{title:g.title,description:g.description,confirm:g.confirm,cancel:g.cancel,onConfirm:g.onConfirm,onCancel:g.onCancel})]})}},50185:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(5057),i=n(55898),a=n.n(i),o=n(12937),l=n(68420),s=n(96266);function c(e){let{children:t,...n}=e;const{t:i}=(0,r.useContext)(l.RD);return(0,s.jsx)(o.Z,{tip:i("common.copyTip"),copiedTip:i("common.copiedTip"),...n,children:t})}c.propTypes={children:a().any.isRequired}},71363:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(55898),i=n.n(r),a=n(11750),o=n(47020),l=n(93938),s=n(68420),c=n(50185),d=n(70461),m=n(96266);function u(e){let{title:t,description:n,confirmPlaceholder:r,cancel:i,confirm:u,params:p,onCancel:f,onConfirm:h,keyName:x}=e;const{t:g}=(0,s.PE)(),y={title:()=>(0,m.jsxs)("div",{children:[t," (".concat(x,")")]}),description:(e,t)=>(0,m.jsxs)("div",{children:[(0,m.jsx)(l.Z,{severity:"warning",style:{width:"100%"},children:g("common.notice")}),(0,m.jsx)("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:n}}),(0,m.jsxs)("div",{style:{marginBottom:24},children:[g("common.click"),"\uff1a",(0,m.jsx)(c.Z,{"data-cy":"click-copy",children:x})]}),(0,m.jsx)(a.Z,{component:"div",children:(0,m.jsx)(o.Z,{label:r,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:e.inputVal,onChange:n=>{var r;r={...e,inputVal:n.target.value,__disableConfirm:x!==n.target.value},t({...r,__disableConfirm:r.__disableConfirm})}})})]}),confirm:u,cancel:i,onConfirm:h,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return(0,m.jsx)(d.Z,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})}u.propTypes={title:i().any.isRequired,keyName:i().any.isRequired,description:i().any.isRequired,confirmPlaceholder:i().any.isRequired,cancel:i().string,confirm:i().string,params:i().object,onCancel:i().func,onConfirm:i().func.isRequired},u.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}}},69569:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r,i=n(71171),a=n(33518);const o={success:"#3ab39d",error:"#D0021B"},l="10px",s=a.Z.div(r||(r=(0,i.Z)(["\n display: inline-block;\n min-width: ",";\n min-height: ",";\n background: ",";\n border-radius: 100%;\n"])),(e=>e.size||l),(e=>e.size||l),(e=>o[e.color]||e.color||o.success))},22228:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55898),i=n.n(r),a=n(19778),o=n(96266);function l(e){let{children:t,style:n,...r}=e;return(0,o.jsx)(a.Z,{style:n,...r,children:t})}l.propTypes={children:i().any.isRequired,style:i().object},l.defaultProps={style:{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5396],{39565:(e,i,l)=>{l.d(i,{Z:()=>p});var s=l(5057),t=l(22256),h=l(55898),c=l(37541),a=l(7278),o=l(67680),n=l(29042),d=l(96266),r=function(e){return(0,d.jsxs)("svg",{...e,children:[(0,d.jsxs)("g",{filter:"url(#a)",children:[(0,d.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,d.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,d.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,d.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,d.jsxs)("g",{mask:"url(#b)",children:[(0,d.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,d.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,d.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,d.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,d.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,d.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,d.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,d.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,d.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,d.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,d.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,d.jsxs)("defs",{children:[(0,d.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,d.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,d.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,d.jsx)("feOffset",{dy:"2"}),(0,d.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,d.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,d.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,d.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,d.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,d.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,d.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,d.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{stopColor:"#101010"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,d.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,d.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{stopColor:"#fff"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,d.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,d.jsx)("stop",{stopColor:"#016BED"}),(0,d.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,d.jsx)("clipPath",{id:"g",children:(0,d.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,d.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um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/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};function A(e){let{src:i,alt:l}=e;const[h,A]=(0,s.useState)(!1),[p,g]=(0,s.useState)(!1),v=()=>g(!0),f=()=>g(!1);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t.Z,{ready:h,customPlaceholder:(0,d.jsx)("img",{style:{cursor:"pointer"},alt:l,src:i,width:"58px",height:"58px",onError:()=>A(!0),onClick:v}),children:(0,d.jsx)(r,{style:{cursor:"pointer",width:"58px",height:"58px"},onClick:v})}),(0,d.jsx)(c.Z,{open:p,onClose:f,"aria-labelledby":"preview-space-nft-display","aria-describedby":"preview space nft display",fullWidth:!0,maxWidth:"md",children:(0,d.jsxs)(a.Z,{style:{padding:"8px 8px",backgroundColor:"rgba(0,0,0,0.8)"},children:[(0,d.jsx)(o.Z,{color:"inherit",onClick:f,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:(0,d.jsx)(n.Z,{})}),h?(0,d.jsx)(r,{style:{width:"100%",height:"75vh"}}):(0,d.jsx)("img",{src:i,alt:"",style:{width:"100%",height:"75vh",objectFit:"contain"}})]})})]})}r.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"},A.propTypes={src:h.string.isRequired,alt:h.string.isRequired};const p=A},56277:(e,i,l)=>{l.d(i,{Z:()=>t});var s=l(38242);const t=function(e){var i,l,t;let{blocklet:h}=e;const{appDid:c}=h,a=(0,s.getAppName)(h),o=(0,s.getAppDescription)(h),n=null===h||void 0===h||null===(i=h.site)||void 0===i||null===(l=i.domainAliases)||void 0===l||null===(t=l.sort(((e,i)=>e.accessibility.accessible&&i.accessibility.accessible?+e.isProtected-+i.isProtected:+i.accessibility.accessible-+e.accessibility.accessible)))||void 0===t?void 0:t.map((e=>{var i;const l=null!==e&&void 0!==e&&null!==(i=e.domainStatus)&&void 0!==i&&i.isHttps?"https://":"http://",s=null===e||void 0===e?void 0:e.value;return"".concat(l).concat(s)})).filter(Boolean),d=null===n||void 0===n?void 0:n[0];return{appDid:c,appName:a,appDescription:o,appUrl:d,scopes:"list:object read:object write:object",referrer:window.location.href,isReady:Boolean(d)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ne});var a=n(71171),i=n(5057),o=n(33518),l=n(85493),s=n(15849),r=n(68420),c=n(11750),d=n(39434),u=n(39948),p=n(10697),m=n(94464),v=n(88574),h=n(28726),g=n(38242),b=n(81010),f=n(87363),y=(n(68534),n(86229)),x=n(1722),k=n(35432),w=n(49983),P=n(58238),j=n(29054),B=n(73545),S=n(14491),E=n(4651),L=n(96266);const Z=e=>{const t={};let n=null;return(0,g.forEachBlockletSync)(e,(e=>{t[e.meta.bundleDid]?n=(0,g.getDisplayName)(e,!0):e.meta.bundleDid&&(t[e.meta.bundleDid]=!0)})),n},_=(e,t,n)=>{const{hostname:a,href:i}=e;if(!t)return i;if(n){var o;const e=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(a);if(!e)return i;const n=e[0],l=(((null===(o=t.site)||void 0===o?void 0:o.domainAliases)||[]).map((e=>e.value)).filter(Boolean).find((e=>e.endsWith(k.DEFAULT_DID_DOMAIN)))||"").replace(".".concat(k.DEFAULT_DID_DOMAIN),"");return l?i.replace(a,"".concat(l,"-").concat(n,".").concat(k.DEFAULT_IP_DOMAIN_SUFFIX)):i}return i.replace(t.meta.bundleDid,t.appPid)};function D(){const{t:e}=(0,r.PE)(),{api:t}=(0,B.T)(),{blocklet:n}=(0,j.y0)(),{inService:a}=(0,P.h6)(),[o,l]=(0,i.useState)(!1),[s,c]=(0,i.useState)(5),d=n&&n.structVersion!==k.APP_STRUCT_VERSION;return[d&&(0,L.jsxs)(v.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,L.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,L.jsx)(h.Z,{variant:"contained",size:"small",color:"primary",onClick:()=>(()=>{try{if("running"===n.status)return void y.Z.error(e("blocklet.migrate.tip.running"));const t=Z(n);if(t)return void y.Z.error(e("blocklet.migrate.tip.duplicate",{name:t}));l(!0)}catch(t){y.Z.error((0,S.Z)(t))}})(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,L.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((t=>(0,L.jsx)(u.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(t))},t)))]},"alert"),n&&(0,L.jsx)(w.Z,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:3e5,onSuccess:()=>{const e=_(window.location,n,a);setTimeout((()=>{window.location.href=e}),5e3),c(5),setInterval((()=>{c((e=>e-1))}),1e3)},extraParams:{appDid:n.appDid,did:n.meta.did,wt:(0,E.iK)(n,!0),title:(0,g.getDisplayName)(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:()=>l(!1)},"connect")]}D.propTypes={};var C,N=n(35966),A=n(43019),G=n(44846),T=n(78123),I=n(75793),O=n(17022),U=n(13671),K=n(74094),z=n(7199);const R=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(2435),n.e(4549)]).then(n.bind(n,64549)))),F=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(6547),n.e(5760),n.e(506),n.e(7150),n.e(2443),n.e(4509),n.e(6230)]).then(n.bind(n,64558)))),M=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4631),n.e(6547),n.e(506),n.e(2443),n.e(1294),n.e(7706),n.e(4775)]).then(n.bind(n,14775)))),V=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(442),n.e(9662),n.e(7676),n.e(8986)]).then(n.bind(n,13239)))),Y=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(7687),n.e(1185),n.e(5979),n.e(2537)]).then(n.bind(n,75979)))),$=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(6547),n.e(5760),n.e(1494),n.e(5672),n.e(3216)]).then(n.bind(n,75672)))),W=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(4901),n.e(1685),n.e(5555)]).then(n.bind(n,85555)))),X=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(2911),n.e(4901),n.e(442),n.e(5526),n.e(7687),n.e(7638),n.e(1685),n.e(7657),n.e(3135),n.e(4240),n.e(5396),n.e(4930)]).then(n.bind(n,54930)))),J=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(9327),n.e(8219)]).then(n.bind(n,92379)))),Q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(6547),n.e(5760),n.e(7534)]).then(n.bind(n,87534)))),q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4901),n.e(3896),n.e(2611)]).then(n.bind(n,42611)))),H=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(95),n.e(6547),n.e(5760),n.e(4240),n.e(5396),n.e(9552)]).then(n.bind(n,39552)))),ee=e=>{let{children:t}=e;return t};function te(){var e;const t=(0,l.useNavigate)(),{tab:n="overview"}=(0,l.useParams)(),{did:a,blocklet:o,error:w,client:P,actions:{setBlocklet:j,refreshBlocklet:B}}=(0,U.y0)(),{refresh:S}=(0,I.h6)(),{t:E}=(0,r.PE)(),Z=(0,i.useCallback)((()=>(0,L.jsx)(V,{scope:a})),[a]),_=(null===o||void 0===o||null===(e=o.environments.find((e=>"BLOCKLET_APP_URL"===e.key)))||void 0===e?void 0:e.value)||window.location.origin,C=e=>(0,K.bV)(e,_),A=e=>{t("/blocklets/".concat(a,"/").concat(e))},te=e=>{e&&j(e),B()},ne=!o||(0,K.wS)(o.status)?[]:(0,g.getAppMissingConfigs)(o);let ie=null;const oe=[{label:E("common.overview"),value:"overview"},{breadcrumbsLabel:E("common.components"),label:(0,L.jsx)(p.Z,{color:"error",variant:"dot",invisible:!ne.length,children:E("common.components")}),value:"components"}];if(w)ie=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(v.Z,{type:"error",variant:"icon",children:(0,K.Z)(w)}),(0,L.jsx)(h.Z,{onClick:()=>B(),children:(0,L.jsx)("span",{style:{textDecoration:"underline"},children:E("common.retry")})})]});else if(o){var le;const e={overview:(0,L.jsx)(R,{}),configuration:F,navigation:M,services:W,members:(0,L.jsx)($,{type:"blocklet",createPassportSvg:C}),passports:Y,components:X,"audit-logs":Z,logs:J,runtime:(0,L.jsx)(Q,{}),traffic:(0,L.jsx)(q,{client:P,did:a}),storage:(0,L.jsx)(H,{})};"configuration"===n&&(0,K.wS)(o.status)&&A("overview"),(0,K.wS)(o.status)||(oe.push({label:E("common.members"),value:"members"}),oe.push({label:E("common.passport"),value:"passports"}),oe.push({label:E("common.configuration"),value:"configuration"})),oe.push({label:E("common.auditLogs"),value:"audit-logs"}),o&&null!==(le=o.children)&&void 0!==le&&le.length&&o.structVersion===k.APP_STRUCT_VERSION&&oe.push({label:E("common.logs"),value:"logs"}),oe.push({label:E("common.configNavigation"),value:"navigation"}),oe.push({label:E("common.runtime"),value:"runtime"}),oe.push({label:E("common.traffic"),value:"traffic"}),oe.push({label:E("common.storage"),value:"storage"});(0,g.getBlockletServices)(o).length&&oe.splice(2,0,{label:E("blocklet.services"),value:"services"});const t=e[n]||e.overview;ie=(0,L.jsxs)(f.g,{type:"components",children:[!(0,g.isExternalBlocklet)(o)&&(0,L.jsx)(m.Z,{tabs:oe,current:n,onChange:A,scrollButtons:"auto"}),(0,L.jsx)("div",{className:"page-content",children:(0,L.jsx)(i.Suspense,{fallback:(0,L.jsx)(N.Z,{relative:"parent",children:(0,L.jsx)(G.Z,{})}),children:(0,i.isValidElement)(t)?t:(0,L.jsx)(t,{blocklet:o,onUpdate:te,createPassportSvg:C})})})]})}else ie=(0,L.jsx)(N.Z,{relative:"parent",children:(0,L.jsx)(G.Z,{})});const se=oe.find((e=>e.value===n)),re=o?O.G6:ee;return(0,L.jsx)(re,{teamDid:a,children:(0,L.jsxs)(ae,{children:[(0,L.jsxs)(d.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,L.jsx)(s.Link,{color:"textSecondary",to:"/blocklets",children:E("common.blocklets")}),(0,L.jsx)(s.NavLink,{to:"/blocklets/".concat(a,"/overview"),style:e=>e?{color:"inherit"}:{},children:E("common.detail")}),(0,L.jsx)(c.Z,{color:"textSecondary",children:se?se.breadcrumbsLabel||se.label:""})]}),(0,L.jsxs)(c.Z,{component:"div",className:"page-header",children:[(0,L.jsxs)(c.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[o?(0,L.jsx)(x.Z,{blocklet:o,style:{marginRight:16}}):null,o?(0,L.jsxs)(u.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[(0,L.jsx)(u.Z,{children:(0,g.getDisplayName)(o)}),"unknown"!==(null===o||void 0===o?void 0:o.status)&&(0,L.jsx)(b.Z,{size:"12px",status:o.status,source:o.source})]}):"".concat(E("common.blocklet")," ").concat(E("common.detail"))]}),(0,L.jsx)(z.Z,{permission:"mutate_blocklets",children:!!o&&!(0,g.isExternalBlocklet)(o)&&(0,L.jsx)(T.Z,{className:"page-actions",blocklet:o,onStart:()=>{},onComplete:e=>{let{action:n,error:a}=e;a?y.Z.error(a.message):"remove"===n?(S(),t("/blocklets")):B()},variant:"group"})})]}),(0,L.jsx)(D,{}),ie]})})}function ne(){const{did:e}=(0,l.useParams)();return e?(0,L.jsx)(U.$8,{did:e,children:(0,L.jsx)(A.wV,{children:(0,L.jsx)(te,{})})}):null}const ae=o.Z.main(C||(C=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\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: 16px;\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"])),(e=>e.theme.breakpoints.values.md))},43019:(e,t,n)=>{n.d(t,{wV:()=>w,XN:()=>P});var a=n(5057),i=n(55898),o=n.n(i),l=n(86229),s=n(68420),r=n(77277),c=n(29054),d=n(84584),u=n(41899),p=n(58238),m=n(65873);var v=n(14491);function h(){var e;let{setLoading:t,refresh:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blocklet:i,actions:{refreshBlocklet:o}}=(0,c.y0)(),s=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,[r,h]=(0,a.useState)([]),{api:g}=(0,p.h6)();return(0,u.Z)((async()=>{try{if(!s)return void h([]);null===t||void 0===t||t(!0);const{spaceGateways:e}=await g.getBlockletSpaceGateways({input:{did:s}}),n=await async function(e){let{blockletDid:t,nodeApi:n,spaceGateways:a}=e,i=!1;const o=await Promise.all(a.map((async e=>{let{name:t}=e;const n=await(0,d.nU)(e.endpoint);return(0,m.isEmpty)(n)||n===t||(t=n,i=!0),{...e,name:t}})));return i&&await Promise.all(o.filter((e=>e.did)).map((e=>n.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:{...e}}})))),o}({blockletDid:s,nodeApi:g,spaceGateways:e});h(null!==n&&void 0!==n?n:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{null===t||void 0===t||t(!1)}}),[s,o,n]),{spaceGateways:r}}function g(){var e;let{deps:t,setLoading:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:()=>{}};const{blocklet:i}=(0,c.y0)(),[o,s]=(0,a.useState)([]),{api:r}=(0,p.h6)(),d=(0,m.debounce)((async()=>{try{if(n(!0),!i)return void s([]);const{backups:e}=await r.getBlockletBackups({input:{did:i.meta.did}});s(null!==e&&void 0!==e?e:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{n(!1)}}),2e3);return(0,u.Z)((async()=>{d()}),[null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did].concat(t)),{backups:o}}const b=function(e){let{appDid:t}=e;const{backups:n}=g(),[i,o]=(0,a.useState)({message:"",progress:0,completed:!1}),l=(0,p.h6)(),{ws:{useSubscription:s}}=l;return s(r.BlockletEvents.backupProgress,(e=>{t===(null===e||void 0===e?void 0:e.appDid)&&o((()=>({...e})))}),[t]),(0,a.useEffect)((()=>{var e;if(null!==n&&void 0!==n&&n.length&&(0,m.isNull)(null===(e=n[0])||void 0===e?void 0:e.status)){const[e]=n;o((()=>({message:e.message,progress:e.progress,completed:Boolean(e.progress>=100)})))}}),[n]),i};var f=n(96266);const y=(0,a.createContext)({}),{Provider:x,Consumer:k}=y;function w(e){let{children:t}=e;const{t:n}=(0,s.PE)(),{api:i}=(0,p.h6)(),{blocklet:o}=(0,c.y0)(),[m,v]=(0,a.useState)(!1),[y,k]=(0,a.useState)(!1),{spaceGateways:w}=h({refresh:y,setLoading:v}),P=b({appDid:null===o||void 0===o?void 0:o.appDid}),[j,B]=(0,a.useState)(!1),S=(0,a.useMemo)((()=>(0,d.mo)(null===o||void 0===o?void 0:o.environments)),[o,y,j]),[E,L]=(0,a.useState)(!1),{backups:Z}=g({deps:[P],setLoading:L}),[_,D]=(0,a.useState)(null===w||void 0===w?void 0:w.find((e=>e.endpoint===S))),[C,N]=(0,a.useState)(!1),A=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,c.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoBackup:e}=await i.getAutoBackup({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[C]}),G=()=>{k((e=>!e))};return(0,f.jsx)(x,{value:{spaceGateways:w,selectedSpaceGateway:_,addSpaceGateway:async(e,t)=>{w.push({...e,loading:!0}),await i.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:e}}),S!==t&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:r.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}}),G(),D(e)},deleteSpaceGateway:async e=>{e&&(e.endpoint!==S?(await i.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:null===e||void 0===e?void 0:e.did}}),G(),D(e)):l.Z.warning(n("storage.spaces.gateway.delete.failedForConnected")))},updateSpaceGateway:async e=>{var t;await i.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:e.did},spaceGateway:e}}),S!==e.endpoint&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:r.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:e.endpoint}]}}),l.Z.success(n("storage.spaces.connectedWithName",{name:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"DID Spaces"})),G()},refreshSpaceGateways:G,spaceGatewaysLoading:m,spaceGatewayIsSelected:e=>(null===e||void 0===e?void 0:e.endpoint)===S,updateAutoBackup:async e=>{await i.updateAutoBackup({input:{did:o.meta.did,autoBackup:e}}),N((e=>!e))},backupEndpoint:S,backupProgress:P,backups:Z,backupsLoading:E,refreshBackupEndpoint:()=>{B((e=>!e))},autoBackup:A},children:t})}function P(){return(0,a.useContext)(y)}w.propTypes={children:o().any.isRequired},w.defaultProps={}},60344:(e,t,n)=>{n.d(t,{hi:()=>o,od:()=>i.a});var a=n(10458),i=n.n(a);i().defaults.timeout=1e4;const o=i().create()},84584:(e,t,n)=>{n.d(t,{EJ:()=>f,Jf:()=>b,LQ:()=>u,Nb:()=>p,UV:()=>y,Xv:()=>c,Z3:()=>x,ag:()=>v,mo:()=>m,nD:()=>d,nU:()=>g,w2:()=>h});var a=n(82434),i=n.n(a),o=n(77277),l=n(65873),s=n(2842),r=n(60344);function c(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/"),a=n.at(-4),i=n.at(-2);return(0,s.xn)(t,"space",a,"apps",i,"explorer?key=/apps/".concat(i,"/.did-objects/").concat(i,"/"))}function d(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",n)}function u(e){return e.replace(/\/$/,"").split("/").at(-4)}async function p(e){try{if(!i()(e))return!1;const{headers:t}=await r.hi.head(e,{timeout:5e3});return"true"===t["x-listable"]&&"true"===t["x-readable"]&&"true"===t["x-writeable"]}catch(t){return console.error(t),!1}}function m(e){var t;return(null===e||void 0===e||null===(t=e.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)))||void 0===t?void 0:t.value)||""}function v(e){const t=new URL(e);return(0,s.xn)(t.origin,t.pathname)}async function h(e){try{if(!i()(e))return!1;const t=v(e),n=(0,s.xn)(t,"space/api/did/one-click-authorization/token"),{status:a,data:o}=await r.hi.get(n,{timeout:5e3});return 200===a&&(0,l.isObject)(o)}catch(t){return console.error(t),!1}}async function g(e){let{timeout:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e3};try{if(!i()(e))return"";const{headers:n}=await r.hi.head(e,{timeout:t}),a=n["x-space-name"];return a?decodeURIComponent(a):""}catch(n){return console.error(n),""}}function b(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(n))}const f=e=>{var t,n;return(null===e||void 0===e||null===(t=e.configs)||void 0===t||null===(n=t.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)))||void 0===n?void 0:n.value)||null};async function y(e){const t={};return t.did=u(e),t.name=await g(e),t.url=function(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}(e),t.endpoint=e,t}async function x(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e4,withSearchParams:!0};if(!(0,l.isString)(e))throw new Error("url(".concat(e,") must be a string"));const a=e.startsWith("http")?e:"https://".concat(e),i=new URL(a),{data:o}=await r.hi.get((0,s.xn)(i.origin,"/__blocklet__.js?type=json"),{timeout:n.timeout}),c=null===(t=o.componentMountPoints.findLast((e=>"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did)))||void 0===t?void 0:t.mountPoint;if(!c)throw new Error("MountPoint(".concat(c,") not found"));const d=(0,s.xn)(i.origin,c);return n.withSearchParams&&i.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(i.searchParams.get("spaceDid"))):d}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7022],{13671:(e,t,i)=>{"use strict";i.d(t,{$8:()=>A,y0:()=>L});var n=i(5057),o=i(68420),s=i(36991),a=i(14491),r=i(29054),l=i(40807),d=i.n(l),c=i(24914),u=i.n(c),m=i(77277),v=i(86229),p=i(4651),f=i(6352),h=i.n(f),g=i(32243),E=i.n(g),k=i(35432),D=i(49714),S=i(41365),b=i.n(S);const y=E()((e=>{const{origin:t,hostname:i}=new URL(e);return i===window.location.hostname||b()(h()(t,k.WELLKNOWN_PING_PREFIX))})),C={};function R(e){let{urls:t,checkAccessible:i=b(),disableCache:o=!1}=e;const s=(0,n.useRef)(t.filter((e=>C[e])).map((e=>C[e]))),a=s.current.length===t.length,[r,l]=(0,n.useState)(a?s.current:[]),[d,c]=(0,n.useState)(!a),u=(0,n.useMemo)((()=>!d&&r.length?r[0]:null),[r,d]);return(0,n.useEffect)((()=>{if((null===t||void 0===t?void 0:t.length)>0&&!a){(async()=>{let e;if(c(!0),o)e=await(0,D.evaluateURLs)(t,{checkAccessible:i}),e.forEach((e=>{C[e.url]=e}));else{(await(0,D.evaluateURLs)(t.filter((e=>!C[e])),{checkAccessible:i})).forEach((e=>{C[e.url]=e})),e=t.map((e=>C[e])).sort(((e,t)=>t.score-e.score))}l(e),c(!1)})()}}),[t,o,a]),{urlsState:r,loading:d,recommendedUrlState:u,recommendedUrl:null===u||void 0===u?void 0:u.url}}function B(e){var t,i,o,s,r,l,c,f;let{did:h,client:g,useSubscription:E,getIP:k,useLocaleContext:D,disableSubscription:S}=e;const{t:b,locale:C}=D(),[B,P]=(0,n.useState)(null),[w,N]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[x,A]=(0,n.useState)(),[L,T]=(0,n.useState)({cpu:[],memory:[]}),[_,O]=(0,n.useState)({}),F=null!==x&&void 0!==x&&null!==(t=x.site)&&void 0!==t&&null!==(i=t.domainAliases)&&void 0!==i&&i.length?JSON.stringify(x.site.domainAliases.map((e=>e.value))):"",H=(0,n.useMemo)((()=>{var e;return((null===x||void 0===x||null===(e=x.site)||void 0===e?void 0:e.domainAliases)||[]).map((e=>e.value))}),[F]),{domainsAccessibility:G,recommendedDomain:K}=function(e){const t=(0,n.useMemo)((()=>e.map((e=>(0,a.Sk)(e)))),[e]),{urlsState:i,loading:o,recommendedUrl:s}=R({urls:t,checkAccessible:y});let r;if(o)r={domainsAccessibility:e.reduce(((e,t)=>({...e,[t]:{loading:!0}})),{}),recommendedDomain:null};else{var l;const e=i.reduce(((e,t)=>{const i=new URL(t.url).hostname;return e[i]={...t,domain:i},e}),{}),t=(null===(l=i.find((e=>e.accessible)))||void 0===l?void 0:l.url)||s;r={domainsAccessibility:e,recommendedDomain:t?new URL(t).hostname:null}}return r}(H),Z=async function(){let{showError:e=!0,attachRuntimeInfo:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!w)try{N(!0),P(null);const{blocklet:e}=await g.getBlocklet({input:{did:h}});if(!e)throw new Error(b("blocklet.notFound"));A((t=>((0,p.Gv)(e,{fixRuntime:"merge-old",oldBlocklet:t}),e))),N(!1),t&&((async()=>{U(!0);try{const{blocklet:e}=await g.getBlocklet({input:{did:h,attachRuntimeInfo:!0}});await(0,p.Gv)(e,{getIP:k}),A(e)}catch(e){v.Z.error(e.message)}finally{U(!1)}})(),(async()=>{try{const e=await g.getBlockletRuntimeHistory({input:{did:h,hours:6}});e&&T({cpu:e.history.map((e=>({date:e.date,value:e.cpu}))),memory:e.history.map((e=>({date:e.date,value:e.mem})))})}catch(e){v.Z.error(e.message)}})())}catch(i){N(!1),P(i),e&&v.Z.error(i.message)}},M=e=>{var t;(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.did)===x.meta.did&&Z({showError:!1})},V=e=>{var t;(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.did)===x.meta.did&&Z({attachRuntimeInfo:!1,showError:!1})},j=()=>{h&&F&&g.checkDomains({input:{did:h}}).catch((e=>{console.error(e)}))};(0,n.useEffect)((()=>{F&&!S&&j()}),[F,S]),E(m.BlockletEvents.domainStatus,(e=>{O((t=>({...t,[e.domain]:{...t[e.domain],...e}})))}),[null===x||void 0===x||null===(o=x.meta)||void 0===o?void 0:o.did,!S]),E(m.BlockletEvents.statusChange,(e=>{var t;(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.did)===x.meta.did&&(A((t=>{const i={...t};return i.status=(0,m.fromBlockletStatus)(e.status),(i.children||[]).forEach((t=>{const i=e.children.find((e=>{var i,n;return(null===(i=e.meta)||void 0===i?void 0:i.did)===(null===(n=t.meta)||void 0===n?void 0:n.did)}));i&&(t.status=(0,m.fromBlockletStatus)(i.status))})),i})),V(e))}),[null===x||void 0===x||null===(s=x.meta)||void 0===s?void 0:s.did,!S]),E(m.BlockletEvents.storeChange,V,[null===x||void 0===x||null===(r=x.meta)||void 0===r?void 0:r.did,!S]),E(m.BlockletEvents.installed,M,[null===x||void 0===x||null===(l=x.meta)||void 0===l?void 0:l.did,!S]),E(m.BlockletEvents.upgraded,M,[null===x||void 0===x||null===(c=x.meta)||void 0===c?void 0:c.did,!S]),E(m.BlockletEvents.updated,M,[null===x||void 0===x||null===(f=x.meta)||void 0===f?void 0:f.did,!S]);const q=x?d()(x,{site:{domainAliases:x.site.domainAliases.map((e=>{const t=e.value,i=(0,a.H$)(t);return e.domainStatus=u()(_[i],["domain","meta"]),e.accessibility=u()(G[t],["domain"]),e.href=(0,a.vH)({blocklet:x,domain:e,params:(0,a.f0)(x,C)}),e}))}}):null;return{loading:w,loadingRuntimeInfo:I,error:B,blocklet:q,runtimeHistory:L,recommendedDomain:K||"",actions:{refreshBlocklet:Z,refreshDomainStatus:j,setBlocklet:A,configNavigations:async e=>{const{blocklet:t}=await g.configNavigations({input:{did:h,navigations:e}});A(t)}}}}var P=i(38242),w=i(75793),N=i(33234),I=i(96266);const{Provider:U,Consumer:x}=r.BlockletContext;function A(e){let{did:t,children:i}=e;const{api:r,ws:{useSubscription:l}}=(0,w.h6)(),[d,c]=(0,n.useState)(),{loading:u,loadingRuntimeInfo:m,error:v,blocklet:p,recommendedDomain:f,runtimeHistory:h,actions:{refreshBlocklet:g,refreshDomainStatus:E,setBlocklet:k,configNavigations:D}}=B({did:t,client:r,useSubscription:l,getIP:N.Z,useLocaleContext:o.PE});(0,n.useEffect)((()=>{g()}),[t]),(0,n.useEffect)((()=>{if(!p||null===p||void 0===p||!p.controller)return;const{controller:e}=p;(0,a.Nh)(e.chainHost,e.nftId).then((e=>{e.expirationDate=(0,s.getNftExpirationDate)(e),e.expired=(0,s.isNFTExpired)(e),c(e)})).catch((e=>console.error(e)))}),[null===p||void 0===p?void 0:p.appPid]);const S={did:t,client:r,loading:u,loadingRuntimeInfo:m,error:v,blocklet:p,recommendedDomain:f,runtimeHistory:h,nftState:d,appIdList:p?(0,P.getBlockletAppIdList)(p):[],actions:{refreshBlocklet:g,refreshDomainStatus:E,setBlocklet:k,configNavigations:D}};return(0,I.jsx)(U,{value:S,children:i})}function L(){return(0,n.useContext)(r.BlockletContext)}},17022:(e,t,i)=>{"use strict";i.d(t,{G6:()=>C});var n=i(5057),o=i(35432),s=i(77277),a=i(38242),r=i(86229),l=i(14491),d=i(17425),c=i(4651),u=i(68420),m=i(75793),v=i(13671),p=i(34937),f=i(96266);const{Provider:h,Consumer:g}=d.TeamContext,E=(e,t,i)=>e===t.did?t.name:i?(0,a.getDisplayName)(i):"",k=(e,t,i)=>{if(i){const e=i.environments.find((e=>e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR));return e?e.value:"auto"}return"default"},D=(e,t,i)=>e===t.did?t.trustedPassports||[]:i&&i.trustedPassports||[],S=(e,t,i)=>e===t.did?t.trustedFactories||[]:i&&i.trustedFactories||[],b=(e,t,i)=>{if(e===t.did)return e;if(i){return((i.environments||[]).find((e=>"BLOCKLET_APP_ID"===e.key))||{}).value||""}return""},y=(e,t,i)=>e===t.did?!1!==t.enablePassportIssuance:!i||!1!==i.enablePassportIssuance;function C(e){let{teamDid:t,children:i}=e;const{t:s,locale:a}=(0,u.PE)(),{api:d,info:g}=(0,m.h6)(),{recommendedDomain:C,blocklet:R}=(0,v.y0)()||{},[B,P]=(0,n.useState)([]),[w,N]=(0,n.useState)([]),[I,U]=(0,n.useState)([]),x=E(t,g,R),A=k(t,g,R),L=D(t,g,R),T=S(t,g,R),_=b(t,g,R),O=y(t,g,R),F=async e=>{try{const t=await d.doBatchQuery({getRoles:{input:{teamDid:e}},getPermissions:{input:{teamDid:e}},getInvitations:{input:{teamDid:e}}});N((t.getRoles.roles||[]).filter((e=>!o.RBAC_CONFIG.roles.some((t=>t.name===e.name&&(!t.passport||t.noHuman))))).map((e=>(e.hasDescription=!!e.description,e.hasDescription||(e.description=s("team.passport.description",{teamName:x,title:e.title})),e)))),U(t.getPermissions.permissions||[]),P(t.getInvitations.invitations||[])}catch(t){r.Z.error(t.message)}};(0,n.useEffect)((()=>{F(t)}),[t]),(0,n.useEffect)((()=>{N((e=>e.map((e=>(e.hasDescription||(e.description=s("team.passport.description",{teamName:x,title:e.title})),{...e})))))}),[s,a]);const H=e=>{e.teamDid===t&&F(t)};(0,p.mU)(o.EVENTS.USER_ADDED,H,[t]),(0,p.mU)(o.EVENTS.USER_REMOVED,H,[t]),(0,p.mU)(o.EVENTS.USER_UPDATED,H,[t]);const G={teamDid:t,teamIssuerDid:_,teamName:x,invitations:B,roles:w,permissions:I,trustedPassports:L,trustedFactories:T,isNodeTeam:t===g.did,enablePassportIssuance:O,refresh:()=>F(t),passportColor:A,endpoint:t===g.did?(0,c.RU)(g):(0,l.Sk)(C),blocklet:R,api:{getUser:function(){let{did:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={teamDid:t,user:{did:e}};return d.getUser({input:i})},getUsers:function(){let{query:e,paging:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n={teamDid:t};return i&&(n.paging=i),e&&(n.query=e),n.sort={lastLoginAt:-1},d.getUsers({input:n})},getUsersCountPerRole:()=>d.getUsersCountPerRole({input:{teamDid:t}})}};return(0,f.jsx)(h,{value:G,children:i})}C.defaultProps={}},36991:(e,t,i)=>{const n=i(59408),o=i(43681),s=e=>n(o(e,"data.value.expirationDate",[]));e.exports={isNFTExpired:e=>(e=>!!e&&new Date(e).getTime()<=Date.now())(s(e)),getNftExpirationDate:s,isNFTConsumed:e=>!!e.data.value.consumedTime}},17425:(e,t,i)=>{"use strict";i.d(t,{DJ:()=>r,TeamContext:()=>o});var n=i(5057);const o=(0,n.createContext)({}),{Provider:s,Consumer:a}=o;function r(){return(0,n.useContext)(o)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9552],{44784:(e,n,t)=>{t.d(n,{Z:()=>d});var o,a=t(71171),s=t(33518),i=t(82790),r=t(96266);function l(e){let{labelProps:n,className:t,style:o,...a}=e;const s={...n,labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"};return(0,r.jsx)(c,{className:t,style:o,children:(0,r.jsx)(i.Z,{labelProps:s,...a})})}l.propTypes=i.Z.propTypes,l.defaultProps=i.Z.defaultProps;const c=s.Z.div(o||(o=(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"])),(e=>{let{theme:n}=e;return n.breakpoints.down("sm")})),d=l},39552:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Ee});var o=t(5057),a=t(39948),s=t(11750),i=t(68420),r=t(29054),l=t(44846),c=t(55372),d=t(47020),p=t(28726),h=t(49983),m=t(6352),u=t.n(m),x=t(86229),g=t(17682),f=t(13128),y=t(88574),v=t(35432),j=t(60344),Z=t(14491),b=t(58238),A=t(56277),S=t(84584),k=t(43019),C=t(96266);function w(e){let{...n}=e;const{blocklet:t}=(0,r.y0)(),{info:m}=(0,b.h6)(),{t:w,locale:B}=(0,i.PE)(),[I,D]=(0,o.useState)(""),[R,z]=(0,o.useState)(!1),[U,E]=(0,o.useState)(!1),[T,M]=(0,o.useState)(""),F=(0,A.Z)({blocklet:t}),O=(0,Z.yP)(m),{spaceGateways:P,addSpaceGateway:L}=(0,k.XN)(),[N,J]=(0,o.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:u()(v.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(v.PROD_DID_SPACES.CORE_URL).origin,checkFn:j.od.create({baseURL:u()(v.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:w("storage.spaces.provideNFT.title",{appName:F.appName},B),scan:w("storage.spaces.provideNFT.scan",{appName:F.appName},B),confirm:"",success:(0,C.jsx)(s.Z,{gutterBottom:!0,children:w("storage.spaces.provideNFT.success")})},onClose:()=>{J((e=>({...e,open:!1})))}}),[G,Q]=(0,o.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:w("storage.spaces.authorize.title",{appName:F.appName},B),scan:w("storage.spaces.authorize.scan",{appName:F.appName},B),confirm:"",success:(0,C.jsx)(s.Z,{gutterBottom:!0,children:w("storage.spaces.authorize.success")})},onClose:()=>{Q((e=>({...e,open:!1})))}}),H=async(e,n)=>{try{const t=n(e.endpoint),o=e.space?n(e.space):{};await V({endpoint:t,did:(0,S.LQ)(t),name:"DID Space",...o}),Q((e=>({...e,open:!1}))),D(null),J((e=>({...e,open:!1})))}catch(t){console.error(t),x.Z.error((0,Z.Z)(t))}},V=async e=>{var n;let{endpoint:t,name:o,did:a}=e;const s=await(0,S.Z3)(t);if(!await(0,S.w2)(s))return void x.Z.error(w("storage.spaces.gateway.add.invalidUrl"));if(P.some((e=>e.endpoint===t)))return void x.Z.error(w("storage.spaces.gateway.add.duplicate",{name:o}));const i={name:o,did:a,url:s,endpoint:t};await L(i,t),x.Z.success(w("storage.spaces.connectedWithName",{name:null!==(n=null===i||void 0===i?void 0:i.name)&&void 0!==n?n:"DID Spaces"}))},X=async()=>{try{z(!0);const e=await(0,S.Z3)(I),n=(0,S.ag)(e),t=new URL(e).searchParams.get("spaceDid");if(!await(0,S.w2)(n))throw new Error(w("storage.spaces.gateway.add.invalidUrl"));Q((e=>({...e,open:!0,prefix:u()(n,"space/api/did"),baseUrl:new URL(n).origin,checkFn:j.od.create({baseURL:u()(n,"space")}).get,extraParams:{appDid:F.appDid,appName:F.appName,appDescription:F.appDescription,scopes:F.scopes,appUrl:F.appUrl,referrer:F.referrer,nodeDid:m.did,spaceDid:t}}))),E(!1)}catch(e){const n="".concat(w("storage.spaces.gateway.add.failed",B),": ").concat((0,Z.Z)(e));M(n)}finally{z(!1)}};return(0,C.jsxs)(a.Z,{children:[(0,C.jsx)(g.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:()=>{J((e=>({...e,open:!0,extraParams:{appDid:F.appDid,appName:F.appName,appDescription:F.appDescription,scopes:F.scopes,appUrl:F.appUrl,referrer:F.referrer,nodeDid:m.did}})))},menu:[(0,C.jsx)(g.Z.Item,{sx:{textTransform:"none"},onClick:()=>E(!0),size:"small",...n,children:w("storage.spaces.connect.useSpaceGateway")},"1")],children:(0,C.jsx)(s.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:w("storage.spaces.connect.useWallet")})}),(0,C.jsx)(h.Z,{forceConnected:!1,saveConnect:!1,prefix:N.prefix,open:N.open,popup:!0,action:N.action,webWalletUrl:O,baseUrl:N.baseUrl,checkFn:N.checkFn,onSuccess:H,onClose:N.onClose,checkTimeout:N.checkTimeout,extraParams:N.extraParams,messages:N.messages,locale:B}),(0,C.jsx)(h.Z,{forceConnected:!1,saveConnect:!1,prefix:G.prefix,open:G.open,popup:!0,action:G.action,baseUrl:G.baseUrl,checkFn:G.checkFn,onSuccess:H,onClose:G.onClose,checkTimeout:G.checkTimeout,extraParams:G.extraParams,messages:G.messages,locale:B}),(0,C.jsxs)(f.ZP,{title:w("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:U,onClose:()=>E(!1),PaperProps:{style:{minHeight:"auto"}},actions:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(p.Z,{onClick:e=>{e.stopPropagation(),E(!1)},color:"inherit",children:w("common.cancel")}),(0,C.jsxs)(p.Z,{onClick:X,color:"primary",disabled:R||!I,variant:"contained",autoFocus:!0,children:[R&&(0,C.jsx)(l.Z,{size:16}),w("common.confirm")]})]}),children:[(0,C.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,C.jsx)(c.Z,{component:"div",children:(0,C.jsx)(s.Z,{component:"div",children:(0,C.jsx)(d.Z,{label:w("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:I,onChange:e=>{M(null),D(e.target.value)},disabled:R,onKeyPress:async e=>{"Enter"===e.key&&await X()},autoFocus:!0})})})}),Boolean(T)&&(0,C.jsx)(y.Z,{type:"error",style:{width:"100%"},children:T})]})]})}w.propTypes={},w.defaultProps={};const B=w;var I,D=t(71171),R=t(33518),z=t(55898),U=t.n(z),E=t(90049),T=t.n(E),M=t(38898),F=t(64886);function O(e){let{blocklet:n,...t}=e;const{t:a}=(0,o.useContext)(i.RD);if(!n.diskInfo)return(0,C.jsx)(s.Z,{children:a("blocklet.diskInfo.empty")});const r=(e,n,t)=>(0,C.jsxs)(s.Z,{children:[t?(0,C.jsx)(M.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,C.jsx)("strong",{children:n?T()(n):"empty"})]}),l=n.environments.reduce(((e,n)=>(e[n.key]=n.value,e)),{}),c=[{key:"appDir",name:a("blocklet.diskInfo.appDir"),value:r(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:a("blocklet.diskInfo.dataDir"),value:r(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:a("blocklet.diskInfo.logDir"),value:r(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:a("blocklet.diskInfo.cacheDir"),value:r(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,C.jsx)(P,{component:"div",...t,children:c.map((e=>(0,C.jsx)(F.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)))})}O.propTypes={blocklet:U().object.isRequired},O.defaultProps={};const P=(0,R.Z)(s.Z)(I||(I=(0,D.Z)([""])));var L=function(e){return(0,C.jsxs)("svg",{...e,children:[(0,C.jsxs)("g",{filter:"url(#a)",children:[(0,C.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,C.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,C.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,C.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,C.jsxs)("g",{mask:"url(#b)",children:[(0,C.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,C.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,C.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,C.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,C.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,C.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,C.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,C.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,C.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,C.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,C.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,C.jsxs)("defs",{children:[(0,C.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,C.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,C.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,C.jsx)("feOffset",{dy:"2"}),(0,C.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,C.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,C.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,C.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,C.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,C.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,C.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,C.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#101010"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,C.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,C.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#fff"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,C.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,C.jsx)("stop",{stopColor:"#016BED"}),(0,C.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,C.jsx)("clipPath",{id:"g",children:(0,C.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,C.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5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m3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};function N(){const{t:e}=(0,i.PE)(),{blocklet:n}=(0,r.y0)();return(0,C.jsxs)(a.Z,{children:[(0,C.jsxs)(a.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,C.jsx)(L,{style:{width:200,height:250}}),(0,C.jsx)(s.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,C.jsx)(B,{})]}),(0,C.jsx)(s.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,C.jsx)(O,{blocklet:n})]})}L.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"},N.propTypes={};const J=N;var G=t(72904),Q=t(19654),H=t(99154),V=t(77277),X=t(79366),K=t(65873),W=t(42876),Y=t(17450),q=t(44784),_=t(67680),$=t(61533),ee=t(74490),ne=t(46954),te=t(44067),oe=t(83294),ae=t(45396),se=t(14482),ie=t(85733),re=t(47595),le=t(60939);function ce(e){let{spaceGateway:n,onDelete:t}=e;const{t:a}=(0,i.PE)(),[s,r]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1),d=(e,n)=>{null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),r(n)};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ee.Z,{color:"red",onClick:e=>d(e,!0),children:[(0,C.jsx)(ne.Z,{style:{minWidth:24,color:"red"},children:(0,C.jsx)(re.default,{fontSize:"small"})}),(0,C.jsx)(te.Z,{style:{color:"red"},children:a("common.delete")})]}),(0,C.jsx)(le.Z,{title:a("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:s,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:l}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:l},onConfirm:async e=>{try{null===e||void 0===e||e.stopPropagation(),c(!0),await t(n),r(!1)}catch(o){console.error(o),x.Z.error("".concat(a("storage.space.gateway.delete.failed"),": ").concat((0,Z.Z)(o)))}finally{c(!1)}},onCancel:e=>d(e,!1)})]})}ce.propTypes={onDelete:U().func,spaceGateway:U().shape({name:U().string.isRequired,url:U().string.isRequired,protected:U().bool}).isRequired},ce.defaultProps={onDelete:()=>{}};const de=ce;function pe(e){let{spaceGateway:n,connected:t,onDelete:a,onConnect:s,enableSwitchToSpace:r,...c}=e;const[d,p]=(0,o.useState)(null),{t:h}=(0,i.PE)(),[m,u]=(0,o.useState)(!1),g=(e,n)=>{e.stopPropagation(),e.preventDefault(),p(n&&e.currentTarget)};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(_.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:e=>g(e,!0),size:"small",...c,children:m||null!==n&&void 0!==n&&n.loading?(0,C.jsx)(l.Z,{size:"24px"}):(0,C.jsx)(oe.Z,{})}),(0,C.jsxs)($.Z,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:Boolean(d),onClose:e=>g(e,!1),children:[(0,C.jsxs)(ee.Z,{onClick:e=>{g(e,!1),window.open(n.endpoint?(0,S.nD)(n.endpoint):n.url)},children:[(0,C.jsx)(ne.Z,{style:{minWidth:24},children:(0,C.jsx)(ae.Z,{fontSize:"small"})}),(0,C.jsx)(te.Z,{children:h("common.open")})]}),(0,C.jsxs)(ee.Z,{onClick:e=>{g(e,!1),window.open((0,S.Xv)(n.endpoint))},children:[(0,C.jsx)(ne.Z,{style:{minWidth:24},children:(0,C.jsx)(ie.Z,{fontSize:"small"})}),(0,C.jsx)(te.Z,{children:h("storage.spaces.strategy.viewBackupFiles")})]}),!t&&r&&(0,C.jsxs)(ee.Z,{onClick:async e=>{try{u(!0),g(e,!1),await s(n)}catch(t){console.error(t),x.Z.error(t.message)}finally{u(!1)}},children:[(0,C.jsx)(ne.Z,{style:{minWidth:24},children:(0,C.jsx)(se.Z,{fontSize:"small"})}),(0,C.jsx)(te.Z,{children:h("storage.spaces.connect.switchToSpace")})]}),!t&&(0,C.jsx)(de,{spaceGateway:n,onDelete:a})]})]})}pe.propTypes={spaceGateway:U().shape({name:U().string.isRequired,url:U().string.isRequired,protected:U().bool,endpoint:U().string.isRequired,loading:U().bool}).isRequired,connected:U().bool.isRequired,enableSwitchToSpace:U().bool,onDelete:U().func,onConnect:U().func},pe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0};const he=pe;var me,ue=t(54063),xe=t(39565),ge=function(e){return(0,C.jsx)("svg",{...e,children:(0,C.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};ge.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var fe=function(e){return(0,C.jsx)("svg",{...e,children:(0,C.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};function ye(e){let{spaceGateway:n,connected:t,onDelete:l,onBackupNow:c,...d}=e;const m=(0,G.Z)((e=>e.breakpoints.down("md"))),{t:g,locale:f}=(0,i.PE)(),{blocklet:y}=(0,r.y0)(),{api:v,info:{did:Z}}=(0,b.h6)(),{appDid:w,appName:B,appDescription:I,scopes:D,appUrl:R,referrer:z}=(0,A.Z)({blocklet:y}),{updateSpaceGateway:U,backupEndpoint:E,backupProgress:T,refreshBackupEndpoint:M}=(0,k.XN)(),[F,O]=(0,o.useState)(!1),[P,L]=(0,o.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:g("storage.spaces.authorize.title",{appName:B},f),scan:g("storage.spaces.authorize.scan",{appName:B},f),confirm:"",success:(0,C.jsx)(s.Z,{gutterBottom:!0,children:g("storage.spaces.authorize.success")})},onClose:()=>{L((e=>({...e,open:!1})))}}),{data:N,loading:J}=(0,X.Z)((async()=>!t||(0,S.Nb)(E)),{refreshDeps:[t,E,null===P||void 0===P?void 0:P.open,F]}),_=t&&N,$=t&&!F&&N&&!(null!==n&&void 0!==n&&n.loading),ee=t&&F&&N,ne=t&&!N&&!J&&!F,te=async()=>{if(await(0,S.Nb)(null===n||void 0===n?void 0:n.endpoint))return await v.configBlocklet({input:{did:[y.meta.did],configs:[{key:V.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}}),M(),void x.Z.success(g("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""}));L((e=>({...e,open:!0,prefix:u()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:j.od.create({baseURL:u()(n.url,"space")}).get,extraParams:{appDid:w,appName:B,appDescription:I,scopes:D,appUrl:R,referrer:z,nodeDid:Z,spaceDid:n.did}})))};return(0,o.useEffect)((()=>{null!==T&&void 0!==T&&T.completed?(100===(null===T||void 0===T?void 0:T.progress)?x.Z.success(g("storage.spaces.backupSuccessfully")):-1===(null===T||void 0===T?void 0:T.progress)&&x.Z.error(null===T||void 0===T?void 0:T.message),O(!1),T.progress=0,T.message=""):T.progress&&O(!0)}),[T]),(0,C.jsxs)(ve,{style:{position:"relative"},children:[(0,C.jsxs)(a.Z,{sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...d,children:[(0,C.jsx)(a.Z,{display:"flex",children:(0,C.jsx)(xe.Z,{alt:n.did,src:(0,S.Jf)(n.endpoint)})}),(0,C.jsxs)(a.Z,{className:"spaces-info",display:"flex",flexGrow:(!m||!ee)&&1,minWidth:"180px",flexDirection:ee?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,C.jsxs)(a.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,C.jsx)(s.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),_&&(0,C.jsx)(Q.Z,{label:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ge,{style:{marginRight:"4px"}}),g("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),ne&&(0,C.jsx)(Q.Z,{label:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(fe,{style:{marginRight:"4px"}}),g("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,C.jsx)(a.Z,{className:"spaces-address",display:ee?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,C.jsx)(s.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,C.jsx)(Y.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,C.jsxs)(a.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:m&&ee&&1,children:[$&&(0,C.jsxs)(a.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,C.jsx)(p.Z,{variant:"contained",size:"small",onClick:async()=>{try{if(F)return;O(!0),await c()}catch(e){console.error(e),x.Z.error(e.message)}finally{O(!0)}},children:g("storage.spaces.strategy.backupNow")}),ue.C&&(0,C.jsx)(q.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,C.jsx)(s.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,C.jsx)("span",{children:g("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),ee&&(0,C.jsxs)(a.Z,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!m&&"640px",marginLeft:m&&"16px",width:m&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[(0,C.jsx)(s.Z,{color:"primary",children:null===T||void 0===T?void 0:T.message}),(0,C.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,C.jsx)(a.Z,{sx:{width:"100%",mr:1},children:(0,C.jsx)(H.Z,{color:"primary",variant:"determinate",value:null===T||void 0===T?void 0:T.progress})}),(0,C.jsx)(a.Z,{sx:{maxWidth:"100%"},children:(0,C.jsxs)(s.Z,{variant:"body2",color:"text.secondary",children:[null===T||void 0===T?void 0:T.progress,"%"]})})]})]}),ne&&(0,C.jsx)(a.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,C.jsx)(p.Z,{color:"error",variant:"contained",size:"small",onClick:te,children:g("storage.spaces.disconnected.reconnectNow")})}),(0,C.jsx)(he,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:l,onConnect:te,enableSwitchToSpace:(null===T||void 0===T?void 0:T.completed)||(0,K.isEmpty)(null===T||void 0===T?void 0:T.message)})]})]}),(0,C.jsx)(h.Z,{forceConnected:!1,saveConnect:!1,prefix:P.prefix,open:P.open,popup:!0,action:P.action,baseUrl:P.baseUrl,checkFn:P.checkFn,onSuccess:async(e,t)=>{var o,a;const s=t(e.endpoint),i=(0,S.LQ)(s),r=e.space?t(e.space):{};if(n.did&&i!==n.did)return L((e=>({...e,open:!1}))),void x.Z.error(g("storage.spaces.gateway.switch.failedForMismatchSpace",{name:null!==r&&void 0!==r&&r.name?r.name:""}));const l={...n,name:null!==(o=r.name)&&void 0!==o?o:"DID Space",did:null!==(a=r.did)&&void 0!==a?a:(0,S.LQ)(s),endpoint:s};await U(l),L((e=>({...e,open:!1})))},onClose:P.onClose,checkTimeout:P.checkTimeout,extraParams:P.extraParams,messages:P.messages,locale:f},"get-endpoint"),(0,C.jsx)(a.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,C.jsx)(W.default,{className:"selected-icon"})})]})}fe.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ye.propTypes={spaceGateway:U().shape({did:U().string.isRequired,name:U().string.isRequired,url:U().string.isRequired,endpoint:U().string.isRequired,protected:U().bool,loading:U().bool}).isRequired,connected:U().bool.isRequired,progress:U().any.isRequired,onDelete:U().func,onBackupNow:U().func},ye.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const ve=(0,R.Z)(a.Z)(me||(me=(0,D.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"]))),je=ye;var Ze=t(19778),be=t(75760),Ae=t(75239),Se=t(21722),ke=t(1577),Ce=t.n(ke),we=t(73119);function Be(e){let{...n}=e;const{t:t,locale:o}=(0,i.PE)(),{spaceGateways:r,backups:c}=(0,k.XN)(),d=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:e=>{var n;const{targetUrl:t,targetName:o,status:a,createdAt:i}=c[e],l=a===v.BACKUPS.STATUS.PROGRESS&&Ce()().diff(i,"hours")>=v.BACKUPS.TIMEOUT_HOURS,d=a===v.BACKUPS.STATUS.SUCCEEDED&&!l,p=o||(null===(n=r.find((e=>null===t||void 0===t?void 0:t.includes((0,S.LQ)(null===e||void 0===e?void 0:e.endpoint)))))||void 0===n?void 0:n.name)||"Unknown DID Space";return d?(0,C.jsx)(M.Z,{fontSize:"16px",href:t,target:"_blank",children:p}):(0,C.jsx)(s.Z,{variant:"body1",fontSize:"16px",children:p})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:e=>{const n=t(0===e?"common.auto":"common.manual");return(0,C.jsx)(Ze.Z,{children:n})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:e=>Ce()(e).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:e=>(0,K.isEmpty)(e)?"":Ce()(e).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:e=>{var n;const{status:o,message:i,createdAt:r}=null!==(n=null===c||void 0===c?void 0:c[e])&&void 0!==n?n:{},d=o===v.BACKUPS.STATUS.PROGRESS&&Ce()().diff(r,"hours")>=v.BACKUPS.TIMEOUT_HOURS,p=d&&t("common.timeoutError"),h=o===v.BACKUPS.STATUS.PROGRESS&&!d,m=o===v.BACKUPS.STATUS.SUCCEEDED&&!d;return h?(0,C.jsxs)(s.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,C.jsx)(l.Z,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):m?(0,C.jsx)(Ze.Z,{type:"success",children:t("common.succeeded")}):(0,C.jsxs)(a.Z,{display:"inline-flex",alignItems:"center",children:[(0,C.jsx)(Ze.Z,{type:"error",children:t("common.failed")})," \xa0",(0,C.jsx)(Ae.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:i||p,children:(0,C.jsx)(Se.Z,{children:(0,C.jsx)(we.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,C.jsx)(a.Z,{...n,children:null!==c&&void 0!==c&&c.length?(0,C.jsx)(be.Z,{title:(0,C.jsx)(s.Z,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.backup.records")}),data:c,columns:d,emptyNode:t("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1}}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(a.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,C.jsx)(s.Z,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.backup.records")})}),(0,C.jsx)(a.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:t("storage.spaces.record.emptyData")})]})})}Be.propTypes={};const Ie=Be;function De(e){let{...n}=e;const{t:t}=(0,i.PE)(),{autoBackup:o,updateAutoBackup:a}=(0,k.XN)();return(0,C.jsx)(q.Z,{checked:Boolean(null===o||void 0===o?void 0:o.enabled),onChange:async()=>{try{const e=!o.enabled;await a({enabled:e}),x.Z.success(t(e?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(e){x.Z.error(e.message)}},name:"enableWelcomePage",labelProps:{label:(0,C.jsx)(s.Z,{marginRight:"8px",children:(0,C.jsx)("span",{children:t("storage.spaces.autoBackup.title")})})},style:{...n.style}})}De.propTypes={};const Re=De;const ze=function(){const{t:e}=(0,i.PE)(),{blocklet:n}=(0,r.y0)(),{api:t}=(0,b.h6)(),{spaceGateways:o,spaceGatewaysLoading:c,deleteSpaceGateway:d,spaceGatewayIsSelected:p}=(0,k.XN)(),h=c&&!(null!==o&&void 0!==o&&o.length),m=async n=>{await d(n),x.Z.success(e("storage.spaces.gateway.delete.succeeded",{name:"(".concat(n.name,")")}))},u=async()=>{await t.backupBlocklet({input:{appDid:n.appDid,to:"spaces"}})};return(0,C.jsxs)(a.Z,{display:"flex",flexDirection:"column",children:[(0,C.jsxs)(a.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,C.jsx)(s.Z,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:e("storage.spaces.connected.title")}),(0,C.jsx)(Re,{style:{marginRight:"32px"}}),(0,C.jsx)(B,{})]}),(0,C.jsx)(a.Z,{children:h?(0,C.jsx)(a.Z,{display:"flex",justifyContent:"center",children:(0,C.jsx)(l.Z,{})}):o.map((e=>(0,C.jsx)(je,{style:{marginTop:"12px"},spaceGateway:e,connected:p(e),onDelete:m,onBackupNow:u},e.endpoint)))}),(0,C.jsx)(Ie,{sx:{marginTop:"24px"}}),(0,C.jsx)(s.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,C.jsx)(O,{blocklet:n})]})};function Ue(){const{backupEndpoint:e}=(0,k.XN)();return e?(0,C.jsx)(ze,{}):(0,C.jsx)(J,{})}Ue.propTypes={};const Ee=Ue},54063:(e,n,t)=>{t.d(n,{C:()=>o});const o="true"===localStorage.getItem("enableDebug")},17682:(e,n,t)=>{t.d(n,{Z:()=>v});var o,a,s=t(71171),i=t(5057),r=t(55898),l=t.n(r),c=t(76720),d=t(24202),p=t(25228),h=t(37200),m=t(1733),u=t(74490),x=t(49127),g=t(56556),f=t(47685),y=t(96266);function v(e){const{size:n,color:t,menu:o,children:a,variant:s,onClick:r,menuButtonProps:l,...d}=e,[x,f]=(0,i.useState)(!1),v=(0,i.useRef)(null),b=Array.isArray(o)?o.map(((e,n)=>(0,i.isValidElement)(e)?e:(0,i.createElement)(u.Z,{...e,key:n}))):o;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(j,{variant:s,size:n,color:t,ref:v,...d,children:["function"===typeof a?a():(0,y.jsx)(g.Z,{onClick:r,color:t,children:a}),(0,y.jsx)(g.Z,{onClick:()=>{f((e=>!e))},color:t,...l,"aria-label":"more functions",children:(0,y.jsx)(c.Z,{})})]}),(0,y.jsx)(Z,{open:x,anchorEl:v.current,placement:"bottom-end",disablePortal:!1,children:(0,y.jsx)(p.Z,{children:(0,y.jsx)(h.d,{onClickAway:e=>{v.current&&v.current.contains(e.target)||f(!1)},children:(0,y.jsx)(m.Z,{onClick:e=>{e.target.closest(".MuiMenuItem-root")&&f(!1)},children:b})})})})]})}v.propTypes={size:l().oneOf(["small","medium","large"]),color:l().oneOf(["primary","secondary","inherit"]),menu:l().oneOfType([l().node,l().array]),children:l().node,variant:l().oneOf(["outlined","contained"]),onClick:l().func,menuButtonProps:l().object},v.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:()=>{},menuButtonProps:{}},v.Item=u.Z;const j=(0,f.zo)(x.Z)(o||(o=(0,s.Z)(["\n > .MuiButtonBase-root:last-of-type {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"]))),Z=(0,f.zo)(d.Z)(a||(a=(0,s.Z)(["\n z-index: ",";\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])),(e=>e.theme.zIndex.tooltip))},82790:(e,n,t)=>{t.d(n,{Z:()=>p});var o=t(55898),a=t.n(o),s=t(26174),i=t(16147),r=t(47685),l=t(96266);const c=(0,r.zo)((e=>(0,l.jsx)(i.Z,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...e})))((e=>{let{theme:n}=e;return{width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"dark"===n.palette.mode?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:"light"===n.palette.mode?n.palette.grey[100]:n.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:"light"===n.palette.mode?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"light"===n.palette.mode?"#E9E9EA":"#39393D",opacity:1,transition:n.transitions.create(["background-color"],{duration:500})}}}));function d(e){let{labelProps:n,...t}=e;return n?(0,l.jsx)(s.Z,{control:(0,l.jsx)(c,{...t}),...n}):(0,l.jsx)(c,{...t})}d.propTypes={labelProps:a().object},d.defaultProps={labelProps:null};const p=d},45396:(e,n,t)=>{var o=t(71600);n.Z=void 0;var a=o(t(56930)),s=t(96266),i=(0,a.default)((0,s.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");n.Z=i},47595:(e,n,t)=>{var o=t(71600);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(56930)),s=t(96266),i=(0,a.default)((0,s.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");n.default=i},14482:(e,n,t)=>{var o=t(71600);n.Z=void 0;var a=o(t(56930)),s=t(96266),i=(0,a.default)((0,s.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02z"}),"ElectricBoltOutlined");n.Z=i},85733:(e,n,t)=>{var o=t(71600);n.Z=void 0;var a=o(t(56930)),s=t(96266),i=(0,a.default)((0,s.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"}),"FolderOutlined");n.Z=i},73119:(e,n,t)=>{var o=t(71600);n.Z=void 0;var a=o(t(56930)),s=t(96266),i=(0,a.default)((0,s.jsx)("path",{d:"M11 18h2v-2h-2v2zm1-16C6.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 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"}),"HelpOutline");n.Z=i},21722:(e,n,t)=>{t.d(n,{Z:()=>g});var o=t(7896),a=t(31461),s=t(5057),i=t(9978),r=t(91213),l=t(62773),c=t(42908),d=t(6285),p=t(76083),h=t(96266);const m=["baseClassName","className","color","component","fontSize"],u=(0,l.ZP)("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,"inherit"!==t.color&&n["color".concat((0,d.Z)(t.color))],n["fontSize".concat((0,d.Z)(t.fontSize))]]}})((e=>{let{theme:n,ownerState:t}=e;return{userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:n.typography.pxToRem(20),medium:n.typography.pxToRem(24),large:n.typography.pxToRem(36)}[t.fontSize],color:{primary:(n.vars||n).palette.primary.main,secondary:(n.vars||n).palette.secondary.main,info:(n.vars||n).palette.info.main,success:(n.vars||n).palette.success.main,warning:(n.vars||n).palette.warning.main,action:(n.vars||n).palette.action.active,error:(n.vars||n).palette.error.main,disabled:(n.vars||n).palette.action.disabled,inherit:void 0}[t.color]}})),x=s.forwardRef((function(e,n){const t=(0,c.Z)({props:e,name:"MuiIcon"}),{baseClassName:s="material-icons",className:l,color:x="inherit",component:g="span",fontSize:f="medium"}=t,y=(0,a.Z)(t,m),v=(0,o.Z)({},t,{baseClassName:s,color:x,component:g,fontSize:f}),j=(e=>{const{color:n,fontSize:t,classes:o}=e,a={root:["root","inherit"!==n&&"color".concat((0,d.Z)(n)),"fontSize".concat((0,d.Z)(t))]};return(0,r.Z)(a,p.d,o)})(v);return(0,h.jsx)(u,(0,o.Z)({as:g,className:(0,i.Z)(s,"notranslate",j.root,l),ownerState:v,"aria-hidden":!0,ref:n},y))}));x.muiName="Icon";const g=x},76083:(e,n,t)=>{t.d(n,{Z:()=>i,d:()=>s});var o=t(31821),a=t(18561);function s(e){return(0,a.Z)("MuiIcon",e)}const i=(0,o.Z)("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"])}}]);